From 5b1182be52b0259b94df3796906796c66f94857a Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Tue, 9 Jul 2024 12:41:03 +0200 Subject: [PATCH 01/37] feat: echidna and halmos bmath bnum protocol --- .solhintignore | 1 + package.json | 3 +- remappings.txt | 1 + test/SUMMARY.md | 67 +++ test/invariant/AdvancedTestsUtils.sol | 60 +++ test/invariant/PROPERTIES.md | 98 ++++ test/invariant/fuzz/config.yaml | 5 + test/invariant/fuzz/external/Protocol.t.sol | 89 ++++ test/invariant/fuzz/internal/BNum.t.sol | 477 ++++++++++++++++++++ test/invariant/symbolic/BMath.t.sol | 32 ++ test/invariant/symbolic/BNum.t.sol | 470 +++++++++++++++++++ yarn.lock | 10 +- 12 files changed, 1309 insertions(+), 4 deletions(-) create mode 100644 test/SUMMARY.md create mode 100644 test/invariant/AdvancedTestsUtils.sol create mode 100644 test/invariant/PROPERTIES.md create mode 100644 test/invariant/fuzz/config.yaml create mode 100644 test/invariant/fuzz/external/Protocol.t.sol create mode 100644 test/invariant/fuzz/internal/BNum.t.sol create mode 100644 test/invariant/symbolic/BMath.t.sol create mode 100644 test/invariant/symbolic/BNum.t.sol diff --git a/.solhintignore b/.solhintignore index 0790ddf4..4a5716f9 100644 --- a/.solhintignore +++ b/.solhintignore @@ -1,2 +1,3 @@ test/smock/* test/manual-smock/* +test/invariant/* \ No newline at end of file diff --git a/package.json b/package.json index 04721367..f9a416c9 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,8 @@ "@defi-wonderland/natspec-smells": "1.1.3", "@defi-wonderland/smock-foundry": "1.5.0", "forge-gas-snapshot": "github:marktoda/forge-gas-snapshot#9161f7c", - "forge-std": "github:foundry-rs/forge-std#5475f85", + "forge-std": "github:foundry-rs/forge-std#1.8.2", + "halmos-cheatcodes": "github:a16z/halmos-cheatcodes#c0d8655", "husky": ">=8", "lint-staged": ">=10", "solhint-community": "4.0.0", diff --git a/remappings.txt b/remappings.txt index 5b011a43..0f64872c 100644 --- a/remappings.txt +++ b/remappings.txt @@ -5,6 +5,7 @@ solmate/=node_modules/solmate/src @cowprotocol/=node_modules/@cowprotocol/contracts/src/contracts cowprotocol/=node_modules/@cowprotocol/contracts/src/ @composable-cow/=node_modules/composable-cow/ +halmos-cheatcodes=node_modules/halmos-cheatcodes contracts/=src/contracts interfaces/=src/interfaces diff --git a/test/SUMMARY.md b/test/SUMMARY.md new file mode 100644 index 00000000..5d254ea8 --- /dev/null +++ b/test/SUMMARY.md @@ -0,0 +1,67 @@ +# Outline + +There are 7 files to cover (B(cow)Const are contracts containing public protocol-wide constants): +BCoWFactory: deployer for cow pools +BCoWPool: adding signature validation to BPool +BFactory: deployer, approx 40sloc +BMath: contract wrapping math logic +BNum: contract wrapping arithmetic op +BPool: the main contract, roughly 400sloc +BToken: extends erc20 + +## Interdependencies +BCoWFactory deploys a bcowpool +BCoWPool is a bpool which adds signature validation +Factory deploys a pool and can "collect" from the pool +Pool inherit btoken (which represents a LP) and bmath +Bmath uses bnum + +## Approach + +Echidna should be prioritized, then halmos should be particularly easy especially for the math libs, for which the implementations will be pretty similar. + +Then slither-mutate on the whole test base + +Setup for protocol-wide *looks* pretty simple (using the factory) - tbc + +## Notes +The bmath corresponding equations are: + +`Spot price:` +$\text{spotPrice} = \frac{\text{tokenBalanceIn}/\text{tokenWeightIn}}{\text{tokenBalanceOut}/\text{tokenWeightOut}} \cdot \frac{1}{1 - \text{swapFee}}$ + + +`Out given in:` +$\text{tokenAmountOut} = \text{tokenBalanceOut} \cdot \left( 1 - \left( \frac{\text{tokenBalanceIn}}{\text{tokenBalanceIn} + \left( \text{tokenAmountIn} \cdot \left(1 - \text{swapFee}\right)\right)} \right)^{\frac{\text{tokenWeightIn}}{\text{tokenWeightOut}}} \right)$ + + +`In given out:` +$\text{tokenAmountIn} = \frac{\text{tokenBalanceIn} \cdot \left( \frac{\text{tokenBalanceOut}}{\text{tokenBalanceOut} - \text{tokenAmountOut}} \right)^{\frac{\text{tokenWeightOut}}{\text{tokenWeightIn}}} - 1}{1 - \text{swapFee}}$ + + +`Pool out given single in` +$\text{poolAmountOut} = \left(\frac{\text{tokenAmountIn} \cdot \left(1 - \left(1 - \frac{\text{tokenWeightIn}}{\text{totalWeight}}\right) \cdot \text{swapFee}\right) + \text{tokenBalanceIn}}{\text{tokenBalanceIn}}\right)^{\frac{\text{tokenWeightIn}}{\text{totalWeight}}} \cdot \text{poolSupply} - \text{poolSupply}$ + + +`Single in given pool out` +$\text{tokenAmountIn} = \frac{\left(\frac{\text{poolSupply} + \text{poolAmountOut}}{\text{poolSupply}}\right)^{\frac{1}{\frac{\text{weightIn}}{\text{totalWeight}}}} \cdot \text{balanceIn} - \text{balanceIn}}{\left(1 - \frac{\text{weightIn}}{\text{totalWeight}}\right) \cdot \text{swapFee}}$ + + +`Single out given pool in` +$\text{tokenAmountOut} = \left( \text{tokenBalanceOut} - \left( \frac{\text{poolSupply} - \left(\text{poolAmountIn} \cdot \left(1 - \text{exitFee}\right)\right)}{\text{poolSupply}} \right)^{\frac{1}{\frac{\text{tokenWeightOut}}{\text{totalWeight}}}} \cdot \text{tokenBalanceOut} \right) \cdot \left(1 - \left(1 - \frac{\text{tokenWeightOut}}{\text{totalWeight}}\right) \cdot \text{swapFee}\right)$ + + +`Pool in given single out` +$\text{poolAmountIn} = \frac{\text{poolSupply} - \left( \frac{\text{tokenBalanceOut} - \frac{\text{tokenAmountOut}}{1 - \left(1 - \frac{\text{tokenWeightOut}}{\text{totalWeight}}\right) \cdot \text{swapFee}}}{\text{tokenBalanceOut}} \right)^{\frac{\text{tokenWeightOut}}{\text{totalWeight}}} \cdot \text{poolSupply}}{1 - \text{exitFee}}$ + + +BNum bpow is based on exponentiation by squaring and hold true because (see dapphub dsmath): https://github.com/dapphub/ds-math/blob/e70a364787804c1ded9801ed6c27b440a86ebd32/src/math.sol#L62 +``` + // If n is even, then x^n = (x^2)^(n/2). + // If n is odd, then x^n = x * x^(n-1), + // and applying the equation for even x gives + // x^n = x * (x^2)^((n-1) / 2). + // + // Also, EVM division is flooring and + // floor[(n-1) / 2] = floor[n / 2]. +``` \ No newline at end of file diff --git a/test/invariant/AdvancedTestsUtils.sol b/test/invariant/AdvancedTestsUtils.sol new file mode 100644 index 00000000..59e0936f --- /dev/null +++ b/test/invariant/AdvancedTestsUtils.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.25; + +import {MockERC20} from 'forge-std/mocks/MockERC20.sol'; +import {SymTest} from 'halmos-cheatcodes/src/SymTest.sol'; + +interface IHevm { + function prank(address) external; +} + +contract FuzzERC20 is MockERC20 { + function mint(address _to, uint256 _amount) public { + _mint(_to, _amount); + } + + function burn(address _from, uint256 _amount) public { + _burn(_from, _amount); + } +} + +contract AgentsHandler { + uint256 internal agentsIndex; + address[] internal agents; + + address internal currentCaller; + + modifier AgentOrDeployer() { + uint256 _currentAgentIndex = agentsIndex; + currentCaller = _currentAgentIndex == 0 ? address(this) : agents[agentsIndex]; + _; + } + + constructor(uint256 _numAgents) { + for (uint256 i = 0; i < _numAgents; i++) { + agents.push(address(bytes20(keccak256(abi.encodePacked(i))))); + } + } + + function nextAgent() public { + agentsIndex = (agentsIndex + 1) % agents.length; + } + + function getCurrentAgent() public view returns (address) { + return agents[agentsIndex]; + } +} + +contract EchidnaTest is AgentsHandler { + event AssertionFailed(); + + IHevm hevm = IHevm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); + + constructor() AgentsHandler(5) {} + + function clamp(uint256 _value, uint256 _min, uint256 _max) internal returns (uint256) { + return _min + (_value % (_max - _min)); + } +} + +contract HalmosTest is SymTest {} diff --git a/test/invariant/PROPERTIES.md b/test/invariant/PROPERTIES.md new file mode 100644 index 00000000..c4eeacbc --- /dev/null +++ b/test/invariant/PROPERTIES.md @@ -0,0 +1,98 @@ +| Properties | Type | +| ----------------------------------------------------------------------------------------------------------- | ---------- | +| BFactory should always be able to deploy new pools | Unit | +| BFactory's blab should always be modifiable by the current blabs | Unit | +| BFactory should always be able to transfer the BToken to the blab, if called by it | Unit | +| BToken increaseApproval should increase the approval of the address by the amount | Variable transition | +| BToken decreaseApproval should decrease the approval to max(old-amount, 0) | Variable transition | +| BToken should not break the ToB ERC20 properties (https://github.com/crytic/properties?tab=readme-ov-file#erc20-tests) | High level | +| an exact amount in should always earn the amount out calculated in bmath | High level | +| an exact amount out is earned only if the amount in calculated in bmath is transfered | High level | +| there can't be any amount out for a 0 amount in | High level | +| the amount received can never be less than min amount out | Unit | +| the amount spent can never be greater than max amount in | Unit | +| the pool btoken can only be minted/burned in the join and exit operations | High level | +| a direct token transfer can never reduce the underlying amount of a given token per BPT | High level | +| the amount of underlying token when exiting should always be the amount calculated in bmath | High level | +| a pool can either be finalized or not finalized | Valid state | +| a finalized pool cannot switch back to non-finalized | State transition | +| a non-finalized pool can only be finalized when the controller calls finalize() | State transition | +| a swap can only happen when the pool is finalized | High level | +| bounding and unbounding token can only be done on a non-finalized pool, by the controller | High level | +| there always should be between MIN_BOUND_TOKENS and MAX_BOUND_TOKENS bound in a pool | High level | +| total weight can be up to 50e18 | Variable transition | +| swap fee can only be 0 (cow pool) +only the settler can commit a hash +when a hash has been commited, only this order can be settled + + + +Unit for the math libs (BNum and BMath): + +btoi should always return the floor(a / BONE) == (a - a%BONE) / BONE +bfloor should always return (a - a % BONE) +badd should be commutative +badd should be associative +0 should be identity for badd +badd result should always be gte its terms +badd should never sum terms which have a sum gt uint max +badd should have bsub as reverse operation + +bsub should not be commutative +bsub should not be associative +bsub should have 0 as identity +bsub result should always be lte its terms +bsub should alway revert if b > a (duplicate with previous tho) + +bsubSign result should always be negative if b > a +bsubSign result should always be positive if a > b +bsubSign result should always be 0 if a == b + +bmul should be commutative +bmul should be associative +bmul should be distributive +1 should be identity for bmul +0 should be absorbing for mul +bmul result should always be gte a and b + +bdiv should be bmul reverse operation // <-- unsolved +1 should be identity for bdiv +bdiv should revert if b is 0 // <-- impl with wrapper to have low lvl call +bdiv result should be lte a + +bpowi should return 1 if exp is 0 +0 should be absorbing if base +1 should be identity if base +1 should be identity if exp +bpowi should be distributive over mult of the same base x^a * x^b == x^(a+b) +bpowi should be distributive over mult of the same exp a^x * b^x == (a*b)^x +power of a power should mult the exp (x^a)^b == x^(a*b) + +bpow should return 1 if exp is 0 +0 should be absorbing if base +1 should be identity if base +1 should be identity if exp +bpow should be distributive over mult of the same base x^a * x^b == x^(a+b) +bpow should be distributive over mult of the same exp a^x * b^x == (a*b)^x +power of a power should mult the exp (x^a)^b == x^(a*b) + + +bpowApprox + +calcOutGivenIn + +calcOutGivenIn should be inv with calcInGivenOut + +calcInGivenOut + +calcPoolOutGivenSingleIn + +calcPoolOutGivenSingleIn should be inv with calcSingleInGivenPoolOut + +calcSingleInGivenPoolOut + +calcSingleOutGivenPoolIn + +calcSingleOutGivenPoolIn should be inv with calcPoolInGivenSingleOut + +calcPoolInGivenSingleOut \ No newline at end of file diff --git a/test/invariant/fuzz/config.yaml b/test/invariant/fuzz/config.yaml new file mode 100644 index 00000000..92d3e480 --- /dev/null +++ b/test/invariant/fuzz/config.yaml @@ -0,0 +1,5 @@ +# https://github.com/crytic/echidna/blob/master/tests/solidity/basic/default.yaml for more options +testMode: assertion +corpusDir: test/invariant/fuzz/corpus/ +coverageFormats: ["html","lcov"] +allContracts: true \ No newline at end of file diff --git a/test/invariant/fuzz/external/Protocol.t.sol b/test/invariant/fuzz/external/Protocol.t.sol new file mode 100644 index 00000000..44fc0ceb --- /dev/null +++ b/test/invariant/fuzz/external/Protocol.t.sol @@ -0,0 +1,89 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.25; + +import {EchidnaTest, FuzzERC20} from '../../AdvancedTestsUtils.sol'; +import {BConst} from 'contracts/BConst.sol'; +import {BFactory, IBPool} from 'contracts/BFactory.sol'; + +contract EchidnaBalancer is EchidnaTest { + // System under test + BFactory factory; + BConst bconst; + FuzzERC20 tokenA; + FuzzERC20 tokenB; + + mapping(address => bool) alreadyMinted; + + IBPool[] deployedPools; + + constructor() { + tokenA = new FuzzERC20(); + tokenB = new FuzzERC20(); + tokenA.initialize('', '', 18); + tokenB.initialize('', '', 18); + + factory = new BFactory(); + bconst = new BConst(); + } + + function setup_mint(uint256 _amountA, uint256 _amountB) public AgentOrDeployer { + if (!alreadyMinted[currentCaller]) { + alreadyMinted[currentCaller] = true; + tokenA.mint(currentCaller, _amountA); + tokenB.mint(currentCaller, _amountB); + } + } + + function setup_poolLiquidity( + uint256 _amountA, + uint256 _amountB, + uint256 _denormA, + uint256 _denormB, + uint256 _poolIndex + ) public { + require(_amountA >= bconst.MIN_BALANCE() && _amountB >= bconst.MIN_BALANCE()); + require(_denormA + _denormB <= bconst.MAX_TOTAL_WEIGHT()); + + _poolIndex = _poolIndex % deployedPools.length; + IBPool pool = deployedPools[_poolIndex]; + + tokenA.approve(address(pool), _amountA); + tokenB.approve(address(pool), _amountB); + pool.bind(address(tokenA), _amountA, _denormA); + pool.bind(address(tokenB), _amountB, _denormB); + pool.finalize(); + } + + // Probably wants to have a pool setup with more than 2 tokens too + swap + + function fuzz_BFactoryAlwaysDeploy() public AgentOrDeployer { + hevm.prank(currentCaller); + IBPool _newPool = factory.newBPool(); + + deployedPools.push(_newPool); + + assert(address(_newPool).code.length > 0); + assert(factory.isBPool(address(_newPool))); + assert(!_newPool.isFinalized()); + } + + function fuzz_blabAlwaysModByBLab() public AgentOrDeployer { + address _currentBLab = factory.getBLabs(); + + hevm.prank(currentCaller); + + try factory.setBLabs(address(123)) { + assert(_currentBLab == currentCaller); + } catch { + assert(_currentBLab != currentCaller); + } + } + + function fuzz_alwayCollect() public AgentOrDeployer {} + + function fuzz_increaseApproval() public AgentOrDeployer {} + + function fuzz_decreaseApproval() public AgentOrDeployer {} + + function fuzz_correctOutForExactIn() public AgentOrDeployer {} +} diff --git a/test/invariant/fuzz/internal/BNum.t.sol b/test/invariant/fuzz/internal/BNum.t.sol new file mode 100644 index 00000000..125302db --- /dev/null +++ b/test/invariant/fuzz/internal/BNum.t.sol @@ -0,0 +1,477 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.25; + +import {EchidnaTest} from '../../AdvancedTestsUtils.sol'; + +import {BNum} from 'contracts/BNum.sol'; + +contract EchidnaBNum is BNum, EchidnaTest { + function bsub_exposed(uint256 a, uint256 b) external pure returns (uint256) { + return bsub(a, b); + } + ///////////////////////////////////////////////////////////////////// + // Bnum::btoi // + ///////////////////////////////////////////////////////////////////// + + // btoi should always return the floor(a / BONE) == (a - a%BONE) / BONE + // TODO: Too tightly coupled + function btoi_alwaysFloor(uint256 _input) public pure { + // action + uint256 _result = btoi(_input); + + // post-conditionn + assert(_result == _input / BONE); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::bfloor // + ///////////////////////////////////////////////////////////////////// + + // btoi should always return the floor(a / BONE) == (a - a%BONE) / BONE + function bfloor_shouldAlwaysRoundDown(uint256 _input) public pure { + // action + uint256 _result = bfloor(_input); + + // post condition + assert(_result == (_input / BONE) * BONE); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::badd // + ///////////////////////////////////////////////////////////////////// + + // badd should be commutative + function baddCommut(uint256 _a, uint256 _b) public pure { + // action + uint256 _result1 = badd(_a, _b); + uint256 _result2 = badd(_b, _a); + + // post condition + assert(_result1 == _result2); + } + + // badd should be associative + function badd_assoc(uint256 _a, uint256 _b, uint256 _c) public pure { + // action + uint256 _result1 = badd(badd(_a, _b), _c); + uint256 _result2 = badd(_a, badd(_b, _c)); + + // post condition + assert(_result1 == _result2); + } + + // 0 should be identity for badd + function badd_zeroIdentity(uint256 _a) public pure { + // action + uint256 _result = badd(_a, 0); + + // post condition + assert(_result == _a); + } + + // badd result should always be gte its terms + function badd_resultGTE(uint256 _a, uint256 _b) public pure { + // action + uint256 _result = badd(_a, _b); + + // post condition + assert(_result >= _a); + assert(_result >= _b); + } + + // badd should never sum terms which have a sum gt uint max + function badd_overflow(uint256 _a, uint256 _b) public pure { + // precondition + // vm.assume(_a != type(uint256).max); + + // action + uint256 _result = badd(_a, _b); + + // post condition + assert(_result == _a + _b); + } + + // badd should have bsub as reverse operation + function badd_bsub(uint256 _a, uint256 _b) public pure { + // action + uint256 _result = badd(_a, _b); + uint256 _result2 = bsub(_result, _b); + + // post condition + assert(_result2 == _a); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::bsub // + ///////////////////////////////////////////////////////////////////// + + // bsub should not be commutative + function bsub_notCommut(uint256 _a, uint256 _b) public pure { + // precondition + require(_a != _b); + + // action + uint256 _result1 = bsub(_a, _b); + uint256 _result2 = bsub(_b, _a); + + // post condition + assert(_result1 != _result2); + } + + // bsub should not be associative + function bsub_notAssoc(uint256 _a, uint256 _b, uint256 _c) public pure { + // precondition + require(_a != _b && _b != _c && _a != _c); + require(_a != 0 && _b != 0 && _c != 0); + + // action + uint256 _result1 = bsub(bsub(_a, _b), _c); + uint256 _result2 = bsub(_a, bsub(_b, _c)); + + // post condition + assert(_result1 != _result2); + } + + // bsub should have 0 as identity + function bsub_zeroIdentity(uint256 _a) public pure { + // action + uint256 _result = bsub(_a, 0); + + // post condition + assert(_result == _a); + } + + // bsub result should always be lte a (underflow reverts) + function bsub_resultLTE(uint256 _a, uint256 _b) public pure { + // action + uint256 _result = bsub(_a, _b); + + // post condition + assert(_result <= _a); + } + + // bsub should alway revert if b > a + function bsub_revert(uint256 _a, uint256 _b) public { + require(_b > _a); + + (bool succ,) = address(this).call(abi.encodeCall(EchidnaBNum.bsub_exposed, (_a, _b))); + assert(!succ); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::bsubSign // + ///////////////////////////////////////////////////////////////////// + + // bsubSign result should always be negative if b > a + function bsubSign_negative(uint256 _a, uint256 _b) public pure { + // precondition + require(_b > _a); + + // action + (uint256 _result, bool _flag) = bsubSign(_a, _b); + + // post condition + assert(_result == _b - _a); + assert(_flag); + } + + // bsubSign result should always be positive if a > b + function bsubSign_positive(uint256 _a, uint256 _b) public pure { + // precondition + require(_a > _b); + + // action + (uint256 _result, bool _flag) = bsubSign(_a, _b); + + // post condition + assert(_result == _a - _b); + assert(!_flag); + } + + // bsubSign result should always be 0 if a == b + function bsubSign_zero(uint256 _a) public pure { + // action + (uint256 _result, bool _flag) = bsubSign(_a, _a); + + // post condition + assert(_result == 0); + assert(!_flag); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::bmul // + ///////////////////////////////////////////////////////////////////// + + // bmul should be commutative + function bmul_commutative(uint256 _a, uint256 _b) public pure { + // action + uint256 _result1 = bmul(_a, _b); + uint256 _result2 = bmul(_b, _a); + + // post condition + assert(_result1 == _result2); + } + + //todo this one fails + // bmul should be associative + function bmul_associative(uint256 _a, uint256 _b, uint256 _c) public pure { + // precondition + require(_a >= BONE); + require(_b >= BONE); + require(_c >= BONE); + + require(_a < type(uint256).max / _b); // Avoid mul overflow + require(_b < type(uint256).max / _c); // Avoid mul overflow + require(_a * _b + _c / 2 < type(uint256).max); // Avoid add overflow + + // action + uint256 _result1 = bmul(bmul(_a, _b), _c); + uint256 _result2 = bmul(_a, bmul(_b, _c)); + + // post condition + assert(_result1 == _result2); + } + + //todo hangs + // bmul should be distributive + function bmul_distributive(uint256 _a, uint256 _b, uint256 _c) public pure { + uint256 _result1 = bmul(_a, badd(_b, _c)); + uint256 _result2 = badd(bmul(_a, _b), bmul(_a, _c)); + assert(_result1 == _result2); + } + + //todo + // 1 should be identity for bmul + function bmul_identity(uint256 _a) public pure { + // vm.assume(_a < type(uint256).max / BONE); // Avoid mul overflow + uint256 _result = bmul(_a, BONE); + assert(_result == _a); + } + + // 0 should be absorbing for mul + function bmul_absorbing(uint256 _a) public pure { + // action + uint256 _result = bmul(_a, 0); + + // post condition + assert(_result == 0); + } + + //todo + //➜ bmul(57896044618658097711785492504343953926634992332820282019728792003956564819968, 1) >= 57896044618658097711785492504343953926634992332820282019728792003956564819968 + // Type: bool + // └ Value: false + // bmul result should always be gte a and b + function bmul_resultGTE(uint256 _a, uint256 _b) public pure { + require(_a >= BONE && _b >= BONE); // Avoid absorbing + require(_a < type(uint256).max / BONE); // Avoid mul overflow + require(_b < type(uint256).max / BONE); // Avoid mul overflow + require(_a * BONE + _b / 2 < type(uint256).max); // Avoid add overflow + + uint256 _result = bmul(_a, _b); + + assert(_result >= _a); + assert(_result >= _b); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::bdiv // + ///////////////////////////////////////////////////////////////////// + + //todo: Halmos times out vs foundry passes + // 1 should be identity for bdiv + function bdiv_identity(uint256 _a) public pure { + // vm.assume(_a < type(uint256).max / BONE); // Avoid add overflow + uint256 _result = bdiv(_a, BONE); + assert(_result == _a); + } + + // uint256[] public fixtureA = [ + // BONE, + // BONE * 2, + // BONE / 2, + // BONE * 2 - 1, + // BONE * 2 + 1, + // BONE / 2 - 1, + // BONE / 2 + 1, + // BONE * 3, + // BONE * 4, + // BONE * 5, + // BONE * 6, + // BONE * 7, + // BONE * 8, + // BONE * 9, + // BONE * 10, + // type(uint256).max / 10**18, + // type(uint256).max / 10**18 - 1, + // type(uint256).max / 10**18 - 10, + // type(uint256).max / 10**18 - BONE / 2, + // type(uint256).max / 10**18 - BONE / 2 + 1, + // type(uint256).max / 10**18 - BONE / 2 - 1, + // type(uint256).max / 10**18 - BONE / 2 - 10, + // 0, + // 1, + // 2 + // ]; + + // /// forge-config: default.fuzz.runs = 1000000 + // function test_bdiv_identity(uint256 a) public pure { + // a = bound(a, 0, type(uint256).max / 10**18); + // uint256 _result = bdiv(a, BONE); + // assertEq(_result, a); + // } + + //todo + // bdiv should revert if b is 0 + // function bdiv_revert(uint256 _a) public pure { + // } + + //todo hangs + // bdiv result should be lte a + function test_bdiv_resultLTE(uint256 _a, uint256 _b) public pure { + // vm.assume(_b != 0); + // vm.assume(_a < type(uint256).max / BONE); // Avoid mul overflow + //todo: overconstrained next line? Too tightly coupled? + // vm.assume(_a * BONE + _b / 2 < type(uint256).max); // Avoid add overflow + + uint256 _result = bdiv(_a, _b); + assert(_result <= _a * BONE); + } + + //todo hangs + // bdiv should be bmul reverse operation + function bdiv_bmul(uint256 _a, uint256 _b) public pure { + require(_b > 0); + require(_a > _b); // todo: overconstrained? + + uint256 _bdivResult = bdiv(_a, _b); + uint256 _result = bmul(_bdivResult, _b); + + assert(_result == _a); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::bpowi // + ///////////////////////////////////////////////////////////////////// + + // bpowi should return 1 if exp is 0 + function bpowi_zeroExp(uint256 _a) public pure { + // action + uint256 _result = bpowi(_a, 0); + + // post condition + assert(_result == BONE); + } + + // 0 should be absorbing if base + function bpowi_absorbingBase(uint256 _exp) public pure { + require(_exp != 0); // Consider 0^0 as undetermined + + uint256 _result = bpowi(0, _exp); + assert(_result == 0); + } + + //todo echidna (loop unrolling bound hit) + // 1 should be identity if base + function bpowi_identityBase(uint256 _exp) public pure { + uint256 _result = bpowi(BONE, _exp); + assert(_result == BONE); + } + + // 1 should be identity if exp + function bpowi_identityExp(uint256 _base) public pure { + require(_base >= BONE); + + uint256 _result = bpowi(_base, BONE); + + assert(_result == _base); + } + + // bpowi should be distributive over mult of the same base x^a x^b == x^(a+b) + function bpowi_distributiveBase(uint256 _base, uint256 _a, uint256 _b) public pure { + require(_a >= BONE && _b >= BONE); + + uint256 _result1 = bpowi(_base, badd(_a, _b)); + uint256 _result2 = bmul(bpowi(_base, _a), bpowi(_base, _b)); + assert(_result1 == _result2); + } + + // bpowi should be distributive over mult of the same exp a^x b^x == (ab)^x + function bpowi_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public pure { + uint256 _result1 = bpowi(bmul(_a, _b), _exp); + uint256 _result2 = bmul(bpowi(_a, _exp), bpowi(_b, _exp)); + assert(_result1 == _result2); + } + + // power of a power should mult the exp (x^a)^b == x^(ab) + function bpowi_powerOfPower(uint256 _base, uint256 _a, uint256 _b) public pure { + require(_a >= BONE); + require(_b >= BONE); + + uint256 _result1 = bpowi(bpowi(_base, _a), _b); + uint256 _result2 = bpowi(_base, bmul(_a, _b)); + assert(_result1 == _result2); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::bpow // + ///////////////////////////////////////////////////////////////////// + + // bpow should return 1 if exp is 0 + function bpow_zeroExp(uint256 _a) public pure { + // action + uint256 _result = bpow(_a, 0); + + // post condition + assert(_result == BONE); + } + + //todo min base is 1wei -> can never be 0 instead (echidna) + // 0 should be absorbing if base + function bpow_absorbingBase(uint256 _exp) public pure { + uint256 _result = bpow(0, _exp); + assert(_result == 0); + } + + //todo echidna (loop unrolling bound hit) + // 1 should be identity if base + function bpow_identityBase(uint256 _exp) public pure { + uint256 _result = bpow(BONE, _exp); + assert(_result == BONE); + } + + // 1 should be identity if exp + function bpow_identityExp(uint256 _base) public pure { + // action + uint256 _result = bpow(_base, BONE); + + // post condition + assert(_result == _base); + } + + //todo infinite loop + // bpow should be distributive over mult of the same base x^a * x^b == x^(a+b) + function bpow_distributiveBase(uint256 _base, uint256 _a, uint256 _b) public pure { + uint256 _result1 = bpow(_base, badd(_a, _b)); + uint256 _result2 = bmul(bpow(_base, _a), bpow(_base, _b)); + assert(_result1 == _result2); + } + + //todo loop + // bpow should be distributive over mult of the same exp a^x * b^x == (a*b)^x + function bpow_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public pure { + require(_exp >= BONE); + + uint256 _result1 = bpow(bmul(_a, _b), _exp); + uint256 _result2 = bmul(bpow(_a, _exp), bpow(_b, _exp)); + assert(_result1 == _result2); + } + + // todo + // power of a power should mult the exp (x^a)^b == x^(a*b) + function bpow_powerOfPower(uint256 _base, uint256 _a, uint256 _b) public pure { + uint256 _result1 = bpow(bpow(_base, _a), _b); + uint256 _result2 = bpow(_base, bmul(_a, _b)); + assert(_result1 == _result2); + } +} diff --git a/test/invariant/symbolic/BMath.t.sol b/test/invariant/symbolic/BMath.t.sol new file mode 100644 index 00000000..96af26dd --- /dev/null +++ b/test/invariant/symbolic/BMath.t.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.25; + +import {HalmosTest} from '../AdvancedTestsUtils.sol'; +import {BMath} from 'contracts/BMath.sol'; + +contract SymbolicBMath is BMath, HalmosTest { +// todo crashes (pow -> loop...) +// calcOutGivenIn should be inv with calcInGivenOut +// function check_calcOutGivenInEquiv() public { +// uint256 tokenBalanceIn = svm.createUint256('tokenBalanceIn'); +// uint256 tokenWeightIn = svm.createUint256('tokenWeightIn'); +// uint256 tokenBalanceOut = svm.createUint256('tokenBalanceOut'); +// uint256 tokenWeightOut = svm.createUint256('tokenWeightOut'); +// uint256 tokenAmountIn = svm.createUint256('tokenAmountIn'); +// uint256 swapFee = svm.createUint256('swapFee'); + +// vm.assume(tokenWeightIn != 0); +// vm.assume(tokenWeightOut != 0); +// vm.assume(tokenAmountIn != 0); +// vm.assume(tokenBalanceIn > BONE - swapFee); + +// uint256 tokenAmountOut = calcOutGivenIn(tokenBalanceIn, tokenWeightIn, tokenBalanceOut, tokenWeightOut, tokenAmountIn, swapFee); +// vm.assume(tokenAmountOut != tokenBalanceOut); + +// uint256 tokenAmountIn2 = calcInGivenOut(tokenBalanceOut, tokenWeightOut, tokenBalanceIn, tokenWeightIn, tokenAmountOut, swapFee); + +// assert(tokenAmountIn == tokenAmountIn2); +// } +// calcPoolOutGivenSingleIn should be inv with calcSingleInGivenPoolOut +// calcSingleOutGivenPoolIn should be inv with calcPoolInGivenSingleOut +} diff --git a/test/invariant/symbolic/BNum.t.sol b/test/invariant/symbolic/BNum.t.sol new file mode 100644 index 00000000..49a8f94a --- /dev/null +++ b/test/invariant/symbolic/BNum.t.sol @@ -0,0 +1,470 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.25; + +import {HalmosTest} from '../AdvancedTestsUtils.sol'; +import {BNum} from 'contracts/BNum.sol'; +import {Test} from 'forge-std/Test.sol'; + +contract SymbolicBNum is BNum, Test, HalmosTest { + ///////////////////////////////////////////////////////////////////// + // Bnum::btoi // + ///////////////////////////////////////////////////////////////////// + + // btoi should always return the floor(a / BONE) == (a - a%BONE) / BONE + // TODO: Too tightly coupled + function check_btoi_alwaysFloor(uint256 _input) public pure { + // action + uint256 _result = btoi(_input); + + // post-conditionn + assert(_result == _input / BONE); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::bfloor // + ///////////////////////////////////////////////////////////////////// + + // btoi should always return the floor(a / BONE) == (a - a%BONE) / BONE + function check_bfloor_shouldAlwaysRoundDown(uint256 _input) public pure { + // action + uint256 _result = bfloor(_input); + + // post condition + assert(_result == (_input / BONE) * BONE); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::badd // + ///////////////////////////////////////////////////////////////////// + + // badd should be commutative + function check_baddCommut(uint256 _a, uint256 _b) public pure { + // action + uint256 _result1 = badd(_a, _b); + uint256 _result2 = badd(_b, _a); + + // post condition + assert(_result1 == _result2); + } + + // badd should be associative + function check_badd_assoc(uint256 _a, uint256 _b, uint256 _c) public pure { + // action + uint256 _result1 = badd(badd(_a, _b), _c); + uint256 _result2 = badd(_a, badd(_b, _c)); + + // post condition + assert(_result1 == _result2); + } + + // 0 should be identity for badd + function check_badd_zeroIdentity(uint256 _a) public pure { + // action + uint256 _result = badd(_a, 0); + + // post condition + assert(_result == _a); + } + + // badd result should always be gte its terms + function check_badd_resultGTE(uint256 _a, uint256 _b) public pure { + // action + uint256 _result = badd(_a, _b); + + // post condition + assert(_result >= _a); + assert(_result >= _b); + } + + // badd should never sum terms which have a sum gt uint max + function check_badd_overflow(uint256 _a, uint256 _b) public pure { + // precondition + vm.assume(_a != type(uint256).max); + + // action + uint256 _result = badd(_a, _b); + + // post condition + assert(_result == _a + _b); + } + + // badd should have bsub as reverse operation + function check_badd_bsub(uint256 _a, uint256 _b) public pure { + // action + uint256 _result = badd(_a, _b); + uint256 _result2 = bsub(_result, _b); + + // post condition + assert(_result2 == _a); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::bsub // + ///////////////////////////////////////////////////////////////////// + + // bsub should not be commutative + function check_bsub_notCommut(uint256 _a, uint256 _b) public pure { + // precondition + vm.assume(_a != _b); + + // action + uint256 _result1 = bsub(_a, _b); + uint256 _result2 = bsub(_b, _a); + + // post condition + assert(_result1 != _result2); + } + + // bsub should not be associative + function check_bsub_notAssoc(uint256 _a, uint256 _b, uint256 _c) public pure { + // precondition + vm.assume(_a != _b && _b != _c && _a != _c); + vm.assume(_a != 0 && _b != 0 && _c != 0); + + // action + uint256 _result1 = bsub(bsub(_a, _b), _c); + uint256 _result2 = bsub(_a, bsub(_b, _c)); + + // post condition + assert(_result1 != _result2); + } + + // bsub should have 0 as identity + function check_bsub_zeroIdentity(uint256 _a) public pure { + // action + uint256 _result = bsub(_a, 0); + + // post condition + assert(_result == _a); + } + + // bsub result should always be lte a + function check_bsub_resultLTE(uint256 _a, uint256 _b) public pure { + // precondition + vm.assume(_a >= _b); // Avoid underflow + + // action + uint256 _result = bsub(_a, _b); + + // post condition + assert(_result <= _a); + } + + // todo + // bsub should alway revert if b > a (duplicate with previous tho) + function check_bsub_revert(uint256 _a, uint256 _b) public pure { + vm.assume(_b > _a); + //bsub(_a, _b); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::bsubSign // + ///////////////////////////////////////////////////////////////////// + + // bsubSign result should always be negative if b > a + function check_bsubSign_negative(uint256 _a, uint256 _b) public pure { + // precondition + vm.assume(_b > _a); + + // action + (uint256 _result, bool _flag) = bsubSign(_a, _b); + + // post condition + assert(_result == _b - _a); + assert(_flag); + } + + // bsubSign result should always be positive if a > b + function check_bsubSign_positive(uint256 _a, uint256 _b) public pure { + // precondition + vm.assume(_a > _b); + + // action + (uint256 _result, bool _flag) = bsubSign(_a, _b); + + // post condition + assert(_result == _a - _b); + assert(!_flag); + } + + // bsubSign result should always be 0 if a == b + function check_bsubSign_zero(uint256 _a) public pure { + // action + (uint256 _result, bool _flag) = bsubSign(_a, _a); + + // post condition + assert(_result == 0); + assert(!_flag); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::bmul // + ///////////////////////////////////////////////////////////////////// + + // bmul should be commutative + function check_bmul_commutative(uint256 _a, uint256 _b) public pure { + // action + uint256 _result1 = bmul(_a, _b); + uint256 _result2 = bmul(_b, _a); + + // post condition + assert(_result1 == _result2); + } + + //todo hangs + // bmul should be associative + function testCheck_bmul_associative(uint256 _a, uint256 _b, uint256 _c) public pure { + // precondition + if (_b != 0) vm.assume(_a < type(uint256).max / _b); // Avoid mul overflow + if (_c != 0) vm.assume(_b < type(uint256).max / _c); // Avoid mul overflow + vm.assume(_a * _b + _c / 2 < type(uint256).max); // Avoid add overflow + + vm.assume(_a >= BONE); + vm.assume(_b >= BONE); + vm.assume(_c >= BONE); + + // action + uint256 _result1 = bmul(bmul(_a, _b), _c); + uint256 _result2 = bmul(_a, bmul(_b, _c)); + + // post condition + // assert(_result1 == _result2); + assertApproxEqAbs(_result1, _result2, 10 * BONE); + } + + //todo hangs + // bmul should be distributive + // function check_bmul_distributive(uint256 _a, uint256 _b, uint256 _c) public pure { + // uint256 _result1 = bmul(_a, badd(_b, _c)); + // uint256 _result2 = badd(bmul(_a, _b), bmul(_a, _c)); + // assert(_result1 == _result2); + // } + + //todo + // 1 should be identity for bmul + // function check_bmul_identity(uint256 _a) public pure { + // vm.assume(_a < type(uint256).max / BONE); // Avoid mul overflow + // uint256 _result = bmul(_a, BONE); + // assert(_result == _a); + // } + + // 0 should be absorbing for mul + function check_bmul_absorbing(uint256 _a) public pure { + // action + uint256 _result = bmul(_a, 0); + + // post condition + assert(_result == 0); + } + + //todo + //➜ bmul(57896044618658097711785492504343953926634992332820282019728792003956564819968, 1) >= 57896044618658097711785492504343953926634992332820282019728792003956564819968 + // Type: bool + // └ Value: false + // bmul result should always be gte a and b + function check_bmul_resultGTE(uint256 _a, uint256 _b) public pure { + vm.assume(_a != 0 && _b != 0); // Avoid absorbing + vm.assume(_a < type(uint256).max / BONE); // Avoid mul overflow + vm.assume(_b < type(uint256).max / BONE); // Avoid mul overflow + vm.assume(_a * BONE + _b / 2 < type(uint256).max); // Avoid add overflow + + uint256 _result = bmul(_a, _b); + assert(_result >= _a); + assert(_result >= _b); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::bdiv // + ///////////////////////////////////////////////////////////////////// + + //todo: Halmos times out vs foundry passes + // 1 should be identity for bdiv + function check_bdiv_identity(uint256 _a) public pure { + vm.assume(_a < type(uint256).max / BONE); // Avoid add overflow + uint256 _result = bdiv(_a, BONE); + assert(_result == _a); + } + + // uint256[] public fixtureA = [ + // BONE, + // BONE * 2, + // BONE / 2, + // BONE * 2 - 1, + // BONE * 2 + 1, + // BONE / 2 - 1, + // BONE / 2 + 1, + // BONE * 3, + // BONE * 4, + // BONE * 5, + // BONE * 6, + // BONE * 7, + // BONE * 8, + // BONE * 9, + // BONE * 10, + // type(uint256).max / 10**18, + // type(uint256).max / 10**18 - 1, + // type(uint256).max / 10**18 - 10, + // type(uint256).max / 10**18 - BONE / 2, + // type(uint256).max / 10**18 - BONE / 2 + 1, + // type(uint256).max / 10**18 - BONE / 2 - 1, + // type(uint256).max / 10**18 - BONE / 2 - 10, + // 0, + // 1, + // 2 + // ]; + + // /// forge-config: default.fuzz.runs = 1000000 + // function test_bdiv_identity(uint256 a) public pure { + // a = bound(a, 0, type(uint256).max / 10**18); + // uint256 _result = bdiv(a, BONE); + // assertEq(_result, a); + // } + + //todo + // bdiv should revert if b is 0 + // function check_bdiv_revert(uint256 _a) public pure { + // } + + //todo hangs + // bdiv result should be lte a + function test_bdiv_resultLTE(uint256 _a, uint256 _b) public pure { + vm.assume(_b != 0); + vm.assume(_a < type(uint256).max / BONE); // Avoid mul overflow + //todo: overconstrained next line? Too tightly coupled? + vm.assume(_a * BONE + _b / 2 < type(uint256).max); // Avoid add overflow + + uint256 _result = bdiv(_a, _b); + assert(_result <= _a * BONE); + assertLe(_result, _a * BONE); + } + + //todo hangs + // bdiv should be bmul reverse operation + function check_bdiv_bmul(uint256 _a, uint256 _b) public pure { + vm.assume(_b > 0); + vm.assume(_a > _b); // todo: overconstrained? + + uint256 _bdivResult = bdiv(_a, _b); + uint256 _result = bmul(_bdivResult, _b); + assert(_result == _a); + } + + ///////////////////////////////////////////////////////////////////// + // Bnum::bpowi // + ///////////////////////////////////////////////////////////////////// + + // bpowi should return 1 if exp is 0 + function check_bpowi_zeroExp(uint256 _a) public pure { + // action + uint256 _result = bpowi(_a, 0); + + // post condition + assert(_result == BONE); + } + + //todo echidna (loop unrolling bound hit) + // 0 should be absorbing if base + function check_bpowi_absorbingBase(uint256 _exp) public pure { + vm.assume(_exp != 0); // Consider 0^0 as undetermined + + uint256 _result = bpowi(0, _exp); + assert(_result == 0); + } + + //todo echidna (loop unrolling bound hit) + // 1 should be identity if base + function check_bpowi_identityBase(uint256 _exp) public pure { + uint256 _result = bpowi(BONE, _exp); + assert(_result == BONE); + } + + //todo echidna (loop unrolling bound hit) + // 1 should be identity if exp + function check_bpowi_identityExp(uint256 _base) public pure { + uint256 _result = bpowi(_base, BONE); + assert(_result == _base); + } + + /** + * // bpowi should be distributive over mult of the same base x^a * x^b == x^(a+b) + * function check_bpowi_distributiveBase(uint256 _base, uint256 _a, uint256 _b) public pure { + * uint256 _result1 = bpowi(_base, badd(_a, _b)); + * uint256 _result2 = bmul(bpowi(_base, _a), bpowi(_base, _b)); + * assert(_result1 == _result2); + * } + * + * // bpowi should be distributive over mult of the same exp a^x * b^x == (a*b)^x + * function check_bpowi_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public pure { + * uint256 _result1 = bpowi(bmul(_a, _b), _exp); + * uint256 _result2 = bmul(bpowi(_a, _exp), bpowi(_b, _exp)); + * assert(_result1 == _result2); + * } + * + * // power of a power should mult the exp (x^a)^b == x^(a*b) + * function check_bpowi_powerOfPower(uint256 _base, uint256 _a, uint256 _b) public pure { + * uint256 _result1 = bpowi(bpowi(_base, _a), _b); + * uint256 _result2 = bpowi(_base, bmul(_a, _b)); + * assert(_result1 == _result2); + * } + */ + + ///////////////////////////////////////////////////////////////////// + // Bnum::bpow // + ///////////////////////////////////////////////////////////////////// + + // bpow should return 1 if exp is 0 + function check_bpow_zeroExp(uint256 _a) public pure { + // action + uint256 _result = bpow(_a, 0); + + // post condition + assert(_result == BONE); + } + + //todo min base is 1wei -> can never be 0 instead (echidna) + // 0 should be absorbing if base + function check_bpow_absorbingBase(uint256 _exp) public pure { + uint256 _result = bpow(0, _exp); + assert(_result == 0); + } + + //todo echidna (loop unrolling bound hit) + // 1 should be identity if base + function check_bpow_identityBase(uint256 _exp) public pure { + uint256 _result = bpow(BONE, _exp); + assert(_result == BONE); + } + + // 1 should be identity if exp + function check_bpow_identityExp(uint256 _base) public pure { + // action + uint256 _result = bpow(_base, BONE); + + // post condition + assert(_result == _base); + } + + //todo infinite loop + // bpow should be distributive over mult of the same base x^a * x^b == x^(a+b) + function check_bpow_distributiveBase(uint256 _base, uint256 _a, uint256 _b) public pure { + uint256 _result1 = bpow(_base, badd(_a, _b)); + uint256 _result2 = bmul(bpow(_base, _a), bpow(_base, _b)); + assert(_result1 == _result2); + } + + //todo loop + // bpow should be distributive over mult of the same exp a^x * b^x == (a*b)^x + function check_bpow_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public pure { + uint256 _result1 = bpow(bmul(_a, _b), _exp); + uint256 _result2 = bmul(bpow(_a, _exp), bpow(_b, _exp)); + assert(_result1 == _result2); + } + + // todo + // // power of a power should mult the exp (x^a)^b == x^(a*b) + function check_bpow_powerOfPower(uint256 _base, uint256 _a, uint256 _b) public pure { + uint256 _result1 = bpow(bpow(_base, _a), _b); + uint256 _result2 = bpow(_base, bmul(_a, _b)); + assert(_result1 == _result2); + } +} diff --git a/yarn.lock b/yarn.lock index 27b5429f..2e77bf67 100644 --- a/yarn.lock +++ b/yarn.lock @@ -828,9 +828,9 @@ for-each@^0.3.3: version "0.0.0" resolved "https://codeload.github.com/marktoda/forge-gas-snapshot/tar.gz/9161f7c0b6c6788a89081e2b3b9c67592b71e689" -"forge-std@github:foundry-rs/forge-std#5475f85": - version "1.7.6" - resolved "https://codeload.github.com/foundry-rs/forge-std/tar.gz/5475f852e3f530d7e25dfb4596aa1f9baa8ffdfc" +"forge-std@github:foundry-rs/forge-std#1.8.2": + version "1.8.2" + resolved "https://codeload.github.com/foundry-rs/forge-std/tar.gz/978ac6fadb62f5f0b723c996f64be52eddba6801" form-data@^4.0.0: version "4.0.0" @@ -978,6 +978,10 @@ graceful-fs@^4.2.0: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== +"halmos-cheatcodes@github:a16z/halmos-cheatcodes#c0d8655": + version "0.0.0" + resolved "https://codeload.github.com/a16z/halmos-cheatcodes/tar.gz/c0d865508c0fee0a11b97732c5e90f9cad6b65a5" + handlebars@4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" From bec1de2013d7476758f8bdaa6457211e3116e900 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Tue, 9 Jul 2024 12:55:52 +0200 Subject: [PATCH 02/37] fix: remove tests halmos cannot handle --- test/invariant/symbolic/BNum.t.sol | 121 ++++++++++++++--------------- 1 file changed, 59 insertions(+), 62 deletions(-) diff --git a/test/invariant/symbolic/BNum.t.sol b/test/invariant/symbolic/BNum.t.sol index 49a8f94a..c7af270a 100644 --- a/test/invariant/symbolic/BNum.t.sol +++ b/test/invariant/symbolic/BNum.t.sol @@ -257,21 +257,18 @@ contract SymbolicBNum is BNum, Test, HalmosTest { assert(_result == 0); } - //todo - //➜ bmul(57896044618658097711785492504343953926634992332820282019728792003956564819968, 1) >= 57896044618658097711785492504343953926634992332820282019728792003956564819968 - // Type: bool - // └ Value: false + //todo hangs // bmul result should always be gte a and b - function check_bmul_resultGTE(uint256 _a, uint256 _b) public pure { - vm.assume(_a != 0 && _b != 0); // Avoid absorbing - vm.assume(_a < type(uint256).max / BONE); // Avoid mul overflow - vm.assume(_b < type(uint256).max / BONE); // Avoid mul overflow - vm.assume(_a * BONE + _b / 2 < type(uint256).max); // Avoid add overflow - - uint256 _result = bmul(_a, _b); - assert(_result >= _a); - assert(_result >= _b); - } + // function check_bmul_resultGTE(uint256 _a, uint256 _b) public pure { + // vm.assume(_a != 0 && _b != 0); // Avoid absorbing + // vm.assume(_a < type(uint256).max / BONE); // Avoid mul overflow + // vm.assume(_b < type(uint256).max / BONE); // Avoid mul overflow + // vm.assume(_a * BONE + _b / 2 < type(uint256).max); // Avoid add overflow + + // uint256 _result = bmul(_a, _b); + // assert(_result >= _a); + // assert(_result >= _b); + // } ///////////////////////////////////////////////////////////////////// // Bnum::bdiv // @@ -279,11 +276,11 @@ contract SymbolicBNum is BNum, Test, HalmosTest { //todo: Halmos times out vs foundry passes // 1 should be identity for bdiv - function check_bdiv_identity(uint256 _a) public pure { - vm.assume(_a < type(uint256).max / BONE); // Avoid add overflow - uint256 _result = bdiv(_a, BONE); - assert(_result == _a); - } + // function check_bdiv_identity(uint256 _a) public pure { + // vm.assume(_a < type(uint256).max / BONE); // Avoid add overflow + // uint256 _result = bdiv(_a, BONE); + // assert(_result == _a); + // } // uint256[] public fixtureA = [ // BONE, @@ -340,14 +337,14 @@ contract SymbolicBNum is BNum, Test, HalmosTest { //todo hangs // bdiv should be bmul reverse operation - function check_bdiv_bmul(uint256 _a, uint256 _b) public pure { - vm.assume(_b > 0); - vm.assume(_a > _b); // todo: overconstrained? + // function check_bdiv_bmul(uint256 _a, uint256 _b) public pure { + // vm.assume(_b > 0); + // vm.assume(_a > _b); // todo: overconstrained? - uint256 _bdivResult = bdiv(_a, _b); - uint256 _result = bmul(_bdivResult, _b); - assert(_result == _a); - } + // uint256 _bdivResult = bdiv(_a, _b); + // uint256 _result = bmul(_bdivResult, _b); + // assert(_result == _a); + // } ///////////////////////////////////////////////////////////////////// // Bnum::bpowi // @@ -364,26 +361,26 @@ contract SymbolicBNum is BNum, Test, HalmosTest { //todo echidna (loop unrolling bound hit) // 0 should be absorbing if base - function check_bpowi_absorbingBase(uint256 _exp) public pure { - vm.assume(_exp != 0); // Consider 0^0 as undetermined + // function check_bpowi_absorbingBase(uint256 _exp) public pure { + // vm.assume(_exp != 0); // Consider 0^0 as undetermined - uint256 _result = bpowi(0, _exp); - assert(_result == 0); - } + // uint256 _result = bpowi(0, _exp); + // assert(_result == 0); + // } //todo echidna (loop unrolling bound hit) // 1 should be identity if base - function check_bpowi_identityBase(uint256 _exp) public pure { - uint256 _result = bpowi(BONE, _exp); - assert(_result == BONE); - } + // function check_bpowi_identityBase(uint256 _exp) public pure { + // uint256 _result = bpowi(BONE, _exp); + // assert(_result == BONE); + // } //todo echidna (loop unrolling bound hit) // 1 should be identity if exp - function check_bpowi_identityExp(uint256 _base) public pure { - uint256 _result = bpowi(_base, BONE); - assert(_result == _base); - } + // function check_bpowi_identityExp(uint256 _base) public pure { + // uint256 _result = bpowi(_base, BONE); + // assert(_result == _base); + // } /** * // bpowi should be distributive over mult of the same base x^a * x^b == x^(a+b) @@ -423,17 +420,17 @@ contract SymbolicBNum is BNum, Test, HalmosTest { //todo min base is 1wei -> can never be 0 instead (echidna) // 0 should be absorbing if base - function check_bpow_absorbingBase(uint256 _exp) public pure { - uint256 _result = bpow(0, _exp); - assert(_result == 0); - } + // function check_bpow_absorbingBase(uint256 _exp) public pure { + // uint256 _result = bpow(0, _exp); + // assert(_result == 0); + // } //todo echidna (loop unrolling bound hit) // 1 should be identity if base - function check_bpow_identityBase(uint256 _exp) public pure { - uint256 _result = bpow(BONE, _exp); - assert(_result == BONE); - } + // function check_bpow_identityBase(uint256 _exp) public pure { + // uint256 _result = bpow(BONE, _exp); + // assert(_result == BONE); + // } // 1 should be identity if exp function check_bpow_identityExp(uint256 _base) public pure { @@ -446,25 +443,25 @@ contract SymbolicBNum is BNum, Test, HalmosTest { //todo infinite loop // bpow should be distributive over mult of the same base x^a * x^b == x^(a+b) - function check_bpow_distributiveBase(uint256 _base, uint256 _a, uint256 _b) public pure { - uint256 _result1 = bpow(_base, badd(_a, _b)); - uint256 _result2 = bmul(bpow(_base, _a), bpow(_base, _b)); - assert(_result1 == _result2); - } + // function check_bpow_distributiveBase(uint256 _base, uint256 _a, uint256 _b) public pure { + // uint256 _result1 = bpow(_base, badd(_a, _b)); + // uint256 _result2 = bmul(bpow(_base, _a), bpow(_base, _b)); + // assert(_result1 == _result2); + // } //todo loop // bpow should be distributive over mult of the same exp a^x * b^x == (a*b)^x - function check_bpow_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public pure { - uint256 _result1 = bpow(bmul(_a, _b), _exp); - uint256 _result2 = bmul(bpow(_a, _exp), bpow(_b, _exp)); - assert(_result1 == _result2); - } + // function check_bpow_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public pure { + // uint256 _result1 = bpow(bmul(_a, _b), _exp); + // uint256 _result2 = bmul(bpow(_a, _exp), bpow(_b, _exp)); + // assert(_result1 == _result2); + // } // todo // // power of a power should mult the exp (x^a)^b == x^(a*b) - function check_bpow_powerOfPower(uint256 _base, uint256 _a, uint256 _b) public pure { - uint256 _result1 = bpow(bpow(_base, _a), _b); - uint256 _result2 = bpow(_base, bmul(_a, _b)); - assert(_result1 == _result2); - } + // function check_bpow_powerOfPower(uint256 _base, uint256 _a, uint256 _b) public pure { + // uint256 _result1 = bpow(bpow(_base, _a), _b); + // uint256 _result2 = bpow(_base, bmul(_a, _b)); + // assert(_result1 == _result2); + // } } From 1d0d05db6b1191e7a331e96665eaea911696b1a3 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Tue, 9 Jul 2024 13:12:30 +0200 Subject: [PATCH 03/37] fix: setup cow pool --- test/invariant/fuzz/external/MockSettler.sol | 21 ++++++++++++++++++++ test/invariant/fuzz/external/Protocol.t.sol | 20 +++++++++++++------ 2 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 test/invariant/fuzz/external/MockSettler.sol diff --git a/test/invariant/fuzz/external/MockSettler.sol b/test/invariant/fuzz/external/MockSettler.sol new file mode 100644 index 00000000..f7a97e8f --- /dev/null +++ b/test/invariant/fuzz/external/MockSettler.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.25; + +import {GPv2Interaction, GPv2Trade, IERC20, ISettlement} from 'interfaces/ISettlement.sol'; + +contract MockSettler is ISettlement { + function domainSeparator() external view override returns (bytes32) { + return bytes32(hex'1234'); + } + + function vaultRelayer() external view override returns (address) { + return address(123); + } + + function settle( + IERC20[] calldata tokens, + uint256[] calldata clearingPrices, + GPv2Trade.Data[] calldata trades, + GPv2Interaction.Data[][3] calldata interactions + ) external {} +} diff --git a/test/invariant/fuzz/external/Protocol.t.sol b/test/invariant/fuzz/external/Protocol.t.sol index 44fc0ceb..fe7212f3 100644 --- a/test/invariant/fuzz/external/Protocol.t.sol +++ b/test/invariant/fuzz/external/Protocol.t.sol @@ -2,19 +2,25 @@ pragma solidity 0.8.25; import {EchidnaTest, FuzzERC20} from '../../AdvancedTestsUtils.sol'; + +import {BCoWFactory, BCoWPool} from 'contracts/BCoWFactory.sol'; import {BConst} from 'contracts/BConst.sol'; -import {BFactory, IBPool} from 'contracts/BFactory.sol'; + +import {MockSettler} from './MockSettler.sol'; contract EchidnaBalancer is EchidnaTest { // System under test - BFactory factory; + BCoWFactory factory; BConst bconst; FuzzERC20 tokenA; FuzzERC20 tokenB; + address solutionSettler; + bytes32 appData; + mapping(address => bool) alreadyMinted; - IBPool[] deployedPools; + BCoWPool[] deployedPools; constructor() { tokenA = new FuzzERC20(); @@ -22,7 +28,9 @@ contract EchidnaBalancer is EchidnaTest { tokenA.initialize('', '', 18); tokenB.initialize('', '', 18); - factory = new BFactory(); + solutionSettler = address(new MockSettler()); + + factory = new BCoWFactory(solutionSettler, appData); bconst = new BConst(); } @@ -45,7 +53,7 @@ contract EchidnaBalancer is EchidnaTest { require(_denormA + _denormB <= bconst.MAX_TOTAL_WEIGHT()); _poolIndex = _poolIndex % deployedPools.length; - IBPool pool = deployedPools[_poolIndex]; + BCoWPool pool = deployedPools[_poolIndex]; tokenA.approve(address(pool), _amountA); tokenB.approve(address(pool), _amountB); @@ -58,7 +66,7 @@ contract EchidnaBalancer is EchidnaTest { function fuzz_BFactoryAlwaysDeploy() public AgentOrDeployer { hevm.prank(currentCaller); - IBPool _newPool = factory.newBPool(); + BCoWPool _newPool = BCoWPool(address(factory.newBPool())); deployedPools.push(_newPool); From 013f72f7bb7a91a23997bd532f2384589901e1af Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Tue, 9 Jul 2024 14:57:49 +0200 Subject: [PATCH 04/37] chore(wip): echidna --- test/invariant/PROPERTIES.md | 61 ++++++++------- test/invariant/fuzz/external/Protocol.t.sol | 86 +++++++++++++-------- 2 files changed, 86 insertions(+), 61 deletions(-) diff --git a/test/invariant/PROPERTIES.md b/test/invariant/PROPERTIES.md index c4eeacbc..df1571a2 100644 --- a/test/invariant/PROPERTIES.md +++ b/test/invariant/PROPERTIES.md @@ -1,33 +1,34 @@ -| Properties | Type | -| ----------------------------------------------------------------------------------------------------------- | ---------- | -| BFactory should always be able to deploy new pools | Unit | -| BFactory's blab should always be modifiable by the current blabs | Unit | -| BFactory should always be able to transfer the BToken to the blab, if called by it | Unit | -| BToken increaseApproval should increase the approval of the address by the amount | Variable transition | -| BToken decreaseApproval should decrease the approval to max(old-amount, 0) | Variable transition | -| BToken should not break the ToB ERC20 properties (https://github.com/crytic/properties?tab=readme-ov-file#erc20-tests) | High level | -| an exact amount in should always earn the amount out calculated in bmath | High level | -| an exact amount out is earned only if the amount in calculated in bmath is transfered | High level | -| there can't be any amount out for a 0 amount in | High level | -| the amount received can never be less than min amount out | Unit | -| the amount spent can never be greater than max amount in | Unit | -| the pool btoken can only be minted/burned in the join and exit operations | High level | -| a direct token transfer can never reduce the underlying amount of a given token per BPT | High level | -| the amount of underlying token when exiting should always be the amount calculated in bmath | High level | -| a pool can either be finalized or not finalized | Valid state | -| a finalized pool cannot switch back to non-finalized | State transition | -| a non-finalized pool can only be finalized when the controller calls finalize() | State transition | -| a swap can only happen when the pool is finalized | High level | -| bounding and unbounding token can only be done on a non-finalized pool, by the controller | High level | -| there always should be between MIN_BOUND_TOKENS and MAX_BOUND_TOKENS bound in a pool | High level | -| total weight can be up to 50e18 | Variable transition | -| swap fee can only be 0 (cow pool) -only the settler can commit a hash -when a hash has been commited, only this order can be settled - - - -Unit for the math libs (BNum and BMath): +| Properties | Type | Id | Halmos | Echidna | +| ------------------------------------------------------------------------------------------- | ------------------- | --- | ------ | ------- | +| BFactory should always be able to deploy new pools | Unit | 1 | [ ] | [ ] | +| BFactory's blab should always be modifiable by the current blabs | Unit | 2 | [ ] | [ ] | +| BFactory should always be able to transfer the BToken to the blab, if called by it | Unit | 3 | [ ] | [ ] | +| the amount received can never be less than min amount out | Unit | 4 | [ ] | [ ] | +| the amount spent can never be greater than max amount in | Unit | 5 | [ ] | [ ] | +| swap fee can only be 0 (cow pool) | Valid state | 6 | [ ] | [ ] | +| total weight can be up to 50e18 | Variable transition | 7 | [ ] | [ ] | +| BToken increaseApproval should increase the approval of the address by the amount | Variable transition | 8 | [ ] | [ ] | +| BToken decreaseApproval should decrease the approval to max(old-amount, 0) | Variable transition | 9 | [ ] | [ ] | +| a pool can either be finalized or not finalized | Valid state | 10 | [ ] | [ ] | +| a finalized pool cannot switch back to non-finalized | State transition | 11 | [ ] | [ ] | +| a non-finalized pool can only be finalized when the controller calls finalize() | State transition | 12 | [ ] | [ ] | +| an exact amount in should always earn the amount out calculated in bmath | High level | 13 | [ ] | [ ] | +| an exact amount out is earned only if the amount in calculated in bmath is transfered | High level | 14 | [ ] | [ ] | +| there can't be any amount out for a 0 amount in | High level | 15 | [ ] | [ ] | +| the pool btoken can only be minted/burned in the join and exit operations | High level | 16 | [ ] | [ ] | +| a direct token transfer can never reduce the underlying amount of a given token per BPT | High level | 17 | [ ] | [ ] | +| the amount of underlying token when exiting should always be the amount calculated in bmath | High level | 18 | [ ] | [ ] | +| a swap can only happen when the pool is finalized | High level | 19 | [ ] | [ ] | +| bounding and unbounding token can only be done on a non-finalized pool, by the controller | High level | 20 | [ ] | [ ] | +| there always should be between MIN_BOUND_TOKENS and MAX_BOUND_TOKENS bound in a pool | High level | 21 | [ ] | [ ] | +| only the settler can commit a hash | High level | 22 | [ ] | [ ] | +| when a hash has been commited, only this order can be settled | High level | 23 | [ ] | [ ] | +| BToken should not break the ToB ERC20 properties* | High level | 24 | [ ] | [ ] | + +* ERC20 properties +(https://github.com/crytic/properties?tab=readme-ov-file#erc20-tests) + +# Unit for the math libs (BNum and BMath): btoi should always return the floor(a / BONE) == (a - a%BONE) / BONE bfloor should always return (a - a % BONE) diff --git a/test/invariant/fuzz/external/Protocol.t.sol b/test/invariant/fuzz/external/Protocol.t.sol index fe7212f3..05899d92 100644 --- a/test/invariant/fuzz/external/Protocol.t.sol +++ b/test/invariant/fuzz/external/Protocol.t.sol @@ -12,62 +12,77 @@ contract EchidnaBalancer is EchidnaTest { // System under test BCoWFactory factory; BConst bconst; - FuzzERC20 tokenA; - FuzzERC20 tokenB; address solutionSettler; bytes32 appData; - mapping(address => bool) alreadyMinted; + bool alreadySetup; + FuzzERC20[] tokens; BCoWPool[] deployedPools; + mapping(BCoWPool => bool) finalizedPools; constructor() { - tokenA = new FuzzERC20(); - tokenB = new FuzzERC20(); - tokenA.initialize('', '', 18); - tokenB.initialize('', '', 18); - solutionSettler = address(new MockSettler()); factory = new BCoWFactory(solutionSettler, appData); bconst = new BConst(); } - function setup_mint(uint256 _amountA, uint256 _amountB) public AgentOrDeployer { - if (!alreadyMinted[currentCaller]) { - alreadyMinted[currentCaller] = true; - tokenA.mint(currentCaller, _amountA); - tokenB.mint(currentCaller, _amountB); - } + modifier providedEnoughTokenCaller(FuzzERC20 _token, uint256 _amount) { + _token.mint(currentCaller, _amount); + _; } - function setup_poolLiquidity( - uint256 _amountA, - uint256 _amountB, - uint256 _denormA, - uint256 _denormB, - uint256 _poolIndex - ) public { - require(_amountA >= bconst.MIN_BALANCE() && _amountB >= bconst.MIN_BALANCE()); - require(_denormA + _denormB <= bconst.MAX_TOTAL_WEIGHT()); + function setup_tokens() public AgentOrDeployer { + if (!alreadySetup) { + // max bound token is 8 + for (uint256 i; i < 8; i++) { + FuzzERC20 _token = new FuzzERC20(); + _token.initialize('', '', 18); + tokens.push(_token); + } + alreadySetup = true; + } + } + + function setup_poolLiquidity(uint256 _numberOfTokens, uint256 _poolIndex) public { _poolIndex = _poolIndex % deployedPools.length; + + _numberOfTokens = clamp(_numberOfTokens, bconst.MIN_BOUND_TOKENS(), bconst.MAX_BOUND_TOKENS()); + BCoWPool pool = deployedPools[_poolIndex]; + require(!deployedPools[_poolIndex].isFinalized()); - tokenA.approve(address(pool), _amountA); - tokenB.approve(address(pool), _amountB); - pool.bind(address(tokenA), _amountA, _denormA); - pool.bind(address(tokenB), _amountB, _denormB); - pool.finalize(); + for (uint256 i; i < _numberOfTokens; i++) { + FuzzERC20 _token = tokens[i]; + uint256 _amount = bconst.INIT_POOL_SUPPLY() / _numberOfTokens; + pool.bind(address(_token), _amount, bconst.MIN_WEIGHT()); + } + + // require(_amountA >= bconst.MIN_BALANCE() && _amountB >= bconst.MIN_BALANCE()); + // require(_denormA + _denormB <= bconst.MAX_TOTAL_WEIGHT()); + + // tokenA.approve(address(pool), _amountA); + // tokenB.approve(address(pool), _amountB); + // pool.bind(address(tokenA), _amountA, _denormA); + // pool.bind(address(tokenB), _amountB, _denormB); + // pool.finalize(); } // Probably wants to have a pool setup with more than 2 tokens too + swap - + /// @custom:property-id 1 + /// @custom:property BFactory should always be able to deploy new pools function fuzz_BFactoryAlwaysDeploy() public AgentOrDeployer { + // Precondition + require(deployedPools.length < 4); // Avoid too many pools to interact with hevm.prank(currentCaller); + + // Action BCoWPool _newPool = BCoWPool(address(factory.newBPool())); + // Postcondition deployedPools.push(_newPool); assert(address(_newPool).code.length > 0); @@ -75,23 +90,32 @@ contract EchidnaBalancer is EchidnaTest { assert(!_newPool.isFinalized()); } + /// @custom:property-id 2 + /// @custom:property BFactory's blab should always be modifiable by the current blabs function fuzz_blabAlwaysModByBLab() public AgentOrDeployer { + // Precondition address _currentBLab = factory.getBLabs(); hevm.prank(currentCaller); + // Action try factory.setBLabs(address(123)) { + // Postcondition assert(_currentBLab == currentCaller); } catch { assert(_currentBLab != currentCaller); } } + /// @custom:property-id 3 + /// @custom:property BFactory should always be able to transfer the BToken to the blab, if called by it function fuzz_alwayCollect() public AgentOrDeployer {} + /// @custom:property-id 8 + /// @custom:property BToken increaseApproval should increase the approval of the address by the amount function fuzz_increaseApproval() public AgentOrDeployer {} + /// @custom:property-id 9 + /// @custom:property BToken decreaseApproval should decrease the approval to max(old-amount, 0) function fuzz_decreaseApproval() public AgentOrDeployer {} - - function fuzz_correctOutForExactIn() public AgentOrDeployer {} } From 388c6573ed881bfe4ece7eb5309a6a193a2dfdd1 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Thu, 11 Jul 2024 11:12:13 +0200 Subject: [PATCH 05/37] feat: clamp util --- test/invariant/AdvancedTestsUtils.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/invariant/AdvancedTestsUtils.sol b/test/invariant/AdvancedTestsUtils.sol index 59e0936f..3ad99e77 100644 --- a/test/invariant/AdvancedTestsUtils.sol +++ b/test/invariant/AdvancedTestsUtils.sol @@ -53,7 +53,10 @@ contract EchidnaTest is AgentsHandler { constructor() AgentsHandler(5) {} function clamp(uint256 _value, uint256 _min, uint256 _max) internal returns (uint256) { - return _min + (_value % (_max - _min)); + if (_value < _min || _value > _max) { + return _min + (_value % (_max - _min + 1)); + } + return _value; } } From caf3c622f4d581764c22022ce1cd8d57a893f184 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Fri, 12 Jul 2024 22:24:10 +0200 Subject: [PATCH 06/37] feat(echidna): prop and tob erc20 --- .solhintignore | 2 +- crytic-export/combined_solc.json | 1 + foundry.toml | 5 +- package.json | 1 + remappings.txt | 1 + script/DeployBCoWFactory.s.sol | 2 +- script/DeployBFactory.s.sol | 2 +- script/Params.s.sol | 2 +- src/contracts/BCoWConst.sol | 2 +- src/contracts/BCoWFactory.sol | 2 +- src/contracts/BCoWPool.sol | 2 +- src/contracts/BConst.sol | 2 +- src/contracts/BFactory.sol | 2 +- src/contracts/BMath.sol | 2 +- src/contracts/BNum.sol | 2 +- src/contracts/BPool.sol | 22 +- src/contracts/BToken.sol | 2 +- src/interfaces/IBCoWFactory.sol | 2 +- src/interfaces/IBCoWPool.sol | 2 +- src/interfaces/IBFactory.sol | 2 +- src/interfaces/IBPool.sol | 2 +- src/interfaces/ISettlement.sol | 2 +- test/integration/BCowPool.t.sol | 2 +- test/integration/BPool.t.sol | 2 +- test/integration/DeploymentGas.t.sol | 2 +- test/invariant/fuzz/external/Protocol.t.sol | 121 ----- .../AdvancedTestsUtils.sol | 2 +- test/{invariant => invariants}/PROPERTIES.md | 4 +- .../fuzz/config.yaml | 4 +- test/invariants/fuzz/external/BToken.sol | 38 ++ .../fuzz/external/MockSettler.sol | 2 +- test/invariants/fuzz/external/Protocol.t.sol | 282 +++++++++++ test/invariants/fuzz/internal/BMath.t.sol | 130 +++++ .../fuzz/internal/BNum.t.sol | 2 +- .../symbolic/BMath.t.sol | 2 +- .../symbolic/BNum.t.sol | 2 +- test/unit/BCoWFactory.t.sol | 2 +- test/unit/BCoWPool.t.sol | 2 +- test/unit/BFactory.t.sol | 2 +- test/unit/BMath.t.sol | 2 +- test/unit/BNum.t.sol | 2 +- test/unit/BPool.t.sol | 2 +- test/unit/BPool/BPool.t.sol | 2 +- test/unit/BPool/BPoolBase.sol | 2 +- test/unit/BPool/BPool_Bind.t.sol | 2 +- test/unit/BPool/BPool_JoinPool.t.sol | 2 +- test/unit/BPool/BPool_Unbind.t.sol | 2 +- test/unit/BToken.t.sol | 2 +- test/utils/Pow.sol | 2 +- test/utils/Utils.sol | 2 +- yarn.lock | 461 +++++++++++++++++- 51 files changed, 971 insertions(+), 177 deletions(-) create mode 100644 crytic-export/combined_solc.json delete mode 100644 test/invariant/fuzz/external/Protocol.t.sol rename test/{invariant => invariants}/AdvancedTestsUtils.sol (98%) rename test/{invariant => invariants}/PROPERTIES.md (99%) rename test/{invariant => invariants}/fuzz/config.yaml (72%) create mode 100644 test/invariants/fuzz/external/BToken.sol rename test/{invariant => invariants}/fuzz/external/MockSettler.sol (95%) create mode 100644 test/invariants/fuzz/external/Protocol.t.sol create mode 100644 test/invariants/fuzz/internal/BMath.t.sol rename test/{invariant => invariants}/fuzz/internal/BNum.t.sol (99%) rename test/{invariant => invariants}/symbolic/BMath.t.sol (98%) rename test/{invariant => invariants}/symbolic/BNum.t.sol (99%) diff --git a/.solhintignore b/.solhintignore index 4a5716f9..4611d082 100644 --- a/.solhintignore +++ b/.solhintignore @@ -1,3 +1,3 @@ test/smock/* test/manual-smock/* -test/invariant/* \ No newline at end of file +test/invariants/* \ No newline at end of file diff --git a/crytic-export/combined_solc.json b/crytic-export/combined_solc.json new file mode 100644 index 00000000..9fe552ee --- /dev/null +++ b/crytic-export/combined_solc.json @@ -0,0 +1 @@ +{"sources": {"/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol": {"AST": {"absolutePath": "node_modules/@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol", "exportedSymbols": {"CryticERC20ExternalBasicProperties": [1131], "CryticERC20ExternalTestBase": [1362]}, "id": 1132, "nodeType": "SourceUnit", "nodes": [{"id": 82, "literals": ["solidity", "^", "0.8", ".0"], "nodeType": "PragmaDirective", "src": "0:23:0"}, {"absolutePath": "node_modules/@crytic/properties/contracts/ERC20/external/util/ERC20ExternalTestBase.sol", "file": "../util/ERC20ExternalTestBase.sol", "id": 84, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1132, "sourceUnit": 1363, "src": "25:78:0", "symbolAliases": [{"foreign": {"id": 83, "name": "CryticERC20ExternalTestBase", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1362, "src": "33:27:0", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"abstract": true, "baseContracts": [{"baseName": {"id": 85, "name": "CryticERC20ExternalTestBase", "nameLocations": ["165:27:0"], "nodeType": "IdentifierPath", "referencedDeclaration": 1362, "src": "165:27:0"}, "id": 86, "nodeType": "InheritanceSpecifier", "src": "165:27:0"}], "canonicalName": "CryticERC20ExternalBasicProperties", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 1131, "linearizedBaseContracts": [1131, 1362, 1224, 3325], "name": "CryticERC20ExternalBasicProperties", "nameLocation": "123:34:0", "nodeType": "ContractDefinition", "nodes": [{"body": {"id": 89, "nodeType": "Block", "src": "213:2:0", "statements": []}, "id": 90, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": {"id": 87, "nodeType": "ParameterList", "parameters": [], "src": "210:2:0"}, "returnParameters": {"id": 88, "nodeType": "ParameterList", "parameters": [], "src": "213:0:0"}, "scope": 1131, "src": "199:16:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 110, "nodeType": "Block", "src": "409:192:0", "statements": [{"expression": {"arguments": [{"id": 97, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "427:29:0", "subExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 94, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "428:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 95, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "434:20:0", "memberName": "isMintableOrBurnable", "nodeType": "MemberAccess", "referencedDeclaration": 1141, "src": "428:26:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$__$returns$_t_bool_$", "typeString": "function () external returns (bool)"}}, "id": 96, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "428:28:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 93, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "419:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 98, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "419:38:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 99, "nodeType": "ExpressionStatement", "src": "419:38:0"}, {"expression": {"arguments": [{"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 101, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "489:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 102, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "495:13:0", "memberName": "initialSupply", "nodeType": "MemberAccess", "referencedDeclaration": 1146, "src": "489:19:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", "typeString": "function () external returns (uint256)"}}, "id": 103, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "489:21:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 104, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "524:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 105, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "530:11:0", "memberName": "totalSupply", "nodeType": "MemberAccess", "referencedDeclaration": 1388, "src": "524:17:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 106, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "524:19:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "546f6b656e20737570706c7920776173206d6f646966696564", "id": 107, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "557:27:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_5fd8329cae6c7af670da228bf73390d26ca120aba549f06ed9cf9aeff6bbd76e", "typeString": "literal_string \"Token supply was modified\""}, "value": "Token supply was modified"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_5fd8329cae6c7af670da228bf73390d26ca120aba549f06ed9cf9aeff6bbd76e", "typeString": "literal_string \"Token supply was modified\""}], "id": 100, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "467:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 108, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "467:127:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 109, "nodeType": "ExpressionStatement", "src": "467:127:0"}]}, "functionSelector": "31261479", "id": 111, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_constantSupply", "nameLocation": "358:33:0", "nodeType": "FunctionDefinition", "parameters": {"id": 91, "nodeType": "ParameterList", "parameters": [], "src": "391:2:0"}, "returnParameters": {"id": 92, "nodeType": "ParameterList", "parameters": [], "src": "409:0:0"}, "scope": 1131, "src": "349:252:0", "stateMutability": "nonpayable", "virtual": true, "visibility": "public"}, {"body": {"id": 126, "nodeType": "Block", "src": "724:163:0", "statements": [{"expression": {"arguments": [{"arguments": [{"expression": {"id": 117, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "773:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 118, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "777:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "773:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 115, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "757:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 116, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "763:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "757:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 119, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "757:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 120, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "798:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 121, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "804:11:0", "memberName": "totalSupply", "nodeType": "MemberAccess", "referencedDeclaration": 1388, "src": "798:17:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 122, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "798:19:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "557365722062616c616e636520686967686572207468616e20746f74616c20737570706c79", "id": 123, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "831:39:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_fc17b6f27a93af589f9dcf143bf95098f749b75a37a180b89d78e0862c9f1485", "typeString": "literal_string \"User balance higher than total supply\""}, "value": "User balance higher than total supply"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_fc17b6f27a93af589f9dcf143bf95098f749b75a37a180b89d78e0862c9f1485", "typeString": "literal_string \"User balance higher than total supply\""}], "id": 114, "name": "assertLte", "nodeType": "Identifier", "overloadedDeclarations": [2512, 2567], "referencedDeclaration": 2512, "src": "734:9:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 124, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "734:146:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 125, "nodeType": "ExpressionStatement", "src": "734:146:0"}]}, "functionSelector": "0069650b", "id": 127, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_userBalanceNotHigherThanSupply", "nameLocation": "665:49:0", "nodeType": "FunctionDefinition", "parameters": {"id": 112, "nodeType": "ParameterList", "parameters": [], "src": "714:2:0"}, "returnParameters": {"id": 113, "nodeType": "ParameterList", "parameters": [], "src": "724:0:0"}, "scope": 1131, "src": "656:231:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 163, "nodeType": "Block", "src": "1019:333:0", "statements": [{"assignments": [131], "declarations": [{"constant": false, "id": 131, "mutability": "mutable", "name": "sumBalances", "nameLocation": "1037:11:0", "nodeType": "VariableDeclaration", "scope": 163, "src": "1029:19:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 130, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1029:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 154, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 153, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 148, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 143, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"arguments": [{"id": 136, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "1075:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 135, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1067:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 134, "name": "address", "nodeType": "ElementaryTypeName", "src": "1067:7:0", "typeDescriptions": {}}}, "id": 137, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1067:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 132, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1051:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 133, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1057:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "1051:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 138, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1051:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [{"id": 141, "name": "USER1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1208, "src": "1112:5:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 139, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1096:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 140, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1102:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "1096:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 142, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1096:22:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "1051:67:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [{"id": 146, "name": "USER2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1214, "src": "1149:5:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 144, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1133:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 145, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1139:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "1133:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 147, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1133:22:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "1051:104:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [{"id": 151, "name": "USER3", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1220, "src": "1186:5:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 149, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1170:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 150, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1176:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "1170:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 152, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1170:22:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "1051:141:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "1029:163:0"}, {"expression": {"arguments": [{"id": 156, "name": "sumBalances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 131, "src": "1225:11:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 157, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1250:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 158, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1256:11:0", "memberName": "totalSupply", "nodeType": "MemberAccess", "referencedDeclaration": 1388, "src": "1250:17:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 159, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1250:19:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "53756d206f6620757365722062616c616e636573206172652067726561746572207468616e20746f74616c20737570706c79", "id": 160, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1283:52:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2b68efa9d0b9bdfa91b0bac2ba9aeff1bfab41285a495d9bf1dcc1786336a5a8", "typeString": "literal_string \"Sum of user balances are greater than total supply\""}, "value": "Sum of user balances are greater than total supply"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_2b68efa9d0b9bdfa91b0bac2ba9aeff1bfab41285a495d9bf1dcc1786336a5a8", "typeString": "literal_string \"Sum of user balances are greater than total supply\""}], "id": 155, "name": "assertLte", "nodeType": "Identifier", "overloadedDeclarations": [2512, 2567], "referencedDeclaration": 2512, "src": "1202:9:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 161, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1202:143:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 162, "nodeType": "ExpressionStatement", "src": "1202:143:0"}]}, "functionSelector": "c2698205", "id": 164, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_userBalancesLessThanTotalSupply", "nameLocation": "959:50:0", "nodeType": "FunctionDefinition", "parameters": {"id": 128, "nodeType": "ParameterList", "parameters": [], "src": "1009:2:0"}, "returnParameters": {"id": 129, "nodeType": "ParameterList", "parameters": [], "src": "1019:0:0"}, "scope": 1131, "src": "950:402:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 179, "nodeType": "Block", "src": "1459:145:0", "statements": [{"expression": {"arguments": [{"arguments": [{"arguments": [{"hexValue": "30", "id": 172, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1515: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": 171, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1507:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 170, "name": "address", "nodeType": "ElementaryTypeName", "src": "1507:7:0", "typeDescriptions": {}}}, "id": 173, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1507:10:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 168, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1491:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 169, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1497:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "1491:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 174, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1491:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "30", "id": 175, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1532:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, {"hexValue": "41646472657373207a65726f2062616c616e6365206e6f7420657175616c20746f207a65726f", "id": 176, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1547:40:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_301dfce7022f554126c054056a35137d7aaf72c7160cd4206a6c2358bfb77516", "typeString": "literal_string \"Address zero balance not equal to zero\""}, "value": "Address zero balance not equal to zero"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, {"typeIdentifier": "t_stringliteral_301dfce7022f554126c054056a35137d7aaf72c7160cd4206a6c2358bfb77516", "typeString": "literal_string \"Address zero balance not equal to zero\""}], "id": 167, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "1469:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 177, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1469:128:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 178, "nodeType": "ExpressionStatement", "src": "1469:128:0"}]}, "functionSelector": "9ece0e86", "id": 180, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_zeroAddressBalance", "nameLocation": "1412:37:0", "nodeType": "FunctionDefinition", "parameters": {"id": 165, "nodeType": "ParameterList", "parameters": [], "src": "1449:2:0"}, "returnParameters": {"id": 166, "nodeType": "ParameterList", "parameters": [], "src": "1459:0:0"}, "scope": 1131, "src": "1403:201:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 217, "nodeType": "Block", "src": "1724:224:0", "statements": [{"assignments": [184], "declarations": [{"constant": false, "id": 184, "mutability": "mutable", "name": "balance", "nameLocation": "1742:7:0", "nodeType": "VariableDeclaration", "scope": 217, "src": "1734:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 183, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1734:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 192, "initialValue": {"arguments": [{"arguments": [{"id": 189, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "1776:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 188, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1768:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 187, "name": "address", "nodeType": "ElementaryTypeName", "src": "1768:7:0", "typeDescriptions": {}}}, "id": 190, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1768:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 185, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1752:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 186, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1758:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "1752:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 191, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1752:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "1734:48:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 196, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 194, "name": "balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 184, "src": "1800:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 195, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1810:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "1800:11:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 193, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "1792:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 197, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1792:20:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 198, "nodeType": "ExpressionStatement", "src": "1792:20:0"}, {"assignments": [200], "declarations": [{"constant": false, "id": 200, "mutability": "mutable", "name": "r", "nameLocation": "1828:1:0", "nodeType": "VariableDeclaration", "scope": 217, "src": "1823:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 199, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1823:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 209, "initialValue": {"arguments": [{"arguments": [{"hexValue": "30", "id": 205, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1855: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": 204, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1847:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 203, "name": "address", "nodeType": "ElementaryTypeName", "src": "1847:7:0", "typeDescriptions": {}}}, "id": 206, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1847:10:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 207, "name": "balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 184, "src": "1859:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 201, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1832:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 202, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1838:8:0", "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 1406, "src": "1832:14:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 208, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1832:35:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "1823:44:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 213, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 211, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 200, "src": "1891:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "66616c7365", "id": 212, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1896:5:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}, "src": "1891:10:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "5375636365737366756c207472616e7366657220746f2061646472657373207a65726f", "id": 214, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1903:37:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_b4fdf22acb2c07142dd99a64598bc530c121fbcb1836778ad9a38f20266117fd", "typeString": "literal_string \"Successful transfer to address zero\""}, "value": "Successful transfer to address zero"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_b4fdf22acb2c07142dd99a64598bc530c121fbcb1836778ad9a38f20266117fd", "typeString": "literal_string \"Successful transfer to address zero\""}], "id": 210, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "1877:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 215, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1877:64:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 216, "nodeType": "ExpressionStatement", "src": "1877:64:0"}]}, "functionSelector": "6eee9ce4", "id": 218, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transferToZeroAddress", "nameLocation": "1674:40:0", "nodeType": "FunctionDefinition", "parameters": {"id": 181, "nodeType": "ParameterList", "parameters": [], "src": "1714:2:0"}, "returnParameters": {"id": 182, "nodeType": "ParameterList", "parameters": [], "src": "1724:0:0"}, "scope": 1131, "src": "1665:283:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 287, "nodeType": "Block", "src": "2099:514:0", "statements": [{"assignments": [224], "declarations": [{"constant": false, "id": 224, "mutability": "mutable", "name": "balance_sender", "nameLocation": "2117:14:0", "nodeType": "VariableDeclaration", "scope": 287, "src": "2109:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 223, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2109:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 230, "initialValue": {"arguments": [{"expression": {"id": 227, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2150:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 228, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2154:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "2150:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 225, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "2134:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 226, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2140:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "2134:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 229, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2134:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "2109:52:0"}, {"assignments": [232], "declarations": [{"constant": false, "id": 232, "mutability": "mutable", "name": "allowance", "nameLocation": "2179:9:0", "nodeType": "VariableDeclaration", "scope": 287, "src": "2171:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 231, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2171:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 242, "initialValue": {"arguments": [{"expression": {"id": 235, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2207:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 236, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2211:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "2207:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 239, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "2227:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 238, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2219:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 237, "name": "address", "nodeType": "ElementaryTypeName", "src": "2219:7:0", "typeDescriptions": {}}}, "id": 240, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2219:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 233, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "2191:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 234, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2197:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "2191:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 241, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2191:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "2171:62:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 250, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 246, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 244, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 224, "src": "2251:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 245, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2268:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "2251:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 249, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 247, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 232, "src": "2273:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 248, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2285:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "2273:13:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "2251:35:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 243, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "2243:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 251, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2243:44:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 252, "nodeType": "ExpressionStatement", "src": "2243:44:0"}, {"assignments": [254], "declarations": [{"constant": false, "id": 254, "mutability": "mutable", "name": "maxValue", "nameLocation": "2305:8:0", "nodeType": "VariableDeclaration", "scope": 287, "src": "2297:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 253, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2297:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 261, "initialValue": {"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 257, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 255, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 224, "src": "2316:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": {"id": 256, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 232, "src": "2334:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "2316:27:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseExpression": {"id": 259, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 224, "src": "2382:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 260, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "2316:80:0", "trueExpression": {"id": 258, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 232, "src": "2358:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "2297:99:0"}, {"assignments": [263], "declarations": [{"constant": false, "id": 263, "mutability": "mutable", "name": "r", "nameLocation": "2412:1:0", "nodeType": "VariableDeclaration", "scope": 287, "src": "2407:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 262, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2407:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 279, "initialValue": {"arguments": [{"expression": {"id": 266, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2448:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 267, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2452:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "2448:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"hexValue": "30", "id": 270, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2480: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": 269, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2472:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 268, "name": "address", "nodeType": "ElementaryTypeName", "src": "2472:7:0", "typeDescriptions": {}}}, "id": 271, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2472:10:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 277, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 272, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 220, "src": "2496:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 275, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 273, "name": "maxValue", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 254, "src": "2505:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 274, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2516:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "2505:12:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 276, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "2504:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "2496:22:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 264, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "2416:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 265, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2422:12:0", "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1438, "src": "2416:18: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": 278, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2416:112:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "2407:121:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 283, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 281, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 263, "src": "2552:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "66616c7365", "id": 282, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2557:5:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}, "src": "2552:10:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "5375636365737366756c207472616e7366657246726f6d20746f2061646472657373207a65726f", "id": 284, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2564:41:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_c13cd6c9a8c081656d2916476c4fdf5563211a1da2623f6d9163f941dfdac645", "typeString": "literal_string \"Successful transferFrom to address zero\""}, "value": "Successful transferFrom to address zero"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_c13cd6c9a8c081656d2916476c4fdf5563211a1da2623f6d9163f941dfdac645", "typeString": "literal_string \"Successful transferFrom to address zero\""}], "id": 280, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "2538:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 285, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2538:68:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 286, "nodeType": "ExpressionStatement", "src": "2538:68:0"}]}, "functionSelector": "2edf6187", "id": 288, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transferFromToZeroAddress", "nameLocation": "2018:44:0", "nodeType": "FunctionDefinition", "parameters": {"id": 221, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 220, "mutability": "mutable", "name": "value", "nameLocation": "2080:5:0", "nodeType": "VariableDeclaration", "scope": 288, "src": "2072:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 219, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2072:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "2062:29:0"}, "returnParameters": {"id": 222, "nodeType": "ParameterList", "parameters": [], "src": "2099:0:0"}, "scope": 1131, "src": "2009:604:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 365, "nodeType": "Block", "src": "2736:646:0", "statements": [{"assignments": [294], "declarations": [{"constant": false, "id": 294, "mutability": "mutable", "name": "balance_sender", "nameLocation": "2754:14:0", "nodeType": "VariableDeclaration", "scope": 365, "src": "2746:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 293, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2746:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 300, "initialValue": {"arguments": [{"expression": {"id": 297, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2787:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 298, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2791:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "2787:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 295, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "2771:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 296, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2777:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "2771:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 299, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2771:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "2746:52:0"}, {"assignments": [302], "declarations": [{"constant": false, "id": 302, "mutability": "mutable", "name": "allowance", "nameLocation": "2816:9:0", "nodeType": "VariableDeclaration", "scope": 365, "src": "2808:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 301, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2808:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 312, "initialValue": {"arguments": [{"expression": {"id": 305, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2844:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 306, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2848:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "2844:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 309, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "2864:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 308, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2856:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 307, "name": "address", "nodeType": "ElementaryTypeName", "src": "2856:7:0", "typeDescriptions": {}}}, "id": 310, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2856:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 303, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "2828:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 304, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2834:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "2828:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 311, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2828:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "2808:62:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 320, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 316, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 314, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 294, "src": "2888:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 315, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2905:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "2888:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 319, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 317, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 302, "src": "2910:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 318, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2922:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "2910:13:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "2888:35:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 313, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "2880:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 321, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2880:44:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 322, "nodeType": "ExpressionStatement", "src": "2880:44:0"}, {"assignments": [324], "declarations": [{"constant": false, "id": 324, "mutability": "mutable", "name": "maxValue", "nameLocation": "2942:8:0", "nodeType": "VariableDeclaration", "scope": 365, "src": "2934:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 323, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2934:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 331, "initialValue": {"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 327, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 325, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 294, "src": "2953:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": {"id": 326, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 302, "src": "2971:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "2953:27:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseExpression": {"id": 329, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 294, "src": "3019:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 330, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "2953:80:0", "trueExpression": {"id": 328, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 302, "src": "2995:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "2934:99:0"}, {"assignments": [333], "declarations": [{"constant": false, "id": 333, "mutability": "mutable", "name": "r", "nameLocation": "3049:1:0", "nodeType": "VariableDeclaration", "scope": 365, "src": "3044:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 332, "name": "bool", "nodeType": "ElementaryTypeName", "src": "3044:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 347, "initialValue": {"arguments": [{"expression": {"id": 336, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "3085:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 337, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3089:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "3085:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"expression": {"id": 338, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "3109:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 339, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3113:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "3109:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 345, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 340, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 290, "src": "3133:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 343, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 341, "name": "maxValue", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 324, "src": "3142:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 342, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3153:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "3142:12:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 344, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "3141:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "3133:22:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 334, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "3053:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 335, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3059:12:0", "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1438, "src": "3053:18: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": 346, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3053:112:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "3044:121:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 351, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 349, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 333, "src": "3189:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 350, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "3194:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "3189:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "4661696c65642073656c66207472616e7366657246726f6d", "id": 352, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3200:26:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_9cc7d8a733c4f125d07ea42c0801b58cf274c6c8f0f58a89b65080748f240279", "typeString": "literal_string \"Failed self transferFrom\""}, "value": "Failed self transferFrom"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_9cc7d8a733c4f125d07ea42c0801b58cf274c6c8f0f58a89b65080748f240279", "typeString": "literal_string \"Failed self transferFrom\""}], "id": 348, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "3175:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 353, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3175:52:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 354, "nodeType": "ExpressionStatement", "src": "3175:52:0"}, {"expression": {"arguments": [{"id": 356, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 294, "src": "3259:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"arguments": [{"expression": {"id": 359, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "3303:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 360, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3307:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "3303:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 357, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "3287:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 358, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3293:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "3287:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 361, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3287:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "53656c66207472616e7366657246726f6d20627265616b73206163636f756e74696e67", "id": 362, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3328:37:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_e6ef5170d9b502ee5cee11af7f2613a7aa058a19e2fd97a2e9ee35ab8e9a7d43", "typeString": "literal_string \"Self transferFrom breaks accounting\""}, "value": "Self transferFrom breaks accounting"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_e6ef5170d9b502ee5cee11af7f2613a7aa058a19e2fd97a2e9ee35ab8e9a7d43", "typeString": "literal_string \"Self transferFrom breaks accounting\""}], "id": 355, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "3237:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 363, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3237:138:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 364, "nodeType": "ExpressionStatement", "src": "3237:138:0"}]}, "functionSelector": "fd8593f9", "id": 366, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_selfTransferFrom", "nameLocation": "2678:35:0", "nodeType": "FunctionDefinition", "parameters": {"id": 291, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 290, "mutability": "mutable", "name": "value", "nameLocation": "2722:5:0", "nodeType": "VariableDeclaration", "scope": 366, "src": "2714:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 289, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2714:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "2713:15:0"}, "returnParameters": {"id": 292, "nodeType": "ParameterList", "parameters": [], "src": "2736:0:0"}, "scope": 1131, "src": "2669:713:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 422, "nodeType": "Block", "src": "3501:393:0", "statements": [{"assignments": [372], "declarations": [{"constant": false, "id": 372, "mutability": "mutable", "name": "balance_sender", "nameLocation": "3519:14:0", "nodeType": "VariableDeclaration", "scope": 422, "src": "3511:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 371, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3511:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 380, "initialValue": {"arguments": [{"arguments": [{"id": 377, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "3560:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 376, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3552:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 375, "name": "address", "nodeType": "ElementaryTypeName", "src": "3552:7:0", "typeDescriptions": {}}}, "id": 378, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3552:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 373, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "3536:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 374, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3542:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "3536:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 379, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3536:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "3511:55:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 384, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 382, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 372, "src": "3584:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 383, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3601:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "3584:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 381, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "3576:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 385, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3576:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 386, "nodeType": "ExpressionStatement", "src": "3576:27:0"}, {"assignments": [388], "declarations": [{"constant": false, "id": 388, "mutability": "mutable", "name": "r", "nameLocation": "3619:1:0", "nodeType": "VariableDeclaration", "scope": 422, "src": "3614:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 387, "name": "bool", "nodeType": "ElementaryTypeName", "src": "3614:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 402, "initialValue": {"arguments": [{"arguments": [{"id": 393, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "3646:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 392, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3638:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 391, "name": "address", "nodeType": "ElementaryTypeName", "src": "3638:7:0", "typeDescriptions": {}}}, "id": 394, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3638:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 400, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 395, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 368, "src": "3653:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 398, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 396, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 372, "src": "3662:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 397, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3679:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "3662:18:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 399, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "3661:20:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "3653:28:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 389, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "3623:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 390, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3629:8:0", "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 1406, "src": "3623:14:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 401, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3623:59:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "3614:68:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 406, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 404, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 388, "src": "3706:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 405, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "3711:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "3706:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "4661696c65642073656c66207472616e73666572", "id": 407, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3717:22:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_203b8d2c9206f4d321bf3603e1a047a66da67e4933f4c9da17d78418b70c0086", "typeString": "literal_string \"Failed self transfer\""}, "value": "Failed self transfer"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_203b8d2c9206f4d321bf3603e1a047a66da67e4933f4c9da17d78418b70c0086", "typeString": "literal_string \"Failed self transfer\""}], "id": 403, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "3692:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 408, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3692:48:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 409, "nodeType": "ExpressionStatement", "src": "3692:48:0"}, {"expression": {"arguments": [{"id": 411, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 372, "src": "3772:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"arguments": [{"arguments": [{"id": 416, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "3824:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 415, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3816:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 414, "name": "address", "nodeType": "ElementaryTypeName", "src": "3816:7:0", "typeDescriptions": {}}}, "id": 417, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3816:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 412, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "3800:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 413, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3806:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "3800:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 418, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3800:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "53656c66207472616e7366657220627265616b73206163636f756e74696e67", "id": 419, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3844:33:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_50f8702111eb5c314e708f2e293f4faad06619956962f7063d5c98e220d6955f", "typeString": "literal_string \"Self transfer breaks accounting\""}, "value": "Self transfer breaks accounting"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_50f8702111eb5c314e708f2e293f4faad06619956962f7063d5c98e220d6955f", "typeString": "literal_string \"Self transfer breaks accounting\""}], "id": 410, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "3750:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 420, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3750:137:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 421, "nodeType": "ExpressionStatement", "src": "3750:137:0"}]}, "functionSelector": "be61b745", "id": 423, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_selfTransfer", "nameLocation": "3447:31:0", "nodeType": "FunctionDefinition", "parameters": {"id": 369, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 368, "mutability": "mutable", "name": "value", "nameLocation": "3487:5:0", "nodeType": "VariableDeclaration", "scope": 423, "src": "3479:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 367, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3479:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "3478:15:0"}, "returnParameters": {"id": 370, "nodeType": "ParameterList", "parameters": [], "src": "3501:0:0"}, "scope": 1131, "src": "3438:456:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 503, "nodeType": "Block", "src": "4064:812:0", "statements": [{"assignments": [429], "declarations": [{"constant": false, "id": 429, "mutability": "mutable", "name": "balance_sender", "nameLocation": "4082:14:0", "nodeType": "VariableDeclaration", "scope": 503, "src": "4074:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 428, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4074:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 435, "initialValue": {"arguments": [{"expression": {"id": 432, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4115:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 433, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4119:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "4115:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 430, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "4099:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 431, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4105:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "4099:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 434, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4099:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "4074:52:0"}, {"assignments": [437], "declarations": [{"constant": false, "id": 437, "mutability": "mutable", "name": "balance_receiver", "nameLocation": "4144:16:0", "nodeType": "VariableDeclaration", "scope": 503, "src": "4136:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 436, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4136:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 442, "initialValue": {"arguments": [{"id": 440, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 425, "src": "4179:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 438, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "4163:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 439, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4169:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "4163:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 441, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4163:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "4136:50:0"}, {"assignments": [444], "declarations": [{"constant": false, "id": 444, "mutability": "mutable", "name": "allowance", "nameLocation": "4204:9:0", "nodeType": "VariableDeclaration", "scope": 503, "src": "4196:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 443, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4196:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 454, "initialValue": {"arguments": [{"expression": {"id": 447, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4232:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 448, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4236:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "4232:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 451, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "4252:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 450, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4244:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 449, "name": "address", "nodeType": "ElementaryTypeName", "src": "4244:7:0", "typeDescriptions": {}}}, "id": 452, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4244:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 445, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "4216:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 446, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4222:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "4216:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 453, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4216:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "4196:62:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 462, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 458, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 456, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 429, "src": "4276:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 457, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4293:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "4276:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 461, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 459, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 444, "src": "4298:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 460, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 429, "src": "4310:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "4298:26:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "4276:48:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 455, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "4268:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 463, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4268:57:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 464, "nodeType": "ExpressionStatement", "src": "4268:57:0"}, {"assignments": [466], "declarations": [{"constant": false, "id": 466, "mutability": "mutable", "name": "r", "nameLocation": "4341:1:0", "nodeType": "VariableDeclaration", "scope": 503, "src": "4336:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 465, "name": "bool", "nodeType": "ElementaryTypeName", "src": "4336:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 476, "initialValue": {"arguments": [{"expression": {"id": 469, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4364:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 470, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4368:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "4364:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 471, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 425, "src": "4376:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 474, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 472, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 429, "src": "4384:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 473, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4401:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "4384:18:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 467, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "4345:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 468, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4351:12:0", "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1438, "src": "4345:18: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": 475, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4345:58:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "4336:67:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 480, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 478, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 466, "src": "4440:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "66616c7365", "id": 479, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "4445:5:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}, "src": "4440:10:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "5375636365737366756c207472616e7366657246726f6d20666f72206d6f7265207468616e206163636f756e742062616c616e6365", "id": 481, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4464:55:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_12ddc4c95aa497b51895a755d4d8b0acc6b33a5329e40931b8c326417d76f074", "typeString": "literal_string \"Successful transferFrom for more than account balance\""}, "value": "Successful transferFrom for more than account balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_12ddc4c95aa497b51895a755d4d8b0acc6b33a5329e40931b8c326417d76f074", "typeString": "literal_string \"Successful transferFrom for more than account balance\""}], "id": 477, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "4413:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 482, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4413:116:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 483, "nodeType": "ExpressionStatement", "src": "4413:116:0"}, {"expression": {"arguments": [{"arguments": [{"expression": {"id": 487, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4577:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 488, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4581:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "4577:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 485, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "4561:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 486, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4567:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "4561:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 489, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4561:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 490, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 429, "src": "4602:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5472616e7366657246726f6d20666f72206d6f7265207468616e2062616c616e6365206d6f64696669656420736f757263652062616c616e6365", "id": 491, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4630:60:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_b94fd449d2a6ec1c7602d10b60585c3328876d2803977728c362b6bf1b601e5e", "typeString": "literal_string \"TransferFrom for more than balance modified source balance\""}, "value": "TransferFrom for more than balance modified source balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_b94fd449d2a6ec1c7602d10b60585c3328876d2803977728c362b6bf1b601e5e", "typeString": "literal_string \"TransferFrom for more than balance modified source balance\""}], "id": 484, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "4539:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 492, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4539:161:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 493, "nodeType": "ExpressionStatement", "src": "4539:161:0"}, {"expression": {"arguments": [{"arguments": [{"id": 497, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 425, "src": "4748:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 495, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "4732:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 496, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4738:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "4732:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 498, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4732:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 499, "name": "balance_receiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 437, "src": "4769:16:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5472616e7366657246726f6d20666f72206d6f7265207468616e2062616c616e6365206d6f646966696564207461726765742062616c616e6365", "id": 500, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4799:60:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_705f9111e5b540a13a06511dabf64f091748dc955032b620b26c0131c05922fe", "typeString": "literal_string \"TransferFrom for more than balance modified target balance\""}, "value": "TransferFrom for more than balance modified target balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_705f9111e5b540a13a06511dabf64f091748dc955032b620b26c0131c05922fe", "typeString": "literal_string \"TransferFrom for more than balance modified target balance\""}], "id": 494, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "4710:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 501, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4710:159:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 502, "nodeType": "ExpressionStatement", "src": "4710:159:0"}]}, "functionSelector": "8c186718", "id": 504, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transferFromMoreThanBalance", "nameLocation": "3980:46:0", "nodeType": "FunctionDefinition", "parameters": {"id": 426, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 425, "mutability": "mutable", "name": "target", "nameLocation": "4044:6:0", "nodeType": "VariableDeclaration", "scope": 504, "src": "4036:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 424, "name": "address", "nodeType": "ElementaryTypeName", "src": "4036:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "4026:30:0"}, "returnParameters": {"id": 427, "nodeType": "ParameterList", "parameters": [], "src": "4064:0:0"}, "scope": 1131, "src": "3971:905:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 570, "nodeType": "Block", "src": "5028:688:0", "statements": [{"assignments": [510], "declarations": [{"constant": false, "id": 510, "mutability": "mutable", "name": "balance_sender", "nameLocation": "5046:14:0", "nodeType": "VariableDeclaration", "scope": 570, "src": "5038:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 509, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5038:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 518, "initialValue": {"arguments": [{"arguments": [{"id": 515, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "5087:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 514, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5079:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 513, "name": "address", "nodeType": "ElementaryTypeName", "src": "5079:7:0", "typeDescriptions": {}}}, "id": 516, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5079:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 511, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "5063:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 512, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5069:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "5063:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 517, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5063:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "5038:55:0"}, {"assignments": [520], "declarations": [{"constant": false, "id": 520, "mutability": "mutable", "name": "balance_receiver", "nameLocation": "5111:16:0", "nodeType": "VariableDeclaration", "scope": 570, "src": "5103:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 519, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5103:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 525, "initialValue": {"arguments": [{"id": 523, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 506, "src": "5146:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 521, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "5130:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 522, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5136:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "5130:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 524, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5130:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "5103:50:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 529, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 527, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 510, "src": "5171:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 528, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5188:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "5171:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 526, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "5163:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 530, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5163:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 531, "nodeType": "ExpressionStatement", "src": "5163:27:0"}, {"assignments": [533], "declarations": [{"constant": false, "id": 533, "mutability": "mutable", "name": "r", "nameLocation": "5206:1:0", "nodeType": "VariableDeclaration", "scope": 570, "src": "5201:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 532, "name": "bool", "nodeType": "ElementaryTypeName", "src": "5201:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 541, "initialValue": {"arguments": [{"id": 536, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 506, "src": "5225:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 539, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 537, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 510, "src": "5233:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 538, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5250:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "5233:18:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 534, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "5210:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 535, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5216:8:0", "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 1406, "src": "5210:14:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 540, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5210:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "5201:51:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 545, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 543, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 533, "src": "5289:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "66616c7365", "id": 544, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "5294:5:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}, "src": "5289:10:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "5375636365737366756c207472616e7366657220666f72206d6f7265207468616e206163636f756e742062616c616e6365", "id": 546, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5313:51:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_40d7e67dc59bdf8af7dd54480a25a09ce1fd4b4825a84158d6cc5f4660e04288", "typeString": "literal_string \"Successful transfer for more than account balance\""}, "value": "Successful transfer for more than account balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_40d7e67dc59bdf8af7dd54480a25a09ce1fd4b4825a84158d6cc5f4660e04288", "typeString": "literal_string \"Successful transfer for more than account balance\""}], "id": 542, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "5262:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 547, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5262:112:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 548, "nodeType": "ExpressionStatement", "src": "5262:112:0"}, {"expression": {"arguments": [{"arguments": [{"arguments": [{"id": 554, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "5430:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 553, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5422:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 552, "name": "address", "nodeType": "ElementaryTypeName", "src": "5422:7:0", "typeDescriptions": {}}}, "id": 555, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5422:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 550, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "5406:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 551, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5412:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "5406:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 556, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5406:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 557, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 510, "src": "5450:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5472616e7366657220666f72206d6f7265207468616e2062616c616e6365206d6f64696669656420736f757263652062616c616e6365", "id": 558, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5478:56:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_ad9fd87b9d1bf38692289811c9b20b5bc1739145770a010036fb33d7ae1196e3", "typeString": "literal_string \"Transfer for more than balance modified source balance\""}, "value": "Transfer for more than balance modified source balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_ad9fd87b9d1bf38692289811c9b20b5bc1739145770a010036fb33d7ae1196e3", "typeString": "literal_string \"Transfer for more than balance modified source balance\""}], "id": 549, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "5384:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 559, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5384:160:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 560, "nodeType": "ExpressionStatement", "src": "5384:160:0"}, {"expression": {"arguments": [{"arguments": [{"id": 564, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 506, "src": "5592:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 562, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "5576:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 563, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5582:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "5576:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 565, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5576:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 566, "name": "balance_receiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 520, "src": "5613:16:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5472616e7366657220666f72206d6f7265207468616e2062616c616e6365206d6f646966696564207461726765742062616c616e6365", "id": 567, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5643:56:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_0320f4f8cbb25868baccd458591791d386adef59f0c76f7c42aa00b959b3e313", "typeString": "literal_string \"Transfer for more than balance modified target balance\""}, "value": "Transfer for more than balance modified target balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_0320f4f8cbb25868baccd458591791d386adef59f0c76f7c42aa00b959b3e313", "typeString": "literal_string \"Transfer for more than balance modified target balance\""}], "id": 561, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "5554:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 568, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5554:155:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 569, "nodeType": "ExpressionStatement", "src": "5554:155:0"}]}, "functionSelector": "6706ede0", "id": 571, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transferMoreThanBalance", "nameLocation": "4962:42:0", "nodeType": "FunctionDefinition", "parameters": {"id": 507, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 506, "mutability": "mutable", "name": "target", "nameLocation": "5013:6:0", "nodeType": "VariableDeclaration", "scope": 571, "src": "5005:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 505, "name": "address", "nodeType": "ElementaryTypeName", "src": "5005:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "5004:16:0"}, "returnParameters": {"id": 508, "nodeType": "ParameterList", "parameters": [], "src": "5028:0:0"}, "scope": 1131, "src": "4953:763:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 635, "nodeType": "Block", "src": "5849:594:0", "statements": [{"assignments": [577], "declarations": [{"constant": false, "id": 577, "mutability": "mutable", "name": "balance_sender", "nameLocation": "5867:14:0", "nodeType": "VariableDeclaration", "scope": 635, "src": "5859:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 576, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5859:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 585, "initialValue": {"arguments": [{"arguments": [{"id": 582, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "5908:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 581, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5900:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 580, "name": "address", "nodeType": "ElementaryTypeName", "src": "5900:7:0", "typeDescriptions": {}}}, "id": 583, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5900:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 578, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "5884:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 579, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5890:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "5884:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 584, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5884:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "5859:55:0"}, {"assignments": [587], "declarations": [{"constant": false, "id": 587, "mutability": "mutable", "name": "balance_receiver", "nameLocation": "5932:16:0", "nodeType": "VariableDeclaration", "scope": 635, "src": "5924:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 586, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5924:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 592, "initialValue": {"arguments": [{"id": 590, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 573, "src": "5967:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 588, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "5951:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 589, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5957:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "5951:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 591, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5951:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "5924:50:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 596, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 594, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 577, "src": "5992:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 595, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6009:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "5992:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 593, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "5984:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 597, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5984:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 598, "nodeType": "ExpressionStatement", "src": "5984:27:0"}, {"assignments": [600], "declarations": [{"constant": false, "id": 600, "mutability": "mutable", "name": "r", "nameLocation": "6027:1:0", "nodeType": "VariableDeclaration", "scope": 635, "src": "6022:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 599, "name": "bool", "nodeType": "ElementaryTypeName", "src": "6022:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 606, "initialValue": {"arguments": [{"id": 603, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 573, "src": "6046:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"hexValue": "30", "id": 604, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6054:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}], "expression": {"id": 601, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6031:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 602, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6037:8:0", "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 1406, "src": "6031:14:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 605, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6031:25:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "6022:34:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 610, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 608, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 600, "src": "6080:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 609, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "6085:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "6080:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "5a65726f20616d6f756e74207472616e73666572206661696c6564", "id": 611, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6091:29:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_bfc7d7846be99831830f9cf0ebaa4b6f95797b4bf573d8bf4bd03ae5adde7f07", "typeString": "literal_string \"Zero amount transfer failed\""}, "value": "Zero amount transfer failed"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_bfc7d7846be99831830f9cf0ebaa4b6f95797b4bf573d8bf4bd03ae5adde7f07", "typeString": "literal_string \"Zero amount transfer failed\""}], "id": 607, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "6066:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 612, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6066:55:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 613, "nodeType": "ExpressionStatement", "src": "6066:55:0"}, {"expression": {"arguments": [{"arguments": [{"arguments": [{"id": 619, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "6177:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 618, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6169:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 617, "name": "address", "nodeType": "ElementaryTypeName", "src": "6169:7:0", "typeDescriptions": {}}}, "id": 620, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6169:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 615, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6153:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 616, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6159:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "6153:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 621, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6153:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 622, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 577, "src": "6197:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5a65726f20616d6f756e74207472616e73666572206d6f64696669656420736f757263652062616c616e6365", "id": 623, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6225:46:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_6e7825686f55fa09db57dfc64880c4b758090e929bb28222d20ba65a67ccabc0", "typeString": "literal_string \"Zero amount transfer modified source balance\""}, "value": "Zero amount transfer modified source balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_6e7825686f55fa09db57dfc64880c4b758090e929bb28222d20ba65a67ccabc0", "typeString": "literal_string \"Zero amount transfer modified source balance\""}], "id": 614, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "6131:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 624, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6131:150:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 625, "nodeType": "ExpressionStatement", "src": "6131:150:0"}, {"expression": {"arguments": [{"arguments": [{"id": 629, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 573, "src": "6329:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 627, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6313:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 628, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6319:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "6313:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 630, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6313:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 631, "name": "balance_receiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 587, "src": "6350:16:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5a65726f20616d6f756e74207472616e73666572206d6f646966696564207461726765742062616c616e6365", "id": 632, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6380:46:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_11074db38b932ee496eab945505435c22b2dd22de4d49acb0aaae1712fb04874", "typeString": "literal_string \"Zero amount transfer modified target balance\""}, "value": "Zero amount transfer modified target balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_11074db38b932ee496eab945505435c22b2dd22de4d49acb0aaae1712fb04874", "typeString": "literal_string \"Zero amount transfer modified target balance\""}], "id": 626, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "6291:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 633, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6291:145:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 634, "nodeType": "ExpressionStatement", "src": "6291:145:0"}]}, "functionSelector": "ecb9d4aa", "id": 636, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transferZeroAmount", "nameLocation": "5788:37:0", "nodeType": "FunctionDefinition", "parameters": {"id": 574, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 573, "mutability": "mutable", "name": "target", "nameLocation": "5834:6:0", "nodeType": "VariableDeclaration", "scope": 636, "src": "5826:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 572, "name": "address", "nodeType": "ElementaryTypeName", "src": "5826:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "5825:16:0"}, "returnParameters": {"id": 575, "nodeType": "ParameterList", "parameters": [], "src": "5849:0:0"}, "scope": 1131, "src": "5779:664:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 714, "nodeType": "Block", "src": "6580:705:0", "statements": [{"assignments": [642], "declarations": [{"constant": false, "id": 642, "mutability": "mutable", "name": "balance_sender", "nameLocation": "6598:14:0", "nodeType": "VariableDeclaration", "scope": 714, "src": "6590:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 641, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6590:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 648, "initialValue": {"arguments": [{"expression": {"id": 645, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6631:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 646, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6635:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "6631:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 643, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6615:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 644, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6621:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "6615:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 647, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6615:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "6590:52:0"}, {"assignments": [650], "declarations": [{"constant": false, "id": 650, "mutability": "mutable", "name": "balance_receiver", "nameLocation": "6660:16:0", "nodeType": "VariableDeclaration", "scope": 714, "src": "6652:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 649, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6652:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 655, "initialValue": {"arguments": [{"id": 653, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 638, "src": "6695:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 651, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6679:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 652, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6685:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "6679:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 654, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6679:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "6652:50:0"}, {"assignments": [657], "declarations": [{"constant": false, "id": 657, "mutability": "mutable", "name": "allowance", "nameLocation": "6720:9:0", "nodeType": "VariableDeclaration", "scope": 714, "src": "6712:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 656, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6712:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 667, "initialValue": {"arguments": [{"expression": {"id": 660, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6748:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 661, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6752:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "6748:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 664, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "6768:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 663, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6760:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 662, "name": "address", "nodeType": "ElementaryTypeName", "src": "6760:7:0", "typeDescriptions": {}}}, "id": 665, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6760:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 658, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6732:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 659, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6738:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "6732:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 666, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6732:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "6712:62:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 675, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 671, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 669, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 642, "src": "6792:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 670, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6809:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "6792:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 674, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 672, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 657, "src": "6814:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 673, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6826:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "6814:13:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "6792:35:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 668, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "6784:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 676, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6784:44:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 677, "nodeType": "ExpressionStatement", "src": "6784:44:0"}, {"assignments": [679], "declarations": [{"constant": false, "id": 679, "mutability": "mutable", "name": "r", "nameLocation": "6844:1:0", "nodeType": "VariableDeclaration", "scope": 714, "src": "6839:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 678, "name": "bool", "nodeType": "ElementaryTypeName", "src": "6839:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 687, "initialValue": {"arguments": [{"expression": {"id": 682, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6867:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 683, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6871:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "6867:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 684, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 638, "src": "6879:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"hexValue": "30", "id": 685, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6887:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}], "expression": {"id": 680, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6848:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 681, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6854:12:0", "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1438, "src": "6848:18: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": 686, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6848:41:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "6839:50:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 691, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 689, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 679, "src": "6913:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 690, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "6918:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "6913:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "5a65726f20616d6f756e74207472616e7366657246726f6d206661696c6564", "id": 692, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6924:33:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_74ad7b2684c30a83b97c861b3065f1017e668f6d068909836cb599821683e9b1", "typeString": "literal_string \"Zero amount transferFrom failed\""}, "value": "Zero amount transferFrom failed"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_74ad7b2684c30a83b97c861b3065f1017e668f6d068909836cb599821683e9b1", "typeString": "literal_string \"Zero amount transferFrom failed\""}], "id": 688, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "6899:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 693, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6899:59:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 694, "nodeType": "ExpressionStatement", "src": "6899:59:0"}, {"expression": {"arguments": [{"arguments": [{"expression": {"id": 698, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "7006:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 699, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7010:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "7006:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 696, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6990:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 697, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6996:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "6990:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 700, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6990:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 701, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 642, "src": "7031:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5a65726f20616d6f756e74207472616e7366657246726f6d206d6f64696669656420736f757263652062616c616e6365", "id": 702, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7059:50:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_4ffc469e8d30fa59088d89d46e012574733b2ba669c1890db4b9b17a05c46a6f", "typeString": "literal_string \"Zero amount transferFrom modified source balance\""}, "value": "Zero amount transferFrom modified source balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_4ffc469e8d30fa59088d89d46e012574733b2ba669c1890db4b9b17a05c46a6f", "typeString": "literal_string \"Zero amount transferFrom modified source balance\""}], "id": 695, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "6968:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 703, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6968:151:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 704, "nodeType": "ExpressionStatement", "src": "6968:151:0"}, {"expression": {"arguments": [{"arguments": [{"id": 708, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 638, "src": "7167:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 706, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "7151:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 707, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7157:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "7151:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 709, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7151:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 710, "name": "balance_receiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 650, "src": "7188:16:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5a65726f20616d6f756e74207472616e7366657246726f6d206d6f646966696564207461726765742062616c616e6365", "id": 711, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7218:50:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_c56dad9c810c9881b74941429208cfe72a94e8c2b62d70bf7f694c3a1dcbdc78", "typeString": "literal_string \"Zero amount transferFrom modified target balance\""}, "value": "Zero amount transferFrom modified target balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_c56dad9c810c9881b74941429208cfe72a94e8c2b62d70bf7f694c3a1dcbdc78", "typeString": "literal_string \"Zero amount transferFrom modified target balance\""}], "id": 705, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "7129:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 712, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7129:149:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 713, "nodeType": "ExpressionStatement", "src": "7129:149:0"}]}, "functionSelector": "cdbebc51", "id": 715, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transferFromZeroAmount", "nameLocation": "6515:41:0", "nodeType": "FunctionDefinition", "parameters": {"id": 639, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 638, "mutability": "mutable", "name": "target", "nameLocation": "6565:6:0", "nodeType": "VariableDeclaration", "scope": 715, "src": "6557:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 637, "name": "address", "nodeType": "ElementaryTypeName", "src": "6557:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "6556:16:0"}, "returnParameters": {"id": 640, "nodeType": "ParameterList", "parameters": [], "src": "6580:0:0"}, "scope": 1131, "src": "6506:779:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 803, "nodeType": "Block", "src": "7441:717:0", "statements": [{"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 728, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 723, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 717, "src": "7459:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"arguments": [{"id": 726, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "7477:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 725, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7469:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 724, "name": "address", "nodeType": "ElementaryTypeName", "src": "7469:7:0", "typeDescriptions": {}}}, "id": 727, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7469:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "7459:23:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 722, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "7451:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 729, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7451:32:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 730, "nodeType": "ExpressionStatement", "src": "7451:32:0"}, {"assignments": [732], "declarations": [{"constant": false, "id": 732, "mutability": "mutable", "name": "balance_sender", "nameLocation": "7501:14:0", "nodeType": "VariableDeclaration", "scope": 803, "src": "7493:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 731, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7493:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 740, "initialValue": {"arguments": [{"arguments": [{"id": 737, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "7542:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 736, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7534:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 735, "name": "address", "nodeType": "ElementaryTypeName", "src": "7534:7:0", "typeDescriptions": {}}}, "id": 738, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7534:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 733, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "7518:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 734, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7524:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "7518:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 739, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7518:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "7493:55:0"}, {"assignments": [742], "declarations": [{"constant": false, "id": 742, "mutability": "mutable", "name": "balance_receiver", "nameLocation": "7566:16:0", "nodeType": "VariableDeclaration", "scope": 803, "src": "7558:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 741, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7558:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 747, "initialValue": {"arguments": [{"id": 745, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 717, "src": "7601:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 743, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "7585:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 744, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7591:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "7585:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 746, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7585:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "7558:50:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 751, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 749, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 732, "src": "7626:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "32", "id": 750, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "7643:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "src": "7626:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 748, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "7618:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 752, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7618:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 753, "nodeType": "ExpressionStatement", "src": "7618:27:0"}, {"assignments": [755], "declarations": [{"constant": false, "id": 755, "mutability": "mutable", "name": "transfer_value", "nameLocation": "7663:14:0", "nodeType": "VariableDeclaration", "scope": 803, "src": "7655:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 754, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7655:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 762, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 761, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 758, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 756, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 719, "src": "7681:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"id": 757, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 732, "src": "7690:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "7681:23:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 759, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "7680:25:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 760, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "7708:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "7680:29:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "7655:54:0"}, {"assignments": [764], "declarations": [{"constant": false, "id": 764, "mutability": "mutable", "name": "r", "nameLocation": "7725:1:0", "nodeType": "VariableDeclaration", "scope": 803, "src": "7720:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 763, "name": "bool", "nodeType": "ElementaryTypeName", "src": "7720:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 770, "initialValue": {"arguments": [{"id": 767, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 717, "src": "7744:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 768, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 755, "src": "7752:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 765, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "7729:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 766, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7735:8:0", "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 1406, "src": "7729:14:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 769, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7729:38:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "7720:47:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 774, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 772, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 764, "src": "7791:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 773, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "7796:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "7791:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "7472616e73666572206661696c6564", "id": 775, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7802:17:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_df1797085e2da014ef9392ee25ab0802d6ce132451397172f17fd86110e2e02b", "typeString": "literal_string \"transfer failed\""}, "value": "transfer failed"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_df1797085e2da014ef9392ee25ab0802d6ce132451397172f17fd86110e2e02b", "typeString": "literal_string \"transfer failed\""}], "id": 771, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "7777:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 776, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7777:43:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 777, "nodeType": "ExpressionStatement", "src": "7777:43:0"}, {"expression": {"arguments": [{"arguments": [{"arguments": [{"id": 783, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "7876:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 782, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7868:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 781, "name": "address", "nodeType": "ElementaryTypeName", "src": "7868:7:0", "typeDescriptions": {}}}, "id": 784, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7868:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 779, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "7852:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 780, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7858:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "7852:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 785, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7852:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 788, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 786, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 732, "src": "7896:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 787, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 755, "src": "7913:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "7896:31:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "57726f6e6720736f757263652062616c616e6365206166746572207472616e73666572", "id": 789, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7941:37:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_7ce124ac73b9f6a6c1c219234d118bbd125d2f3578904c511230f33ef8550017", "typeString": "literal_string \"Wrong source balance after transfer\""}, "value": "Wrong source balance after transfer"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_7ce124ac73b9f6a6c1c219234d118bbd125d2f3578904c511230f33ef8550017", "typeString": "literal_string \"Wrong source balance after transfer\""}], "id": 778, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "7830:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 790, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7830:158:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 791, "nodeType": "ExpressionStatement", "src": "7830:158:0"}, {"expression": {"arguments": [{"arguments": [{"id": 795, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 717, "src": "8036:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 793, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "8020:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 794, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8026:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "8020:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 796, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8020:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 799, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 797, "name": "balance_receiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 742, "src": "8057:16:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 798, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 755, "src": "8076:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8057:33:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "57726f6e67207461726765742062616c616e6365206166746572207472616e73666572", "id": 800, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8104:37:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_df344c7b0d5e9a0d7322b07c661c4d82b5977664fd8d80b8bb34466f472706a5", "typeString": "literal_string \"Wrong target balance after transfer\""}, "value": "Wrong target balance after transfer"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_df344c7b0d5e9a0d7322b07c661c4d82b5977664fd8d80b8bb34466f472706a5", "typeString": "literal_string \"Wrong target balance after transfer\""}], "id": 792, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "7998:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 801, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7998:153:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 802, "nodeType": "ExpressionStatement", "src": "7998:153:0"}]}, "functionSelector": "a0662c50", "id": 804, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transfer", "nameLocation": "7352:27:0", "nodeType": "FunctionDefinition", "parameters": {"id": 720, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 717, "mutability": "mutable", "name": "target", "nameLocation": "7397:6:0", "nodeType": "VariableDeclaration", "scope": 804, "src": "7389:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 716, "name": "address", "nodeType": "ElementaryTypeName", "src": "7389:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 719, "mutability": "mutable", "name": "amount", "nameLocation": "7421:6:0", "nodeType": "VariableDeclaration", "scope": 804, "src": "7413:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 718, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7413:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "7379:54:0"}, "returnParameters": {"id": 721, "nodeType": "ParameterList", "parameters": [], "src": "7441:0:0"}, "scope": 1131, "src": "7343:815:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 913, "nodeType": "Block", "src": "8318:876:0", "statements": [{"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 817, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 812, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 806, "src": "8336:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"arguments": [{"id": 815, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "8354:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 814, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8346:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 813, "name": "address", "nodeType": "ElementaryTypeName", "src": "8346:7:0", "typeDescriptions": {}}}, "id": 816, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8346:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "8336:23:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 811, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "8328:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 818, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8328:32:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 819, "nodeType": "ExpressionStatement", "src": "8328:32:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 824, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 821, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 806, "src": "8378:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"expression": {"id": 822, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8388:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 823, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8392:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "8388:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "8378:20:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 820, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "8370:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 825, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8370:29:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 826, "nodeType": "ExpressionStatement", "src": "8370:29:0"}, {"assignments": [828], "declarations": [{"constant": false, "id": 828, "mutability": "mutable", "name": "balance_sender", "nameLocation": "8417:14:0", "nodeType": "VariableDeclaration", "scope": 913, "src": "8409:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 827, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8409:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 834, "initialValue": {"arguments": [{"expression": {"id": 831, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8450:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 832, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8454:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "8450:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 829, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "8434:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 830, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8440:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "8434:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 833, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8434:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "8409:52:0"}, {"assignments": [836], "declarations": [{"constant": false, "id": 836, "mutability": "mutable", "name": "balance_receiver", "nameLocation": "8479:16:0", "nodeType": "VariableDeclaration", "scope": 913, "src": "8471:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 835, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8471:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 841, "initialValue": {"arguments": [{"id": 839, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 806, "src": "8514:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 837, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "8498:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 838, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8504:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "8498:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 840, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8498:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "8471:50:0"}, {"assignments": [843], "declarations": [{"constant": false, "id": 843, "mutability": "mutable", "name": "allowance", "nameLocation": "8539:9:0", "nodeType": "VariableDeclaration", "scope": 913, "src": "8531:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 842, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8531:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 853, "initialValue": {"arguments": [{"expression": {"id": 846, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8567:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 847, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8571:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "8567:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 850, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "8587:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 849, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8579:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 848, "name": "address", "nodeType": "ElementaryTypeName", "src": "8579:7:0", "typeDescriptions": {}}}, "id": 851, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8579:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 844, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "8551:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 845, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8557:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "8551:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 852, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8551:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "8531:62:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 861, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 857, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 855, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 828, "src": "8611:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "32", "id": 856, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8628:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "src": "8611:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 860, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 858, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 843, "src": "8633:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 859, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 828, "src": "8645:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8633:26:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "8611:48:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 854, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "8603:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 862, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8603:57:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 863, "nodeType": "ExpressionStatement", "src": "8603:57:0"}, {"assignments": [865], "declarations": [{"constant": false, "id": 865, "mutability": "mutable", "name": "transfer_value", "nameLocation": "8678:14:0", "nodeType": "VariableDeclaration", "scope": 913, "src": "8670:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 864, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8670:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 872, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 871, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 868, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 866, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 808, "src": "8696:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"id": 867, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 828, "src": "8705:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8696:23:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 869, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "8695:25:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 870, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8723:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "8695:29:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "8670:54:0"}, {"assignments": [874], "declarations": [{"constant": false, "id": 874, "mutability": "mutable", "name": "r", "nameLocation": "8740:1:0", "nodeType": "VariableDeclaration", "scope": 913, "src": "8735:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 873, "name": "bool", "nodeType": "ElementaryTypeName", "src": "8735:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 882, "initialValue": {"arguments": [{"expression": {"id": 877, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8763:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 878, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8767:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "8763:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 879, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 806, "src": "8775:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 880, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 865, "src": "8783:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 875, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "8744:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 876, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8750:12:0", "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1438, "src": "8744:18: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": 881, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8744:54:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "8735:63:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 886, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 884, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 874, "src": "8822:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 885, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "8827:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "8822:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "7472616e73666572206661696c6564", "id": 887, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8833:17:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_df1797085e2da014ef9392ee25ab0802d6ce132451397172f17fd86110e2e02b", "typeString": "literal_string \"transfer failed\""}, "value": "transfer failed"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_df1797085e2da014ef9392ee25ab0802d6ce132451397172f17fd86110e2e02b", "typeString": "literal_string \"transfer failed\""}], "id": 883, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "8808:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 888, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8808:43:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 889, "nodeType": "ExpressionStatement", "src": "8808:43:0"}, {"expression": {"arguments": [{"arguments": [{"expression": {"id": 893, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8899:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 894, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8903:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "8899:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 891, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "8883:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 892, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8889:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "8883:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 895, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8883:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 898, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 896, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 828, "src": "8924:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 897, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 865, "src": "8941:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8924:31:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "57726f6e6720736f757263652062616c616e6365206166746572207472616e7366657246726f6d", "id": 899, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8969:41:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_dc3e1f828fa627ce2d76378866b15349c14418e103afafdf5eabac357bf3d782", "typeString": "literal_string \"Wrong source balance after transferFrom\""}, "value": "Wrong source balance after transferFrom"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_dc3e1f828fa627ce2d76378866b15349c14418e103afafdf5eabac357bf3d782", "typeString": "literal_string \"Wrong source balance after transferFrom\""}], "id": 890, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "8861:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 900, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8861:159:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 901, "nodeType": "ExpressionStatement", "src": "8861:159:0"}, {"expression": {"arguments": [{"arguments": [{"id": 905, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 806, "src": "9068:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 903, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "9052:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 904, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9058:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "9052:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 906, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9052:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 909, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 907, "name": "balance_receiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 836, "src": "9089:16:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 908, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 865, "src": "9108:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "9089:33:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "57726f6e67207461726765742062616c616e6365206166746572207472616e7366657246726f6d", "id": 910, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9136:41:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_c99a92691bfd19cc286bbc345f3a135ed4ffe9a5d588f11d170c1c26267d1e61", "typeString": "literal_string \"Wrong target balance after transferFrom\""}, "value": "Wrong target balance after transferFrom"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_c99a92691bfd19cc286bbc345f3a135ed4ffe9a5d588f11d170c1c26267d1e61", "typeString": "literal_string \"Wrong target balance after transferFrom\""}], "id": 902, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "9030:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 911, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9030:157:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 912, "nodeType": "ExpressionStatement", "src": "9030:157:0"}]}, "functionSelector": "2adaa1c9", "id": 914, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transferFrom", "nameLocation": "8225:31:0", "nodeType": "FunctionDefinition", "parameters": {"id": 809, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 806, "mutability": "mutable", "name": "target", "nameLocation": "8274:6:0", "nodeType": "VariableDeclaration", "scope": 914, "src": "8266:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 805, "name": "address", "nodeType": "ElementaryTypeName", "src": "8266:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 808, "mutability": "mutable", "name": "amount", "nameLocation": "8298:6:0", "nodeType": "VariableDeclaration", "scope": 914, "src": "8290:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 807, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8290:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "8256:54:0"}, "returnParameters": {"id": 810, "nodeType": "ParameterList", "parameters": [], "src": "8318:0:0"}, "scope": 1131, "src": "8216:978:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 949, "nodeType": "Block", "src": "9347:271:0", "statements": [{"assignments": [922], "declarations": [{"constant": false, "id": 922, "mutability": "mutable", "name": "r", "nameLocation": "9362:1:0", "nodeType": "VariableDeclaration", "scope": 949, "src": "9357:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 921, "name": "bool", "nodeType": "ElementaryTypeName", "src": "9357:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 928, "initialValue": {"arguments": [{"id": 925, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 916, "src": "9380:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 926, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 918, "src": "9388:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 923, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "9366:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 924, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9372:7:0", "memberName": "approve", "nodeType": "MemberAccess", "referencedDeclaration": 1426, "src": "9366:13:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 927, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9366:29:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "9357:38:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 932, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 930, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 922, "src": "9419:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 931, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "9424:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "9419:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "4661696c656420746f2073657420616c6c6f77616e63652076696120617070726f7665", "id": 933, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9430:37:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_7f1d3dd4afc686915bdd345e1cfbb299e9d35b1e8bead035853e4d030efb124f", "typeString": "literal_string \"Failed to set allowance via approve\""}, "value": "Failed to set allowance via approve"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_7f1d3dd4afc686915bdd345e1cfbb299e9d35b1e8bead035853e4d030efb124f", "typeString": "literal_string \"Failed to set allowance via approve\""}], "id": 929, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "9405:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 934, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9405:63:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 935, "nodeType": "ExpressionStatement", "src": "9405:63:0"}, {"expression": {"arguments": [{"arguments": [{"arguments": [{"id": 941, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "9524:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 940, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "9516:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 939, "name": "address", "nodeType": "ElementaryTypeName", "src": "9516:7:0", "typeDescriptions": {}}}, "id": 942, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9516:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 943, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 916, "src": "9531:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 937, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "9500:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 938, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9506:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "9500:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 944, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9500:38:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 945, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 918, "src": "9552:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "416c6c6f77616e6365206e6f742073657420636f72726563746c79", "id": 946, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9572:29:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_039511649023dfd211115e041905531a23fddb46b54f5481aaa27b69c23b1ed9", "typeString": "literal_string \"Allowance not set correctly\""}, "value": "Allowance not set correctly"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_039511649023dfd211115e041905531a23fddb46b54f5481aaa27b69c23b1ed9", "typeString": "literal_string \"Allowance not set correctly\""}], "id": 936, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "9478:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 947, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9478:133:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 948, "nodeType": "ExpressionStatement", "src": "9478:133:0"}]}, "functionSelector": "5d1dfde0", "id": 950, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_setAllowance", "nameLocation": "9254:31:0", "nodeType": "FunctionDefinition", "parameters": {"id": 919, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 916, "mutability": "mutable", "name": "target", "nameLocation": "9303:6:0", "nodeType": "VariableDeclaration", "scope": 950, "src": "9295:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 915, "name": "address", "nodeType": "ElementaryTypeName", "src": "9295:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 918, "mutability": "mutable", "name": "amount", "nameLocation": "9327:6:0", "nodeType": "VariableDeclaration", "scope": 950, "src": "9319:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 917, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9319:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "9285:54:0"}, "returnParameters": {"id": 920, "nodeType": "ParameterList", "parameters": [], "src": "9347:0:0"}, "scope": 1131, "src": "9245:373:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 1017, "nodeType": "Block", "src": "9776:539:0", "statements": [{"assignments": [958], "declarations": [{"constant": false, "id": 958, "mutability": "mutable", "name": "r", "nameLocation": "9791:1:0", "nodeType": "VariableDeclaration", "scope": 1017, "src": "9786:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 957, "name": "bool", "nodeType": "ElementaryTypeName", "src": "9786:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 964, "initialValue": {"arguments": [{"id": 961, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 952, "src": "9809:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 962, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 954, "src": "9817:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 959, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "9795:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 960, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9801:7:0", "memberName": "approve", "nodeType": "MemberAccess", "referencedDeclaration": 1426, "src": "9795:13:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 963, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9795:29:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "9786:38:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 968, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 966, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 958, "src": "9848:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 967, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "9853:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "9848:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "4661696c656420746f2073657420616c6c6f77616e63652076696120617070726f7665", "id": 969, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9859:37:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_7f1d3dd4afc686915bdd345e1cfbb299e9d35b1e8bead035853e4d030efb124f", "typeString": "literal_string \"Failed to set allowance via approve\""}, "value": "Failed to set allowance via approve"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_7f1d3dd4afc686915bdd345e1cfbb299e9d35b1e8bead035853e4d030efb124f", "typeString": "literal_string \"Failed to set allowance via approve\""}], "id": 965, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "9834:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 970, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9834:63:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 971, "nodeType": "ExpressionStatement", "src": "9834:63:0"}, {"expression": {"arguments": [{"arguments": [{"arguments": [{"id": 977, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "9953:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 976, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "9945:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 975, "name": "address", "nodeType": "ElementaryTypeName", "src": "9945:7:0", "typeDescriptions": {}}}, "id": 978, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9945:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 979, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 952, "src": "9960:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 973, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "9929:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 974, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9935:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "9929:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 980, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9929:38:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 981, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 954, "src": "9981:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "416c6c6f77616e6365206e6f742073657420636f72726563746c79", "id": 982, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10001:29:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_039511649023dfd211115e041905531a23fddb46b54f5481aaa27b69c23b1ed9", "typeString": "literal_string \"Allowance not set correctly\""}, "value": "Allowance not set correctly"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_039511649023dfd211115e041905531a23fddb46b54f5481aaa27b69c23b1ed9", "typeString": "literal_string \"Allowance not set correctly\""}], "id": 972, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "9907:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 983, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9907:133:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 984, "nodeType": "ExpressionStatement", "src": "9907:133:0"}, {"expression": {"id": 993, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 985, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 958, "src": "10051:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 988, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 952, "src": "10069:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 991, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 989, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 954, "src": "10077:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": {"hexValue": "32", "id": 990, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10086:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "src": "10077:10:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 986, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "10055:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 987, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10061:7:0", "memberName": "approve", "nodeType": "MemberAccess", "referencedDeclaration": 1426, "src": "10055:13:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 992, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10055:33:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "10051:37:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 994, "nodeType": "ExpressionStatement", "src": "10051:37:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 998, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 996, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 958, "src": "10112:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 997, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "10117:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "10112:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "4661696c656420746f2073657420616c6c6f77616e63652076696120617070726f7665", "id": 999, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10123:37:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_7f1d3dd4afc686915bdd345e1cfbb299e9d35b1e8bead035853e4d030efb124f", "typeString": "literal_string \"Failed to set allowance via approve\""}, "value": "Failed to set allowance via approve"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_7f1d3dd4afc686915bdd345e1cfbb299e9d35b1e8bead035853e4d030efb124f", "typeString": "literal_string \"Failed to set allowance via approve\""}], "id": 995, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "10098:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 1000, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10098:63:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1001, "nodeType": "ExpressionStatement", "src": "10098:63:0"}, {"expression": {"arguments": [{"arguments": [{"arguments": [{"id": 1007, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "10217:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 1006, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10209:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1005, "name": "address", "nodeType": "ElementaryTypeName", "src": "10209:7:0", "typeDescriptions": {}}}, "id": 1008, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10209:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1009, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 952, "src": "10224:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 1003, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "10193:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 1004, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10199:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "10193:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 1010, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10193:38:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1013, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1011, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 954, "src": "10245:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": {"hexValue": "32", "id": 1012, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10254:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "src": "10245:10:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "416c6c6f77616e6365206e6f742073657420636f72726563746c79", "id": 1014, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10269:29:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_039511649023dfd211115e041905531a23fddb46b54f5481aaa27b69c23b1ed9", "typeString": "literal_string \"Allowance not set correctly\""}, "value": "Allowance not set correctly"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_039511649023dfd211115e041905531a23fddb46b54f5481aaa27b69c23b1ed9", "typeString": "literal_string \"Allowance not set correctly\""}], "id": 1002, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "10171:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 1015, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10171:137:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1016, "nodeType": "ExpressionStatement", "src": "10171:137:0"}]}, "functionSelector": "01b0710a", "id": 1018, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_setAllowanceTwice", "nameLocation": "9678:36:0", "nodeType": "FunctionDefinition", "parameters": {"id": 955, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 952, "mutability": "mutable", "name": "target", "nameLocation": "9732:6:0", "nodeType": "VariableDeclaration", "scope": 1018, "src": "9724:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 951, "name": "address", "nodeType": "ElementaryTypeName", "src": "9724:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 954, "mutability": "mutable", "name": "amount", "nameLocation": "9756:6:0", "nodeType": "VariableDeclaration", "scope": 1018, "src": "9748:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 953, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9748:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "9714:54:0"}, "returnParameters": {"id": 956, "nodeType": "ParameterList", "parameters": [], "src": "9776:0:0"}, "scope": 1131, "src": "9669:646:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 1129, "nodeType": "Block", "src": "10484:890:0", "statements": [{"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 1038, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1031, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1026, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1020, "src": "10502:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"arguments": [{"id": 1029, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "10520:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 1028, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10512:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1027, "name": "address", "nodeType": "ElementaryTypeName", "src": "10512:7:0", "typeDescriptions": {}}}, "id": 1030, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10512:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "10502:23:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1037, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1032, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1020, "src": "10529:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1035, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10547: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": 1034, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10539:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1033, "name": "address", "nodeType": "ElementaryTypeName", "src": "10539:7:0", "typeDescriptions": {}}}, "id": 1036, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10539:10:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "10529:20:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "10502:47:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 1025, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "10494:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 1039, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10494:56:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1040, "nodeType": "ExpressionStatement", "src": "10494:56:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1045, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1042, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1020, "src": "10568:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"expression": {"id": 1043, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "10578:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1044, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10582:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "10578:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "10568:20:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 1041, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "10560:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 1046, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10560:29:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1047, "nodeType": "ExpressionStatement", "src": "10560:29:0"}, {"assignments": [1049], "declarations": [{"constant": false, "id": 1049, "mutability": "mutable", "name": "balance_sender", "nameLocation": "10607:14:0", "nodeType": "VariableDeclaration", "scope": 1129, "src": "10599:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1048, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10599:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 1055, "initialValue": {"arguments": [{"expression": {"id": 1052, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "10640:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1053, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10644:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "10640:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 1050, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "10624:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 1051, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10630:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "10624:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 1054, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10624:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "10599:52:0"}, {"assignments": [1057], "declarations": [{"constant": false, "id": 1057, "mutability": "mutable", "name": "current_allowance", "nameLocation": "10669:17:0", "nodeType": "VariableDeclaration", "scope": 1129, "src": "10661:25:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1056, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10661:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 1067, "initialValue": {"arguments": [{"expression": {"id": 1060, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "10705:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1061, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10709:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "10705:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 1064, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "10725:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 1063, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10717:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1062, "name": "address", "nodeType": "ElementaryTypeName", "src": "10717:7:0", "typeDescriptions": {}}}, "id": 1065, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10717:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 1058, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "10689:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 1059, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10695:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "10689:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 1066, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10689:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "10661:70:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 1075, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1071, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1069, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1049, "src": "10749:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 1070, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10766:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "10749:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1074, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1072, "name": "current_allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1057, "src": "10771:17:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 1073, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1049, "src": "10791:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "10771:34:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "10749:56:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 1068, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "10741:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 1076, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10741:65:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1077, "nodeType": "ExpressionStatement", "src": "10741:65:0"}, {"assignments": [1079], "declarations": [{"constant": false, "id": 1079, "mutability": "mutable", "name": "transfer_value", "nameLocation": "10824:14:0", "nodeType": "VariableDeclaration", "scope": 1129, "src": "10816:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1078, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10816:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 1086, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1085, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1082, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1080, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1022, "src": "10842:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"id": 1081, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1049, "src": "10851:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "10842:23:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 1083, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "10841:25:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 1084, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10869:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "10841:29:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "10816:54:0"}, {"assignments": [1088], "declarations": [{"constant": false, "id": 1088, "mutability": "mutable", "name": "r", "nameLocation": "10886:1:0", "nodeType": "VariableDeclaration", "scope": 1129, "src": "10881:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1087, "name": "bool", "nodeType": "ElementaryTypeName", "src": "10881:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 1096, "initialValue": {"arguments": [{"expression": {"id": 1091, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "10909:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1092, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10913:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "10909:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1093, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1020, "src": "10921:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1094, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1079, "src": "10929:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 1089, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "10890:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 1090, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10896:12:0", "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1438, "src": "10890:18: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": 1095, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10890:54:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "10881:63:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 1100, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1098, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1088, "src": "10968:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 1099, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "10973:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "10968:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "7472616e7366657246726f6d206661696c6564", "id": 1101, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10979:21:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_ab0f731885d207443b1e545c1c7e7ed7ac9b6ea503774981a1bcc8ac01b461c3", "typeString": "literal_string \"transferFrom failed\""}, "value": "transferFrom failed"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_ab0f731885d207443b1e545c1c7e7ed7ac9b6ea503774981a1bcc8ac01b461c3", "typeString": "literal_string \"transferFrom failed\""}], "id": 1097, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "10954:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 1102, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10954:47:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1103, "nodeType": "ExpressionStatement", "src": "10954:47:0"}, {"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1110, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1104, "name": "current_allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1057, "src": "11118:17:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"expression": {"arguments": [{"id": 1107, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "11144:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}, "typeName": {"id": 1106, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11144:7:0", "typeDescriptions": {}}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}], "id": 1105, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "11139:4:0", "typeDescriptions": {"typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure"}}, "id": 1108, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11139:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_magic_meta_type_t_uint256", "typeString": "type(uint256)"}}, "id": 1109, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "11153:3:0", "memberName": "max", "nodeType": "MemberAccess", "src": "11139:17:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "11118:38:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1128, "nodeType": "IfStatement", "src": "11114:254:0", "trueBody": {"id": 1127, "nodeType": "Block", "src": "11158:210:0", "statements": [{"expression": {"arguments": [{"arguments": [{"expression": {"id": 1114, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "11214:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1115, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "11218:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "11214:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 1118, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "11234:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 1117, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "11226:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1116, "name": "address", "nodeType": "ElementaryTypeName", "src": "11226:7:0", "typeDescriptions": {}}}, "id": 1119, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11226:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 1112, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "11198:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 1113, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "11204:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "11198:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 1120, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11198:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1123, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1121, "name": "current_allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1057, "src": "11258:17:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 1122, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1079, "src": "11278:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "11258:34:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "416c6c6f77616e6365206e6f74207570646174656420636f72726563746c79", "id": 1124, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "11310:33:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_8a9d4062b5e91cae80b2f90c0a1556e7aa463cd7bea8697d5178f4b92d2ace6e", "typeString": "literal_string \"Allowance not updated correctly\""}, "value": "Allowance not updated correctly"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_8a9d4062b5e91cae80b2f90c0a1556e7aa463cd7bea8697d5178f4b92d2ace6e", "typeString": "literal_string \"Allowance not updated correctly\""}], "id": 1111, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "11172:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 1125, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11172:185:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1126, "nodeType": "ExpressionStatement", "src": "11172:185:0"}]}}]}, "functionSelector": "ee5f3aeb", "id": 1130, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_spendAllowanceAfterTransfer", "nameLocation": "10376:46:0", "nodeType": "FunctionDefinition", "parameters": {"id": 1023, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1020, "mutability": "mutable", "name": "target", "nameLocation": "10440:6:0", "nodeType": "VariableDeclaration", "scope": 1130, "src": "10432:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1019, "name": "address", "nodeType": "ElementaryTypeName", "src": "10432:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1022, "mutability": "mutable", "name": "amount", "nameLocation": "10464:6:0", "nodeType": "VariableDeclaration", "scope": 1130, "src": "10456:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1021, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10456:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "10422:54:0"}, "returnParameters": {"id": 1024, "nodeType": "ParameterList", "parameters": [], "src": "10484:0:0"}, "scope": 1131, "src": "10367:1007:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 1132, "src": "105:11271:0", "usedErrors": [], "usedEvents": [1967, 1973, 1977, 1981, 1985, 1989, 1993, 1997, 2001, 2005]}], "src": "0:11377:0"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/util/ERC20ExternalTestBase.sol": {"AST": {"absolutePath": "node_modules/@crytic/properties/contracts/ERC20/external/util/ERC20ExternalTestBase.sol", "exportedSymbols": {"CryticERC20ExternalTestBase": [1362], "IERC20": [1444], "ITokenMock": [1200], "PropertiesAsserts": [3325], "PropertiesConstants": [1224], "PropertiesLibString": [3527]}, "id": 1363, "nodeType": "SourceUnit", "nodes": [{"id": 1347, "literals": ["solidity", "^", "0.8", ".0"], "nodeType": "PragmaDirective", "src": "0:23:1"}, {"absolutePath": "node_modules/@crytic/properties/contracts/util/PropertiesHelper.sol", "file": "../../../util/PropertiesHelper.sol", "id": 1348, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1363, "sourceUnit": 3528, "src": "25:44:1", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "node_modules/@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol", "file": "./ITokenMock.sol", "id": 1349, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1363, "sourceUnit": 1201, "src": "70:26:1", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "node_modules/@crytic/properties/contracts/util/PropertiesConstants.sol", "file": "../../../util/PropertiesConstants.sol", "id": 1350, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1363, "sourceUnit": 1225, "src": "97:47:1", "symbolAliases": [], "unitAlias": ""}, {"abstract": true, "baseContracts": [{"baseName": {"id": 1351, "name": "PropertiesAsserts", "nameLocations": ["199:17:1"], "nodeType": "IdentifierPath", "referencedDeclaration": 3325, "src": "199:17:1"}, "id": 1352, "nodeType": "InheritanceSpecifier", "src": "199:17:1"}, {"baseName": {"id": 1353, "name": "PropertiesConstants", "nameLocations": ["222:19:1"], "nodeType": "IdentifierPath", "referencedDeclaration": 1224, "src": "222:19:1"}, "id": 1354, "nodeType": "InheritanceSpecifier", "src": "222:19:1"}], "canonicalName": "CryticERC20ExternalTestBase", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 1362, "linearizedBaseContracts": [1362, 1224, 3325], "name": "CryticERC20ExternalTestBase", "nameLocation": "164:27:1", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 1357, "mutability": "mutable", "name": "token", "nameLocation": "259:5:1", "nodeType": "VariableDeclaration", "scope": 1362, "src": "248:16:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}, "typeName": {"id": 1356, "nodeType": "UserDefinedTypeName", "pathNode": {"id": 1355, "name": "ITokenMock", "nameLocations": ["248:10:1"], "nodeType": "IdentifierPath", "referencedDeclaration": 1200, "src": "248:10:1"}, "referencedDeclaration": 1200, "src": "248:10:1", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "visibility": "internal"}, {"body": {"id": 1360, "nodeType": "Block", "src": "285:2:1", "statements": []}, "id": 1361, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": {"id": 1358, "nodeType": "ParameterList", "parameters": [], "src": "282:2:1"}, "returnParameters": {"id": 1359, "nodeType": "ParameterList", "parameters": [], "src": "285:0:1"}, "scope": 1362, "src": "271:16:1", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}], "scope": 1363, "src": "146:143:1", "usedErrors": [], "usedEvents": [1967, 1973, 1977, 1981, 1985, 1989, 1993, 1997, 2001, 2005]}], "src": "0:290:1"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol": {"AST": {"absolutePath": "node_modules/@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol", "exportedSymbols": {"IERC20": [1444], "ITokenMock": [1200]}, "id": 1201, "nodeType": "SourceUnit", "nodes": [{"id": 1133, "literals": ["solidity", "^", "0.8", ".0"], "nodeType": "PragmaDirective", "src": "0:23:2"}, {"absolutePath": "node_modules/@crytic/properties/contracts/util/IERC20.sol", "file": "../../../util/IERC20.sol", "id": 1134, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1201, "sourceUnit": 1445, "src": "25:34:2", "symbolAliases": [], "unitAlias": ""}, {"abstract": false, "baseContracts": [{"baseName": {"id": 1135, "name": "IERC20", "nameLocations": ["85:6:2"], "nodeType": "IdentifierPath", "referencedDeclaration": 1444, "src": "85:6:2"}, "id": 1136, "nodeType": "InheritanceSpecifier", "src": "85:6:2"}], "canonicalName": "ITokenMock", "contractDependencies": [], "contractKind": "interface", "fullyImplemented": false, "id": 1200, "linearizedBaseContracts": [1200, 1444], "name": "ITokenMock", "nameLocation": "71:10:2", "nodeType": "ContractDefinition", "nodes": [{"functionSelector": "ab789fa3", "id": 1141, "implemented": false, "kind": "function", "modifiers": [], "name": "isMintableOrBurnable", "nameLocation": "107:20:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1137, "nodeType": "ParameterList", "parameters": [], "src": "127:2:2"}, "returnParameters": {"id": 1140, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1139, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1141, "src": "148:4:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1138, "name": "bool", "nodeType": "ElementaryTypeName", "src": "148:4:2", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "147:6:2"}, "scope": 1200, "src": "98:56:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "378dc3dc", "id": 1146, "implemented": false, "kind": "function", "modifiers": [], "name": "initialSupply", "nameLocation": "169:13:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1142, "nodeType": "ParameterList", "parameters": [], "src": "182:2:2"}, "returnParameters": {"id": 1145, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1144, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1146, "src": "203:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1143, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "203:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "202:9:2"}, "scope": 1200, "src": "160:52:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "42966c68", "id": 1151, "implemented": false, "kind": "function", "modifiers": [], "name": "burn", "nameLocation": "227:4:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1149, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1148, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1151, "src": "232:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1147, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "232:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "231:9:2"}, "returnParameters": {"id": 1150, "nodeType": "ParameterList", "parameters": [], "src": "249:0:2"}, "scope": 1200, "src": "218:32:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "79cc6790", "id": 1158, "implemented": false, "kind": "function", "modifiers": [], "name": "burnFrom", "nameLocation": "265:8:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1156, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1153, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1158, "src": "274:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1152, "name": "address", "nodeType": "ElementaryTypeName", "src": "274:7:2", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1155, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1158, "src": "283:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1154, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "283:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "273:18:2"}, "returnParameters": {"id": 1157, "nodeType": "ParameterList", "parameters": [], "src": "300:0:2"}, "scope": 1200, "src": "256:45:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "40c10f19", "id": 1165, "implemented": false, "kind": "function", "modifiers": [], "name": "mint", "nameLocation": "316:4:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1163, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1160, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1165, "src": "321:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1159, "name": "address", "nodeType": "ElementaryTypeName", "src": "321:7:2", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1162, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1165, "src": "330:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1161, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "330:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "320:18:2"}, "returnParameters": {"id": 1164, "nodeType": "ParameterList", "parameters": [], "src": "347:0:2"}, "scope": 1200, "src": "307:41:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "8456cb59", "id": 1168, "implemented": false, "kind": "function", "modifiers": [], "name": "pause", "nameLocation": "363:5:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1166, "nodeType": "ParameterList", "parameters": [], "src": "368:2:2"}, "returnParameters": {"id": 1167, "nodeType": "ParameterList", "parameters": [], "src": "379:0:2"}, "scope": 1200, "src": "354:26:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "3f4ba83a", "id": 1171, "implemented": false, "kind": "function", "modifiers": [], "name": "unpause", "nameLocation": "395:7:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1169, "nodeType": "ParameterList", "parameters": [], "src": "402:2:2"}, "returnParameters": {"id": 1170, "nodeType": "ParameterList", "parameters": [], "src": "413:0:2"}, "scope": 1200, "src": "386:28:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "5c975abb", "id": 1176, "implemented": false, "kind": "function", "modifiers": [], "name": "paused", "nameLocation": "429:6:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1172, "nodeType": "ParameterList", "parameters": [], "src": "435:2:2"}, "returnParameters": {"id": 1175, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1174, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1176, "src": "456:4:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1173, "name": "bool", "nodeType": "ElementaryTypeName", "src": "456:4:2", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "455:6:2"}, "scope": 1200, "src": "420:42:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "8da5cb5b", "id": 1181, "implemented": false, "kind": "function", "modifiers": [], "name": "owner", "nameLocation": "477:5:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1177, "nodeType": "ParameterList", "parameters": [], "src": "482:2:2"}, "returnParameters": {"id": 1180, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1179, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1181, "src": "503:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1178, "name": "address", "nodeType": "ElementaryTypeName", "src": "503:7:2", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "502:9:2"}, "scope": 1200, "src": "468:44:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "39509351", "id": 1190, "implemented": false, "kind": "function", "modifiers": [], "name": "increaseAllowance", "nameLocation": "527:17:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1186, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1183, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1190, "src": "545:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1182, "name": "address", "nodeType": "ElementaryTypeName", "src": "545:7:2", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1185, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1190, "src": "554:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1184, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "554:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "544:18:2"}, "returnParameters": {"id": 1189, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1188, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1190, "src": "581:4:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1187, "name": "bool", "nodeType": "ElementaryTypeName", "src": "581:4:2", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "580:6:2"}, "scope": 1200, "src": "518:69:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "a457c2d7", "id": 1199, "implemented": false, "kind": "function", "modifiers": [], "name": "decreaseAllowance", "nameLocation": "602:17:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1195, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1192, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1199, "src": "620:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1191, "name": "address", "nodeType": "ElementaryTypeName", "src": "620:7:2", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1194, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1199, "src": "629:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1193, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "629:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "619:18:2"}, "returnParameters": {"id": 1198, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1197, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1199, "src": "656:4:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1196, "name": "bool", "nodeType": "ElementaryTypeName", "src": "656:4:2", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "655:6:2"}, "scope": 1200, "src": "593:69:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}], "scope": 1201, "src": "61:603:2", "usedErrors": [], "usedEvents": [1373, 1382]}], "src": "0:665:2"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/IERC20.sol": {"AST": {"absolutePath": "node_modules/@crytic/properties/contracts/util/IERC20.sol", "exportedSymbols": {"IERC20": [1444]}, "id": 1445, "license": "MIT", "nodeType": "SourceUnit", "nodes": [{"id": 1364, "literals": ["solidity", "^", "0.8", ".0"], "nodeType": "PragmaDirective", "src": "32:23:3"}, {"abstract": false, "baseContracts": [], "canonicalName": "IERC20", "contractDependencies": [], "contractKind": "interface", "fullyImplemented": false, "id": 1444, "linearizedBaseContracts": [1444], "name": "IERC20", "nameLocation": "67:6:3", "nodeType": "ContractDefinition", "nodes": [{"anonymous": false, "documentation": {"id": 1365, "nodeType": "StructuredDocumentation", "src": "80:158:3", "text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero."}, "eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "id": 1373, "name": "Transfer", "nameLocation": "249:8:3", "nodeType": "EventDefinition", "parameters": {"id": 1372, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1367, "indexed": true, "mutability": "mutable", "name": "from", "nameLocation": "274:4:3", "nodeType": "VariableDeclaration", "scope": 1373, "src": "258:20:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1366, "name": "address", "nodeType": "ElementaryTypeName", "src": "258:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1369, "indexed": true, "mutability": "mutable", "name": "to", "nameLocation": "296:2:3", "nodeType": "VariableDeclaration", "scope": 1373, "src": "280:18:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1368, "name": "address", "nodeType": "ElementaryTypeName", "src": "280:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1371, "indexed": false, "mutability": "mutable", "name": "value", "nameLocation": "308:5:3", "nodeType": "VariableDeclaration", "scope": 1373, "src": "300:13:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1370, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "300:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "257:57:3"}, "src": "243:72:3"}, {"anonymous": false, "documentation": {"id": 1374, "nodeType": "StructuredDocumentation", "src": "321:148:3", "text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance."}, "eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", "id": 1382, "name": "Approval", "nameLocation": "480:8:3", "nodeType": "EventDefinition", "parameters": {"id": 1381, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1376, "indexed": true, "mutability": "mutable", "name": "owner", "nameLocation": "514:5:3", "nodeType": "VariableDeclaration", "scope": 1382, "src": "498:21:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1375, "name": "address", "nodeType": "ElementaryTypeName", "src": "498:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1378, "indexed": true, "mutability": "mutable", "name": "spender", "nameLocation": "545:7:3", "nodeType": "VariableDeclaration", "scope": 1382, "src": "529:23:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1377, "name": "address", "nodeType": "ElementaryTypeName", "src": "529:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1380, "indexed": false, "mutability": "mutable", "name": "value", "nameLocation": "570:5:3", "nodeType": "VariableDeclaration", "scope": 1382, "src": "562:13:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1379, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "562:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "488:93:3"}, "src": "474:108:3"}, {"documentation": {"id": 1383, "nodeType": "StructuredDocumentation", "src": "588:66:3", "text": " @dev Returns the amount of tokens in existence."}, "functionSelector": "18160ddd", "id": 1388, "implemented": false, "kind": "function", "modifiers": [], "name": "totalSupply", "nameLocation": "668:11:3", "nodeType": "FunctionDefinition", "parameters": {"id": 1384, "nodeType": "ParameterList", "parameters": [], "src": "679:2:3"}, "returnParameters": {"id": 1387, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1386, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1388, "src": "705:7:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1385, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "705:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "704:9:3"}, "scope": 1444, "src": "659:55:3", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 1389, "nodeType": "StructuredDocumentation", "src": "720:72:3", "text": " @dev Returns the amount of tokens owned by `account`."}, "functionSelector": "70a08231", "id": 1396, "implemented": false, "kind": "function", "modifiers": [], "name": "balanceOf", "nameLocation": "806:9:3", "nodeType": "FunctionDefinition", "parameters": {"id": 1392, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1391, "mutability": "mutable", "name": "account", "nameLocation": "824:7:3", "nodeType": "VariableDeclaration", "scope": 1396, "src": "816:15:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1390, "name": "address", "nodeType": "ElementaryTypeName", "src": "816:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "815:17:3"}, "returnParameters": {"id": 1395, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1394, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1396, "src": "856:7:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1393, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "856:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "855:9:3"}, "scope": 1444, "src": "797:68:3", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 1397, "nodeType": "StructuredDocumentation", "src": "871:202:3", "text": " @dev Moves `amount` tokens from the caller's account to `to`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."}, "functionSelector": "a9059cbb", "id": 1406, "implemented": false, "kind": "function", "modifiers": [], "name": "transfer", "nameLocation": "1087:8:3", "nodeType": "FunctionDefinition", "parameters": {"id": 1402, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1399, "mutability": "mutable", "name": "to", "nameLocation": "1104:2:3", "nodeType": "VariableDeclaration", "scope": 1406, "src": "1096:10:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1398, "name": "address", "nodeType": "ElementaryTypeName", "src": "1096:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1401, "mutability": "mutable", "name": "amount", "nameLocation": "1116:6:3", "nodeType": "VariableDeclaration", "scope": 1406, "src": "1108:14:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1400, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1108:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1095:28:3"}, "returnParameters": {"id": 1405, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1404, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1406, "src": "1142:4:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1403, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1142:4:3", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "1141:6:3"}, "scope": 1444, "src": "1078:70:3", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"documentation": {"id": 1407, "nodeType": "StructuredDocumentation", "src": "1154:264:3", "text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called."}, "functionSelector": "dd62ed3e", "id": 1416, "implemented": false, "kind": "function", "modifiers": [], "name": "allowance", "nameLocation": "1432:9:3", "nodeType": "FunctionDefinition", "parameters": {"id": 1412, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1409, "mutability": "mutable", "name": "owner", "nameLocation": "1459:5:3", "nodeType": "VariableDeclaration", "scope": 1416, "src": "1451:13:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1408, "name": "address", "nodeType": "ElementaryTypeName", "src": "1451:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1411, "mutability": "mutable", "name": "spender", "nameLocation": "1482:7:3", "nodeType": "VariableDeclaration", "scope": 1416, "src": "1474:15:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1410, "name": "address", "nodeType": "ElementaryTypeName", "src": "1474:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "1441:54:3"}, "returnParameters": {"id": 1415, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1414, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1416, "src": "1519:7:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1413, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1519:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1518:9:3"}, "scope": 1444, "src": "1423:105:3", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 1417, "nodeType": "StructuredDocumentation", "src": "1534:642:3", "text": " @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\n IMPORTANT: Beware that changing an allowance with this method brings the risk\n that someone may use both the old and the new allowance by unfortunate\n transaction ordering. One possible solution to mitigate this race\n condition is to first reduce the spender's allowance to 0 and set the\n desired value afterwards:\n https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n Emits an {Approval} event."}, "functionSelector": "095ea7b3", "id": 1426, "implemented": false, "kind": "function", "modifiers": [], "name": "approve", "nameLocation": "2190:7:3", "nodeType": "FunctionDefinition", "parameters": {"id": 1422, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1419, "mutability": "mutable", "name": "spender", "nameLocation": "2206:7:3", "nodeType": "VariableDeclaration", "scope": 1426, "src": "2198:15:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1418, "name": "address", "nodeType": "ElementaryTypeName", "src": "2198:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1421, "mutability": "mutable", "name": "amount", "nameLocation": "2223:6:3", "nodeType": "VariableDeclaration", "scope": 1426, "src": "2215:14:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1420, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2215:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "2197:33:3"}, "returnParameters": {"id": 1425, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1424, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1426, "src": "2249:4:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1423, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2249:4:3", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "2248:6:3"}, "scope": 1444, "src": "2181:74:3", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"documentation": {"id": 1427, "nodeType": "StructuredDocumentation", "src": "2261:287:3", "text": " @dev Moves `amount` tokens from `from` to `to` using the\n allowance mechanism. `amount` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."}, "functionSelector": "23b872dd", "id": 1438, "implemented": false, "kind": "function", "modifiers": [], "name": "transferFrom", "nameLocation": "2562:12:3", "nodeType": "FunctionDefinition", "parameters": {"id": 1434, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1429, "mutability": "mutable", "name": "from", "nameLocation": "2592:4:3", "nodeType": "VariableDeclaration", "scope": 1438, "src": "2584:12:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1428, "name": "address", "nodeType": "ElementaryTypeName", "src": "2584:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1431, "mutability": "mutable", "name": "to", "nameLocation": "2614:2:3", "nodeType": "VariableDeclaration", "scope": 1438, "src": "2606:10:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1430, "name": "address", "nodeType": "ElementaryTypeName", "src": "2606:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1433, "mutability": "mutable", "name": "amount", "nameLocation": "2634:6:3", "nodeType": "VariableDeclaration", "scope": 1438, "src": "2626:14:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1432, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2626:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "2574:72:3"}, "returnParameters": {"id": 1437, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1436, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1438, "src": "2665:4:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1435, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2665:4:3", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "2664:6:3"}, "scope": 1444, "src": "2553:118:3", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "313ce567", "id": 1443, "implemented": false, "kind": "function", "modifiers": [], "name": "decimals", "nameLocation": "2686:8:3", "nodeType": "FunctionDefinition", "parameters": {"id": 1439, "nodeType": "ParameterList", "parameters": [], "src": "2694:2:3"}, "returnParameters": {"id": 1442, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1441, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1443, "src": "2715:5:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "typeName": {"id": 1440, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "2715:5:3", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "visibility": "internal"}], "src": "2714:7:3"}, "scope": 1444, "src": "2677:45:3", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}], "scope": 1445, "src": "57:2667:3", "usedErrors": [], "usedEvents": [1373, 1382]}], "src": "32:2693:3"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/PropertiesConstants.sol": {"AST": {"absolutePath": "node_modules/@crytic/properties/contracts/util/PropertiesConstants.sol", "exportedSymbols": {"PropertiesConstants": [1224]}, "id": 1225, "nodeType": "SourceUnit", "nodes": [{"id": 1202, "literals": ["solidity", "^", "0.8", ".0"], "nodeType": "PragmaDirective", "src": "0:23:4"}, {"abstract": true, "baseContracts": [], "canonicalName": "PropertiesConstants", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 1224, "linearizedBaseContracts": [1224], "name": "PropertiesConstants", "nameLocation": "43:19:4", "nodeType": "ContractDefinition", "nodes": [{"constant": true, "id": 1208, "mutability": "constant", "name": "USER1", "nameLocation": "120:5:4", "nodeType": "VariableDeclaration", "scope": 1224, "src": "103:41:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1203, "name": "address", "nodeType": "ElementaryTypeName", "src": "103:7:4", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "value": {"arguments": [{"hexValue": "30783130303030", "id": 1206, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "136:7:4", "typeDescriptions": {"typeIdentifier": "t_rational_65536_by_1", "typeString": "int_const 65536"}, "value": "0x10000"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_65536_by_1", "typeString": "int_const 65536"}], "id": 1205, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "128:7:4", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1204, "name": "address", "nodeType": "ElementaryTypeName", "src": "128:7:4", "typeDescriptions": {}}}, "id": 1207, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "128:16:4", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": true, "id": 1214, "mutability": "constant", "name": "USER2", "nameLocation": "167:5:4", "nodeType": "VariableDeclaration", "scope": 1224, "src": "150:41:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1209, "name": "address", "nodeType": "ElementaryTypeName", "src": "150:7:4", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "value": {"arguments": [{"hexValue": "30783230303030", "id": 1212, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "183:7:4", "typeDescriptions": {"typeIdentifier": "t_rational_131072_by_1", "typeString": "int_const 131072"}, "value": "0x20000"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_131072_by_1", "typeString": "int_const 131072"}], "id": 1211, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "175:7:4", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1210, "name": "address", "nodeType": "ElementaryTypeName", "src": "175:7:4", "typeDescriptions": {}}}, "id": 1213, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "175:16:4", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": true, "id": 1220, "mutability": "constant", "name": "USER3", "nameLocation": "214:5:4", "nodeType": "VariableDeclaration", "scope": 1224, "src": "197:41:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1215, "name": "address", "nodeType": "ElementaryTypeName", "src": "197:7:4", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "value": {"arguments": [{"hexValue": "30783330303030", "id": 1218, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "230:7:4", "typeDescriptions": {"typeIdentifier": "t_rational_196608_by_1", "typeString": "int_const 196608"}, "value": "0x30000"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_196608_by_1", "typeString": "int_const 196608"}], "id": 1217, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "222:7:4", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1216, "name": "address", "nodeType": "ElementaryTypeName", "src": "222:7:4", "typeDescriptions": {}}}, "id": 1219, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "222:16:4", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": true, "id": 1223, "mutability": "constant", "name": "INITIAL_BALANCE", "nameLocation": "261:15:4", "nodeType": "VariableDeclaration", "scope": 1224, "src": "244:42:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1221, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "244:7:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": {"hexValue": "31303030653138", "id": 1222, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "279:7:4", "typeDescriptions": {"typeIdentifier": "t_rational_1000000000000000000000_by_1", "typeString": "int_const 1000000000000000000000"}, "value": "1000e18"}, "visibility": "internal"}], "scope": 1225, "src": "25:264:4", "usedErrors": [], "usedEvents": []}], "src": "0:290:4"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/PropertiesHelper.sol": {"AST": {"absolutePath": "node_modules/@crytic/properties/contracts/util/PropertiesHelper.sol", "exportedSymbols": {"PropertiesAsserts": [3325], "PropertiesLibString": [3527]}, "id": 3528, "nodeType": "SourceUnit", "nodes": [{"id": 1961, "literals": ["solidity", "^", "0.8", ".0"], "nodeType": "PragmaDirective", "src": "0:23:5"}, {"abstract": true, "baseContracts": [], "canonicalName": "PropertiesAsserts", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 3325, "linearizedBaseContracts": [3325], "name": "PropertiesAsserts", "nameLocation": "43:17:5", "nodeType": "ContractDefinition", "nodes": [{"anonymous": false, "eventSelector": "31c369d7029afba34b21369bcf9a6ac132fb2621c34558b914859b768d05232d", "id": 1967, "name": "LogUint256", "nameLocation": "73:10:5", "nodeType": "EventDefinition", "parameters": {"id": 1966, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1963, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1967, "src": "84:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1962, "name": "string", "nodeType": "ElementaryTypeName", "src": "84:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}, {"constant": false, "id": 1965, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1967, "src": "92:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1964, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "92:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "83:17:5"}, "src": "67:34:5"}, {"anonymous": false, "eventSelector": "62ddffe5b5108385f7a590f100e1ee414ad9551a31f089e64e82998440785e1e", "id": 1973, "name": "LogAddress", "nameLocation": "112:10:5", "nodeType": "EventDefinition", "parameters": {"id": 1972, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1969, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1973, "src": "123:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1968, "name": "string", "nodeType": "ElementaryTypeName", "src": "123:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}, {"constant": false, "id": 1971, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1973, "src": "131:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1970, "name": "address", "nodeType": "ElementaryTypeName", "src": "131:7:5", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "122:17:5"}, "src": "106:34:5"}, {"anonymous": false, "eventSelector": "a95e6e2a182411e7a6f9ed114a85c3761d87f9b8f453d842c71235aa64fff99f", "id": 1977, "name": "LogString", "nameLocation": "151:9:5", "nodeType": "EventDefinition", "parameters": {"id": 1976, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1975, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1977, "src": "161:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1974, "name": "string", "nodeType": "ElementaryTypeName", "src": "161:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "160:8:5"}, "src": "145:24:5"}, {"anonymous": false, "eventSelector": "eb03ca8c87c7849bef8f54cfdd2c6b967b2734fe872f751978c34bb91e13d351", "id": 1981, "name": "AssertFail", "nameLocation": "181:10:5", "nodeType": "EventDefinition", "parameters": {"id": 1980, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1979, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1981, "src": "192:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1978, "name": "string", "nodeType": "ElementaryTypeName", "src": "192:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "191:8:5"}, "src": "175:25:5"}, {"anonymous": false, "eventSelector": "2d2d38c9a34df9887a6dcb2a54c1f79ff8bf9c4d4cafacd7d1f7277f57baab6f", "id": 1985, "name": "AssertEqFail", "nameLocation": "211:12:5", "nodeType": "EventDefinition", "parameters": {"id": 1984, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1983, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1985, "src": "224:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1982, "name": "string", "nodeType": "ElementaryTypeName", "src": "224:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "223:8:5"}, "src": "205:27:5"}, {"anonymous": false, "eventSelector": "ff4de080d2384f233e1a4fb3268e8f715d8802217ad2382235900a274dde76dd", "id": 1989, "name": "AssertNeqFail", "nameLocation": "243:13:5", "nodeType": "EventDefinition", "parameters": {"id": 1988, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1987, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1989, "src": "257:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1986, "name": "string", "nodeType": "ElementaryTypeName", "src": "257:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "256:8:5"}, "src": "237:28:5"}, {"anonymous": false, "eventSelector": "94424ed24fb39638b64817c737dd443f387aaa1486614da449b6686a642d6d6c", "id": 1993, "name": "AssertGteFail", "nameLocation": "276:13:5", "nodeType": "EventDefinition", "parameters": {"id": 1992, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1991, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1993, "src": "290:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1990, "name": "string", "nodeType": "ElementaryTypeName", "src": "290:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "289:8:5"}, "src": "270:28:5"}, {"anonymous": false, "eventSelector": "707b8c56e4c211cf1321faeb4148237062228db2fcecc9be487e83a2680e7e50", "id": 1997, "name": "AssertGtFail", "nameLocation": "309:12:5", "nodeType": "EventDefinition", "parameters": {"id": 1996, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1995, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1997, "src": "322:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1994, "name": "string", "nodeType": "ElementaryTypeName", "src": "322:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "321:8:5"}, "src": "303:27:5"}, {"anonymous": false, "eventSelector": "62bdda9a05cdbcdbf905cbad99c6ebdc098b6f0933d8f2eb3cfab7400b602514", "id": 2001, "name": "AssertLteFail", "nameLocation": "341:13:5", "nodeType": "EventDefinition", "parameters": {"id": 2000, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1999, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2001, "src": "355:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1998, "name": "string", "nodeType": "ElementaryTypeName", "src": "355:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "354:8:5"}, "src": "335:28:5"}, {"anonymous": false, "eventSelector": "46d01dfbc4861b5b859d858d541e8b0046175a8dece70e24f892a3318f70e2bb", "id": 2005, "name": "AssertLtFail", "nameLocation": "374:12:5", "nodeType": "EventDefinition", "parameters": {"id": 2004, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2003, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2005, "src": "387:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2002, "name": "string", "nodeType": "ElementaryTypeName", "src": "387:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "386:8:5"}, "src": "368:27:5"}, {"body": {"id": 2024, "nodeType": "Block", "src": "463:99:5", "statements": [{"condition": {"id": 2013, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "477:2:5", "subExpression": {"id": 2012, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2007, "src": "478:1:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2023, "nodeType": "IfStatement", "src": "473:83:5", "trueBody": {"id": 2022, "nodeType": "Block", "src": "481:75:5", "statements": [{"eventCall": {"arguments": [{"id": 2015, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2009, "src": "511:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2014, "name": "AssertFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1981, "src": "500:10:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2016, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "500:18:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2017, "nodeType": "EmitStatement", "src": "495:23:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2019, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "539:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2018, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "532:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2020, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "532:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2021, "nodeType": "ExpressionStatement", "src": "532:13:5"}]}}]}, "id": 2025, "implemented": true, "kind": "function", "modifiers": [], "name": "assertWithMsg", "nameLocation": "410:13:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2010, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2007, "mutability": "mutable", "name": "b", "nameLocation": "429:1:5", "nodeType": "VariableDeclaration", "scope": 2025, "src": "424:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 2006, "name": "bool", "nodeType": "ElementaryTypeName", "src": "424:4:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}, {"constant": false, "id": 2009, "mutability": "mutable", "name": "reason", "nameLocation": "446:6:5", "nodeType": "VariableDeclaration", "scope": 2025, "src": "432:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2008, "name": "string", "nodeType": "ElementaryTypeName", "src": "432:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "423:30:5"}, "returnParameters": {"id": 2011, "nodeType": "ParameterList", "parameters": [], "src": "463:0:5"}, "scope": 3325, "src": "401:161:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2077, "nodeType": "Block", "src": "721:466:5", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2037, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2035, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2028, "src": "735:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"id": 2036, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2030, "src": "740:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "735:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2076, "nodeType": "IfStatement", "src": "731:450:5", "trueBody": {"id": 2075, "nodeType": "Block", "src": "743:438:5", "statements": [{"assignments": [2039], "declarations": [{"constant": false, "id": 2039, "mutability": "mutable", "name": "aStr", "nameLocation": "771:4:5", "nodeType": "VariableDeclaration", "scope": 2075, "src": "757:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2038, "name": "string", "nodeType": "ElementaryTypeName", "src": "757:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2044, "initialValue": {"arguments": [{"id": 2042, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2028, "src": "807:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2040, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "778:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2041, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "798:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "778:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2043, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "778:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "757:52:5"}, {"assignments": [2046], "declarations": [{"constant": false, "id": 2046, "mutability": "mutable", "name": "bStr", "nameLocation": "837:4:5", "nodeType": "VariableDeclaration", "scope": 2075, "src": "823:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2045, "name": "string", "nodeType": "ElementaryTypeName", "src": "823:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2051, "initialValue": {"arguments": [{"id": 2049, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2030, "src": "873:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2047, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "844:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2048, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "864:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "844:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2050, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "844:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "823:52:5"}, {"assignments": [2053], "declarations": [{"constant": false, "id": 2053, "mutability": "mutable", "name": "assertMsg", "nameLocation": "902:9:5", "nodeType": "VariableDeclaration", "scope": 2075, "src": "889:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2052, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "889:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2063, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2056, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "948:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2057, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2039, "src": "977:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "213d", "id": 2058, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "999:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_9ac244772c728e3ea33abaab05d51ed9065114029a53892fd1ed2fbb33ede3c8", "typeString": "literal_string \"!=\""}, "value": "!="}, {"id": 2059, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2046, "src": "1021:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "2c20726561736f6e3a20", "id": 2060, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1043:12:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, "value": ", reason: "}, {"id": 2061, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2032, "src": "1073:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_9ac244772c728e3ea33abaab05d51ed9065114029a53892fd1ed2fbb33ede3c8", "typeString": "literal_string \"!=\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2054, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "914:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2055, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "918:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "914:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2062, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "914:179:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "889:204:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2067, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2053, "src": "1132:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2066, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1125:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2065, "name": "string", "nodeType": "ElementaryTypeName", "src": "1125:6:5", "typeDescriptions": {}}}, "id": 2068, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1125:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2064, "name": "AssertEqFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1985, "src": "1112:12:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2069, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1112:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2070, "nodeType": "EmitStatement", "src": "1107:36:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2072, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1164:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2071, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "1157:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2073, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1157:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2074, "nodeType": "ExpressionStatement", "src": "1157:13:5"}]}}]}, "documentation": {"id": 2026, "nodeType": "StructuredDocumentation", "src": "568:77:5", "text": "@notice asserts that a is equal to b. Violations are logged using reason."}, "id": 2078, "implemented": true, "kind": "function", "modifiers": [], "name": "assertEq", "nameLocation": "659:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2033, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2028, "mutability": "mutable", "name": "a", "nameLocation": "676:1:5", "nodeType": "VariableDeclaration", "scope": 2078, "src": "668:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2027, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "668:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2030, "mutability": "mutable", "name": "b", "nameLocation": "687:1:5", "nodeType": "VariableDeclaration", "scope": 2078, "src": "679:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2029, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "679:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2032, "mutability": "mutable", "name": "reason", "nameLocation": "704:6:5", "nodeType": "VariableDeclaration", "scope": 2078, "src": "690:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2031, "name": "string", "nodeType": "ElementaryTypeName", "src": "690:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "667:44:5"}, "returnParameters": {"id": 2034, "nodeType": "ParameterList", "parameters": [], "src": "721:0:5"}, "scope": 3325, "src": "650:537:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2130, "nodeType": "Block", "src": "1305:466:5", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2090, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2088, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2081, "src": "1319:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"id": 2089, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2083, "src": "1324:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "1319:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2129, "nodeType": "IfStatement", "src": "1315:450:5", "trueBody": {"id": 2128, "nodeType": "Block", "src": "1327:438:5", "statements": [{"assignments": [2092], "declarations": [{"constant": false, "id": 2092, "mutability": "mutable", "name": "aStr", "nameLocation": "1355:4:5", "nodeType": "VariableDeclaration", "scope": 2128, "src": "1341:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2091, "name": "string", "nodeType": "ElementaryTypeName", "src": "1341:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2097, "initialValue": {"arguments": [{"id": 2095, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2081, "src": "1391:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2093, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "1362:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2094, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1382:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "1362:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2096, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1362:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "1341:52:5"}, {"assignments": [2099], "declarations": [{"constant": false, "id": 2099, "mutability": "mutable", "name": "bStr", "nameLocation": "1421:4:5", "nodeType": "VariableDeclaration", "scope": 2128, "src": "1407:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2098, "name": "string", "nodeType": "ElementaryTypeName", "src": "1407:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2104, "initialValue": {"arguments": [{"id": 2102, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2083, "src": "1457:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2100, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "1428:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2101, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1448:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "1428:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2103, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1428:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "1407:52:5"}, {"assignments": [2106], "declarations": [{"constant": false, "id": 2106, "mutability": "mutable", "name": "assertMsg", "nameLocation": "1486:9:5", "nodeType": "VariableDeclaration", "scope": 2128, "src": "1473:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2105, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1473:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2116, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2109, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1532:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2110, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2092, "src": "1561:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "213d", "id": 2111, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1583:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_9ac244772c728e3ea33abaab05d51ed9065114029a53892fd1ed2fbb33ede3c8", "typeString": "literal_string \"!=\""}, "value": "!="}, {"id": 2112, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2099, "src": "1605:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "2c20726561736f6e3a20", "id": 2113, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1627:12:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, "value": ", reason: "}, {"id": 2114, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2085, "src": "1657:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_9ac244772c728e3ea33abaab05d51ed9065114029a53892fd1ed2fbb33ede3c8", "typeString": "literal_string \"!=\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2107, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "1498:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2108, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "1502:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "1498:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2115, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1498:179:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "1473:204:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2120, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2106, "src": "1716:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2119, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1709:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2118, "name": "string", "nodeType": "ElementaryTypeName", "src": "1709:6:5", "typeDescriptions": {}}}, "id": 2121, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1709:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2117, "name": "AssertEqFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1985, "src": "1696:12:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2122, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1696:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2123, "nodeType": "EmitStatement", "src": "1691:36:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2125, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1748:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2124, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "1741:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2126, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1741:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2127, "nodeType": "ExpressionStatement", "src": "1741:13:5"}]}}]}, "documentation": {"id": 2079, "nodeType": "StructuredDocumentation", "src": "1193:38:5", "text": "@notice int256 version of assertEq"}, "id": 2131, "implemented": true, "kind": "function", "modifiers": [], "name": "assertEq", "nameLocation": "1245:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2086, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2081, "mutability": "mutable", "name": "a", "nameLocation": "1261:1:5", "nodeType": "VariableDeclaration", "scope": 2131, "src": "1254:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2080, "name": "int256", "nodeType": "ElementaryTypeName", "src": "1254:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2083, "mutability": "mutable", "name": "b", "nameLocation": "1271:1:5", "nodeType": "VariableDeclaration", "scope": 2131, "src": "1264:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2082, "name": "int256", "nodeType": "ElementaryTypeName", "src": "1264:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2085, "mutability": "mutable", "name": "reason", "nameLocation": "1288:6:5", "nodeType": "VariableDeclaration", "scope": 2131, "src": "1274:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2084, "name": "string", "nodeType": "ElementaryTypeName", "src": "1274:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "1253:42:5"}, "returnParameters": {"id": 2087, "nodeType": "ParameterList", "parameters": [], "src": "1305:0:5"}, "scope": 3325, "src": "1236:535:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2183, "nodeType": "Block", "src": "1935:467:5", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2143, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2141, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2134, "src": "1949:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"id": 2142, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2136, "src": "1954:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "1949:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2182, "nodeType": "IfStatement", "src": "1945:451:5", "trueBody": {"id": 2181, "nodeType": "Block", "src": "1957:439:5", "statements": [{"assignments": [2145], "declarations": [{"constant": false, "id": 2145, "mutability": "mutable", "name": "aStr", "nameLocation": "1985:4:5", "nodeType": "VariableDeclaration", "scope": 2181, "src": "1971:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2144, "name": "string", "nodeType": "ElementaryTypeName", "src": "1971:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2150, "initialValue": {"arguments": [{"id": 2148, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2134, "src": "2021:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2146, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "1992:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2147, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2012:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "1992:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2149, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1992:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "1971:52:5"}, {"assignments": [2152], "declarations": [{"constant": false, "id": 2152, "mutability": "mutable", "name": "bStr", "nameLocation": "2051:4:5", "nodeType": "VariableDeclaration", "scope": 2181, "src": "2037:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2151, "name": "string", "nodeType": "ElementaryTypeName", "src": "2037:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2157, "initialValue": {"arguments": [{"id": 2155, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2136, "src": "2087:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2153, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "2058:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2154, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2078:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "2058:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2156, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2058:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "2037:52:5"}, {"assignments": [2159], "declarations": [{"constant": false, "id": 2159, "mutability": "mutable", "name": "assertMsg", "nameLocation": "2116:9:5", "nodeType": "VariableDeclaration", "scope": 2181, "src": "2103:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2158, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2103:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2169, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2162, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2162:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2163, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2145, "src": "2191:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3d3d", "id": 2164, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2213:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_8130d264cf52b536814fc69bd2deac50f17224d36413db41792fe7f8742c2b5a", "typeString": "literal_string \"==\""}, "value": "=="}, {"id": 2165, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2152, "src": "2235:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "2c20726561736f6e3a20", "id": 2166, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2257:12:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, "value": ", reason: "}, {"id": 2167, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2138, "src": "2287:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_8130d264cf52b536814fc69bd2deac50f17224d36413db41792fe7f8742c2b5a", "typeString": "literal_string \"==\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2160, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "2128:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2161, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "2132:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "2128:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2168, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2128:179:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "2103:204:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2173, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2159, "src": "2347:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2172, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2340:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2171, "name": "string", "nodeType": "ElementaryTypeName", "src": "2340:6:5", "typeDescriptions": {}}}, "id": 2174, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2340:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2170, "name": "AssertNeqFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1989, "src": "2326:13:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2175, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2326:32:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2176, "nodeType": "EmitStatement", "src": "2321:37:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2178, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2379:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2177, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "2372:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2179, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2372:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2180, "nodeType": "ExpressionStatement", "src": "2372:13:5"}]}}]}, "documentation": {"id": 2132, "nodeType": "StructuredDocumentation", "src": "1777:81:5", "text": "@notice asserts that a is not equal to b. Violations are logged using reason."}, "id": 2184, "implemented": true, "kind": "function", "modifiers": [], "name": "assertNeq", "nameLocation": "1872:9:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2139, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2134, "mutability": "mutable", "name": "a", "nameLocation": "1890:1:5", "nodeType": "VariableDeclaration", "scope": 2184, "src": "1882:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2133, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1882:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2136, "mutability": "mutable", "name": "b", "nameLocation": "1901:1:5", "nodeType": "VariableDeclaration", "scope": 2184, "src": "1893:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2135, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1893:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2138, "mutability": "mutable", "name": "reason", "nameLocation": "1918:6:5", "nodeType": "VariableDeclaration", "scope": 2184, "src": "1904:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2137, "name": "string", "nodeType": "ElementaryTypeName", "src": "1904:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "1881:44:5"}, "returnParameters": {"id": 2140, "nodeType": "ParameterList", "parameters": [], "src": "1935:0:5"}, "scope": 3325, "src": "1863:539:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2236, "nodeType": "Block", "src": "2522:467:5", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2196, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2194, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2187, "src": "2536:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"id": 2195, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2189, "src": "2541:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "2536:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2235, "nodeType": "IfStatement", "src": "2532:451:5", "trueBody": {"id": 2234, "nodeType": "Block", "src": "2544:439:5", "statements": [{"assignments": [2198], "declarations": [{"constant": false, "id": 2198, "mutability": "mutable", "name": "aStr", "nameLocation": "2572:4:5", "nodeType": "VariableDeclaration", "scope": 2234, "src": "2558:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2197, "name": "string", "nodeType": "ElementaryTypeName", "src": "2558:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2203, "initialValue": {"arguments": [{"id": 2201, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2187, "src": "2608:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2199, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "2579:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2200, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2599:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "2579:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2202, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2579:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "2558:52:5"}, {"assignments": [2205], "declarations": [{"constant": false, "id": 2205, "mutability": "mutable", "name": "bStr", "nameLocation": "2638:4:5", "nodeType": "VariableDeclaration", "scope": 2234, "src": "2624:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2204, "name": "string", "nodeType": "ElementaryTypeName", "src": "2624:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2210, "initialValue": {"arguments": [{"id": 2208, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2189, "src": "2674:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2206, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "2645:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2207, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2665:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "2645:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2209, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2645:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "2624:52:5"}, {"assignments": [2212], "declarations": [{"constant": false, "id": 2212, "mutability": "mutable", "name": "assertMsg", "nameLocation": "2703:9:5", "nodeType": "VariableDeclaration", "scope": 2234, "src": "2690:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2211, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2690:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2222, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2215, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2749:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2216, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2198, "src": "2778:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3d3d", "id": 2217, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2800:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_8130d264cf52b536814fc69bd2deac50f17224d36413db41792fe7f8742c2b5a", "typeString": "literal_string \"==\""}, "value": "=="}, {"id": 2218, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2205, "src": "2822:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "2c20726561736f6e3a20", "id": 2219, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2844:12:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, "value": ", reason: "}, {"id": 2220, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2191, "src": "2874:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_8130d264cf52b536814fc69bd2deac50f17224d36413db41792fe7f8742c2b5a", "typeString": "literal_string \"==\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2213, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "2715:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2214, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "2719:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "2715:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2221, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2715:179:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "2690:204:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2226, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2212, "src": "2934:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2225, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2927:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2224, "name": "string", "nodeType": "ElementaryTypeName", "src": "2927:6:5", "typeDescriptions": {}}}, "id": 2227, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2927:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2223, "name": "AssertNeqFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1989, "src": "2913:13:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2228, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2913:32:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2229, "nodeType": "EmitStatement", "src": "2908:37:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2231, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2966:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2230, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "2959:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2232, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2959:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2233, "nodeType": "ExpressionStatement", "src": "2959:13:5"}]}}]}, "documentation": {"id": 2185, "nodeType": "StructuredDocumentation", "src": "2408:39:5", "text": "@notice int256 version of assertNeq"}, "id": 2237, "implemented": true, "kind": "function", "modifiers": [], "name": "assertNeq", "nameLocation": "2461:9:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2192, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2187, "mutability": "mutable", "name": "a", "nameLocation": "2478:1:5", "nodeType": "VariableDeclaration", "scope": 2237, "src": "2471:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2186, "name": "int256", "nodeType": "ElementaryTypeName", "src": "2471:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2189, "mutability": "mutable", "name": "b", "nameLocation": "2488:1:5", "nodeType": "VariableDeclaration", "scope": 2237, "src": "2481:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2188, "name": "int256", "nodeType": "ElementaryTypeName", "src": "2481:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2191, "mutability": "mutable", "name": "reason", "nameLocation": "2505:6:5", "nodeType": "VariableDeclaration", "scope": 2237, "src": "2491:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2190, "name": "string", "nodeType": "ElementaryTypeName", "src": "2491:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "2470:42:5"}, "returnParameters": {"id": 2193, "nodeType": "ParameterList", "parameters": [], "src": "2522:0:5"}, "scope": 3325, "src": "2452:537:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2291, "nodeType": "Block", "src": "3165:476:5", "statements": [{"condition": {"id": 2251, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "3179:9:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2249, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2247, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2240, "src": "3181:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": {"id": 2248, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2242, "src": "3186:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "3181:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2250, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "3180:8:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2290, "nodeType": "IfStatement", "src": "3175:460:5", "trueBody": {"id": 2289, "nodeType": "Block", "src": "3190:445:5", "statements": [{"assignments": [2253], "declarations": [{"constant": false, "id": 2253, "mutability": "mutable", "name": "aStr", "nameLocation": "3218:4:5", "nodeType": "VariableDeclaration", "scope": 2289, "src": "3204:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2252, "name": "string", "nodeType": "ElementaryTypeName", "src": "3204:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2258, "initialValue": {"arguments": [{"id": 2256, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2240, "src": "3254:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2254, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "3225:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2255, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3245:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "3225:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2257, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3225:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "3204:52:5"}, {"assignments": [2260], "declarations": [{"constant": false, "id": 2260, "mutability": "mutable", "name": "bStr", "nameLocation": "3284:4:5", "nodeType": "VariableDeclaration", "scope": 2289, "src": "3270:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2259, "name": "string", "nodeType": "ElementaryTypeName", "src": "3270:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2265, "initialValue": {"arguments": [{"id": 2263, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2242, "src": "3320:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2261, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "3291:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2262, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3311:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "3291:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2264, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3291:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "3270:52:5"}, {"assignments": [2267], "declarations": [{"constant": false, "id": 2267, "mutability": "mutable", "name": "assertMsg", "nameLocation": "3349:9:5", "nodeType": "VariableDeclaration", "scope": 2289, "src": "3336:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2266, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3336:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2277, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2270, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3395:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2271, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2253, "src": "3424:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3c", "id": 2272, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3446:3:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_8cb938a03d27235fdf22924e770f8c8a7fc7441e706e979b359839d1efe72520", "typeString": "literal_string \"<\""}, "value": "<"}, {"id": 2273, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2260, "src": "3467:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2274, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3489:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2275, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2244, "src": "3526:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_8cb938a03d27235fdf22924e770f8c8a7fc7441e706e979b359839d1efe72520", "typeString": "literal_string \"<\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2268, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "3361:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2269, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "3365:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "3361:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2276, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3361:185:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "3336:210:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2281, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2267, "src": "3586:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2280, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3579:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2279, "name": "string", "nodeType": "ElementaryTypeName", "src": "3579:6:5", "typeDescriptions": {}}}, "id": 2282, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3579:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2278, "name": "AssertGteFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1993, "src": "3565:13:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2283, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3565:32:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2284, "nodeType": "EmitStatement", "src": "3560:37:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2286, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "3618:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2285, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "3611:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2287, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3611:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2288, "nodeType": "ExpressionStatement", "src": "3611:13:5"}]}}]}, "documentation": {"id": 2238, "nodeType": "StructuredDocumentation", "src": "2995:93:5", "text": "@notice asserts that a is greater than or equal to b. Violations are logged using reason."}, "id": 2292, "implemented": true, "kind": "function", "modifiers": [], "name": "assertGte", "nameLocation": "3102:9:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2245, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2240, "mutability": "mutable", "name": "a", "nameLocation": "3120:1:5", "nodeType": "VariableDeclaration", "scope": 2292, "src": "3112:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2239, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3112:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2242, "mutability": "mutable", "name": "b", "nameLocation": "3131:1:5", "nodeType": "VariableDeclaration", "scope": 2292, "src": "3123:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2241, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3123:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2244, "mutability": "mutable", "name": "reason", "nameLocation": "3148:6:5", "nodeType": "VariableDeclaration", "scope": 2292, "src": "3134:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2243, "name": "string", "nodeType": "ElementaryTypeName", "src": "3134:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "3111:44:5"}, "returnParameters": {"id": 2246, "nodeType": "ParameterList", "parameters": [], "src": "3165:0:5"}, "scope": 3325, "src": "3093:548:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2346, "nodeType": "Block", "src": "3761:476:5", "statements": [{"condition": {"id": 2306, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "3775:9:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2304, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2302, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2295, "src": "3777:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": {"id": 2303, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2297, "src": "3782:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "3777:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2305, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "3776:8:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2345, "nodeType": "IfStatement", "src": "3771:460:5", "trueBody": {"id": 2344, "nodeType": "Block", "src": "3786:445:5", "statements": [{"assignments": [2308], "declarations": [{"constant": false, "id": 2308, "mutability": "mutable", "name": "aStr", "nameLocation": "3814:4:5", "nodeType": "VariableDeclaration", "scope": 2344, "src": "3800:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2307, "name": "string", "nodeType": "ElementaryTypeName", "src": "3800:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2313, "initialValue": {"arguments": [{"id": 2311, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2295, "src": "3850:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2309, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "3821:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2310, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3841:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "3821:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2312, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3821:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "3800:52:5"}, {"assignments": [2315], "declarations": [{"constant": false, "id": 2315, "mutability": "mutable", "name": "bStr", "nameLocation": "3880:4:5", "nodeType": "VariableDeclaration", "scope": 2344, "src": "3866:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2314, "name": "string", "nodeType": "ElementaryTypeName", "src": "3866:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2320, "initialValue": {"arguments": [{"id": 2318, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2297, "src": "3916:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2316, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "3887:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2317, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3907:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "3887:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2319, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3887:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "3866:52:5"}, {"assignments": [2322], "declarations": [{"constant": false, "id": 2322, "mutability": "mutable", "name": "assertMsg", "nameLocation": "3945:9:5", "nodeType": "VariableDeclaration", "scope": 2344, "src": "3932:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2321, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3932:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2332, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2325, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3991:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2326, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2308, "src": "4020:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3c", "id": 2327, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4042:3:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_8cb938a03d27235fdf22924e770f8c8a7fc7441e706e979b359839d1efe72520", "typeString": "literal_string \"<\""}, "value": "<"}, {"id": 2328, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2315, "src": "4063:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2329, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4085:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2330, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2299, "src": "4122:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_8cb938a03d27235fdf22924e770f8c8a7fc7441e706e979b359839d1efe72520", "typeString": "literal_string \"<\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2323, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "3957:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2324, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "3961:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "3957:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2331, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3957:185:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "3932:210:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2336, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2322, "src": "4182:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2335, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4175:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2334, "name": "string", "nodeType": "ElementaryTypeName", "src": "4175:6:5", "typeDescriptions": {}}}, "id": 2337, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4175:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2333, "name": "AssertGteFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1993, "src": "4161:13:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2338, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4161:32:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2339, "nodeType": "EmitStatement", "src": "4156:37:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2341, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "4214:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2340, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "4207:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2342, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4207:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2343, "nodeType": "ExpressionStatement", "src": "4207:13:5"}]}}]}, "documentation": {"id": 2293, "nodeType": "StructuredDocumentation", "src": "3647:39:5", "text": "@notice int256 version of assertGte"}, "id": 2347, "implemented": true, "kind": "function", "modifiers": [], "name": "assertGte", "nameLocation": "3700:9:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2300, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2295, "mutability": "mutable", "name": "a", "nameLocation": "3717:1:5", "nodeType": "VariableDeclaration", "scope": 2347, "src": "3710:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2294, "name": "int256", "nodeType": "ElementaryTypeName", "src": "3710:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2297, "mutability": "mutable", "name": "b", "nameLocation": "3727:1:5", "nodeType": "VariableDeclaration", "scope": 2347, "src": "3720:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2296, "name": "int256", "nodeType": "ElementaryTypeName", "src": "3720:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2299, "mutability": "mutable", "name": "reason", "nameLocation": "3744:6:5", "nodeType": "VariableDeclaration", "scope": 2347, "src": "3730:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2298, "name": "string", "nodeType": "ElementaryTypeName", "src": "3730:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "3709:42:5"}, "returnParameters": {"id": 2301, "nodeType": "ParameterList", "parameters": [], "src": "3761:0:5"}, "scope": 3325, "src": "3691:546:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2401, "nodeType": "Block", "src": "4400:475:5", "statements": [{"condition": {"id": 2361, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "4414:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2359, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2357, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2350, "src": "4416:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 2358, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2352, "src": "4420:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "4416:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2360, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "4415:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2400, "nodeType": "IfStatement", "src": "4410:459:5", "trueBody": {"id": 2399, "nodeType": "Block", "src": "4424:445:5", "statements": [{"assignments": [2363], "declarations": [{"constant": false, "id": 2363, "mutability": "mutable", "name": "aStr", "nameLocation": "4452:4:5", "nodeType": "VariableDeclaration", "scope": 2399, "src": "4438:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2362, "name": "string", "nodeType": "ElementaryTypeName", "src": "4438:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2368, "initialValue": {"arguments": [{"id": 2366, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2350, "src": "4488:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2364, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "4459:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2365, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4479:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "4459:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2367, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4459:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "4438:52:5"}, {"assignments": [2370], "declarations": [{"constant": false, "id": 2370, "mutability": "mutable", "name": "bStr", "nameLocation": "4518:4:5", "nodeType": "VariableDeclaration", "scope": 2399, "src": "4504:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2369, "name": "string", "nodeType": "ElementaryTypeName", "src": "4504:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2375, "initialValue": {"arguments": [{"id": 2373, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2352, "src": "4554:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2371, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "4525:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2372, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4545:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "4525:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2374, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4525:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "4504:52:5"}, {"assignments": [2377], "declarations": [{"constant": false, "id": 2377, "mutability": "mutable", "name": "assertMsg", "nameLocation": "4583:9:5", "nodeType": "VariableDeclaration", "scope": 2399, "src": "4570:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2376, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "4570:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2387, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2380, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4629:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2381, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2363, "src": "4658:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3c3d", "id": 2382, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4680:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_e5a87a2aa5cf9e4c4a6b6ca07e0c091c8a0118e9066affa9adc7f6ae150a71a2", "typeString": "literal_string \"<=\""}, "value": "<="}, {"id": 2383, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2370, "src": "4702:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2384, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4724:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2385, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2354, "src": "4761:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_e5a87a2aa5cf9e4c4a6b6ca07e0c091c8a0118e9066affa9adc7f6ae150a71a2", "typeString": "literal_string \"<=\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2378, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "4595:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2379, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "4599:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "4595:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2386, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4595:186:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "4570:211:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2391, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2377, "src": "4820:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2390, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4813:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2389, "name": "string", "nodeType": "ElementaryTypeName", "src": "4813:6:5", "typeDescriptions": {}}}, "id": 2392, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4813:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2388, "name": "AssertGtFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1997, "src": "4800:12:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2393, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4800:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2394, "nodeType": "EmitStatement", "src": "4795:36:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2396, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "4852:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2395, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "4845:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2397, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4845:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2398, "nodeType": "ExpressionStatement", "src": "4845:13:5"}]}}]}, "documentation": {"id": 2348, "nodeType": "StructuredDocumentation", "src": "4243:81:5", "text": "@notice asserts that a is greater than b. Violations are logged using reason."}, "id": 2402, "implemented": true, "kind": "function", "modifiers": [], "name": "assertGt", "nameLocation": "4338:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2355, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2350, "mutability": "mutable", "name": "a", "nameLocation": "4355:1:5", "nodeType": "VariableDeclaration", "scope": 2402, "src": "4347:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2349, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4347:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2352, "mutability": "mutable", "name": "b", "nameLocation": "4366:1:5", "nodeType": "VariableDeclaration", "scope": 2402, "src": "4358:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2351, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4358:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2354, "mutability": "mutable", "name": "reason", "nameLocation": "4383:6:5", "nodeType": "VariableDeclaration", "scope": 2402, "src": "4369:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2353, "name": "string", "nodeType": "ElementaryTypeName", "src": "4369:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "4346:44:5"}, "returnParameters": {"id": 2356, "nodeType": "ParameterList", "parameters": [], "src": "4400:0:5"}, "scope": 3325, "src": "4329:546:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2456, "nodeType": "Block", "src": "4993:475:5", "statements": [{"condition": {"id": 2416, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "5007:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2414, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2412, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2405, "src": "5009:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 2413, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2407, "src": "5013:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "5009:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2415, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "5008:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2455, "nodeType": "IfStatement", "src": "5003:459:5", "trueBody": {"id": 2454, "nodeType": "Block", "src": "5017:445:5", "statements": [{"assignments": [2418], "declarations": [{"constant": false, "id": 2418, "mutability": "mutable", "name": "aStr", "nameLocation": "5045:4:5", "nodeType": "VariableDeclaration", "scope": 2454, "src": "5031:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2417, "name": "string", "nodeType": "ElementaryTypeName", "src": "5031:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2423, "initialValue": {"arguments": [{"id": 2421, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2405, "src": "5081:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2419, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "5052:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2420, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5072:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "5052:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2422, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5052:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "5031:52:5"}, {"assignments": [2425], "declarations": [{"constant": false, "id": 2425, "mutability": "mutable", "name": "bStr", "nameLocation": "5111:4:5", "nodeType": "VariableDeclaration", "scope": 2454, "src": "5097:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2424, "name": "string", "nodeType": "ElementaryTypeName", "src": "5097:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2430, "initialValue": {"arguments": [{"id": 2428, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2407, "src": "5147:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2426, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "5118:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2427, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5138:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "5118:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2429, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5118:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "5097:52:5"}, {"assignments": [2432], "declarations": [{"constant": false, "id": 2432, "mutability": "mutable", "name": "assertMsg", "nameLocation": "5176:9:5", "nodeType": "VariableDeclaration", "scope": 2454, "src": "5163:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2431, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "5163:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2442, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2435, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5222:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2436, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2418, "src": "5251:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3c3d", "id": 2437, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5273:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_e5a87a2aa5cf9e4c4a6b6ca07e0c091c8a0118e9066affa9adc7f6ae150a71a2", "typeString": "literal_string \"<=\""}, "value": "<="}, {"id": 2438, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2425, "src": "5295:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2439, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5317:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2440, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2409, "src": "5354:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_e5a87a2aa5cf9e4c4a6b6ca07e0c091c8a0118e9066affa9adc7f6ae150a71a2", "typeString": "literal_string \"<=\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2433, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "5188:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2434, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "5192:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "5188:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2441, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5188:186:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "5163:211:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2446, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2432, "src": "5413:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2445, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5406:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2444, "name": "string", "nodeType": "ElementaryTypeName", "src": "5406:6:5", "typeDescriptions": {}}}, "id": 2447, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5406:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2443, "name": "AssertGtFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1997, "src": "5393:12:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2448, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5393:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2449, "nodeType": "EmitStatement", "src": "5388:36:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2451, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "5445:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2450, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "5438:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2452, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5438:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2453, "nodeType": "ExpressionStatement", "src": "5438:13:5"}]}}]}, "documentation": {"id": 2403, "nodeType": "StructuredDocumentation", "src": "4881:38:5", "text": "@notice int256 version of assertGt"}, "id": 2457, "implemented": true, "kind": "function", "modifiers": [], "name": "assertGt", "nameLocation": "4933:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2410, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2405, "mutability": "mutable", "name": "a", "nameLocation": "4949:1:5", "nodeType": "VariableDeclaration", "scope": 2457, "src": "4942:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2404, "name": "int256", "nodeType": "ElementaryTypeName", "src": "4942:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2407, "mutability": "mutable", "name": "b", "nameLocation": "4959:1:5", "nodeType": "VariableDeclaration", "scope": 2457, "src": "4952:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2406, "name": "int256", "nodeType": "ElementaryTypeName", "src": "4952:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2409, "mutability": "mutable", "name": "reason", "nameLocation": "4976:6:5", "nodeType": "VariableDeclaration", "scope": 2457, "src": "4962:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2408, "name": "string", "nodeType": "ElementaryTypeName", "src": "4962:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "4941:42:5"}, "returnParameters": {"id": 2411, "nodeType": "ParameterList", "parameters": [], "src": "4993:0:5"}, "scope": 3325, "src": "4924:544:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2511, "nodeType": "Block", "src": "5641:476:5", "statements": [{"condition": {"id": 2471, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "5655:9:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2469, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2467, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2460, "src": "5657:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": {"id": 2468, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2462, "src": "5662:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "5657:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2470, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "5656:8:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2510, "nodeType": "IfStatement", "src": "5651:460:5", "trueBody": {"id": 2509, "nodeType": "Block", "src": "5666:445:5", "statements": [{"assignments": [2473], "declarations": [{"constant": false, "id": 2473, "mutability": "mutable", "name": "aStr", "nameLocation": "5694:4:5", "nodeType": "VariableDeclaration", "scope": 2509, "src": "5680:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2472, "name": "string", "nodeType": "ElementaryTypeName", "src": "5680:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2478, "initialValue": {"arguments": [{"id": 2476, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2460, "src": "5730:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2474, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "5701:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2475, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5721:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "5701:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2477, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5701:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "5680:52:5"}, {"assignments": [2480], "declarations": [{"constant": false, "id": 2480, "mutability": "mutable", "name": "bStr", "nameLocation": "5760:4:5", "nodeType": "VariableDeclaration", "scope": 2509, "src": "5746:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2479, "name": "string", "nodeType": "ElementaryTypeName", "src": "5746:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2485, "initialValue": {"arguments": [{"id": 2483, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2462, "src": "5796:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2481, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "5767:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2482, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5787:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "5767:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2484, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5767:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "5746:52:5"}, {"assignments": [2487], "declarations": [{"constant": false, "id": 2487, "mutability": "mutable", "name": "assertMsg", "nameLocation": "5825:9:5", "nodeType": "VariableDeclaration", "scope": 2509, "src": "5812:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2486, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "5812:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2497, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2490, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5871:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2491, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2473, "src": "5900:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3e", "id": 2492, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5922:3:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_eff31f7855752a3582db9a0d965d5063f23d94003e66f8c5a8f8e8fe2ab24753", "typeString": "literal_string \">\""}, "value": ">"}, {"id": 2493, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2480, "src": "5943:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2494, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5965:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2495, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2464, "src": "6002:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_eff31f7855752a3582db9a0d965d5063f23d94003e66f8c5a8f8e8fe2ab24753", "typeString": "literal_string \">\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2488, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "5837:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2489, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "5841:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "5837:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2496, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5837:185:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "5812:210:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2501, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2487, "src": "6062:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2500, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6055:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2499, "name": "string", "nodeType": "ElementaryTypeName", "src": "6055:6:5", "typeDescriptions": {}}}, "id": 2502, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6055:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2498, "name": "AssertLteFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2001, "src": "6041:13:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2503, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6041:32:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2504, "nodeType": "EmitStatement", "src": "6036:37:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2506, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "6094:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2505, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "6087:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2507, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6087:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2508, "nodeType": "ExpressionStatement", "src": "6087:13:5"}]}}]}, "documentation": {"id": 2458, "nodeType": "StructuredDocumentation", "src": "5474:90:5", "text": "@notice asserts that a is less than or equal to b. Violations are logged using reason."}, "id": 2512, "implemented": true, "kind": "function", "modifiers": [], "name": "assertLte", "nameLocation": "5578:9:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2465, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2460, "mutability": "mutable", "name": "a", "nameLocation": "5596:1:5", "nodeType": "VariableDeclaration", "scope": 2512, "src": "5588:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2459, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5588:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2462, "mutability": "mutable", "name": "b", "nameLocation": "5607:1:5", "nodeType": "VariableDeclaration", "scope": 2512, "src": "5599:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2461, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5599:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2464, "mutability": "mutable", "name": "reason", "nameLocation": "5624:6:5", "nodeType": "VariableDeclaration", "scope": 2512, "src": "5610:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2463, "name": "string", "nodeType": "ElementaryTypeName", "src": "5610:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "5587:44:5"}, "returnParameters": {"id": 2466, "nodeType": "ParameterList", "parameters": [], "src": "5641:0:5"}, "scope": 3325, "src": "5569:548:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2566, "nodeType": "Block", "src": "6237:476:5", "statements": [{"condition": {"id": 2526, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "6251:9:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2524, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2522, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2515, "src": "6253:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": {"id": 2523, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2517, "src": "6258:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "6253:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2525, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "6252:8:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2565, "nodeType": "IfStatement", "src": "6247:460:5", "trueBody": {"id": 2564, "nodeType": "Block", "src": "6262:445:5", "statements": [{"assignments": [2528], "declarations": [{"constant": false, "id": 2528, "mutability": "mutable", "name": "aStr", "nameLocation": "6290:4:5", "nodeType": "VariableDeclaration", "scope": 2564, "src": "6276:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2527, "name": "string", "nodeType": "ElementaryTypeName", "src": "6276:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2533, "initialValue": {"arguments": [{"id": 2531, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2515, "src": "6326:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2529, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "6297:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2530, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6317:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "6297:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2532, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6297:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "6276:52:5"}, {"assignments": [2535], "declarations": [{"constant": false, "id": 2535, "mutability": "mutable", "name": "bStr", "nameLocation": "6356:4:5", "nodeType": "VariableDeclaration", "scope": 2564, "src": "6342:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2534, "name": "string", "nodeType": "ElementaryTypeName", "src": "6342:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2540, "initialValue": {"arguments": [{"id": 2538, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2517, "src": "6392:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2536, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "6363:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2537, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6383:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "6363:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2539, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6363:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "6342:52:5"}, {"assignments": [2542], "declarations": [{"constant": false, "id": 2542, "mutability": "mutable", "name": "assertMsg", "nameLocation": "6421:9:5", "nodeType": "VariableDeclaration", "scope": 2564, "src": "6408:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2541, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "6408:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2552, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2545, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6467:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2546, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2528, "src": "6496:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3e", "id": 2547, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6518:3:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_eff31f7855752a3582db9a0d965d5063f23d94003e66f8c5a8f8e8fe2ab24753", "typeString": "literal_string \">\""}, "value": ">"}, {"id": 2548, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2535, "src": "6539:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2549, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6561:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2550, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2519, "src": "6598:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_eff31f7855752a3582db9a0d965d5063f23d94003e66f8c5a8f8e8fe2ab24753", "typeString": "literal_string \">\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2543, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "6433:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2544, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "6437:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "6433:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2551, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6433:185:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "6408:210:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2556, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2542, "src": "6658:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2555, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6651:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2554, "name": "string", "nodeType": "ElementaryTypeName", "src": "6651:6:5", "typeDescriptions": {}}}, "id": 2557, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6651:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2553, "name": "AssertLteFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2001, "src": "6637:13:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2558, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6637:32:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2559, "nodeType": "EmitStatement", "src": "6632:37:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2561, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "6690:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2560, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "6683:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2562, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6683:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2563, "nodeType": "ExpressionStatement", "src": "6683:13:5"}]}}]}, "documentation": {"id": 2513, "nodeType": "StructuredDocumentation", "src": "6123:39:5", "text": "@notice int256 version of assertLte"}, "id": 2567, "implemented": true, "kind": "function", "modifiers": [], "name": "assertLte", "nameLocation": "6176:9:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2520, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2515, "mutability": "mutable", "name": "a", "nameLocation": "6193:1:5", "nodeType": "VariableDeclaration", "scope": 2567, "src": "6186:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2514, "name": "int256", "nodeType": "ElementaryTypeName", "src": "6186:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2517, "mutability": "mutable", "name": "b", "nameLocation": "6203:1:5", "nodeType": "VariableDeclaration", "scope": 2567, "src": "6196:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2516, "name": "int256", "nodeType": "ElementaryTypeName", "src": "6196:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2519, "mutability": "mutable", "name": "reason", "nameLocation": "6220:6:5", "nodeType": "VariableDeclaration", "scope": 2567, "src": "6206:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2518, "name": "string", "nodeType": "ElementaryTypeName", "src": "6206:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "6185:42:5"}, "returnParameters": {"id": 2521, "nodeType": "ParameterList", "parameters": [], "src": "6237:0:5"}, "scope": 3325, "src": "6167:546:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2621, "nodeType": "Block", "src": "6873:475:5", "statements": [{"condition": {"id": 2581, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "6887:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2579, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2577, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2570, "src": "6889:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 2578, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2572, "src": "6893:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "6889:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2580, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "6888:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2620, "nodeType": "IfStatement", "src": "6883:459:5", "trueBody": {"id": 2619, "nodeType": "Block", "src": "6897:445:5", "statements": [{"assignments": [2583], "declarations": [{"constant": false, "id": 2583, "mutability": "mutable", "name": "aStr", "nameLocation": "6925:4:5", "nodeType": "VariableDeclaration", "scope": 2619, "src": "6911:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2582, "name": "string", "nodeType": "ElementaryTypeName", "src": "6911:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2588, "initialValue": {"arguments": [{"id": 2586, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2570, "src": "6961:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2584, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "6932:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2585, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6952:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "6932:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2587, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6932:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "6911:52:5"}, {"assignments": [2590], "declarations": [{"constant": false, "id": 2590, "mutability": "mutable", "name": "bStr", "nameLocation": "6991:4:5", "nodeType": "VariableDeclaration", "scope": 2619, "src": "6977:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2589, "name": "string", "nodeType": "ElementaryTypeName", "src": "6977:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2595, "initialValue": {"arguments": [{"id": 2593, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2572, "src": "7027:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2591, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "6998:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2592, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7018:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "6998:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2594, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6998:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "6977:52:5"}, {"assignments": [2597], "declarations": [{"constant": false, "id": 2597, "mutability": "mutable", "name": "assertMsg", "nameLocation": "7056:9:5", "nodeType": "VariableDeclaration", "scope": 2619, "src": "7043:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2596, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "7043:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2607, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2600, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7102:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2601, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2583, "src": "7131:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3e3d", "id": 2602, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7153:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_07cb807c6a0dff35ec91f1d7c9113298207e728f628c0def2060de1af723685a", "typeString": "literal_string \">=\""}, "value": ">="}, {"id": 2603, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2590, "src": "7175:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2604, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7197:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2605, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2574, "src": "7234:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_07cb807c6a0dff35ec91f1d7c9113298207e728f628c0def2060de1af723685a", "typeString": "literal_string \">=\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2598, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "7068:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2599, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "7072:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "7068:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2606, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7068:186:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "7043:211:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2611, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2597, "src": "7293:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2610, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7286:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2609, "name": "string", "nodeType": "ElementaryTypeName", "src": "7286:6:5", "typeDescriptions": {}}}, "id": 2612, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7286:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2608, "name": "AssertLtFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2005, "src": "7273:12:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2613, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7273:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2614, "nodeType": "EmitStatement", "src": "7268:36:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2616, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "7325:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2615, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "7318:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2617, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7318:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2618, "nodeType": "ExpressionStatement", "src": "7318:13:5"}]}}]}, "documentation": {"id": 2568, "nodeType": "StructuredDocumentation", "src": "6719:78:5", "text": "@notice asserts that a is less than b. Violations are logged using reason."}, "id": 2622, "implemented": true, "kind": "function", "modifiers": [], "name": "assertLt", "nameLocation": "6811:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2575, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2570, "mutability": "mutable", "name": "a", "nameLocation": "6828:1:5", "nodeType": "VariableDeclaration", "scope": 2622, "src": "6820:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2569, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6820:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2572, "mutability": "mutable", "name": "b", "nameLocation": "6839:1:5", "nodeType": "VariableDeclaration", "scope": 2622, "src": "6831:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2571, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6831:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2574, "mutability": "mutable", "name": "reason", "nameLocation": "6856:6:5", "nodeType": "VariableDeclaration", "scope": 2622, "src": "6842:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2573, "name": "string", "nodeType": "ElementaryTypeName", "src": "6842:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "6819:44:5"}, "returnParameters": {"id": 2576, "nodeType": "ParameterList", "parameters": [], "src": "6873:0:5"}, "scope": 3325, "src": "6802:546:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2676, "nodeType": "Block", "src": "7466:475:5", "statements": [{"condition": {"id": 2636, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "7480:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2634, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2632, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2625, "src": "7482:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 2633, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2627, "src": "7486:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "7482:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2635, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "7481:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2675, "nodeType": "IfStatement", "src": "7476:459:5", "trueBody": {"id": 2674, "nodeType": "Block", "src": "7490:445:5", "statements": [{"assignments": [2638], "declarations": [{"constant": false, "id": 2638, "mutability": "mutable", "name": "aStr", "nameLocation": "7518:4:5", "nodeType": "VariableDeclaration", "scope": 2674, "src": "7504:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2637, "name": "string", "nodeType": "ElementaryTypeName", "src": "7504:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2643, "initialValue": {"arguments": [{"id": 2641, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2625, "src": "7554:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2639, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "7525:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2640, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7545:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "7525:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2642, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7525:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "7504:52:5"}, {"assignments": [2645], "declarations": [{"constant": false, "id": 2645, "mutability": "mutable", "name": "bStr", "nameLocation": "7584:4:5", "nodeType": "VariableDeclaration", "scope": 2674, "src": "7570:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2644, "name": "string", "nodeType": "ElementaryTypeName", "src": "7570:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2650, "initialValue": {"arguments": [{"id": 2648, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2627, "src": "7620:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2646, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "7591:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2647, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7611:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "7591:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2649, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7591:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "7570:52:5"}, {"assignments": [2652], "declarations": [{"constant": false, "id": 2652, "mutability": "mutable", "name": "assertMsg", "nameLocation": "7649:9:5", "nodeType": "VariableDeclaration", "scope": 2674, "src": "7636:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2651, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "7636:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2662, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2655, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7695:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2656, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2638, "src": "7724:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3e3d", "id": 2657, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7746:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_07cb807c6a0dff35ec91f1d7c9113298207e728f628c0def2060de1af723685a", "typeString": "literal_string \">=\""}, "value": ">="}, {"id": 2658, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2645, "src": "7768:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2659, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7790:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2660, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2629, "src": "7827:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_07cb807c6a0dff35ec91f1d7c9113298207e728f628c0def2060de1af723685a", "typeString": "literal_string \">=\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2653, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "7661:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2654, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "7665:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "7661:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2661, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7661:186:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "7636:211:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2666, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2652, "src": "7886:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2665, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7879:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2664, "name": "string", "nodeType": "ElementaryTypeName", "src": "7879:6:5", "typeDescriptions": {}}}, "id": 2667, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7879:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2663, "name": "AssertLtFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2005, "src": "7866:12:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2668, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7866:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2669, "nodeType": "EmitStatement", "src": "7861:36:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2671, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "7918:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2670, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "7911:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2672, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7911:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2673, "nodeType": "ExpressionStatement", "src": "7911:13:5"}]}}]}, "documentation": {"id": 2623, "nodeType": "StructuredDocumentation", "src": "7354:38:5", "text": "@notice int256 version of assertLt"}, "id": 2677, "implemented": true, "kind": "function", "modifiers": [], "name": "assertLt", "nameLocation": "7406:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2630, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2625, "mutability": "mutable", "name": "a", "nameLocation": "7422:1:5", "nodeType": "VariableDeclaration", "scope": 2677, "src": "7415:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2624, "name": "int256", "nodeType": "ElementaryTypeName", "src": "7415:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2627, "mutability": "mutable", "name": "b", "nameLocation": "7432:1:5", "nodeType": "VariableDeclaration", "scope": 2677, "src": "7425:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2626, "name": "int256", "nodeType": "ElementaryTypeName", "src": "7425:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2629, "mutability": "mutable", "name": "reason", "nameLocation": "7449:6:5", "nodeType": "VariableDeclaration", "scope": 2677, "src": "7435:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2628, "name": "string", "nodeType": "ElementaryTypeName", "src": "7435:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "7414:42:5"}, "returnParameters": {"id": 2631, "nodeType": "ParameterList", "parameters": [], "src": "7466:0:5"}, "scope": 3325, "src": "7397:544:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2747, "nodeType": "Block", "src": "8140:528:5", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 2695, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2691, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2689, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2680, "src": "8154:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 2690, "name": "low", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2682, "src": "8162:3:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8154:11:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2694, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2692, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2680, "src": "8169:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 2693, "name": "high", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2684, "src": "8177:4:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8169:12:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "8154:27:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2744, "nodeType": "IfStatement", "src": "8150:490:5", "trueBody": {"id": 2743, "nodeType": "Block", "src": "8183:457:5", "statements": [{"assignments": [2697], "declarations": [{"constant": false, "id": 2697, "mutability": "mutable", "name": "ans", "nameLocation": "8202:3:5", "nodeType": "VariableDeclaration", "scope": 2743, "src": "8197:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2696, "name": "uint", "nodeType": "ElementaryTypeName", "src": "8197:4:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 2709, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2708, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2698, "name": "low", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2682, "src": "8208:3:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2706, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2699, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2680, "src": "8215:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2704, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2702, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2700, "name": "high", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2684, "src": "8224:4:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 2701, "name": "low", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2682, "src": "8231:3:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8224:10:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 2703, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8237:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "8224:14:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 2705, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "8223:16:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8215:24:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 2707, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "8214:26:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8208:32:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "8197:43:5"}, {"assignments": [2711], "declarations": [{"constant": false, "id": 2711, "mutability": "mutable", "name": "valueStr", "nameLocation": "8268:8:5", "nodeType": "VariableDeclaration", "scope": 2743, "src": "8254:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2710, "name": "string", "nodeType": "ElementaryTypeName", "src": "8254:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2716, "initialValue": {"arguments": [{"id": 2714, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2680, "src": "8308:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2712, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "8279:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2713, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8299:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "8279:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2715, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8279:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "8254:60:5"}, {"assignments": [2718], "declarations": [{"constant": false, "id": 2718, "mutability": "mutable", "name": "ansStr", "nameLocation": "8342:6:5", "nodeType": "VariableDeclaration", "scope": 2743, "src": "8328:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2717, "name": "string", "nodeType": "ElementaryTypeName", "src": "8328:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2723, "initialValue": {"arguments": [{"id": 2721, "name": "ans", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2697, "src": "8380:3:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2719, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "8351:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2720, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8371:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "8351:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2722, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8351:33:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "8328:56:5"}, {"assignments": [2725], "declarations": [{"constant": false, "id": 2725, "mutability": "mutable", "name": "message", "nameLocation": "8411:7:5", "nodeType": "VariableDeclaration", "scope": 2743, "src": "8398:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2724, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "8398:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2733, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 2728, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8455:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 2729, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2711, "src": "8490:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 2730, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8516:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 2731, "name": "ansStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2718, "src": "8540:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2726, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "8421:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2727, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "8425:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "8421:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2732, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8421:139:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "8398:162:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2737, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2725, "src": "8596:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2736, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8589:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2735, "name": "string", "nodeType": "ElementaryTypeName", "src": "8589:6:5", "typeDescriptions": {}}}, "id": 2738, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8589:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2734, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "8579:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2739, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8579:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2740, "nodeType": "EmitStatement", "src": "8574:31:5"}, {"expression": {"id": 2741, "name": "ans", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2697, "src": "8626:3:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 2688, "id": 2742, "nodeType": "Return", "src": "8619:10:5"}]}}, {"expression": {"id": 2745, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2680, "src": "8656:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 2688, "id": 2746, "nodeType": "Return", "src": "8649:12:5"}]}, "documentation": {"id": 2678, "nodeType": "StructuredDocumentation", "src": "7947:67:5", "text": "@notice Clamps value to be between low and high, both inclusive"}, "id": 2748, "implemented": true, "kind": "function", "modifiers": [], "name": "clampBetween", "nameLocation": "8028:12:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2685, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2680, "mutability": "mutable", "name": "value", "nameLocation": "8058:5:5", "nodeType": "VariableDeclaration", "scope": 2748, "src": "8050:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2679, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8050:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2682, "mutability": "mutable", "name": "low", "nameLocation": "8081:3:5", "nodeType": "VariableDeclaration", "scope": 2748, "src": "8073:11:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2681, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8073:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2684, "mutability": "mutable", "name": "high", "nameLocation": "8102:4:5", "nodeType": "VariableDeclaration", "scope": 2748, "src": "8094:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2683, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8094:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "8040:72:5"}, "returnParameters": {"id": 2688, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2687, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2748, "src": "8131:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2686, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8131:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "8130:9:5"}, "scope": 3325, "src": "8019:649:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2836, "nodeType": "Block", "src": "8838:646:5", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 2766, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2762, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2760, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2751, "src": "8852:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 2761, "name": "low", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2753, "src": "8860:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "8852:11:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2765, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2763, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2751, "src": "8867:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 2764, "name": "high", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2755, "src": "8875:4:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "8867:12:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "8852:27:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2833, "nodeType": "IfStatement", "src": "8848:608:5", "trueBody": {"id": 2832, "nodeType": "Block", "src": "8881:575:5", "statements": [{"assignments": [2768], "declarations": [{"constant": false, "id": 2768, "mutability": "mutable", "name": "range", "nameLocation": "8899:5:5", "nodeType": "VariableDeclaration", "scope": 2832, "src": "8895:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2767, "name": "int", "nodeType": "ElementaryTypeName", "src": "8895:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "id": 2774, "initialValue": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2773, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2771, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2769, "name": "high", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2755, "src": "8907:4:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 2770, "name": "low", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2753, "src": "8914:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "8907:10:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 2772, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8920:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "8907:14:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "VariableDeclarationStatement", "src": "8895:26:5"}, {"assignments": [2776], "declarations": [{"constant": false, "id": 2776, "mutability": "mutable", "name": "clamped", "nameLocation": "8939:7:5", "nodeType": "VariableDeclaration", "scope": 2832, "src": "8935:11:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2775, "name": "int", "nodeType": "ElementaryTypeName", "src": "8935:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "id": 2784, "initialValue": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2783, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2779, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2777, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2751, "src": "8950:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 2778, "name": "low", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2753, "src": "8958:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "8950:11:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "id": 2780, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "8949:13:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"components": [{"id": 2781, "name": "range", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2768, "src": "8966:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "id": 2782, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "8965:7:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "8949:23:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "VariableDeclarationStatement", "src": "8935:37:5"}, {"condition": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2787, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2785, "name": "clamped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2776, "src": "8990:7:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"hexValue": "30", "id": 2786, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9000:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "8990:11:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2792, "nodeType": "IfStatement", "src": "8986:33:5", "trueBody": {"expression": {"id": 2790, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 2788, "name": "clamped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2776, "src": "9003:7:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "Assignment", "operator": "+=", "rightHandSide": {"id": 2789, "name": "range", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2768, "src": "9014:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "9003:16:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "id": 2791, "nodeType": "ExpressionStatement", "src": "9003:16:5"}}, {"assignments": [2794], "declarations": [{"constant": false, "id": 2794, "mutability": "mutable", "name": "ans", "nameLocation": "9037:3:5", "nodeType": "VariableDeclaration", "scope": 2832, "src": "9033:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2793, "name": "int", "nodeType": "ElementaryTypeName", "src": "9033:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "id": 2798, "initialValue": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2797, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2795, "name": "low", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2753, "src": "9043:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 2796, "name": "clamped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2776, "src": "9049:7:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "9043:13:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "VariableDeclarationStatement", "src": "9033:23:5"}, {"assignments": [2800], "declarations": [{"constant": false, "id": 2800, "mutability": "mutable", "name": "valueStr", "nameLocation": "9084:8:5", "nodeType": "VariableDeclaration", "scope": 2832, "src": "9070:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2799, "name": "string", "nodeType": "ElementaryTypeName", "src": "9070:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2805, "initialValue": {"arguments": [{"id": 2803, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2751, "src": "9124:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2801, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "9095:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2802, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9115:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "9095:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2804, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9095:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "9070:60:5"}, {"assignments": [2807], "declarations": [{"constant": false, "id": 2807, "mutability": "mutable", "name": "ansStr", "nameLocation": "9158:6:5", "nodeType": "VariableDeclaration", "scope": 2832, "src": "9144:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2806, "name": "string", "nodeType": "ElementaryTypeName", "src": "9144:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2812, "initialValue": {"arguments": [{"id": 2810, "name": "ans", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2794, "src": "9196:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2808, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "9167:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2809, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9187:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "9167:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2811, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9167:33:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "9144:56:5"}, {"assignments": [2814], "declarations": [{"constant": false, "id": 2814, "mutability": "mutable", "name": "message", "nameLocation": "9227:7:5", "nodeType": "VariableDeclaration", "scope": 2832, "src": "9214:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2813, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "9214:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2822, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 2817, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9271:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 2818, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2800, "src": "9306:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 2819, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9332:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 2820, "name": "ansStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2807, "src": "9356:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2815, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "9237:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2816, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "9241:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "9237:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2821, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9237:139:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "9214:162:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2826, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2814, "src": "9412:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2825, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "9405:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2824, "name": "string", "nodeType": "ElementaryTypeName", "src": "9405:6:5", "typeDescriptions": {}}}, "id": 2827, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9405:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2823, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "9395:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2828, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9395:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2829, "nodeType": "EmitStatement", "src": "9390:31:5"}, {"expression": {"id": 2830, "name": "ans", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2794, "src": "9442:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 2759, "id": 2831, "nodeType": "Return", "src": "9435:10:5"}]}}, {"expression": {"id": 2834, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2751, "src": "9472:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 2759, "id": 2835, "nodeType": "Return", "src": "9465:12:5"}]}, "documentation": {"id": 2749, "nodeType": "StructuredDocumentation", "src": "8674:42:5", "text": "@notice int256 version of clampBetween"}, "id": 2837, "implemented": true, "kind": "function", "modifiers": [], "name": "clampBetween", "nameLocation": "8730:12:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2756, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2751, "mutability": "mutable", "name": "value", "nameLocation": "8759:5:5", "nodeType": "VariableDeclaration", "scope": 2837, "src": "8752:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2750, "name": "int256", "nodeType": "ElementaryTypeName", "src": "8752:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2753, "mutability": "mutable", "name": "low", "nameLocation": "8781:3:5", "nodeType": "VariableDeclaration", "scope": 2837, "src": "8774:10:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2752, "name": "int256", "nodeType": "ElementaryTypeName", "src": "8774:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2755, "mutability": "mutable", "name": "high", "nameLocation": "8801:4:5", "nodeType": "VariableDeclaration", "scope": 2837, "src": "8794:11:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2754, "name": "int256", "nodeType": "ElementaryTypeName", "src": "8794:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "8742:69:5"}, "returnParameters": {"id": 2759, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2758, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2837, "src": "8830:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2757, "name": "int256", "nodeType": "ElementaryTypeName", "src": "8830:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "8829:8:5"}, "scope": 3325, "src": "8721:763:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2901, "nodeType": "Block", "src": "9599:655:5", "statements": [{"condition": {"id": 2851, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "9613:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2849, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2847, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2840, "src": "9615:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 2848, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2842, "src": "9619:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "9615:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2850, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "9614:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2898, "nodeType": "IfStatement", "src": "9609:621:5", "trueBody": {"id": 2897, "nodeType": "Block", "src": "9623:607:5", "statements": [{"expression": {"arguments": [{"id": 2853, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2842, "src": "9664:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "30", "id": 2854, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9683:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, {"hexValue": "636c616d704c742063616e6e6f7420636c616d702076616c7565206120746f206265206c657373207468616e207a65726f2e20436865636b20796f757220696e707574732f617373756d7074696f6e732e", "id": 2855, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9702:83:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_88cbc7223df7150b831fdd0d25a212430685c04b2ca3353c6b35e896f5266755", "typeString": "literal_string \"clampLt cannot clamp value a to be less than zero. Check your inputs/assumptions.\""}, "value": "clampLt cannot clamp value a to be less than zero. Check your inputs/assumptions."}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, {"typeIdentifier": "t_stringliteral_88cbc7223df7150b831fdd0d25a212430685c04b2ca3353c6b35e896f5266755", "typeString": "literal_string \"clampLt cannot clamp value a to be less than zero. Check your inputs/assumptions.\""}], "id": 2852, "name": "assertNeq", "nodeType": "Identifier", "overloadedDeclarations": [2184, 2237], "referencedDeclaration": 2184, "src": "9637:9:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 2856, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9637:162:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2857, "nodeType": "ExpressionStatement", "src": "9637:162:5"}, {"assignments": [2859], "declarations": [{"constant": false, "id": 2859, "mutability": "mutable", "name": "value", "nameLocation": "9821:5:5", "nodeType": "VariableDeclaration", "scope": 2897, "src": "9813:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2858, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9813:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 2863, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2862, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2860, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2840, "src": "9829:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"id": 2861, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2842, "src": "9833:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "9829:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "9813:21:5"}, {"assignments": [2865], "declarations": [{"constant": false, "id": 2865, "mutability": "mutable", "name": "aStr", "nameLocation": "9862:4:5", "nodeType": "VariableDeclaration", "scope": 2897, "src": "9848:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2864, "name": "string", "nodeType": "ElementaryTypeName", "src": "9848:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2870, "initialValue": {"arguments": [{"id": 2868, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2840, "src": "9898:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2866, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "9869:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2867, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9889:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "9869:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2869, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9869:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "9848:52:5"}, {"assignments": [2872], "declarations": [{"constant": false, "id": 2872, "mutability": "mutable", "name": "valueStr", "nameLocation": "9928:8:5", "nodeType": "VariableDeclaration", "scope": 2897, "src": "9914:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2871, "name": "string", "nodeType": "ElementaryTypeName", "src": "9914:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2877, "initialValue": {"arguments": [{"id": 2875, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2859, "src": "9968:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2873, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "9939:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2874, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9959:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "9939:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2876, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9939:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "9914:60:5"}, {"assignments": [2879], "declarations": [{"constant": false, "id": 2879, "mutability": "mutable", "name": "message", "nameLocation": "10001:7:5", "nodeType": "VariableDeclaration", "scope": 2897, "src": "9988:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2878, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "9988:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2887, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 2882, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10045:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 2883, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2865, "src": "10080:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 2884, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10102:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 2885, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2872, "src": "10126:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2880, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "10011:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2881, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "10015:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "10011:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2886, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10011:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "9988:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2891, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2879, "src": "10184:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2890, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10177:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2889, "name": "string", "nodeType": "ElementaryTypeName", "src": "10177:6:5", "typeDescriptions": {}}}, "id": 2892, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10177:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2888, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "10167:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2893, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10167:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2894, "nodeType": "EmitStatement", "src": "10162:31:5"}, {"expression": {"id": 2895, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2859, "src": "10214:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 2846, "id": 2896, "nodeType": "Return", "src": "10207:12:5"}]}}, {"expression": {"id": 2899, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2840, "src": "10246:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 2846, "id": 2900, "nodeType": "Return", "src": "10239:8:5"}]}, "documentation": {"id": 2838, "nodeType": "StructuredDocumentation", "src": "9490:38:5", "text": "@notice clamps a to be less than b"}, "id": 2902, "implemented": true, "kind": "function", "modifiers": [], "name": "clampLt", "nameLocation": "9542:7:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2843, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2840, "mutability": "mutable", "name": "a", "nameLocation": "9558:1:5", "nodeType": "VariableDeclaration", "scope": 2902, "src": "9550:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2839, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9550:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2842, "mutability": "mutable", "name": "b", "nameLocation": "9569:1:5", "nodeType": "VariableDeclaration", "scope": 2902, "src": "9561:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2841, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9561:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "9549:22:5"}, "returnParameters": {"id": 2846, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2845, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2902, "src": "9590:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2844, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9590:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "9589:9:5"}, "scope": 3325, "src": "9533:721:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2960, "nodeType": "Block", "src": "10365:478:5", "statements": [{"condition": {"id": 2916, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "10379:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2914, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2912, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2905, "src": "10381:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 2913, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2907, "src": "10385:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "10381:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2915, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "10380:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2957, "nodeType": "IfStatement", "src": "10375:444:5", "trueBody": {"id": 2956, "nodeType": "Block", "src": "10389:430:5", "statements": [{"assignments": [2918], "declarations": [{"constant": false, "id": 2918, "mutability": "mutable", "name": "value", "nameLocation": "10410:5:5", "nodeType": "VariableDeclaration", "scope": 2956, "src": "10403:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2917, "name": "int256", "nodeType": "ElementaryTypeName", "src": "10403:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "id": 2922, "initialValue": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2921, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2919, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2907, "src": "10418:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"hexValue": "31", "id": 2920, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10422:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "10418:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "VariableDeclarationStatement", "src": "10403:20:5"}, {"assignments": [2924], "declarations": [{"constant": false, "id": 2924, "mutability": "mutable", "name": "aStr", "nameLocation": "10451:4:5", "nodeType": "VariableDeclaration", "scope": 2956, "src": "10437:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2923, "name": "string", "nodeType": "ElementaryTypeName", "src": "10437:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2929, "initialValue": {"arguments": [{"id": 2927, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2905, "src": "10487:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2925, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "10458:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2926, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10478:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "10458:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2928, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10458:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "10437:52:5"}, {"assignments": [2931], "declarations": [{"constant": false, "id": 2931, "mutability": "mutable", "name": "valueStr", "nameLocation": "10517:8:5", "nodeType": "VariableDeclaration", "scope": 2956, "src": "10503:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2930, "name": "string", "nodeType": "ElementaryTypeName", "src": "10503:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2936, "initialValue": {"arguments": [{"id": 2934, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2918, "src": "10557:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2932, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "10528:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2933, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10548:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "10528:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2935, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10528:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "10503:60:5"}, {"assignments": [2938], "declarations": [{"constant": false, "id": 2938, "mutability": "mutable", "name": "message", "nameLocation": "10590:7:5", "nodeType": "VariableDeclaration", "scope": 2956, "src": "10577:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2937, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "10577:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2946, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 2941, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10634:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 2942, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2924, "src": "10669:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 2943, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10691:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 2944, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2931, "src": "10715:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2939, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "10600:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2940, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "10604:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "10600:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2945, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10600:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "10577:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2950, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2938, "src": "10773:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2949, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10766:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2948, "name": "string", "nodeType": "ElementaryTypeName", "src": "10766:6:5", "typeDescriptions": {}}}, "id": 2951, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10766:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2947, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "10756:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2952, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10756:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2953, "nodeType": "EmitStatement", "src": "10751:31:5"}, {"expression": {"id": 2954, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2918, "src": "10803:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 2911, "id": 2955, "nodeType": "Return", "src": "10796:12:5"}]}}, {"expression": {"id": 2958, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2905, "src": "10835:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 2911, "id": 2959, "nodeType": "Return", "src": "10828:8:5"}]}, "documentation": {"id": 2903, "nodeType": "StructuredDocumentation", "src": "10260:37:5", "text": "@notice int256 version of clampLt"}, "id": 2961, "implemented": true, "kind": "function", "modifiers": [], "name": "clampLt", "nameLocation": "10311:7:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2908, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2905, "mutability": "mutable", "name": "a", "nameLocation": "10326:1:5", "nodeType": "VariableDeclaration", "scope": 2961, "src": "10319:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2904, "name": "int256", "nodeType": "ElementaryTypeName", "src": "10319:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2907, "mutability": "mutable", "name": "b", "nameLocation": "10336:1:5", "nodeType": "VariableDeclaration", "scope": 2961, "src": "10329:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2906, "name": "int256", "nodeType": "ElementaryTypeName", "src": "10329:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "10318:20:5"}, "returnParameters": {"id": 2911, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2910, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2961, "src": "10357:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2909, "name": "int256", "nodeType": "ElementaryTypeName", "src": "10357:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "10356:8:5"}, "scope": 3325, "src": "10302:541:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 3022, "nodeType": "Block", "src": "10971:486:5", "statements": [{"condition": {"id": 2975, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "10985:9:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2973, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2971, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2964, "src": "10987:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": {"id": 2972, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2966, "src": "10992:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "10987:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2974, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "10986:8:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 3019, "nodeType": "IfStatement", "src": "10981:452:5", "trueBody": {"id": 3018, "nodeType": "Block", "src": "10996:437:5", "statements": [{"assignments": [2977], "declarations": [{"constant": false, "id": 2977, "mutability": "mutable", "name": "value", "nameLocation": "11018:5:5", "nodeType": "VariableDeclaration", "scope": 3018, "src": "11010:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2976, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11010:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 2984, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2983, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2978, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2964, "src": "11026:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2981, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2979, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2966, "src": "11031:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 2980, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "11035:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "11031:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 2982, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "11030:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "11026:11:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "11010:27:5"}, {"assignments": [2986], "declarations": [{"constant": false, "id": 2986, "mutability": "mutable", "name": "aStr", "nameLocation": "11065:4:5", "nodeType": "VariableDeclaration", "scope": 3018, "src": "11051:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2985, "name": "string", "nodeType": "ElementaryTypeName", "src": "11051:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2991, "initialValue": {"arguments": [{"id": 2989, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2964, "src": "11101:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2987, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "11072:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2988, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "11092:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "11072:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2990, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11072:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "11051:52:5"}, {"assignments": [2993], "declarations": [{"constant": false, "id": 2993, "mutability": "mutable", "name": "valueStr", "nameLocation": "11131:8:5", "nodeType": "VariableDeclaration", "scope": 3018, "src": "11117:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2992, "name": "string", "nodeType": "ElementaryTypeName", "src": "11117:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2998, "initialValue": {"arguments": [{"id": 2996, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2977, "src": "11171:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2994, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "11142:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2995, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "11162:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "11142:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2997, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11142:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "11117:60:5"}, {"assignments": [3000], "declarations": [{"constant": false, "id": 3000, "mutability": "mutable", "name": "message", "nameLocation": "11204:7:5", "nodeType": "VariableDeclaration", "scope": 3018, "src": "11191:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2999, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "11191:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 3008, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 3003, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "11248:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 3004, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2986, "src": "11283:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 3005, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "11305:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 3006, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2993, "src": "11329:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 3001, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "11214:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 3002, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "11218:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "11214:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 3007, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11214:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "11191:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 3012, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3000, "src": "11387:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3011, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "11380:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3010, "name": "string", "nodeType": "ElementaryTypeName", "src": "11380:6:5", "typeDescriptions": {}}}, "id": 3013, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11380:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 3009, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "11370:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 3014, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11370:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 3015, "nodeType": "EmitStatement", "src": "11365:31:5"}, {"expression": {"id": 3016, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2977, "src": "11417:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 2970, "id": 3017, "nodeType": "Return", "src": "11410:12:5"}]}}, {"expression": {"id": 3020, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2964, "src": "11449:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 2970, "id": 3021, "nodeType": "Return", "src": "11442:8:5"}]}, "documentation": {"id": 2962, "nodeType": "StructuredDocumentation", "src": "10849:50:5", "text": "@notice clamps a to be less than or equal to b"}, "id": 3023, "implemented": true, "kind": "function", "modifiers": [], "name": "clampLte", "nameLocation": "10913:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2967, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2964, "mutability": "mutable", "name": "a", "nameLocation": "10930:1:5", "nodeType": "VariableDeclaration", "scope": 3023, "src": "10922:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2963, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10922:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2966, "mutability": "mutable", "name": "b", "nameLocation": "10941:1:5", "nodeType": "VariableDeclaration", "scope": 3023, "src": "10933:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2965, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10933:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "10921:22:5"}, "returnParameters": {"id": 2970, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2969, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3023, "src": "10962:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2968, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10962:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "10961:9:5"}, "scope": 3325, "src": "10904:553:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 3079, "nodeType": "Block", "src": "11570:475:5", "statements": [{"condition": {"id": 3037, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "11584:9:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 3035, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3033, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3026, "src": "11586:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": {"id": 3034, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3028, "src": "11591:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "11586:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 3036, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "11585:8:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 3076, "nodeType": "IfStatement", "src": "11580:441:5", "trueBody": {"id": 3075, "nodeType": "Block", "src": "11595:426:5", "statements": [{"assignments": [3039], "declarations": [{"constant": false, "id": 3039, "mutability": "mutable", "name": "value", "nameLocation": "11616:5:5", "nodeType": "VariableDeclaration", "scope": 3075, "src": "11609:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3038, "name": "int256", "nodeType": "ElementaryTypeName", "src": "11609:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "id": 3041, "initialValue": {"id": 3040, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3028, "src": "11624:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "VariableDeclarationStatement", "src": "11609:16:5"}, {"assignments": [3043], "declarations": [{"constant": false, "id": 3043, "mutability": "mutable", "name": "aStr", "nameLocation": "11653:4:5", "nodeType": "VariableDeclaration", "scope": 3075, "src": "11639:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3042, "name": "string", "nodeType": "ElementaryTypeName", "src": "11639:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3048, "initialValue": {"arguments": [{"id": 3046, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3026, "src": "11689:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 3044, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "11660:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3045, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "11680:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "11660:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 3047, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11660:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "11639:52:5"}, {"assignments": [3050], "declarations": [{"constant": false, "id": 3050, "mutability": "mutable", "name": "valueStr", "nameLocation": "11719:8:5", "nodeType": "VariableDeclaration", "scope": 3075, "src": "11705:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3049, "name": "string", "nodeType": "ElementaryTypeName", "src": "11705:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3055, "initialValue": {"arguments": [{"id": 3053, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3039, "src": "11759:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 3051, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "11730:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3052, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "11750:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "11730:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 3054, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11730:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "11705:60:5"}, {"assignments": [3057], "declarations": [{"constant": false, "id": 3057, "mutability": "mutable", "name": "message", "nameLocation": "11792:7:5", "nodeType": "VariableDeclaration", "scope": 3075, "src": "11779:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 3056, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "11779:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 3065, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 3060, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "11836:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 3061, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3043, "src": "11871:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 3062, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "11893:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 3063, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3050, "src": "11917:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 3058, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "11802:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 3059, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "11806:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "11802:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 3064, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11802:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "11779:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 3069, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3057, "src": "11975:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3068, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "11968:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3067, "name": "string", "nodeType": "ElementaryTypeName", "src": "11968:6:5", "typeDescriptions": {}}}, "id": 3070, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11968:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 3066, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "11958:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 3071, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11958:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 3072, "nodeType": "EmitStatement", "src": "11953:31:5"}, {"expression": {"id": 3073, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3039, "src": "12005:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 3032, "id": 3074, "nodeType": "Return", "src": "11998:12:5"}]}}, {"expression": {"id": 3077, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3026, "src": "12037:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 3032, "id": 3078, "nodeType": "Return", "src": "12030:8:5"}]}, "documentation": {"id": 3024, "nodeType": "StructuredDocumentation", "src": "11463:38:5", "text": "@notice int256 version of clampLte"}, "id": 3080, "implemented": true, "kind": "function", "modifiers": [], "name": "clampLte", "nameLocation": "11515:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3029, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3026, "mutability": "mutable", "name": "a", "nameLocation": "11531:1:5", "nodeType": "VariableDeclaration", "scope": 3080, "src": "11524:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3025, "name": "int256", "nodeType": "ElementaryTypeName", "src": "11524:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 3028, "mutability": "mutable", "name": "b", "nameLocation": "11541:1:5", "nodeType": "VariableDeclaration", "scope": 3080, "src": "11534:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3027, "name": "int256", "nodeType": "ElementaryTypeName", "src": "11534:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "11523:20:5"}, "returnParameters": {"id": 3032, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3031, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3080, "src": "11562:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3030, "name": "int256", "nodeType": "ElementaryTypeName", "src": "11562:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "11561:8:5"}, "scope": 3325, "src": "11506:539:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 3149, "nodeType": "Block", "src": "12163:701:5", "statements": [{"condition": {"id": 3094, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "12177:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3092, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3090, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3083, "src": "12179:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 3091, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3085, "src": "12183:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "12179:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 3093, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "12178:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseBody": {"id": 3147, "nodeType": "Block", "src": "12825:33:5", "statements": [{"expression": {"id": 3145, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3083, "src": "12846:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 3089, "id": 3146, "nodeType": "Return", "src": "12839:8:5"}]}, "id": 3148, "nodeType": "IfStatement", "src": "12173:685:5", "trueBody": {"id": 3144, "nodeType": "Block", "src": "12187:632:5", "statements": [{"expression": {"arguments": [{"id": 3096, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3085, "src": "12228:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"expression": {"arguments": [{"id": 3099, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "12252:7:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}, "typeName": {"id": 3098, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "12252:7:5", "typeDescriptions": {}}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}], "id": 3097, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "12247:4:5", "typeDescriptions": {"typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure"}}, "id": 3100, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12247:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_magic_meta_type_t_uint256", "typeString": "type(uint256)"}}, "id": 3101, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "12261:3:5", "memberName": "max", "nodeType": "MemberAccess", "src": "12247:17:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "636c616d7047742063616e6e6f7420636c616d702076616c7565206120746f206265206c6172676572207468616e2075696e743235362e6d61782e20436865636b20796f757220696e707574732f617373756d7074696f6e732e", "id": 3102, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "12282:92:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_922f1b91690a2e735abd3aee2b398fdff5957cdd0f3040e92601649842022cec", "typeString": "literal_string \"clampGt cannot clamp value a to be larger than uint256.max. Check your inputs/assumptions.\""}, "value": "clampGt cannot clamp value a to be larger than uint256.max. Check your inputs/assumptions."}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_922f1b91690a2e735abd3aee2b398fdff5957cdd0f3040e92601649842022cec", "typeString": "literal_string \"clampGt cannot clamp value a to be larger than uint256.max. Check your inputs/assumptions.\""}], "id": 3095, "name": "assertNeq", "nodeType": "Identifier", "overloadedDeclarations": [2184, 2237], "referencedDeclaration": 2184, "src": "12201:9:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 3103, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12201:187:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 3104, "nodeType": "ExpressionStatement", "src": "12201:187:5"}, {"assignments": [3106], "declarations": [{"constant": false, "id": 3106, "mutability": "mutable", "name": "value", "nameLocation": "12410:5:5", "nodeType": "VariableDeclaration", "scope": 3144, "src": "12402:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3105, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "12402:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 3110, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3109, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3107, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3085, "src": "12418:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 3108, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "12422:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "12418:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "12402:21:5"}, {"assignments": [3112], "declarations": [{"constant": false, "id": 3112, "mutability": "mutable", "name": "aStr", "nameLocation": "12451:4:5", "nodeType": "VariableDeclaration", "scope": 3144, "src": "12437:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3111, "name": "string", "nodeType": "ElementaryTypeName", "src": "12437:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3117, "initialValue": {"arguments": [{"id": 3115, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3083, "src": "12487:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 3113, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "12458:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3114, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "12478:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "12458:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 3116, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12458:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "12437:52:5"}, {"assignments": [3119], "declarations": [{"constant": false, "id": 3119, "mutability": "mutable", "name": "valueStr", "nameLocation": "12517:8:5", "nodeType": "VariableDeclaration", "scope": 3144, "src": "12503:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3118, "name": "string", "nodeType": "ElementaryTypeName", "src": "12503:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3124, "initialValue": {"arguments": [{"id": 3122, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3106, "src": "12557:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 3120, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "12528:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3121, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "12548:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "12528:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 3123, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12528:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "12503:60:5"}, {"assignments": [3126], "declarations": [{"constant": false, "id": 3126, "mutability": "mutable", "name": "message", "nameLocation": "12590:7:5", "nodeType": "VariableDeclaration", "scope": 3144, "src": "12577:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 3125, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "12577:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 3134, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 3129, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "12634:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 3130, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3112, "src": "12669:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 3131, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "12691:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 3132, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3119, "src": "12715:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 3127, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "12600:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 3128, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "12604:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "12600:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 3133, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12600:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "12577:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 3138, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3126, "src": "12773:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3137, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "12766:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3136, "name": "string", "nodeType": "ElementaryTypeName", "src": "12766:6:5", "typeDescriptions": {}}}, "id": 3139, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12766:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 3135, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "12756:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 3140, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12756:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 3141, "nodeType": "EmitStatement", "src": "12751:31:5"}, {"expression": {"id": 3142, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3106, "src": "12803:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 3089, "id": 3143, "nodeType": "Return", "src": "12796:12:5"}]}}]}, "documentation": {"id": 3081, "nodeType": "StructuredDocumentation", "src": "12051:41:5", "text": "@notice clamps a to be greater than b"}, "id": 3150, "implemented": true, "kind": "function", "modifiers": [], "name": "clampGt", "nameLocation": "12106:7:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3086, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3083, "mutability": "mutable", "name": "a", "nameLocation": "12122:1:5", "nodeType": "VariableDeclaration", "scope": 3150, "src": "12114:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3082, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "12114:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3085, "mutability": "mutable", "name": "b", "nameLocation": "12133:1:5", "nodeType": "VariableDeclaration", "scope": 3150, "src": "12125:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3084, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "12125:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "12113:22:5"}, "returnParameters": {"id": 3089, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3088, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3150, "src": "12154:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3087, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "12154:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "12153:9:5"}, "scope": 3325, "src": "12097:767:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 3209, "nodeType": "Block", "src": "12975:499:5", "statements": [{"condition": {"id": 3164, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "12989:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 3162, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3160, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3153, "src": "12991:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 3161, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3155, "src": "12995:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "12991:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 3163, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "12990:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseBody": {"id": 3207, "nodeType": "Block", "src": "13435:33:5", "statements": [{"expression": {"id": 3205, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3153, "src": "13456:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 3159, "id": 3206, "nodeType": "Return", "src": "13449:8:5"}]}, "id": 3208, "nodeType": "IfStatement", "src": "12985:483:5", "trueBody": {"id": 3204, "nodeType": "Block", "src": "12999:430:5", "statements": [{"assignments": [3166], "declarations": [{"constant": false, "id": 3166, "mutability": "mutable", "name": "value", "nameLocation": "13020:5:5", "nodeType": "VariableDeclaration", "scope": 3204, "src": "13013:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3165, "name": "int256", "nodeType": "ElementaryTypeName", "src": "13013:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "id": 3170, "initialValue": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 3169, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3167, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3155, "src": "13028:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 3168, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "13032:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "13028:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "VariableDeclarationStatement", "src": "13013:20:5"}, {"assignments": [3172], "declarations": [{"constant": false, "id": 3172, "mutability": "mutable", "name": "aStr", "nameLocation": "13061:4:5", "nodeType": "VariableDeclaration", "scope": 3204, "src": "13047:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3171, "name": "string", "nodeType": "ElementaryTypeName", "src": "13047:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3177, "initialValue": {"arguments": [{"id": 3175, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3153, "src": "13097:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 3173, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "13068:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3174, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "13088:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "13068:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 3176, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13068:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "13047:52:5"}, {"assignments": [3179], "declarations": [{"constant": false, "id": 3179, "mutability": "mutable", "name": "valueStr", "nameLocation": "13127:8:5", "nodeType": "VariableDeclaration", "scope": 3204, "src": "13113:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3178, "name": "string", "nodeType": "ElementaryTypeName", "src": "13113:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3184, "initialValue": {"arguments": [{"id": 3182, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3166, "src": "13167:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 3180, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "13138:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3181, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "13158:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "13138:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 3183, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13138:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "13113:60:5"}, {"assignments": [3186], "declarations": [{"constant": false, "id": 3186, "mutability": "mutable", "name": "message", "nameLocation": "13200:7:5", "nodeType": "VariableDeclaration", "scope": 3204, "src": "13187:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 3185, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "13187:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 3194, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 3189, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "13244:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 3190, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3172, "src": "13279:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 3191, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "13301:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 3192, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3179, "src": "13325:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 3187, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "13210:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 3188, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "13214:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "13210:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 3193, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13210:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "13187:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 3198, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3186, "src": "13383:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3197, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "13376:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3196, "name": "string", "nodeType": "ElementaryTypeName", "src": "13376:6:5", "typeDescriptions": {}}}, "id": 3199, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13376:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 3195, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "13366:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 3200, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13366:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 3201, "nodeType": "EmitStatement", "src": "13361:31:5"}, {"expression": {"id": 3202, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3166, "src": "13413:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 3159, "id": 3203, "nodeType": "Return", "src": "13406:12:5"}]}}]}, "documentation": {"id": 3151, "nodeType": "StructuredDocumentation", "src": "12870:37:5", "text": "@notice int256 version of clampGt"}, "id": 3210, "implemented": true, "kind": "function", "modifiers": [], "name": "clampGt", "nameLocation": "12921:7:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3156, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3153, "mutability": "mutable", "name": "a", "nameLocation": "12936:1:5", "nodeType": "VariableDeclaration", "scope": 3210, "src": "12929:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3152, "name": "int256", "nodeType": "ElementaryTypeName", "src": "12929:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 3155, "mutability": "mutable", "name": "b", "nameLocation": "12946:1:5", "nodeType": "VariableDeclaration", "scope": 3210, "src": "12939:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3154, "name": "int256", "nodeType": "ElementaryTypeName", "src": "12939:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "12928:20:5"}, "returnParameters": {"id": 3159, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3158, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3210, "src": "12967:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3157, "name": "int256", "nodeType": "ElementaryTypeName", "src": "12967:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "12966:8:5"}, "scope": 3325, "src": "12912:562:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 3266, "nodeType": "Block", "src": "13605:475:5", "statements": [{"condition": {"id": 3224, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "13619:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3222, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3220, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3213, "src": "13621:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 3221, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3215, "src": "13625:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "13621:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 3223, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "13620:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 3263, "nodeType": "IfStatement", "src": "13615:441:5", "trueBody": {"id": 3262, "nodeType": "Block", "src": "13629:427:5", "statements": [{"assignments": [3226], "declarations": [{"constant": false, "id": 3226, "mutability": "mutable", "name": "value", "nameLocation": "13651:5:5", "nodeType": "VariableDeclaration", "scope": 3262, "src": "13643:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3225, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "13643:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 3228, "initialValue": {"id": 3227, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3215, "src": "13659:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "13643:17:5"}, {"assignments": [3230], "declarations": [{"constant": false, "id": 3230, "mutability": "mutable", "name": "aStr", "nameLocation": "13688:4:5", "nodeType": "VariableDeclaration", "scope": 3262, "src": "13674:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3229, "name": "string", "nodeType": "ElementaryTypeName", "src": "13674:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3235, "initialValue": {"arguments": [{"id": 3233, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3213, "src": "13724:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 3231, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "13695:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3232, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "13715:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "13695:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 3234, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13695:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "13674:52:5"}, {"assignments": [3237], "declarations": [{"constant": false, "id": 3237, "mutability": "mutable", "name": "valueStr", "nameLocation": "13754:8:5", "nodeType": "VariableDeclaration", "scope": 3262, "src": "13740:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3236, "name": "string", "nodeType": "ElementaryTypeName", "src": "13740:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3242, "initialValue": {"arguments": [{"id": 3240, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3226, "src": "13794:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 3238, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "13765:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3239, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "13785:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "13765:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 3241, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13765:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "13740:60:5"}, {"assignments": [3244], "declarations": [{"constant": false, "id": 3244, "mutability": "mutable", "name": "message", "nameLocation": "13827:7:5", "nodeType": "VariableDeclaration", "scope": 3262, "src": "13814:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 3243, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "13814:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 3252, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 3247, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "13871:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 3248, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3230, "src": "13906:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 3249, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "13928:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 3250, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3237, "src": "13952:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 3245, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "13837:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 3246, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "13841:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "13837:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 3251, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13837:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "13814:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 3256, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3244, "src": "14010:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3255, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "14003:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3254, "name": "string", "nodeType": "ElementaryTypeName", "src": "14003:6:5", "typeDescriptions": {}}}, "id": 3257, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "14003:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 3253, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "13993:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 3258, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13993:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 3259, "nodeType": "EmitStatement", "src": "13988:31:5"}, {"expression": {"id": 3260, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3226, "src": "14040:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 3219, "id": 3261, "nodeType": "Return", "src": "14033:12:5"}]}}, {"expression": {"id": 3264, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3213, "src": "14072:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 3219, "id": 3265, "nodeType": "Return", "src": "14065:8:5"}]}, "documentation": {"id": 3211, "nodeType": "StructuredDocumentation", "src": "13480:53:5", "text": "@notice clamps a to be greater than or equal to b"}, "id": 3267, "implemented": true, "kind": "function", "modifiers": [], "name": "clampGte", "nameLocation": "13547:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3216, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3213, "mutability": "mutable", "name": "a", "nameLocation": "13564:1:5", "nodeType": "VariableDeclaration", "scope": 3267, "src": "13556:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3212, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "13556:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3215, "mutability": "mutable", "name": "b", "nameLocation": "13575:1:5", "nodeType": "VariableDeclaration", "scope": 3267, "src": "13567:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3214, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "13567:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "13555:22:5"}, "returnParameters": {"id": 3219, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3218, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3267, "src": "13596:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3217, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "13596:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "13595:9:5"}, "scope": 3325, "src": "13538:542:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 3323, "nodeType": "Block", "src": "14193:474:5", "statements": [{"condition": {"id": 3281, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "14207:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 3279, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3277, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3270, "src": "14209:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 3278, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3272, "src": "14213:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "14209:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 3280, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "14208:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 3320, "nodeType": "IfStatement", "src": "14203:440:5", "trueBody": {"id": 3319, "nodeType": "Block", "src": "14217:426:5", "statements": [{"assignments": [3283], "declarations": [{"constant": false, "id": 3283, "mutability": "mutable", "name": "value", "nameLocation": "14238:5:5", "nodeType": "VariableDeclaration", "scope": 3319, "src": "14231:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3282, "name": "int256", "nodeType": "ElementaryTypeName", "src": "14231:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "id": 3285, "initialValue": {"id": 3284, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3272, "src": "14246:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "VariableDeclarationStatement", "src": "14231:16:5"}, {"assignments": [3287], "declarations": [{"constant": false, "id": 3287, "mutability": "mutable", "name": "aStr", "nameLocation": "14275:4:5", "nodeType": "VariableDeclaration", "scope": 3319, "src": "14261:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3286, "name": "string", "nodeType": "ElementaryTypeName", "src": "14261:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3292, "initialValue": {"arguments": [{"id": 3290, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3270, "src": "14311:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 3288, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "14282:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3289, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "14302:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "14282:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 3291, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "14282:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "14261:52:5"}, {"assignments": [3294], "declarations": [{"constant": false, "id": 3294, "mutability": "mutable", "name": "valueStr", "nameLocation": "14341:8:5", "nodeType": "VariableDeclaration", "scope": 3319, "src": "14327:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3293, "name": "string", "nodeType": "ElementaryTypeName", "src": "14327:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3299, "initialValue": {"arguments": [{"id": 3297, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3283, "src": "14381:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 3295, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "14352:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3296, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "14372:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "14352:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 3298, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "14352:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "14327:60:5"}, {"assignments": [3301], "declarations": [{"constant": false, "id": 3301, "mutability": "mutable", "name": "message", "nameLocation": "14414:7:5", "nodeType": "VariableDeclaration", "scope": 3319, "src": "14401:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 3300, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "14401:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 3309, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 3304, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "14458:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 3305, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3287, "src": "14493:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 3306, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "14515:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 3307, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3294, "src": "14539:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 3302, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "14424:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 3303, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "14428:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "14424:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 3308, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "14424:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "14401:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 3313, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3301, "src": "14597:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3312, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "14590:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3311, "name": "string", "nodeType": "ElementaryTypeName", "src": "14590:6:5", "typeDescriptions": {}}}, "id": 3314, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "14590:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 3310, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "14580:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 3315, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "14580:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 3316, "nodeType": "EmitStatement", "src": "14575:31:5"}, {"expression": {"id": 3317, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3283, "src": "14627:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 3276, "id": 3318, "nodeType": "Return", "src": "14620:12:5"}]}}, {"expression": {"id": 3321, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3270, "src": "14659:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 3276, "id": 3322, "nodeType": "Return", "src": "14652:8:5"}]}, "documentation": {"id": 3268, "nodeType": "StructuredDocumentation", "src": "14086:38:5", "text": "@notice int256 version of clampGte"}, "id": 3324, "implemented": true, "kind": "function", "modifiers": [], "name": "clampGte", "nameLocation": "14138:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3273, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3270, "mutability": "mutable", "name": "a", "nameLocation": "14154:1:5", "nodeType": "VariableDeclaration", "scope": 3324, "src": "14147:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3269, "name": "int256", "nodeType": "ElementaryTypeName", "src": "14147:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 3272, "mutability": "mutable", "name": "b", "nameLocation": "14164:1:5", "nodeType": "VariableDeclaration", "scope": 3324, "src": "14157:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3271, "name": "int256", "nodeType": "ElementaryTypeName", "src": "14157:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "14146:20:5"}, "returnParameters": {"id": 3276, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3275, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3324, "src": "14185:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3274, "name": "int256", "nodeType": "ElementaryTypeName", "src": "14185:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "14184:8:5"}, "scope": 3325, "src": "14129:538:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}], "scope": 3528, "src": "25:14644:5", "usedErrors": [], "usedEvents": [1967, 1973, 1977, 1981, 1985, 1989, 1993, 1997, 2001, 2005]}, {"abstract": false, "baseContracts": [], "canonicalName": "PropertiesLibString", "contractDependencies": [], "contractKind": "library", "documentation": {"id": 3326, "nodeType": "StructuredDocumentation", "src": "14671:390:5", "text": "@notice Efficient library for creating string representations of integers.\n @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/LibString.sol)\n @author Modified from Solady (https://github.com/Vectorized/solady/blob/main/src/utils/LibString.sol)\n @dev Name of the library is modified to prevent collisions with contract-under-test uses of LibString"}, "fullyImplemented": true, "id": 3527, "linearizedBaseContracts": [3527], "name": "PropertiesLibString", "nameLocation": "15069:19:5", "nodeType": "ContractDefinition", "nodes": [{"body": {"id": 3371, "nodeType": "Block", "src": "15169:205:5", "statements": [{"assignments": [3334], "declarations": [{"constant": false, "id": 3334, "mutability": "mutable", "name": "absValue", "nameLocation": "15187:8:5", "nodeType": "VariableDeclaration", "scope": 3371, "src": "15179:16:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3333, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "15179:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 3348, "initialValue": {"condition": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 3337, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3335, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3328, "src": "15198:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": {"hexValue": "30", "id": 3336, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "15207:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "15198:10:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseExpression": {"arguments": [{"id": 3345, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "-", "prefix": true, "src": "15236:6:5", "subExpression": {"id": 3344, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3328, "src": "15237:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "id": 3343, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "15228:7:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}, "typeName": {"id": 3342, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "15228:7:5", "typeDescriptions": {}}}, "id": 3346, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "15228:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 3347, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "15198:45:5", "trueExpression": {"arguments": [{"id": 3340, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3328, "src": "15219:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "id": 3339, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "15211:7:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}, "typeName": {"id": 3338, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "15211:7:5", "typeDescriptions": {}}}, "id": 3341, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "15211:14:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "15179:64:5"}, {"expression": {"id": 3353, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 3349, "name": "str", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3331, "src": "15253:3:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 3351, "name": "absValue", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3334, "src": "15268:8:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 3350, "name": "toString", "nodeType": "Identifier", "overloadedDeclarations": [3372, 3381, 3491], "referencedDeclaration": 3381, "src": "15259:8:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 3352, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "15259:18:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "src": "15253:24:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "id": 3354, "nodeType": "ExpressionStatement", "src": "15253:24:5"}, {"condition": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 3357, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3355, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3328, "src": "15292:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"hexValue": "30", "id": 3356, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "15300:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "15292:9:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 3370, "nodeType": "IfStatement", "src": "15288:80:5", "trueBody": {"id": 3369, "nodeType": "Block", "src": "15303:65:5", "statements": [{"expression": {"id": 3367, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 3358, "name": "str", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3331, "src": "15317:3:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"arguments": [{"hexValue": "2d", "id": 3363, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "15347:3:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561", "typeString": "literal_string \"-\""}, "value": "-"}, {"id": 3364, "name": "str", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3331, "src": "15352:3:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561", "typeString": "literal_string \"-\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 3361, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "15330:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 3362, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "15334:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "15330:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 3365, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "15330:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3360, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "15323:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3359, "name": "string", "nodeType": "ElementaryTypeName", "src": "15323:6:5", "typeDescriptions": {}}}, "id": 3366, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "15323:34:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "src": "15317:40:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "id": 3368, "nodeType": "ExpressionStatement", "src": "15317:40:5"}]}}]}, "id": 3372, "implemented": true, "kind": "function", "modifiers": [], "name": "toString", "nameLocation": "15104:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3329, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3328, "mutability": "mutable", "name": "value", "nameLocation": "15120:5:5", "nodeType": "VariableDeclaration", "scope": 3372, "src": "15113:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3327, "name": "int256", "nodeType": "ElementaryTypeName", "src": "15113:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "15112:14:5"}, "returnParameters": {"id": 3332, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3331, "mutability": "mutable", "name": "str", "nameLocation": "15164:3:5", "nodeType": "VariableDeclaration", "scope": 3372, "src": "15150:17:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3330, "name": "string", "nodeType": "ElementaryTypeName", "src": "15150:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "15149:19:5"}, "scope": 3527, "src": "15095:279:5", "stateMutability": "pure", "virtual": false, "visibility": "internal"}, {"body": {"id": 3380, "nodeType": "Block", "src": "15455:1965:5", "statements": [{"AST": {"nativeSrc": "15517:1897:5", "nodeType": "YulBlock", "src": "15517:1897:5", "statements": [{"nativeSrc": "15863:49:5", "nodeType": "YulVariableDeclaration", "src": "15863:49:5", "value": {"arguments": [{"arguments": [{"kind": "number", "nativeSrc": "15901:4:5", "nodeType": "YulLiteral", "src": "15901:4:5", "type": "", "value": "0x40"}], "functionName": {"name": "mload", "nativeSrc": "15895:5:5", "nodeType": "YulIdentifier", "src": "15895:5:5"}, "nativeSrc": "15895:11:5", "nodeType": "YulFunctionCall", "src": "15895:11:5"}, {"kind": "number", "nativeSrc": "15908:3:5", "nodeType": "YulLiteral", "src": "15908:3:5", "type": "", "value": "160"}], "functionName": {"name": "add", "nativeSrc": "15891:3:5", "nodeType": "YulIdentifier", "src": "15891:3:5"}, "nativeSrc": "15891:21:5", "nodeType": "YulFunctionCall", "src": "15891:21:5"}, "variables": [{"name": "newFreeMemoryPointer", "nativeSrc": "15867:20:5", "nodeType": "YulTypedName", "src": "15867:20:5", "type": ""}]}, {"expression": {"arguments": [{"kind": "number", "nativeSrc": "16011:4:5", "nodeType": "YulLiteral", "src": "16011:4:5", "type": "", "value": "0x40"}, {"name": "newFreeMemoryPointer", "nativeSrc": "16017:20:5", "nodeType": "YulIdentifier", "src": "16017:20:5"}], "functionName": {"name": "mstore", "nativeSrc": "16004:6:5", "nodeType": "YulIdentifier", "src": "16004:6:5"}, "nativeSrc": "16004:34:5", "nodeType": "YulFunctionCall", "src": "16004:34:5"}, "nativeSrc": "16004:34:5", "nodeType": "YulExpressionStatement", "src": "16004:34:5"}, {"nativeSrc": "16128:36:5", "nodeType": "YulAssignment", "src": "16128:36:5", "value": {"arguments": [{"name": "newFreeMemoryPointer", "nativeSrc": "16139:20:5", "nodeType": "YulIdentifier", "src": "16139:20:5"}, {"kind": "number", "nativeSrc": "16161:2:5", "nodeType": "YulLiteral", "src": "16161:2:5", "type": "", "value": "32"}], "functionName": {"name": "sub", "nativeSrc": "16135:3:5", "nodeType": "YulIdentifier", "src": "16135:3:5"}, "nativeSrc": "16135:29:5", "nodeType": "YulFunctionCall", "src": "16135:29:5"}, "variableNames": [{"name": "str", "nativeSrc": "16128:3:5", "nodeType": "YulIdentifier", "src": "16128:3:5"}]}, {"expression": {"arguments": [{"name": "str", "nativeSrc": "16257:3:5", "nodeType": "YulIdentifier", "src": "16257:3:5"}, {"kind": "number", "nativeSrc": "16262:1:5", "nodeType": "YulLiteral", "src": "16262:1:5", "type": "", "value": "0"}], "functionName": {"name": "mstore", "nativeSrc": "16250:6:5", "nodeType": "YulIdentifier", "src": "16250:6:5"}, "nativeSrc": "16250:14:5", "nodeType": "YulFunctionCall", "src": "16250:14:5"}, "nativeSrc": "16250:14:5", "nodeType": "YulExpressionStatement", "src": "16250:14:5"}, {"nativeSrc": "16352:14:5", "nodeType": "YulVariableDeclaration", "src": "16352:14:5", "value": {"name": "str", "nativeSrc": "16363:3:5", "nodeType": "YulIdentifier", "src": "16363:3:5"}, "variables": [{"name": "end", "nativeSrc": "16356:3:5", "nodeType": "YulTypedName", "src": "16356:3:5", "type": ""}]}, {"body": {"nativeSrc": "16610:446:5", "nodeType": "YulBlock", "src": "16610:446:5", "statements": [{"nativeSrc": "16684:18:5", "nodeType": "YulAssignment", "src": "16684:18:5", "value": {"arguments": [{"name": "str", "nativeSrc": "16695:3:5", "nodeType": "YulIdentifier", "src": "16695:3:5"}, {"kind": "number", "nativeSrc": "16700:1:5", "nodeType": "YulLiteral", "src": "16700:1:5", "type": "", "value": "1"}], "functionName": {"name": "sub", "nativeSrc": "16691:3:5", "nodeType": "YulIdentifier", "src": "16691:3:5"}, "nativeSrc": "16691:11:5", "nodeType": "YulFunctionCall", "src": "16691:11:5"}, "variableNames": [{"name": "str", "nativeSrc": "16684:3:5", "nodeType": "YulIdentifier", "src": "16684:3:5"}]}, {"expression": {"arguments": [{"name": "str", "nativeSrc": "16846:3:5", "nodeType": "YulIdentifier", "src": "16846:3:5"}, {"arguments": [{"kind": "number", "nativeSrc": "16855:2:5", "nodeType": "YulLiteral", "src": "16855:2:5", "type": "", "value": "48"}, {"arguments": [{"name": "temp", "nativeSrc": "16863:4:5", "nodeType": "YulIdentifier", "src": "16863:4:5"}, {"kind": "number", "nativeSrc": "16869:2:5", "nodeType": "YulLiteral", "src": "16869:2:5", "type": "", "value": "10"}], "functionName": {"name": "mod", "nativeSrc": "16859:3:5", "nodeType": "YulIdentifier", "src": "16859:3:5"}, "nativeSrc": "16859:13:5", "nodeType": "YulFunctionCall", "src": "16859:13:5"}], "functionName": {"name": "add", "nativeSrc": "16851:3:5", "nodeType": "YulIdentifier", "src": "16851:3:5"}, "nativeSrc": "16851:22:5", "nodeType": "YulFunctionCall", "src": "16851:22:5"}], "functionName": {"name": "mstore8", "nativeSrc": "16838:7:5", "nodeType": "YulIdentifier", "src": "16838:7:5"}, "nativeSrc": "16838:36:5", "nodeType": "YulFunctionCall", "src": "16838:36:5"}, "nativeSrc": "16838:36:5", "nodeType": "YulExpressionStatement", "src": "16838:36:5"}, {"nativeSrc": "16942:21:5", "nodeType": "YulAssignment", "src": "16942:21:5", "value": {"arguments": [{"name": "temp", "nativeSrc": "16954:4:5", "nodeType": "YulIdentifier", "src": "16954:4:5"}, {"kind": "number", "nativeSrc": "16960:2:5", "nodeType": "YulLiteral", "src": "16960:2:5", "type": "", "value": "10"}], "functionName": {"name": "div", "nativeSrc": "16950:3:5", "nodeType": "YulIdentifier", "src": "16950:3:5"}, "nativeSrc": "16950:13:5", "nodeType": "YulFunctionCall", "src": "16950:13:5"}, "variableNames": [{"name": "temp", "nativeSrc": "16942:4:5", "nodeType": "YulIdentifier", "src": "16942:4:5"}]}, {"body": {"nativeSrc": "17033:9:5", "nodeType": "YulBlock", "src": "17033:9:5", "statements": [{"nativeSrc": "17035:5:5", "nodeType": "YulBreak", "src": "17035:5:5"}]}, "condition": {"arguments": [{"name": "temp", "nativeSrc": "17027:4:5", "nodeType": "YulIdentifier", "src": "17027:4:5"}], "functionName": {"name": "iszero", "nativeSrc": "17020:6:5", "nodeType": "YulIdentifier", "src": "17020:6:5"}, "nativeSrc": "17020:12:5", "nodeType": "YulFunctionCall", "src": "17020:12:5"}, "nativeSrc": "17017:25:5", "nodeType": "YulIf", "src": "17017:25:5"}]}, "condition": {"kind": "number", "nativeSrc": "16605:1:5", "nodeType": "YulLiteral", "src": "16605:1:5", "type": "", "value": "1"}, "nativeSrc": "16579:477:5", "nodeType": "YulForLoop", "post": {"nativeSrc": "16607:2:5", "nodeType": "YulBlock", "src": "16607:2:5", "statements": []}, "pre": {"nativeSrc": "16583:21:5", "nodeType": "YulBlock", "src": "16583:21:5", "statements": [{"nativeSrc": "16585:17:5", "nodeType": "YulVariableDeclaration", "src": "16585:17:5", "value": {"name": "value", "nativeSrc": "16597:5:5", "nodeType": "YulIdentifier", "src": "16597:5:5"}, "variables": [{"name": "temp", "nativeSrc": "16589:4:5", "nodeType": "YulTypedName", "src": "16589:4:5", "type": ""}]}]}, "src": "16579:477:5"}, {"nativeSrc": "17141:27:5", "nodeType": "YulVariableDeclaration", "src": "17141:27:5", "value": {"arguments": [{"name": "end", "nativeSrc": "17159:3:5", "nodeType": "YulIdentifier", "src": "17159:3:5"}, {"name": "str", "nativeSrc": "17164:3:5", "nodeType": "YulIdentifier", "src": "17164:3:5"}], "functionName": {"name": "sub", "nativeSrc": "17155:3:5", "nodeType": "YulIdentifier", "src": "17155:3:5"}, "nativeSrc": "17155:13:5", "nodeType": "YulFunctionCall", "src": "17155:13:5"}, "variables": [{"name": "length", "nativeSrc": "17145:6:5", "nodeType": "YulTypedName", "src": "17145:6:5", "type": ""}]}, {"nativeSrc": "17262:19:5", "nodeType": "YulAssignment", "src": "17262:19:5", "value": {"arguments": [{"name": "str", "nativeSrc": "17273:3:5", "nodeType": "YulIdentifier", "src": "17273:3:5"}, {"kind": "number", "nativeSrc": "17278:2:5", "nodeType": "YulLiteral", "src": "17278:2:5", "type": "", "value": "32"}], "functionName": {"name": "sub", "nativeSrc": "17269:3:5", "nodeType": "YulIdentifier", "src": "17269:3:5"}, "nativeSrc": "17269:12:5", "nodeType": "YulFunctionCall", "src": "17269:12:5"}, "variableNames": [{"name": "str", "nativeSrc": "17262:3:5", "nodeType": "YulIdentifier", "src": "17262:3:5"}]}, {"expression": {"arguments": [{"name": "str", "nativeSrc": "17392:3:5", "nodeType": "YulIdentifier", "src": "17392:3:5"}, {"name": "length", "nativeSrc": "17397:6:5", "nodeType": "YulIdentifier", "src": "17397:6:5"}], "functionName": {"name": "mstore", "nativeSrc": "17385:6:5", "nodeType": "YulIdentifier", "src": "17385:6:5"}, "nativeSrc": "17385:19:5", "nodeType": "YulFunctionCall", "src": "17385:19:5"}, "nativeSrc": "17385:19:5", "nodeType": "YulExpressionStatement", "src": "17385:19:5"}]}, "documentation": "@solidity memory-safe-assembly", "evmVersion": "shanghai", "externalReferences": [{"declaration": 3377, "isOffset": false, "isSlot": false, "src": "16128:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "16257:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "16363:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "16684:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "16695:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "16846:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "17164:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "17262:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "17273:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "17392:3:5", "valueSize": 1}, {"declaration": 3374, "isOffset": false, "isSlot": false, "src": "16597:5:5", "valueSize": 1}], "id": 3379, "nodeType": "InlineAssembly", "src": "15508:1906:5"}]}, "id": 3381, "implemented": true, "kind": "function", "modifiers": [], "name": "toString", "nameLocation": "15389:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3375, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3374, "mutability": "mutable", "name": "value", "nameLocation": "15406:5:5", "nodeType": "VariableDeclaration", "scope": 3381, "src": "15398:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3373, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "15398:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "15397:15:5"}, "returnParameters": {"id": 3378, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3377, "mutability": "mutable", "name": "str", "nameLocation": "15450:3:5", "nodeType": "VariableDeclaration", "scope": 3381, "src": "15436:17:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3376, "name": "string", "nodeType": "ElementaryTypeName", "src": "15436:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "15435:19:5"}, "scope": 3527, "src": "15380:2040:5", "stateMutability": "pure", "virtual": false, "visibility": "internal"}, {"body": {"id": 3490, "nodeType": "Block", "src": "17501:413:5", "statements": [{"assignments": [3389], "declarations": [{"constant": false, "id": 3389, "mutability": "mutable", "name": "s", "nameLocation": "17524:1:5", "nodeType": "VariableDeclaration", "scope": 3490, "src": "17511:14:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 3388, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "17511:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 3394, "initialValue": {"arguments": [{"hexValue": "3430", "id": 3392, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17538:2:5", "typeDescriptions": {"typeIdentifier": "t_rational_40_by_1", "typeString": "int_const 40"}, "value": "40"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_40_by_1", "typeString": "int_const 40"}], "id": 3391, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "NewExpression", "src": "17528:9:5", "typeDescriptions": {"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", "typeString": "function (uint256) pure returns (bytes memory)"}, "typeName": {"id": 3390, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "17532:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}}, "id": 3393, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17528:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "17511:30:5"}, {"body": {"id": 3483, "nodeType": "Block", "src": "17581:301:5", "statements": [{"assignments": [3406], "declarations": [{"constant": false, "id": 3406, "mutability": "mutable", "name": "b", "nameLocation": "17602:1:5", "nodeType": "VariableDeclaration", "scope": 3483, "src": "17595:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}, "typeName": {"id": 3405, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17595:6:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "visibility": "internal"}], "id": 3431, "initialValue": {"arguments": [{"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3428, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"arguments": [{"id": 3415, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3383, "src": "17649:5:5", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 3414, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17641:7:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint160_$", "typeString": "type(uint160)"}, "typeName": {"id": 3413, "name": "uint160", "nodeType": "ElementaryTypeName", "src": "17641:7:5", "typeDescriptions": {}}}, "id": 3416, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17641:14:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint160", "typeString": "uint160"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint160", "typeString": "uint160"}], "id": 3412, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17636:4:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}, "typeName": {"id": 3411, "name": "uint", "nodeType": "ElementaryTypeName", "src": "17636:4:5", "typeDescriptions": {}}}, "id": 3417, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17636:20:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3426, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"hexValue": "32", "id": 3418, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17660:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "nodeType": "BinaryOperation", "operator": "**", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3424, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"hexValue": "38", "id": 3419, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17666:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_8_by_1", "typeString": "int_const 8"}, "value": "8"}, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3422, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"hexValue": "3139", "id": 3420, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17671:2:5", "typeDescriptions": {"typeIdentifier": "t_rational_19_by_1", "typeString": "int_const 19"}, "value": "19"}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 3421, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3396, "src": "17676:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "17671:6:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 3423, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "17670:8:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "17666:12:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 3425, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "17665:14:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "17660:19:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 3427, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "17659:21:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "17636:44:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 3410, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17630:5:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)"}, "typeName": {"id": 3409, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "17630:5:5", "typeDescriptions": {}}}, "id": 3429, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17630:51:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint8", "typeString": "uint8"}], "id": 3408, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17606:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_bytes1_$", "typeString": "type(bytes1)"}, "typeName": {"id": 3407, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17606:6:5", "typeDescriptions": {}}}, "id": 3430, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17606:89:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "nodeType": "VariableDeclarationStatement", "src": "17595:100:5"}, {"assignments": [3433], "declarations": [{"constant": false, "id": 3433, "mutability": "mutable", "name": "hi", "nameLocation": "17716:2:5", "nodeType": "VariableDeclaration", "scope": 3483, "src": "17709:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}, "typeName": {"id": 3432, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17709:6:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "visibility": "internal"}], "id": 3443, "initialValue": {"arguments": [{"commonType": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "id": 3441, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"id": 3438, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3406, "src": "17734:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3437, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17728:5:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)"}, "typeName": {"id": 3436, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "17728:5:5", "typeDescriptions": {}}}, "id": 3439, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17728:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": {"hexValue": "3136", "id": 3440, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17739:2:5", "typeDescriptions": {"typeIdentifier": "t_rational_16_by_1", "typeString": "int_const 16"}, "value": "16"}, "src": "17728:13:5", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint8", "typeString": "uint8"}], "id": 3435, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17721:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_bytes1_$", "typeString": "type(bytes1)"}, "typeName": {"id": 3434, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17721:6:5", "typeDescriptions": {}}}, "id": 3442, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17721:21:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "nodeType": "VariableDeclarationStatement", "src": "17709:33:5"}, {"assignments": [3445], "declarations": [{"constant": false, "id": 3445, "mutability": "mutable", "name": "lo", "nameLocation": "17763:2:5", "nodeType": "VariableDeclaration", "scope": 3483, "src": "17756:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}, "typeName": {"id": 3444, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17756:6:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "visibility": "internal"}], "id": 3460, "initialValue": {"arguments": [{"commonType": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "id": 3458, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"id": 3450, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3406, "src": "17781:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3449, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17775:5:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)"}, "typeName": {"id": 3448, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "17775:5:5", "typeDescriptions": {}}}, "id": 3451, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17775:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"commonType": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "id": 3457, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"hexValue": "3136", "id": 3452, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17786:2:5", "typeDescriptions": {"typeIdentifier": "t_rational_16_by_1", "typeString": "int_const 16"}, "value": "16"}, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": {"arguments": [{"id": 3455, "name": "hi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3433, "src": "17797:2:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3454, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17791:5:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)"}, "typeName": {"id": 3453, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "17791:5:5", "typeDescriptions": {}}}, "id": 3456, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17791:9:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "src": "17786:14:5", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "src": "17775:25:5", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint8", "typeString": "uint8"}], "id": 3447, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17768:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_bytes1_$", "typeString": "type(bytes1)"}, "typeName": {"id": 3446, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17768:6:5", "typeDescriptions": {}}}, "id": 3459, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17768:33:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "nodeType": "VariableDeclarationStatement", "src": "17756:45:5"}, {"expression": {"id": 3469, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"baseExpression": {"id": 3461, "name": "s", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3389, "src": "17815:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "id": 3465, "indexExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3464, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"hexValue": "32", "id": 3462, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17817:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": {"id": 3463, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3396, "src": "17821:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "17817:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "17815:8:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 3467, "name": "hi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3433, "src": "17831:2:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3466, "name": "char", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3526, "src": "17826:4:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_bytes1_$returns$_t_bytes1_$", "typeString": "function (bytes1) pure returns (bytes1)"}}, "id": 3468, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17826:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "src": "17815:19:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "id": 3470, "nodeType": "ExpressionStatement", "src": "17815:19:5"}, {"expression": {"id": 3481, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"baseExpression": {"id": 3471, "name": "s", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3389, "src": "17848:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "id": 3477, "indexExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3476, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3474, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"hexValue": "32", "id": 3472, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17850:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": {"id": 3473, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3396, "src": "17854:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "17850:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 3475, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17858:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "17850:9:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "17848:12:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 3479, "name": "lo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3445, "src": "17868:2:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3478, "name": "char", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3526, "src": "17863:4:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_bytes1_$returns$_t_bytes1_$", "typeString": "function (bytes1) pure returns (bytes1)"}}, "id": 3480, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17863:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "src": "17848:23:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "id": 3482, "nodeType": "ExpressionStatement", "src": "17848:23:5"}]}, "condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3401, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3399, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3396, "src": "17568:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"hexValue": "3230", "id": 3400, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17572:2:5", "typeDescriptions": {"typeIdentifier": "t_rational_20_by_1", "typeString": "int_const 20"}, "value": "20"}, "src": "17568:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 3484, "initializationExpression": {"assignments": [3396], "declarations": [{"constant": false, "id": 3396, "mutability": "mutable", "name": "i", "nameLocation": "17561:1:5", "nodeType": "VariableDeclaration", "scope": 3484, "src": "17556:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3395, "name": "uint", "nodeType": "ElementaryTypeName", "src": "17556:4:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 3398, "initialValue": {"hexValue": "30", "id": 3397, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17565:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "nodeType": "VariableDeclarationStatement", "src": "17556:10:5"}, "isSimpleCounterLoop": true, "loopExpression": {"expression": {"id": 3403, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "17576:3:5", "subExpression": {"id": 3402, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3396, "src": "17576:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 3404, "nodeType": "ExpressionStatement", "src": "17576:3:5"}, "nodeType": "ForStatement", "src": "17551:331:5"}, {"expression": {"arguments": [{"id": 3487, "name": "s", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3389, "src": "17905:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3486, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17898:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3485, "name": "string", "nodeType": "ElementaryTypeName", "src": "17898:6:5", "typeDescriptions": {}}}, "id": 3488, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17898:9:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "functionReturnParameters": 3387, "id": 3489, "nodeType": "Return", "src": "17891:16:5"}]}, "id": 3491, "implemented": true, "kind": "function", "modifiers": [], "name": "toString", "nameLocation": "17435:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3384, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3383, "mutability": "mutable", "name": "value", "nameLocation": "17452:5:5", "nodeType": "VariableDeclaration", "scope": 3491, "src": "17444:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3382, "name": "address", "nodeType": "ElementaryTypeName", "src": "17444:7:5", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "17443:15:5"}, "returnParameters": {"id": 3387, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3386, "mutability": "mutable", "name": "str", "nameLocation": "17496:3:5", "nodeType": "VariableDeclaration", "scope": 3491, "src": "17482:17:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3385, "name": "string", "nodeType": "ElementaryTypeName", "src": "17482:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "17481:19:5"}, "scope": 3527, "src": "17426:488:5", "stateMutability": "pure", "virtual": false, "visibility": "internal"}, {"body": {"id": 3525, "nodeType": "Block", "src": "17977:111:5", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "id": 3503, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"id": 3500, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3493, "src": "17997:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3499, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17991:5:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)"}, "typeName": {"id": 3498, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "17991:5:5", "typeDescriptions": {}}}, "id": 3501, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17991:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"hexValue": "3130", "id": 3502, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "18002:2:5", "typeDescriptions": {"typeIdentifier": "t_rational_10_by_1", "typeString": "int_const 10"}, "value": "10"}, "src": "17991:13:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseBody": {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "id": 3521, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"id": 3518, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3493, "src": "18071:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3517, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "18065:5:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)"}, "typeName": {"id": 3516, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "18065:5:5", "typeDescriptions": {}}}, "id": 3519, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "18065:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "30783537", "id": 3520, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "18076:4:5", "typeDescriptions": {"typeIdentifier": "t_rational_87_by_1", "typeString": "int_const 87"}, "value": "0x57"}, "src": "18065:15:5", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint8", "typeString": "uint8"}], "id": 3515, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "18058:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_bytes1_$", "typeString": "type(bytes1)"}, "typeName": {"id": 3514, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "18058:6:5", "typeDescriptions": {}}}, "id": 3522, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "18058:23:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "functionReturnParameters": 3497, "id": 3523, "nodeType": "Return", "src": "18051:30:5"}, "id": 3524, "nodeType": "IfStatement", "src": "17987:94:5", "trueBody": {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "id": 3511, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"id": 3508, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3493, "src": "18026:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3507, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "18020:5:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)"}, "typeName": {"id": 3506, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "18020:5:5", "typeDescriptions": {}}}, "id": 3509, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "18020:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "30783330", "id": 3510, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "18031:4:5", "typeDescriptions": {"typeIdentifier": "t_rational_48_by_1", "typeString": "int_const 48"}, "value": "0x30"}, "src": "18020:15:5", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint8", "typeString": "uint8"}], "id": 3505, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "18013:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_bytes1_$", "typeString": "type(bytes1)"}, "typeName": {"id": 3504, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "18013:6:5", "typeDescriptions": {}}}, "id": 3512, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "18013:23:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "functionReturnParameters": 3497, "id": 3513, "nodeType": "Return", "src": "18006:30:5"}}]}, "id": 3526, "implemented": true, "kind": "function", "modifiers": [], "name": "char", "nameLocation": "17929:4:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3494, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3493, "mutability": "mutable", "name": "b", "nameLocation": "17941:1:5", "nodeType": "VariableDeclaration", "scope": 3526, "src": "17934:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}, "typeName": {"id": 3492, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17934:6:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "visibility": "internal"}], "src": "17933:10:5"}, "returnParameters": {"id": 3497, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3496, "mutability": "mutable", "name": "c", "nameLocation": "17974:1:5", "nodeType": "VariableDeclaration", "scope": 3526, "src": "17967:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}, "typeName": {"id": 3495, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17967:6:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "visibility": "internal"}], "src": "17966:10:5"}, "scope": 3527, "src": "17920:168:5", "stateMutability": "pure", "virtual": false, "visibility": "internal"}], "scope": 3528, "src": "15061:3029:5", "usedErrors": [], "usedEvents": []}], "src": "0:18091:5"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol": {"AST": {"absolutePath": "node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol", "exportedSymbols": {"IERC1155Errors": [3664], "IERC20Errors": [3569], "IERC721Errors": [3617]}, "id": 3665, "license": "MIT", "nodeType": "SourceUnit", "nodes": [{"id": 3529, "literals": ["solidity", "^", "0.8", ".20"], "nodeType": "PragmaDirective", "src": "112:24:6"}, {"abstract": false, "baseContracts": [], "canonicalName": "IERC20Errors", "contractDependencies": [], "contractKind": "interface", "documentation": {"id": 3530, "nodeType": "StructuredDocumentation", "src": "138:139:6", "text": " @dev Standard ERC20 Errors\n Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens."}, "fullyImplemented": true, "id": 3569, "linearizedBaseContracts": [3569], "name": "IERC20Errors", "nameLocation": "288:12:6", "nodeType": "ContractDefinition", "nodes": [{"documentation": {"id": 3531, "nodeType": "StructuredDocumentation", "src": "307:309:6", "text": " @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n @param sender Address whose tokens are being transferred.\n @param balance Current balance for the interacting account.\n @param needed Minimum amount required to perform a transfer."}, "errorSelector": "e450d38c", "id": 3539, "name": "ERC20InsufficientBalance", "nameLocation": "627:24:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3538, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3533, "mutability": "mutable", "name": "sender", "nameLocation": "660:6:6", "nodeType": "VariableDeclaration", "scope": 3539, "src": "652:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3532, "name": "address", "nodeType": "ElementaryTypeName", "src": "652:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3535, "mutability": "mutable", "name": "balance", "nameLocation": "676:7:6", "nodeType": "VariableDeclaration", "scope": 3539, "src": "668:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3534, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "668:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3537, "mutability": "mutable", "name": "needed", "nameLocation": "693:6:6", "nodeType": "VariableDeclaration", "scope": 3539, "src": "685:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3536, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "685:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "651:49:6"}, "src": "621:80:6"}, {"documentation": {"id": 3540, "nodeType": "StructuredDocumentation", "src": "707:152:6", "text": " @dev Indicates a failure with the token `sender`. Used in transfers.\n @param sender Address whose tokens are being transferred."}, "errorSelector": "96c6fd1e", "id": 3544, "name": "ERC20InvalidSender", "nameLocation": "870:18:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3543, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3542, "mutability": "mutable", "name": "sender", "nameLocation": "897:6:6", "nodeType": "VariableDeclaration", "scope": 3544, "src": "889:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3541, "name": "address", "nodeType": "ElementaryTypeName", "src": "889:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "888:16:6"}, "src": "864:41:6"}, {"documentation": {"id": 3545, "nodeType": "StructuredDocumentation", "src": "911:159:6", "text": " @dev Indicates a failure with the token `receiver`. Used in transfers.\n @param receiver Address to which tokens are being transferred."}, "errorSelector": "ec442f05", "id": 3549, "name": "ERC20InvalidReceiver", "nameLocation": "1081:20:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3548, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3547, "mutability": "mutable", "name": "receiver", "nameLocation": "1110:8:6", "nodeType": "VariableDeclaration", "scope": 3549, "src": "1102:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3546, "name": "address", "nodeType": "ElementaryTypeName", "src": "1102:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "1101:18:6"}, "src": "1075:45:6"}, {"documentation": {"id": 3550, "nodeType": "StructuredDocumentation", "src": "1126:345:6", "text": " @dev Indicates a failure with the `spender`\u2019s `allowance`. Used in transfers.\n @param spender Address that may be allowed to operate on tokens without being their owner.\n @param allowance Amount of tokens a `spender` is allowed to operate with.\n @param needed Minimum amount required to perform a transfer."}, "errorSelector": "fb8f41b2", "id": 3558, "name": "ERC20InsufficientAllowance", "nameLocation": "1482:26:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3557, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3552, "mutability": "mutable", "name": "spender", "nameLocation": "1517:7:6", "nodeType": "VariableDeclaration", "scope": 3558, "src": "1509:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3551, "name": "address", "nodeType": "ElementaryTypeName", "src": "1509:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3554, "mutability": "mutable", "name": "allowance", "nameLocation": "1534:9:6", "nodeType": "VariableDeclaration", "scope": 3558, "src": "1526:17:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3553, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1526:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3556, "mutability": "mutable", "name": "needed", "nameLocation": "1553:6:6", "nodeType": "VariableDeclaration", "scope": 3558, "src": "1545:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3555, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1545:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1508:52:6"}, "src": "1476:85:6"}, {"documentation": {"id": 3559, "nodeType": "StructuredDocumentation", "src": "1567:174:6", "text": " @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n @param approver Address initiating an approval operation."}, "errorSelector": "e602df05", "id": 3563, "name": "ERC20InvalidApprover", "nameLocation": "1752:20:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3562, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3561, "mutability": "mutable", "name": "approver", "nameLocation": "1781:8:6", "nodeType": "VariableDeclaration", "scope": 3563, "src": "1773:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3560, "name": "address", "nodeType": "ElementaryTypeName", "src": "1773:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "1772:18:6"}, "src": "1746:45:6"}, {"documentation": {"id": 3564, "nodeType": "StructuredDocumentation", "src": "1797:195:6", "text": " @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n @param spender Address that may be allowed to operate on tokens without being their owner."}, "errorSelector": "94280d62", "id": 3568, "name": "ERC20InvalidSpender", "nameLocation": "2003:19:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3567, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3566, "mutability": "mutable", "name": "spender", "nameLocation": "2031:7:6", "nodeType": "VariableDeclaration", "scope": 3568, "src": "2023:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3565, "name": "address", "nodeType": "ElementaryTypeName", "src": "2023:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "2022:17:6"}, "src": "1997:43:6"}], "scope": 3665, "src": "278:1764:6", "usedErrors": [3539, 3544, 3549, 3558, 3563, 3568], "usedEvents": []}, {"abstract": false, "baseContracts": [], "canonicalName": "IERC721Errors", "contractDependencies": [], "contractKind": "interface", "documentation": {"id": 3570, "nodeType": "StructuredDocumentation", "src": "2044:141:6", "text": " @dev Standard ERC721 Errors\n Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens."}, "fullyImplemented": true, "id": 3617, "linearizedBaseContracts": [3617], "name": "IERC721Errors", "nameLocation": "2196:13:6", "nodeType": "ContractDefinition", "nodes": [{"documentation": {"id": 3571, "nodeType": "StructuredDocumentation", "src": "2216:219:6", "text": " @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n Used in balance queries.\n @param owner Address of the current owner of a token."}, "errorSelector": "89c62b64", "id": 3575, "name": "ERC721InvalidOwner", "nameLocation": "2446:18:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3574, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3573, "mutability": "mutable", "name": "owner", "nameLocation": "2473:5:6", "nodeType": "VariableDeclaration", "scope": 3575, "src": "2465:13:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3572, "name": "address", "nodeType": "ElementaryTypeName", "src": "2465:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "2464:15:6"}, "src": "2440:40:6"}, {"documentation": {"id": 3576, "nodeType": "StructuredDocumentation", "src": "2486:132:6", "text": " @dev Indicates a `tokenId` whose `owner` is the zero address.\n @param tokenId Identifier number of a token."}, "errorSelector": "7e273289", "id": 3580, "name": "ERC721NonexistentToken", "nameLocation": "2629:22:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3579, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3578, "mutability": "mutable", "name": "tokenId", "nameLocation": "2660:7:6", "nodeType": "VariableDeclaration", "scope": 3580, "src": "2652:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3577, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2652:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "2651:17:6"}, "src": "2623:46:6"}, {"documentation": {"id": 3581, "nodeType": "StructuredDocumentation", "src": "2675:289:6", "text": " @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n @param sender Address whose tokens are being transferred.\n @param tokenId Identifier number of a token.\n @param owner Address of the current owner of a token."}, "errorSelector": "64283d7b", "id": 3589, "name": "ERC721IncorrectOwner", "nameLocation": "2975:20:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3588, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3583, "mutability": "mutable", "name": "sender", "nameLocation": "3004:6:6", "nodeType": "VariableDeclaration", "scope": 3589, "src": "2996:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3582, "name": "address", "nodeType": "ElementaryTypeName", "src": "2996:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3585, "mutability": "mutable", "name": "tokenId", "nameLocation": "3020:7:6", "nodeType": "VariableDeclaration", "scope": 3589, "src": "3012:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3584, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3012:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3587, "mutability": "mutable", "name": "owner", "nameLocation": "3037:5:6", "nodeType": "VariableDeclaration", "scope": 3589, "src": "3029:13:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3586, "name": "address", "nodeType": "ElementaryTypeName", "src": "3029:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "2995:48:6"}, "src": "2969:75:6"}, {"documentation": {"id": 3590, "nodeType": "StructuredDocumentation", "src": "3050:152:6", "text": " @dev Indicates a failure with the token `sender`. Used in transfers.\n @param sender Address whose tokens are being transferred."}, "errorSelector": "73c6ac6e", "id": 3594, "name": "ERC721InvalidSender", "nameLocation": "3213:19:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3593, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3592, "mutability": "mutable", "name": "sender", "nameLocation": "3241:6:6", "nodeType": "VariableDeclaration", "scope": 3594, "src": "3233:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3591, "name": "address", "nodeType": "ElementaryTypeName", "src": "3233:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "3232:16:6"}, "src": "3207:42:6"}, {"documentation": {"id": 3595, "nodeType": "StructuredDocumentation", "src": "3255:159:6", "text": " @dev Indicates a failure with the token `receiver`. Used in transfers.\n @param receiver Address to which tokens are being transferred."}, "errorSelector": "64a0ae92", "id": 3599, "name": "ERC721InvalidReceiver", "nameLocation": "3425:21:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3598, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3597, "mutability": "mutable", "name": "receiver", "nameLocation": "3455:8:6", "nodeType": "VariableDeclaration", "scope": 3599, "src": "3447:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3596, "name": "address", "nodeType": "ElementaryTypeName", "src": "3447:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "3446:18:6"}, "src": "3419:46:6"}, {"documentation": {"id": 3600, "nodeType": "StructuredDocumentation", "src": "3471:247:6", "text": " @dev Indicates a failure with the `operator`\u2019s approval. Used in transfers.\n @param operator Address that may be allowed to operate on tokens without being their owner.\n @param tokenId Identifier number of a token."}, "errorSelector": "177e802f", "id": 3606, "name": "ERC721InsufficientApproval", "nameLocation": "3729:26:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3605, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3602, "mutability": "mutable", "name": "operator", "nameLocation": "3764:8:6", "nodeType": "VariableDeclaration", "scope": 3606, "src": "3756:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3601, "name": "address", "nodeType": "ElementaryTypeName", "src": "3756:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3604, "mutability": "mutable", "name": "tokenId", "nameLocation": "3782:7:6", "nodeType": "VariableDeclaration", "scope": 3606, "src": "3774:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3603, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3774:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "3755:35:6"}, "src": "3723:68:6"}, {"documentation": {"id": 3607, "nodeType": "StructuredDocumentation", "src": "3797:174:6", "text": " @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n @param approver Address initiating an approval operation."}, "errorSelector": "a9fbf51f", "id": 3611, "name": "ERC721InvalidApprover", "nameLocation": "3982:21:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3610, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3609, "mutability": "mutable", "name": "approver", "nameLocation": "4012:8:6", "nodeType": "VariableDeclaration", "scope": 3611, "src": "4004:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3608, "name": "address", "nodeType": "ElementaryTypeName", "src": "4004:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "4003:18:6"}, "src": "3976:46:6"}, {"documentation": {"id": 3612, "nodeType": "StructuredDocumentation", "src": "4028:197:6", "text": " @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n @param operator Address that may be allowed to operate on tokens without being their owner."}, "errorSelector": "5b08ba18", "id": 3616, "name": "ERC721InvalidOperator", "nameLocation": "4236:21:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3615, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3614, "mutability": "mutable", "name": "operator", "nameLocation": "4266:8:6", "nodeType": "VariableDeclaration", "scope": 3616, "src": "4258:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3613, "name": "address", "nodeType": "ElementaryTypeName", "src": "4258:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "4257:18:6"}, "src": "4230:46:6"}], "scope": 3665, "src": "2186:2092:6", "usedErrors": [3575, 3580, 3589, 3594, 3599, 3606, 3611, 3616], "usedEvents": []}, {"abstract": false, "baseContracts": [], "canonicalName": "IERC1155Errors", "contractDependencies": [], "contractKind": "interface", "documentation": {"id": 3618, "nodeType": "StructuredDocumentation", "src": "4280:143:6", "text": " @dev Standard ERC1155 Errors\n Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens."}, "fullyImplemented": true, "id": 3664, "linearizedBaseContracts": [3664], "name": "IERC1155Errors", "nameLocation": "4434:14:6", "nodeType": "ContractDefinition", "nodes": [{"documentation": {"id": 3619, "nodeType": "StructuredDocumentation", "src": "4455:361:6", "text": " @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n @param sender Address whose tokens are being transferred.\n @param balance Current balance for the interacting account.\n @param needed Minimum amount required to perform a transfer.\n @param tokenId Identifier number of a token."}, "errorSelector": "03dee4c5", "id": 3629, "name": "ERC1155InsufficientBalance", "nameLocation": "4827:26:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3628, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3621, "mutability": "mutable", "name": "sender", "nameLocation": "4862:6:6", "nodeType": "VariableDeclaration", "scope": 3629, "src": "4854:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3620, "name": "address", "nodeType": "ElementaryTypeName", "src": "4854:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3623, "mutability": "mutable", "name": "balance", "nameLocation": "4878:7:6", "nodeType": "VariableDeclaration", "scope": 3629, "src": "4870:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3622, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4870:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3625, "mutability": "mutable", "name": "needed", "nameLocation": "4895:6:6", "nodeType": "VariableDeclaration", "scope": 3629, "src": "4887:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3624, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4887:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3627, "mutability": "mutable", "name": "tokenId", "nameLocation": "4911:7:6", "nodeType": "VariableDeclaration", "scope": 3629, "src": "4903:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3626, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4903:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "4853:66:6"}, "src": "4821:99:6"}, {"documentation": {"id": 3630, "nodeType": "StructuredDocumentation", "src": "4926:152:6", "text": " @dev Indicates a failure with the token `sender`. Used in transfers.\n @param sender Address whose tokens are being transferred."}, "errorSelector": "01a83514", "id": 3634, "name": "ERC1155InvalidSender", "nameLocation": "5089:20:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3633, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3632, "mutability": "mutable", "name": "sender", "nameLocation": "5118:6:6", "nodeType": "VariableDeclaration", "scope": 3634, "src": "5110:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3631, "name": "address", "nodeType": "ElementaryTypeName", "src": "5110:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "5109:16:6"}, "src": "5083:43:6"}, {"documentation": {"id": 3635, "nodeType": "StructuredDocumentation", "src": "5132:159:6", "text": " @dev Indicates a failure with the token `receiver`. Used in transfers.\n @param receiver Address to which tokens are being transferred."}, "errorSelector": "57f447ce", "id": 3639, "name": "ERC1155InvalidReceiver", "nameLocation": "5302:22:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3638, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3637, "mutability": "mutable", "name": "receiver", "nameLocation": "5333:8:6", "nodeType": "VariableDeclaration", "scope": 3639, "src": "5325:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3636, "name": "address", "nodeType": "ElementaryTypeName", "src": "5325:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "5324:18:6"}, "src": "5296:47:6"}, {"documentation": {"id": 3640, "nodeType": "StructuredDocumentation", "src": "5349:256:6", "text": " @dev Indicates a failure with the `operator`\u2019s approval. Used in transfers.\n @param operator Address that may be allowed to operate on tokens without being their owner.\n @param owner Address of the current owner of a token."}, "errorSelector": "e237d922", "id": 3646, "name": "ERC1155MissingApprovalForAll", "nameLocation": "5616:28:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3645, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3642, "mutability": "mutable", "name": "operator", "nameLocation": "5653:8:6", "nodeType": "VariableDeclaration", "scope": 3646, "src": "5645:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3641, "name": "address", "nodeType": "ElementaryTypeName", "src": "5645:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3644, "mutability": "mutable", "name": "owner", "nameLocation": "5671:5:6", "nodeType": "VariableDeclaration", "scope": 3646, "src": "5663:13:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3643, "name": "address", "nodeType": "ElementaryTypeName", "src": "5663:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "5644:33:6"}, "src": "5610:68:6"}, {"documentation": {"id": 3647, "nodeType": "StructuredDocumentation", "src": "5684:174:6", "text": " @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n @param approver Address initiating an approval operation."}, "errorSelector": "3e31884e", "id": 3651, "name": "ERC1155InvalidApprover", "nameLocation": "5869:22:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3650, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3649, "mutability": "mutable", "name": "approver", "nameLocation": "5900:8:6", "nodeType": "VariableDeclaration", "scope": 3651, "src": "5892:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3648, "name": "address", "nodeType": "ElementaryTypeName", "src": "5892:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "5891:18:6"}, "src": "5863:47:6"}, {"documentation": {"id": 3652, "nodeType": "StructuredDocumentation", "src": "5916:197:6", "text": " @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n @param operator Address that may be allowed to operate on tokens without being their owner."}, "errorSelector": "ced3e100", "id": 3656, "name": "ERC1155InvalidOperator", "nameLocation": "6124:22:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3655, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3654, "mutability": "mutable", "name": "operator", "nameLocation": "6155:8:6", "nodeType": "VariableDeclaration", "scope": 3656, "src": "6147:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3653, "name": "address", "nodeType": "ElementaryTypeName", "src": "6147:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "6146:18:6"}, "src": "6118:47:6"}, {"documentation": {"id": 3657, "nodeType": "StructuredDocumentation", "src": "6171:280:6", "text": " @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n Used in batch transfers.\n @param idsLength Length of the array of token identifiers\n @param valuesLength Length of the array of token amounts"}, "errorSelector": "5b059991", "id": 3663, "name": "ERC1155InvalidArrayLength", "nameLocation": "6462:25:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3662, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3659, "mutability": "mutable", "name": "idsLength", "nameLocation": "6496:9:6", "nodeType": "VariableDeclaration", "scope": 3663, "src": "6488:17:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3658, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6488:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3661, "mutability": "mutable", "name": "valuesLength", "nameLocation": "6515:12:6", "nodeType": "VariableDeclaration", "scope": 3663, "src": "6507:20:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3660, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6507:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "6487:41:6"}, "src": "6456:73:6"}], "scope": 3665, "src": "4424:2107:6", "usedErrors": [3629, 3634, 3639, 3646, 3651, 3656, 3663], "usedEvents": []}], "src": "112:6420:6"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol": {"AST": {"absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol", "exportedSymbols": {"Context": [3798], "ERC20": [1959], "IERC20": [3742], "IERC20Errors": [3569], "IERC20Metadata": [3768]}, "id": 1960, "license": "MIT", "nodeType": "SourceUnit", "nodes": [{"id": 1446, "literals": ["solidity", "^", "0.8", ".20"], "nodeType": "PragmaDirective", "src": "105:24:7"}, {"absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol", "file": "./IERC20.sol", "id": 1448, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1960, "sourceUnit": 3743, "src": "131:36:7", "symbolAliases": [{"foreign": {"id": 1447, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3742, "src": "139:6:7", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol", "file": "./extensions/IERC20Metadata.sol", "id": 1450, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1960, "sourceUnit": 3769, "src": "168:63:7", "symbolAliases": [{"foreign": {"id": 1449, "name": "IERC20Metadata", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3768, "src": "176:14:7", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"absolutePath": "node_modules/@openzeppelin/contracts/utils/Context.sol", "file": "../../utils/Context.sol", "id": 1452, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1960, "sourceUnit": 3799, "src": "232:48:7", "symbolAliases": [{"foreign": {"id": 1451, "name": "Context", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3798, "src": "240:7:7", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"absolutePath": "node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol", "file": "../../interfaces/draft-IERC6093.sol", "id": 1454, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1960, "sourceUnit": 3665, "src": "281:65:7", "symbolAliases": [{"foreign": {"id": 1453, "name": "IERC20Errors", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3569, "src": "289:12:7", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"abstract": true, "baseContracts": [{"baseName": {"id": 1456, "name": "Context", "nameLocations": ["1428:7:7"], "nodeType": "IdentifierPath", "referencedDeclaration": 3798, "src": "1428:7:7"}, "id": 1457, "nodeType": "InheritanceSpecifier", "src": "1428:7:7"}, {"baseName": {"id": 1458, "name": "IERC20", "nameLocations": ["1437:6:7"], "nodeType": "IdentifierPath", "referencedDeclaration": 3742, "src": "1437:6:7"}, "id": 1459, "nodeType": "InheritanceSpecifier", "src": "1437:6:7"}, {"baseName": {"id": 1460, "name": "IERC20Metadata", "nameLocations": ["1445:14:7"], "nodeType": "IdentifierPath", "referencedDeclaration": 3768, "src": "1445:14:7"}, "id": 1461, "nodeType": "InheritanceSpecifier", "src": "1445:14:7"}, {"baseName": {"id": 1462, "name": "IERC20Errors", "nameLocations": ["1461:12:7"], "nodeType": "IdentifierPath", "referencedDeclaration": 3569, "src": "1461:12:7"}, "id": 1463, "nodeType": "InheritanceSpecifier", "src": "1461:12:7"}], "canonicalName": "ERC20", "contractDependencies": [], "contractKind": "contract", "documentation": {"id": 1455, "nodeType": "StructuredDocumentation", "src": "348:1052:7", "text": " @dev Implementation of the {IERC20} interface.\n This implementation is agnostic to the way tokens are created. This means\n that a supply mechanism has to be added in a derived contract using {_mint}.\n TIP: For a detailed writeup see our guide\n https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n to implement supply mechanisms].\n The default value of {decimals} is 18. To change this, you should override\n this function so it returns a different value.\n We have followed general OpenZeppelin Contracts guidelines: functions revert\n instead returning `false` on failure. This behavior is nonetheless\n conventional and does not conflict with the expectations of ERC20\n applications.\n Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n This allows applications to reconstruct the allowance for all accounts just\n by listening to said events. Other implementations of the EIP may not emit\n these events, as it isn't required by the specification."}, "fullyImplemented": true, "id": 1959, "linearizedBaseContracts": [1959, 3569, 3768, 3742, 3798], "name": "ERC20", "nameLocation": "1419:5:7", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 1467, "mutability": "mutable", "name": "_balances", "nameLocation": "1524:9:7", "nodeType": "VariableDeclaration", "scope": 1959, "src": "1480:53:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}, "typeName": {"id": 1466, "keyName": "account", "keyNameLocation": "1496:7:7", "keyType": {"id": 1464, "name": "address", "nodeType": "ElementaryTypeName", "src": "1488:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "Mapping", "src": "1480:35:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}, "valueName": "", "valueNameLocation": "-1:-1:-1", "valueType": {"id": 1465, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1507:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}}, "visibility": "private"}, {"constant": false, "id": 1473, "mutability": "mutable", "name": "_allowances", "nameLocation": "1612:11:7", "nodeType": "VariableDeclaration", "scope": 1959, "src": "1540:83:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))"}, "typeName": {"id": 1472, "keyName": "account", "keyNameLocation": "1556:7:7", "keyType": {"id": 1468, "name": "address", "nodeType": "ElementaryTypeName", "src": "1548:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "Mapping", "src": "1540:63:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))"}, "valueName": "", "valueNameLocation": "-1:-1:-1", "valueType": {"id": 1471, "keyName": "spender", "keyNameLocation": "1583:7:7", "keyType": {"id": 1469, "name": "address", "nodeType": "ElementaryTypeName", "src": "1575:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "Mapping", "src": "1567:35:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}, "valueName": "", "valueNameLocation": "-1:-1:-1", "valueType": {"id": 1470, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1594:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}}}, "visibility": "private"}, {"constant": false, "id": 1475, "mutability": "mutable", "name": "_totalSupply", "nameLocation": "1646:12:7", "nodeType": "VariableDeclaration", "scope": 1959, "src": "1630:28:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1474, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1630:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "private"}, {"constant": false, "id": 1477, "mutability": "mutable", "name": "_name", "nameLocation": "1680:5:7", "nodeType": "VariableDeclaration", "scope": 1959, "src": "1665:20:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string"}, "typeName": {"id": 1476, "name": "string", "nodeType": "ElementaryTypeName", "src": "1665:6:7", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "private"}, {"constant": false, "id": 1479, "mutability": "mutable", "name": "_symbol", "nameLocation": "1706:7:7", "nodeType": "VariableDeclaration", "scope": 1959, "src": "1691:22:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string"}, "typeName": {"id": 1478, "name": "string", "nodeType": "ElementaryTypeName", "src": "1691:6:7", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "private"}, {"body": {"id": 1495, "nodeType": "Block", "src": "1952:57:7", "statements": [{"expression": {"id": 1489, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 1487, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1477, "src": "1962:5:7", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string storage ref"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 1488, "name": "name_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1482, "src": "1970:5:7", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "src": "1962:13:7", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string storage ref"}}, "id": 1490, "nodeType": "ExpressionStatement", "src": "1962:13:7"}, {"expression": {"id": 1493, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 1491, "name": "_symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1479, "src": "1985:7:7", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string storage ref"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 1492, "name": "symbol_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1484, "src": "1995:7:7", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "src": "1985:17:7", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string storage ref"}}, "id": 1494, "nodeType": "ExpressionStatement", "src": "1985:17:7"}]}, "documentation": {"id": 1480, "nodeType": "StructuredDocumentation", "src": "1720:171:7", "text": " @dev Sets the values for {name} and {symbol}.\n All two of these values are immutable: they can only be set once during\n construction."}, "id": 1496, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": {"id": 1485, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1482, "mutability": "mutable", "name": "name_", "nameLocation": "1922:5:7", "nodeType": "VariableDeclaration", "scope": 1496, "src": "1908:19:7", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1481, "name": "string", "nodeType": "ElementaryTypeName", "src": "1908:6:7", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}, {"constant": false, "id": 1484, "mutability": "mutable", "name": "symbol_", "nameLocation": "1943:7:7", "nodeType": "VariableDeclaration", "scope": 1496, "src": "1929:21:7", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1483, "name": "string", "nodeType": "ElementaryTypeName", "src": "1929:6:7", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "1907:44:7"}, "returnParameters": {"id": 1486, "nodeType": "ParameterList", "parameters": [], "src": "1952:0:7"}, "scope": 1959, "src": "1896:113:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"baseFunctions": [3755], "body": {"id": 1504, "nodeType": "Block", "src": "2134:29:7", "statements": [{"expression": {"id": 1502, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1477, "src": "2151:5:7", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string storage ref"}}, "functionReturnParameters": 1501, "id": 1503, "nodeType": "Return", "src": "2144:12:7"}]}, "documentation": {"id": 1497, "nodeType": "StructuredDocumentation", "src": "2015:54:7", "text": " @dev Returns the name of the token."}, "functionSelector": "06fdde03", "id": 1505, "implemented": true, "kind": "function", "modifiers": [], "name": "name", "nameLocation": "2083:4:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1498, "nodeType": "ParameterList", "parameters": [], "src": "2087:2:7"}, "returnParameters": {"id": 1501, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1500, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1505, "src": "2119:13:7", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1499, "name": "string", "nodeType": "ElementaryTypeName", "src": "2119:6:7", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "2118:15:7"}, "scope": 1959, "src": "2074:89:7", "stateMutability": "view", "virtual": true, "visibility": "public"}, {"baseFunctions": [3761], "body": {"id": 1513, "nodeType": "Block", "src": "2338:31:7", "statements": [{"expression": {"id": 1511, "name": "_symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1479, "src": "2355:7:7", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string storage ref"}}, "functionReturnParameters": 1510, "id": 1512, "nodeType": "Return", "src": "2348:14:7"}]}, "documentation": {"id": 1506, "nodeType": "StructuredDocumentation", "src": "2169:102:7", "text": " @dev Returns the symbol of the token, usually a shorter version of the\n name."}, "functionSelector": "95d89b41", "id": 1514, "implemented": true, "kind": "function", "modifiers": [], "name": "symbol", "nameLocation": "2285:6:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1507, "nodeType": "ParameterList", "parameters": [], "src": "2291:2:7"}, "returnParameters": {"id": 1510, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1509, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1514, "src": "2323:13:7", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1508, "name": "string", "nodeType": "ElementaryTypeName", "src": "2323:6:7", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "2322:15:7"}, "scope": 1959, "src": "2276:93:7", "stateMutability": "view", "virtual": true, "visibility": "public"}, {"baseFunctions": [3767], "body": {"id": 1522, "nodeType": "Block", "src": "3058:26:7", "statements": [{"expression": {"hexValue": "3138", "id": 1520, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3075:2:7", "typeDescriptions": {"typeIdentifier": "t_rational_18_by_1", "typeString": "int_const 18"}, "value": "18"}, "functionReturnParameters": 1519, "id": 1521, "nodeType": "Return", "src": "3068:9:7"}]}, "documentation": {"id": 1515, "nodeType": "StructuredDocumentation", "src": "2375:622:7", "text": " @dev Returns the number of decimals used to get its user representation.\n For example, if `decimals` equals `2`, a balance of `505` tokens should\n be displayed to a user as `5.05` (`505 / 10 ** 2`).\n Tokens usually opt for a value of 18, imitating the relationship between\n Ether and Wei. This is the default value returned by this function, unless\n it's overridden.\n NOTE: This information is only used for _display_ purposes: it in\n no way affects any of the arithmetic of the contract, including\n {IERC20-balanceOf} and {IERC20-transfer}."}, "functionSelector": "313ce567", "id": 1523, "implemented": true, "kind": "function", "modifiers": [], "name": "decimals", "nameLocation": "3011:8:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1516, "nodeType": "ParameterList", "parameters": [], "src": "3019:2:7"}, "returnParameters": {"id": 1519, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1518, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1523, "src": "3051:5:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "typeName": {"id": 1517, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "3051:5:7", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "visibility": "internal"}], "src": "3050:7:7"}, "scope": 1959, "src": "3002:82:7", "stateMutability": "view", "virtual": true, "visibility": "public"}, {"baseFunctions": [3691], "body": {"id": 1531, "nodeType": "Block", "src": "3205:36:7", "statements": [{"expression": {"id": 1529, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1475, "src": "3222:12:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 1528, "id": 1530, "nodeType": "Return", "src": "3215:19:7"}]}, "documentation": {"id": 1524, "nodeType": "StructuredDocumentation", "src": "3090:49:7", "text": " @dev See {IERC20-totalSupply}."}, "functionSelector": "18160ddd", "id": 1532, "implemented": true, "kind": "function", "modifiers": [], "name": "totalSupply", "nameLocation": "3153:11:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1525, "nodeType": "ParameterList", "parameters": [], "src": "3164:2:7"}, "returnParameters": {"id": 1528, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1527, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1532, "src": "3196:7:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1526, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3196:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "3195:9:7"}, "scope": 1959, "src": "3144:97:7", "stateMutability": "view", "virtual": true, "visibility": "public"}, {"baseFunctions": [3699], "body": {"id": 1544, "nodeType": "Block", "src": "3373:42:7", "statements": [{"expression": {"baseExpression": {"id": 1540, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1467, "src": "3390:9:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}}, "id": 1542, "indexExpression": {"id": 1541, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1535, "src": "3400:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3390:18:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 1539, "id": 1543, "nodeType": "Return", "src": "3383:25:7"}]}, "documentation": {"id": 1533, "nodeType": "StructuredDocumentation", "src": "3247:47:7", "text": " @dev See {IERC20-balanceOf}."}, "functionSelector": "70a08231", "id": 1545, "implemented": true, "kind": "function", "modifiers": [], "name": "balanceOf", "nameLocation": "3308:9:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1536, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1535, "mutability": "mutable", "name": "account", "nameLocation": "3326:7:7", "nodeType": "VariableDeclaration", "scope": 1545, "src": "3318:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1534, "name": "address", "nodeType": "ElementaryTypeName", "src": "3318:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "3317:17:7"}, "returnParameters": {"id": 1539, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1538, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1545, "src": "3364:7:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1537, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3364:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "3363:9:7"}, "scope": 1959, "src": "3299:116:7", "stateMutability": "view", "virtual": true, "visibility": "public"}, {"baseFunctions": [3709], "body": {"id": 1568, "nodeType": "Block", "src": "3685:103:7", "statements": [{"assignments": [1556], "declarations": [{"constant": false, "id": 1556, "mutability": "mutable", "name": "owner", "nameLocation": "3703:5:7", "nodeType": "VariableDeclaration", "scope": 1568, "src": "3695:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1555, "name": "address", "nodeType": "ElementaryTypeName", "src": "3695:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "id": 1559, "initialValue": {"arguments": [], "expression": {"argumentTypes": [], "id": 1557, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3780, "src": "3711:10:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)"}}, "id": 1558, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3711:12:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "VariableDeclarationStatement", "src": "3695:28:7"}, {"expression": {"arguments": [{"id": 1561, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1556, "src": "3743:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1562, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1548, "src": "3750:2:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1563, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1550, "src": "3754:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1560, "name": "_transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1689, "src": "3733:9:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1564, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3733:27:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1565, "nodeType": "ExpressionStatement", "src": "3733:27:7"}, {"expression": {"hexValue": "74727565", "id": 1566, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "3777:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "functionReturnParameters": 1554, "id": 1567, "nodeType": "Return", "src": "3770:11:7"}]}, "documentation": {"id": 1546, "nodeType": "StructuredDocumentation", "src": "3421:184:7", "text": " @dev See {IERC20-transfer}.\n Requirements:\n - `to` cannot be the zero address.\n - the caller must have a balance of at least `value`."}, "functionSelector": "a9059cbb", "id": 1569, "implemented": true, "kind": "function", "modifiers": [], "name": "transfer", "nameLocation": "3619:8:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1551, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1548, "mutability": "mutable", "name": "to", "nameLocation": "3636:2:7", "nodeType": "VariableDeclaration", "scope": 1569, "src": "3628:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1547, "name": "address", "nodeType": "ElementaryTypeName", "src": "3628:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1550, "mutability": "mutable", "name": "value", "nameLocation": "3648:5:7", "nodeType": "VariableDeclaration", "scope": 1569, "src": "3640:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1549, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3640:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "3627:27:7"}, "returnParameters": {"id": 1554, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1553, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1569, "src": "3679:4:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1552, "name": "bool", "nodeType": "ElementaryTypeName", "src": "3679:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "3678:6:7"}, "scope": 1959, "src": "3610:178:7", "stateMutability": "nonpayable", "virtual": true, "visibility": "public"}, {"baseFunctions": [3719], "body": {"id": 1585, "nodeType": "Block", "src": "3935:51:7", "statements": [{"expression": {"baseExpression": {"baseExpression": {"id": 1579, "name": "_allowances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1473, "src": "3952:11:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))"}}, "id": 1581, "indexExpression": {"id": 1580, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1572, "src": "3964:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3952:18:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}}, "id": 1583, "indexExpression": {"id": 1582, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1574, "src": "3971:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3952:27:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 1578, "id": 1584, "nodeType": "Return", "src": "3945:34:7"}]}, "documentation": {"id": 1570, "nodeType": "StructuredDocumentation", "src": "3794:47:7", "text": " @dev See {IERC20-allowance}."}, "functionSelector": "dd62ed3e", "id": 1586, "implemented": true, "kind": "function", "modifiers": [], "name": "allowance", "nameLocation": "3855:9:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1575, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1572, "mutability": "mutable", "name": "owner", "nameLocation": "3873:5:7", "nodeType": "VariableDeclaration", "scope": 1586, "src": "3865:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1571, "name": "address", "nodeType": "ElementaryTypeName", "src": "3865:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1574, "mutability": "mutable", "name": "spender", "nameLocation": "3888:7:7", "nodeType": "VariableDeclaration", "scope": 1586, "src": "3880:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1573, "name": "address", "nodeType": "ElementaryTypeName", "src": "3880:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "3864:32:7"}, "returnParameters": {"id": 1578, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1577, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1586, "src": "3926:7:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1576, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3926:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "3925:9:7"}, "scope": 1959, "src": "3846:140:7", "stateMutability": "view", "virtual": true, "visibility": "public"}, {"baseFunctions": [3729], "body": {"id": 1609, "nodeType": "Block", "src": "4372:107:7", "statements": [{"assignments": [1597], "declarations": [{"constant": false, "id": 1597, "mutability": "mutable", "name": "owner", "nameLocation": "4390:5:7", "nodeType": "VariableDeclaration", "scope": 1609, "src": "4382:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1596, "name": "address", "nodeType": "ElementaryTypeName", "src": "4382:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "id": 1600, "initialValue": {"arguments": [], "expression": {"argumentTypes": [], "id": 1598, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3780, "src": "4398:10:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)"}}, "id": 1599, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4398:12:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "VariableDeclarationStatement", "src": "4382:28:7"}, {"expression": {"arguments": [{"id": 1602, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1597, "src": "4429:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1603, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1589, "src": "4436:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1604, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1591, "src": "4445:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1601, "name": "_approve", "nodeType": "Identifier", "overloadedDeclarations": [1850, 1910], "referencedDeclaration": 1850, "src": "4420:8:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1605, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4420:31:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1606, "nodeType": "ExpressionStatement", "src": "4420:31:7"}, {"expression": {"hexValue": "74727565", "id": 1607, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "4468:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "functionReturnParameters": 1595, "id": 1608, "nodeType": "Return", "src": "4461:11:7"}]}, "documentation": {"id": 1587, "nodeType": "StructuredDocumentation", "src": "3992:296:7", "text": " @dev See {IERC20-approve}.\n NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n `transferFrom`. This is semantically equivalent to an infinite approval.\n Requirements:\n - `spender` cannot be the zero address."}, "functionSelector": "095ea7b3", "id": 1610, "implemented": true, "kind": "function", "modifiers": [], "name": "approve", "nameLocation": "4302:7:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1592, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1589, "mutability": "mutable", "name": "spender", "nameLocation": "4318:7:7", "nodeType": "VariableDeclaration", "scope": 1610, "src": "4310:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1588, "name": "address", "nodeType": "ElementaryTypeName", "src": "4310:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1591, "mutability": "mutable", "name": "value", "nameLocation": "4335:5:7", "nodeType": "VariableDeclaration", "scope": 1610, "src": "4327:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1590, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4327:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "4309:32:7"}, "returnParameters": {"id": 1595, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1594, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1610, "src": "4366:4:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1593, "name": "bool", "nodeType": "ElementaryTypeName", "src": "4366:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "4365:6:7"}, "scope": 1959, "src": "4293:186:7", "stateMutability": "nonpayable", "virtual": true, "visibility": "public"}, {"baseFunctions": [3741], "body": {"id": 1641, "nodeType": "Block", "src": "5132:151:7", "statements": [{"assignments": [1623], "declarations": [{"constant": false, "id": 1623, "mutability": "mutable", "name": "spender", "nameLocation": "5150:7:7", "nodeType": "VariableDeclaration", "scope": 1641, "src": "5142:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1622, "name": "address", "nodeType": "ElementaryTypeName", "src": "5142:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "id": 1626, "initialValue": {"arguments": [], "expression": {"argumentTypes": [], "id": 1624, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3780, "src": "5160:10:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)"}}, "id": 1625, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5160:12:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "VariableDeclarationStatement", "src": "5142:30:7"}, {"expression": {"arguments": [{"id": 1628, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1613, "src": "5198:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1629, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1623, "src": "5204:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1630, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1617, "src": "5213:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1627, "name": "_spendAllowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1958, "src": "5182:15:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1631, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5182:37:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1632, "nodeType": "ExpressionStatement", "src": "5182:37:7"}, {"expression": {"arguments": [{"id": 1634, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1613, "src": "5239:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1635, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1615, "src": "5245:2:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1636, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1617, "src": "5249:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1633, "name": "_transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1689, "src": "5229:9:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1637, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5229:26:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1638, "nodeType": "ExpressionStatement", "src": "5229:26:7"}, {"expression": {"hexValue": "74727565", "id": 1639, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "5272:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "functionReturnParameters": 1621, "id": 1640, "nodeType": "Return", "src": "5265:11:7"}]}, "documentation": {"id": 1611, "nodeType": "StructuredDocumentation", "src": "4485:549:7", "text": " @dev See {IERC20-transferFrom}.\n Emits an {Approval} event indicating the updated allowance. This is not\n required by the EIP. See the note at the beginning of {ERC20}.\n NOTE: Does not update the allowance if the current allowance\n is the maximum `uint256`.\n Requirements:\n - `from` and `to` cannot be the zero address.\n - `from` must have a balance of at least `value`.\n - the caller must have allowance for ``from``'s tokens of at least\n `value`."}, "functionSelector": "23b872dd", "id": 1642, "implemented": true, "kind": "function", "modifiers": [], "name": "transferFrom", "nameLocation": "5048:12:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1618, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1613, "mutability": "mutable", "name": "from", "nameLocation": "5069:4:7", "nodeType": "VariableDeclaration", "scope": 1642, "src": "5061:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1612, "name": "address", "nodeType": "ElementaryTypeName", "src": "5061:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1615, "mutability": "mutable", "name": "to", "nameLocation": "5083:2:7", "nodeType": "VariableDeclaration", "scope": 1642, "src": "5075:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1614, "name": "address", "nodeType": "ElementaryTypeName", "src": "5075:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1617, "mutability": "mutable", "name": "value", "nameLocation": "5095:5:7", "nodeType": "VariableDeclaration", "scope": 1642, "src": "5087:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1616, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5087:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "5060:41:7"}, "returnParameters": {"id": 1621, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1620, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1642, "src": "5126:4:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1619, "name": "bool", "nodeType": "ElementaryTypeName", "src": "5126:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "5125:6:7"}, "scope": 1959, "src": "5039:244:7", "stateMutability": "nonpayable", "virtual": true, "visibility": "public"}, {"body": {"id": 1688, "nodeType": "Block", "src": "5725:231:7", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1657, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1652, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1645, "src": "5739:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1655, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5755:1:7", "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": 1654, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5747:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1653, "name": "address", "nodeType": "ElementaryTypeName", "src": "5747:7:7", "typeDescriptions": {}}}, "id": 1656, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5747:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "5739:18:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1666, "nodeType": "IfStatement", "src": "5735:86:7", "trueBody": {"id": 1665, "nodeType": "Block", "src": "5759:62:7", "statements": [{"errorCall": {"arguments": [{"arguments": [{"hexValue": "30", "id": 1661, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5807:1:7", "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": 1660, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5799:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1659, "name": "address", "nodeType": "ElementaryTypeName", "src": "5799:7:7", "typeDescriptions": {}}}, "id": 1662, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5799:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 1658, "name": "ERC20InvalidSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3544, "src": "5780:18:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", "typeString": "function (address) pure"}}, "id": 1663, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5780:30:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1664, "nodeType": "RevertStatement", "src": "5773:37:7"}]}}, {"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1672, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1667, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1647, "src": "5834:2:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1670, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5848:1:7", "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": 1669, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5840:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1668, "name": "address", "nodeType": "ElementaryTypeName", "src": "5840:7:7", "typeDescriptions": {}}}, "id": 1671, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5840:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "5834:16:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1681, "nodeType": "IfStatement", "src": "5830:86:7", "trueBody": {"id": 1680, "nodeType": "Block", "src": "5852:64:7", "statements": [{"errorCall": {"arguments": [{"arguments": [{"hexValue": "30", "id": 1676, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5902:1:7", "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": 1675, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5894:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1674, "name": "address", "nodeType": "ElementaryTypeName", "src": "5894:7:7", "typeDescriptions": {}}}, "id": 1677, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5894:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 1673, "name": "ERC20InvalidReceiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3549, "src": "5873:20:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", "typeString": "function (address) pure"}}, "id": 1678, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5873:32:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1679, "nodeType": "RevertStatement", "src": "5866:39:7"}]}}, {"expression": {"arguments": [{"id": 1683, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1645, "src": "5933:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1684, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1647, "src": "5939:2:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1685, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1649, "src": "5943:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1682, "name": "_update", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1766, "src": "5925:7:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1686, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5925:24:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1687, "nodeType": "ExpressionStatement", "src": "5925:24:7"}]}, "documentation": {"id": 1643, "nodeType": "StructuredDocumentation", "src": "5289:362:7", "text": " @dev Moves a `value` amount of tokens from `from` to `to`.\n This internal function is equivalent to {transfer}, and can be used to\n e.g. implement automatic token fees, slashing mechanisms, etc.\n Emits a {Transfer} event.\n NOTE: This function is not virtual, {_update} should be overridden instead."}, "id": 1689, "implemented": true, "kind": "function", "modifiers": [], "name": "_transfer", "nameLocation": "5665:9:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1650, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1645, "mutability": "mutable", "name": "from", "nameLocation": "5683:4:7", "nodeType": "VariableDeclaration", "scope": 1689, "src": "5675:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1644, "name": "address", "nodeType": "ElementaryTypeName", "src": "5675:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1647, "mutability": "mutable", "name": "to", "nameLocation": "5697:2:7", "nodeType": "VariableDeclaration", "scope": 1689, "src": "5689:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1646, "name": "address", "nodeType": "ElementaryTypeName", "src": "5689:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1649, "mutability": "mutable", "name": "value", "nameLocation": "5709:5:7", "nodeType": "VariableDeclaration", "scope": 1689, "src": "5701:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1648, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5701:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "5674:41:7"}, "returnParameters": {"id": 1651, "nodeType": "ParameterList", "parameters": [], "src": "5725:0:7"}, "scope": 1959, "src": "5656:300:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 1765, "nodeType": "Block", "src": "6346:1032:7", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1704, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1699, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1692, "src": "6360:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1702, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6376:1:7", "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": 1701, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6368:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1700, "name": "address", "nodeType": "ElementaryTypeName", "src": "6368:7:7", "typeDescriptions": {}}}, "id": 1703, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6368:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "6360:18:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseBody": {"id": 1736, "nodeType": "Block", "src": "6534:362:7", "statements": [{"assignments": [1711], "declarations": [{"constant": false, "id": 1711, "mutability": "mutable", "name": "fromBalance", "nameLocation": "6556:11:7", "nodeType": "VariableDeclaration", "scope": 1736, "src": "6548:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1710, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6548:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 1715, "initialValue": {"baseExpression": {"id": 1712, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1467, "src": "6570:9:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}}, "id": 1714, "indexExpression": {"id": 1713, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1692, "src": "6580:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "6570:15:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "6548:37:7"}, {"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1718, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1716, "name": "fromBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1711, "src": "6603:11:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 1717, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "6617:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "6603:19:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1726, "nodeType": "IfStatement", "src": "6599:115:7", "trueBody": {"id": 1725, "nodeType": "Block", "src": "6624:90:7", "statements": [{"errorCall": {"arguments": [{"id": 1720, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1692, "src": "6674:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1721, "name": "fromBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1711, "src": "6680:11:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 1722, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "6693:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1719, "name": "ERC20InsufficientBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3539, "src": "6649:24:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,uint256,uint256) pure"}}, "id": 1723, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6649:50:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1724, "nodeType": "RevertStatement", "src": "6642:57:7"}]}}, {"id": 1735, "nodeType": "UncheckedBlock", "src": "6727:159:7", "statements": [{"expression": {"id": 1733, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"baseExpression": {"id": 1727, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1467, "src": "6834:9:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}}, "id": 1729, "indexExpression": {"id": 1728, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1692, "src": "6844:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "6834:15:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1732, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1730, "name": "fromBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1711, "src": "6852:11:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 1731, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "6866:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "6852:19:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "6834:37:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 1734, "nodeType": "ExpressionStatement", "src": "6834:37:7"}]}]}, "id": 1737, "nodeType": "IfStatement", "src": "6356:540:7", "trueBody": {"id": 1709, "nodeType": "Block", "src": "6380:148:7", "statements": [{"expression": {"id": 1707, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 1705, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1475, "src": "6496:12:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "+=", "rightHandSide": {"id": 1706, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "6512:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "6496:21:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 1708, "nodeType": "ExpressionStatement", "src": "6496:21:7"}]}}, {"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1743, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1738, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1694, "src": "6910:2:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1741, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6924:1:7", "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": 1740, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6916:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1739, "name": "address", "nodeType": "ElementaryTypeName", "src": "6916:7:7", "typeDescriptions": {}}}, "id": 1742, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6916:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "6910:16:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseBody": {"id": 1757, "nodeType": "Block", "src": "7125:206:7", "statements": [{"id": 1756, "nodeType": "UncheckedBlock", "src": "7139:182:7", "statements": [{"expression": {"id": 1754, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"baseExpression": {"id": 1750, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1467, "src": "7284:9:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}}, "id": 1752, "indexExpression": {"id": 1751, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1694, "src": "7294:2:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "7284:13:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "+=", "rightHandSide": {"id": 1753, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "7301:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "7284:22:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 1755, "nodeType": "ExpressionStatement", "src": "7284:22:7"}]}]}, "id": 1758, "nodeType": "IfStatement", "src": "6906:425:7", "trueBody": {"id": 1749, "nodeType": "Block", "src": "6928:191:7", "statements": [{"id": 1748, "nodeType": "UncheckedBlock", "src": "6942:167:7", "statements": [{"expression": {"id": 1746, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 1744, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1475, "src": "7073:12:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "-=", "rightHandSide": {"id": 1745, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "7089:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "7073:21:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 1747, "nodeType": "ExpressionStatement", "src": "7073:21:7"}]}]}}, {"eventCall": {"arguments": [{"id": 1760, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1692, "src": "7355:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1761, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1694, "src": "7361:2:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1762, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "7365:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1759, "name": "Transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3676, "src": "7346:8:7", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1763, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7346:25:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1764, "nodeType": "EmitStatement", "src": "7341:30:7"}]}, "documentation": {"id": 1690, "nodeType": "StructuredDocumentation", "src": "5962:304:7", "text": " @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n this function.\n Emits a {Transfer} event."}, "id": 1766, "implemented": true, "kind": "function", "modifiers": [], "name": "_update", "nameLocation": "6280:7:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1697, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1692, "mutability": "mutable", "name": "from", "nameLocation": "6296:4:7", "nodeType": "VariableDeclaration", "scope": 1766, "src": "6288:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1691, "name": "address", "nodeType": "ElementaryTypeName", "src": "6288:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1694, "mutability": "mutable", "name": "to", "nameLocation": "6310:2:7", "nodeType": "VariableDeclaration", "scope": 1766, "src": "6302:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1693, "name": "address", "nodeType": "ElementaryTypeName", "src": "6302:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1696, "mutability": "mutable", "name": "value", "nameLocation": "6322:5:7", "nodeType": "VariableDeclaration", "scope": 1766, "src": "6314:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1695, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6314:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "6287:41:7"}, "returnParameters": {"id": 1698, "nodeType": "ParameterList", "parameters": [], "src": "6346:0:7"}, "scope": 1959, "src": "6271:1107:7", "stateMutability": "nonpayable", "virtual": true, "visibility": "internal"}, {"body": {"id": 1798, "nodeType": "Block", "src": "7777:152:7", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1779, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1774, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1769, "src": "7791:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1777, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "7810:1:7", "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": 1776, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7802:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1775, "name": "address", "nodeType": "ElementaryTypeName", "src": "7802:7:7", "typeDescriptions": {}}}, "id": 1778, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7802:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "7791:21:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1788, "nodeType": "IfStatement", "src": "7787:91:7", "trueBody": {"id": 1787, "nodeType": "Block", "src": "7814:64:7", "statements": [{"errorCall": {"arguments": [{"arguments": [{"hexValue": "30", "id": 1783, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "7864:1:7", "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": 1782, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7856:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1781, "name": "address", "nodeType": "ElementaryTypeName", "src": "7856:7:7", "typeDescriptions": {}}}, "id": 1784, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7856:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 1780, "name": "ERC20InvalidReceiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3549, "src": "7835:20:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", "typeString": "function (address) pure"}}, "id": 1785, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7835:32:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1786, "nodeType": "RevertStatement", "src": "7828:39:7"}]}}, {"expression": {"arguments": [{"arguments": [{"hexValue": "30", "id": 1792, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "7903:1:7", "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": 1791, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7895:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1790, "name": "address", "nodeType": "ElementaryTypeName", "src": "7895:7:7", "typeDescriptions": {}}}, "id": 1793, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7895:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1794, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1769, "src": "7907:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1795, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1771, "src": "7916:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1789, "name": "_update", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1766, "src": "7887:7:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1796, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7887:35:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1797, "nodeType": "ExpressionStatement", "src": "7887:35:7"}]}, "documentation": {"id": 1767, "nodeType": "StructuredDocumentation", "src": "7384:332:7", "text": " @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n Relies on the `_update` mechanism\n Emits a {Transfer} event with `from` set to the zero address.\n NOTE: This function is not virtual, {_update} should be overridden instead."}, "id": 1799, "implemented": true, "kind": "function", "modifiers": [], "name": "_mint", "nameLocation": "7730:5:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1772, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1769, "mutability": "mutable", "name": "account", "nameLocation": "7744:7:7", "nodeType": "VariableDeclaration", "scope": 1799, "src": "7736:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1768, "name": "address", "nodeType": "ElementaryTypeName", "src": "7736:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1771, "mutability": "mutable", "name": "value", "nameLocation": "7761:5:7", "nodeType": "VariableDeclaration", "scope": 1799, "src": "7753:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1770, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7753:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "7735:32:7"}, "returnParameters": {"id": 1773, "nodeType": "ParameterList", "parameters": [], "src": "7777:0:7"}, "scope": 1959, "src": "7721:208:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 1831, "nodeType": "Block", "src": "8303:150:7", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1812, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1807, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1802, "src": "8317:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1810, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8336:1:7", "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": 1809, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8328:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1808, "name": "address", "nodeType": "ElementaryTypeName", "src": "8328:7:7", "typeDescriptions": {}}}, "id": 1811, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8328:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "8317:21:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1821, "nodeType": "IfStatement", "src": "8313:89:7", "trueBody": {"id": 1820, "nodeType": "Block", "src": "8340:62:7", "statements": [{"errorCall": {"arguments": [{"arguments": [{"hexValue": "30", "id": 1816, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8388:1:7", "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": 1815, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8380:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1814, "name": "address", "nodeType": "ElementaryTypeName", "src": "8380:7:7", "typeDescriptions": {}}}, "id": 1817, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8380:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 1813, "name": "ERC20InvalidSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3544, "src": "8361:18:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", "typeString": "function (address) pure"}}, "id": 1818, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8361:30:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1819, "nodeType": "RevertStatement", "src": "8354:37:7"}]}}, {"expression": {"arguments": [{"id": 1823, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1802, "src": "8419:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"hexValue": "30", "id": 1826, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8436:1:7", "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": 1825, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8428:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1824, "name": "address", "nodeType": "ElementaryTypeName", "src": "8428:7:7", "typeDescriptions": {}}}, "id": 1827, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8428:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1828, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1804, "src": "8440:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1822, "name": "_update", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1766, "src": "8411:7:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1829, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8411:35:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1830, "nodeType": "ExpressionStatement", "src": "8411:35:7"}]}, "documentation": {"id": 1800, "nodeType": "StructuredDocumentation", "src": "7935:307:7", "text": " @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n Relies on the `_update` mechanism.\n Emits a {Transfer} event with `to` set to the zero address.\n NOTE: This function is not virtual, {_update} should be overridden instead"}, "id": 1832, "implemented": true, "kind": "function", "modifiers": [], "name": "_burn", "nameLocation": "8256:5:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1805, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1802, "mutability": "mutable", "name": "account", "nameLocation": "8270:7:7", "nodeType": "VariableDeclaration", "scope": 1832, "src": "8262:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1801, "name": "address", "nodeType": "ElementaryTypeName", "src": "8262:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1804, "mutability": "mutable", "name": "value", "nameLocation": "8287:5:7", "nodeType": "VariableDeclaration", "scope": 1832, "src": "8279:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1803, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8279:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "8261:32:7"}, "returnParameters": {"id": 1806, "nodeType": "ParameterList", "parameters": [], "src": "8303:0:7"}, "scope": 1959, "src": "8247:206:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 1849, "nodeType": "Block", "src": "9063:54:7", "statements": [{"expression": {"arguments": [{"id": 1843, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1835, "src": "9082:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1844, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1837, "src": "9089:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1845, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1839, "src": "9098:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "74727565", "id": 1846, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "9105:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 1842, "name": "_approve", "nodeType": "Identifier", "overloadedDeclarations": [1850, 1910], "referencedDeclaration": 1910, "src": "9073:8:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bool_$returns$__$", "typeString": "function (address,address,uint256,bool)"}}, "id": 1847, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9073:37:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1848, "nodeType": "ExpressionStatement", "src": "9073:37:7"}]}, "documentation": {"id": 1833, "nodeType": "StructuredDocumentation", "src": "8459:525:7", "text": " @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n This internal function is equivalent to `approve`, and can be used to\n e.g. set automatic allowances for certain subsystems, etc.\n Emits an {Approval} event.\n Requirements:\n - `owner` cannot be the zero address.\n - `spender` cannot be the zero address.\n Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument."}, "id": 1850, "implemented": true, "kind": "function", "modifiers": [], "name": "_approve", "nameLocation": "8998:8:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1840, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1835, "mutability": "mutable", "name": "owner", "nameLocation": "9015:5:7", "nodeType": "VariableDeclaration", "scope": 1850, "src": "9007:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1834, "name": "address", "nodeType": "ElementaryTypeName", "src": "9007:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1837, "mutability": "mutable", "name": "spender", "nameLocation": "9030:7:7", "nodeType": "VariableDeclaration", "scope": 1850, "src": "9022:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1836, "name": "address", "nodeType": "ElementaryTypeName", "src": "9022:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1839, "mutability": "mutable", "name": "value", "nameLocation": "9047:5:7", "nodeType": "VariableDeclaration", "scope": 1850, "src": "9039:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1838, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9039:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "9006:47:7"}, "returnParameters": {"id": 1841, "nodeType": "ParameterList", "parameters": [], "src": "9063:0:7"}, "scope": 1959, "src": "8989:128:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 1909, "nodeType": "Block", "src": "10047:334:7", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1867, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1862, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1853, "src": "10061:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1865, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10078:1:7", "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": 1864, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10070:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1863, "name": "address", "nodeType": "ElementaryTypeName", "src": "10070:7:7", "typeDescriptions": {}}}, "id": 1866, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10070:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "10061:19:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1876, "nodeType": "IfStatement", "src": "10057:89:7", "trueBody": {"id": 1875, "nodeType": "Block", "src": "10082:64:7", "statements": [{"errorCall": {"arguments": [{"arguments": [{"hexValue": "30", "id": 1871, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10132:1:7", "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": 1870, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10124:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1869, "name": "address", "nodeType": "ElementaryTypeName", "src": "10124:7:7", "typeDescriptions": {}}}, "id": 1872, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10124:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 1868, "name": "ERC20InvalidApprover", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3563, "src": "10103:20:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", "typeString": "function (address) pure"}}, "id": 1873, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10103:32:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1874, "nodeType": "RevertStatement", "src": "10096:39:7"}]}}, {"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1882, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1877, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1855, "src": "10159:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1880, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10178:1:7", "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": 1879, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10170:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1878, "name": "address", "nodeType": "ElementaryTypeName", "src": "10170:7:7", "typeDescriptions": {}}}, "id": 1881, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10170:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "10159:21:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1891, "nodeType": "IfStatement", "src": "10155:90:7", "trueBody": {"id": 1890, "nodeType": "Block", "src": "10182:63:7", "statements": [{"errorCall": {"arguments": [{"arguments": [{"hexValue": "30", "id": 1886, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10231:1:7", "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": 1885, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10223:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1884, "name": "address", "nodeType": "ElementaryTypeName", "src": "10223:7:7", "typeDescriptions": {}}}, "id": 1887, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10223:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 1883, "name": "ERC20InvalidSpender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3568, "src": "10203:19:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", "typeString": "function (address) pure"}}, "id": 1888, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10203:31:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1889, "nodeType": "RevertStatement", "src": "10196:38:7"}]}}, {"expression": {"id": 1898, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"baseExpression": {"baseExpression": {"id": 1892, "name": "_allowances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1473, "src": "10254:11:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))"}}, "id": 1895, "indexExpression": {"id": 1893, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1853, "src": "10266:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "10254:18:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}}, "id": 1896, "indexExpression": {"id": 1894, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1855, "src": "10273:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "10254:27:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 1897, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1857, "src": "10284:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "10254:35:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 1899, "nodeType": "ExpressionStatement", "src": "10254:35:7"}, {"condition": {"id": 1900, "name": "emitEvent", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1859, "src": "10303:9:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1908, "nodeType": "IfStatement", "src": "10299:76:7", "trueBody": {"id": 1907, "nodeType": "Block", "src": "10314:61:7", "statements": [{"eventCall": {"arguments": [{"id": 1902, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1853, "src": "10342:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1903, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1855, "src": "10349:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1904, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1857, "src": "10358:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1901, "name": "Approval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3685, "src": "10333:8:7", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1905, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10333:31:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1906, "nodeType": "EmitStatement", "src": "10328:36:7"}]}}]}, "documentation": {"id": 1851, "nodeType": "StructuredDocumentation", "src": "9123:821:7", "text": " @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n `Approval` event during `transferFrom` operations.\n Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n true using the following override:\n ```\n function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n super._approve(owner, spender, value, true);\n }\n ```\n Requirements are the same as {_approve}."}, "id": 1910, "implemented": true, "kind": "function", "modifiers": [], "name": "_approve", "nameLocation": "9958:8:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1860, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1853, "mutability": "mutable", "name": "owner", "nameLocation": "9975:5:7", "nodeType": "VariableDeclaration", "scope": 1910, "src": "9967:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1852, "name": "address", "nodeType": "ElementaryTypeName", "src": "9967:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1855, "mutability": "mutable", "name": "spender", "nameLocation": "9990:7:7", "nodeType": "VariableDeclaration", "scope": 1910, "src": "9982:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1854, "name": "address", "nodeType": "ElementaryTypeName", "src": "9982:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1857, "mutability": "mutable", "name": "value", "nameLocation": "10007:5:7", "nodeType": "VariableDeclaration", "scope": 1910, "src": "9999:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1856, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9999:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 1859, "mutability": "mutable", "name": "emitEvent", "nameLocation": "10019:9:7", "nodeType": "VariableDeclaration", "scope": 1910, "src": "10014:14:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1858, "name": "bool", "nodeType": "ElementaryTypeName", "src": "10014:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "9966:63:7"}, "returnParameters": {"id": 1861, "nodeType": "ParameterList", "parameters": [], "src": "10047:0:7"}, "scope": 1959, "src": "9949:432:7", "stateMutability": "nonpayable", "virtual": true, "visibility": "internal"}, {"body": {"id": 1957, "nodeType": "Block", "src": "10752:388:7", "statements": [{"assignments": [1921], "declarations": [{"constant": false, "id": 1921, "mutability": "mutable", "name": "currentAllowance", "nameLocation": "10770:16:7", "nodeType": "VariableDeclaration", "scope": 1957, "src": "10762:24:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1920, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10762:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 1926, "initialValue": {"arguments": [{"id": 1923, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1913, "src": "10799:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1924, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1915, "src": "10806:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "id": 1922, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1586, "src": "10789:9:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view returns (uint256)"}}, "id": 1925, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10789:25:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "10762:52:7"}, {"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1933, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1927, "name": "currentAllowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1921, "src": "10828:16:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"expression": {"arguments": [{"id": 1930, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10853:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}, "typeName": {"id": 1929, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10853:7:7", "typeDescriptions": {}}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}], "id": 1928, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "10848:4:7", "typeDescriptions": {"typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure"}}, "id": 1931, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10848:13:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_magic_meta_type_t_uint256", "typeString": "type(uint256)"}}, "id": 1932, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "10862:3:7", "memberName": "max", "nodeType": "MemberAccess", "src": "10848:17:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "10828:37:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1956, "nodeType": "IfStatement", "src": "10824:310:7", "trueBody": {"id": 1955, "nodeType": "Block", "src": "10867:267:7", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1936, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1934, "name": "currentAllowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1921, "src": "10885:16:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 1935, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1917, "src": "10904:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "10885:24:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1944, "nodeType": "IfStatement", "src": "10881:130:7", "trueBody": {"id": 1943, "nodeType": "Block", "src": "10911:100:7", "statements": [{"errorCall": {"arguments": [{"id": 1938, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1915, "src": "10963:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1939, "name": "currentAllowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1921, "src": "10972:16:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 1940, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1917, "src": "10990:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1937, "name": "ERC20InsufficientAllowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3558, "src": "10936:26:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,uint256,uint256) pure"}}, "id": 1941, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10936:60:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1942, "nodeType": "RevertStatement", "src": "10929:67:7"}]}}, {"id": 1954, "nodeType": "UncheckedBlock", "src": "11024:100:7", "statements": [{"expression": {"arguments": [{"id": 1946, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1913, "src": "11061:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1947, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1915, "src": "11068:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1950, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1948, "name": "currentAllowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1921, "src": "11077:16:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 1949, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1917, "src": "11096:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "11077:24:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "66616c7365", "id": 1951, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "11103:5:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 1945, "name": "_approve", "nodeType": "Identifier", "overloadedDeclarations": [1850, 1910], "referencedDeclaration": 1910, "src": "11052:8:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bool_$returns$__$", "typeString": "function (address,address,uint256,bool)"}}, "id": 1952, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11052:57:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1953, "nodeType": "ExpressionStatement", "src": "11052:57:7"}]}]}}]}, "documentation": {"id": 1911, "nodeType": "StructuredDocumentation", "src": "10387:271:7", "text": " @dev Updates `owner` s allowance for `spender` based on spent `value`.\n Does not update the allowance value in case of infinite allowance.\n Revert if not enough allowance is available.\n Does not emit an {Approval} event."}, "id": 1958, "implemented": true, "kind": "function", "modifiers": [], "name": "_spendAllowance", "nameLocation": "10672:15:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1918, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1913, "mutability": "mutable", "name": "owner", "nameLocation": "10696:5:7", "nodeType": "VariableDeclaration", "scope": 1958, "src": "10688:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1912, "name": "address", "nodeType": "ElementaryTypeName", "src": "10688:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1915, "mutability": "mutable", "name": "spender", "nameLocation": "10711:7:7", "nodeType": "VariableDeclaration", "scope": 1958, "src": "10703:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1914, "name": "address", "nodeType": "ElementaryTypeName", "src": "10703:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1917, "mutability": "mutable", "name": "value", "nameLocation": "10728:5:7", "nodeType": "VariableDeclaration", "scope": 1958, "src": "10720:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1916, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10720:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "10687:47:7"}, "returnParameters": {"id": 1919, "nodeType": "ParameterList", "parameters": [], "src": "10752:0:7"}, "scope": 1959, "src": "10663:477:7", "stateMutability": "nonpayable", "virtual": true, "visibility": "internal"}], "scope": 1960, "src": "1401:9741:7", "usedErrors": [3539, 3544, 3549, 3558, 3563, 3568], "usedEvents": [3676, 3685]}], "src": "105:11038:7"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol": {"AST": {"absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol", "exportedSymbols": {"IERC20": [3742]}, "id": 3743, "license": "MIT", "nodeType": "SourceUnit", "nodes": [{"id": 3666, "literals": ["solidity", "^", "0.8", ".20"], "nodeType": "PragmaDirective", "src": "106:24:8"}, {"abstract": false, "baseContracts": [], "canonicalName": "IERC20", "contractDependencies": [], "contractKind": "interface", "documentation": {"id": 3667, "nodeType": "StructuredDocumentation", "src": "132:70:8", "text": " @dev Interface of the ERC20 standard as defined in the EIP."}, "fullyImplemented": false, "id": 3742, "linearizedBaseContracts": [3742], "name": "IERC20", "nameLocation": "213:6:8", "nodeType": "ContractDefinition", "nodes": [{"anonymous": false, "documentation": {"id": 3668, "nodeType": "StructuredDocumentation", "src": "226:158:8", "text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero."}, "eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "id": 3676, "name": "Transfer", "nameLocation": "395:8:8", "nodeType": "EventDefinition", "parameters": {"id": 3675, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3670, "indexed": true, "mutability": "mutable", "name": "from", "nameLocation": "420:4:8", "nodeType": "VariableDeclaration", "scope": 3676, "src": "404:20:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3669, "name": "address", "nodeType": "ElementaryTypeName", "src": "404:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3672, "indexed": true, "mutability": "mutable", "name": "to", "nameLocation": "442:2:8", "nodeType": "VariableDeclaration", "scope": 3676, "src": "426:18:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3671, "name": "address", "nodeType": "ElementaryTypeName", "src": "426:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3674, "indexed": false, "mutability": "mutable", "name": "value", "nameLocation": "454:5:8", "nodeType": "VariableDeclaration", "scope": 3676, "src": "446:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3673, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "446:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "403:57:8"}, "src": "389:72:8"}, {"anonymous": false, "documentation": {"id": 3677, "nodeType": "StructuredDocumentation", "src": "467:148:8", "text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance."}, "eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", "id": 3685, "name": "Approval", "nameLocation": "626:8:8", "nodeType": "EventDefinition", "parameters": {"id": 3684, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3679, "indexed": true, "mutability": "mutable", "name": "owner", "nameLocation": "651:5:8", "nodeType": "VariableDeclaration", "scope": 3685, "src": "635:21:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3678, "name": "address", "nodeType": "ElementaryTypeName", "src": "635:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3681, "indexed": true, "mutability": "mutable", "name": "spender", "nameLocation": "674:7:8", "nodeType": "VariableDeclaration", "scope": 3685, "src": "658:23:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3680, "name": "address", "nodeType": "ElementaryTypeName", "src": "658:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3683, "indexed": false, "mutability": "mutable", "name": "value", "nameLocation": "691:5:8", "nodeType": "VariableDeclaration", "scope": 3685, "src": "683:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3682, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "683:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "634:63:8"}, "src": "620:78:8"}, {"documentation": {"id": 3686, "nodeType": "StructuredDocumentation", "src": "704:65:8", "text": " @dev Returns the value of tokens in existence."}, "functionSelector": "18160ddd", "id": 3691, "implemented": false, "kind": "function", "modifiers": [], "name": "totalSupply", "nameLocation": "783:11:8", "nodeType": "FunctionDefinition", "parameters": {"id": 3687, "nodeType": "ParameterList", "parameters": [], "src": "794:2:8"}, "returnParameters": {"id": 3690, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3689, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3691, "src": "820:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3688, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "820:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "819:9:8"}, "scope": 3742, "src": "774:55:8", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 3692, "nodeType": "StructuredDocumentation", "src": "835:71:8", "text": " @dev Returns the value of tokens owned by `account`."}, "functionSelector": "70a08231", "id": 3699, "implemented": false, "kind": "function", "modifiers": [], "name": "balanceOf", "nameLocation": "920:9:8", "nodeType": "FunctionDefinition", "parameters": {"id": 3695, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3694, "mutability": "mutable", "name": "account", "nameLocation": "938:7:8", "nodeType": "VariableDeclaration", "scope": 3699, "src": "930:15:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3693, "name": "address", "nodeType": "ElementaryTypeName", "src": "930:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "929:17:8"}, "returnParameters": {"id": 3698, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3697, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3699, "src": "970:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3696, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "970:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "969:9:8"}, "scope": 3742, "src": "911:68:8", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 3700, "nodeType": "StructuredDocumentation", "src": "985:213:8", "text": " @dev Moves a `value` amount of tokens from the caller's account to `to`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."}, "functionSelector": "a9059cbb", "id": 3709, "implemented": false, "kind": "function", "modifiers": [], "name": "transfer", "nameLocation": "1212:8:8", "nodeType": "FunctionDefinition", "parameters": {"id": 3705, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3702, "mutability": "mutable", "name": "to", "nameLocation": "1229:2:8", "nodeType": "VariableDeclaration", "scope": 3709, "src": "1221:10:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3701, "name": "address", "nodeType": "ElementaryTypeName", "src": "1221:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3704, "mutability": "mutable", "name": "value", "nameLocation": "1241:5:8", "nodeType": "VariableDeclaration", "scope": 3709, "src": "1233:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3703, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1233:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1220:27:8"}, "returnParameters": {"id": 3708, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3707, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3709, "src": "1266:4:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 3706, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1266:4:8", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "1265:6:8"}, "scope": 3742, "src": "1203:69:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"documentation": {"id": 3710, "nodeType": "StructuredDocumentation", "src": "1278:264:8", "text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called."}, "functionSelector": "dd62ed3e", "id": 3719, "implemented": false, "kind": "function", "modifiers": [], "name": "allowance", "nameLocation": "1556:9:8", "nodeType": "FunctionDefinition", "parameters": {"id": 3715, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3712, "mutability": "mutable", "name": "owner", "nameLocation": "1574:5:8", "nodeType": "VariableDeclaration", "scope": 3719, "src": "1566:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3711, "name": "address", "nodeType": "ElementaryTypeName", "src": "1566:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3714, "mutability": "mutable", "name": "spender", "nameLocation": "1589:7:8", "nodeType": "VariableDeclaration", "scope": 3719, "src": "1581:15:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3713, "name": "address", "nodeType": "ElementaryTypeName", "src": "1581:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "1565:32:8"}, "returnParameters": {"id": 3718, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3717, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3719, "src": "1621:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3716, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1621:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1620:9:8"}, "scope": 3742, "src": "1547:83:8", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 3720, "nodeType": "StructuredDocumentation", "src": "1636:667:8", "text": " @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\n IMPORTANT: Beware that changing an allowance with this method brings the risk\n that someone may use both the old and the new allowance by unfortunate\n transaction ordering. One possible solution to mitigate this race\n condition is to first reduce the spender's allowance to 0 and set the\n desired value afterwards:\n https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n Emits an {Approval} event."}, "functionSelector": "095ea7b3", "id": 3729, "implemented": false, "kind": "function", "modifiers": [], "name": "approve", "nameLocation": "2317:7:8", "nodeType": "FunctionDefinition", "parameters": {"id": 3725, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3722, "mutability": "mutable", "name": "spender", "nameLocation": "2333:7:8", "nodeType": "VariableDeclaration", "scope": 3729, "src": "2325:15:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3721, "name": "address", "nodeType": "ElementaryTypeName", "src": "2325:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3724, "mutability": "mutable", "name": "value", "nameLocation": "2350:5:8", "nodeType": "VariableDeclaration", "scope": 3729, "src": "2342:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3723, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2342:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "2324:32:8"}, "returnParameters": {"id": 3728, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3727, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3729, "src": "2375:4:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 3726, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2375:4:8", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "2374:6:8"}, "scope": 3742, "src": "2308:73:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"documentation": {"id": 3730, "nodeType": "StructuredDocumentation", "src": "2387:297:8", "text": " @dev Moves a `value` amount of tokens from `from` to `to` using the\n allowance mechanism. `value` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."}, "functionSelector": "23b872dd", "id": 3741, "implemented": false, "kind": "function", "modifiers": [], "name": "transferFrom", "nameLocation": "2698:12:8", "nodeType": "FunctionDefinition", "parameters": {"id": 3737, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3732, "mutability": "mutable", "name": "from", "nameLocation": "2719:4:8", "nodeType": "VariableDeclaration", "scope": 3741, "src": "2711:12:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3731, "name": "address", "nodeType": "ElementaryTypeName", "src": "2711:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3734, "mutability": "mutable", "name": "to", "nameLocation": "2733:2:8", "nodeType": "VariableDeclaration", "scope": 3741, "src": "2725:10:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3733, "name": "address", "nodeType": "ElementaryTypeName", "src": "2725:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3736, "mutability": "mutable", "name": "value", "nameLocation": "2745:5:8", "nodeType": "VariableDeclaration", "scope": 3741, "src": "2737:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3735, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2737:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "2710:41:8"}, "returnParameters": {"id": 3740, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3739, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3741, "src": "2770:4:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 3738, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2770:4:8", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "2769:6:8"}, "scope": 3742, "src": "2689:87:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}], "scope": 3743, "src": "203:2575:8", "usedErrors": [], "usedEvents": [3676, 3685]}], "src": "106:2673:8"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": {"AST": {"absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol", "exportedSymbols": {"IERC20": [3742], "IERC20Metadata": [3768]}, "id": 3769, "license": "MIT", "nodeType": "SourceUnit", "nodes": [{"id": 3744, "literals": ["solidity", "^", "0.8", ".20"], "nodeType": "PragmaDirective", "src": "125:24:9"}, {"absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol", "file": "../IERC20.sol", "id": 3746, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 3769, "sourceUnit": 3743, "src": "151:37:9", "symbolAliases": [{"foreign": {"id": 3745, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3742, "src": "159:6:9", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"abstract": false, "baseContracts": [{"baseName": {"id": 3748, "name": "IERC20", "nameLocations": ["305:6:9"], "nodeType": "IdentifierPath", "referencedDeclaration": 3742, "src": "305:6:9"}, "id": 3749, "nodeType": "InheritanceSpecifier", "src": "305:6:9"}], "canonicalName": "IERC20Metadata", "contractDependencies": [], "contractKind": "interface", "documentation": {"id": 3747, "nodeType": "StructuredDocumentation", "src": "190:86:9", "text": " @dev Interface for the optional metadata functions from the ERC20 standard."}, "fullyImplemented": false, "id": 3768, "linearizedBaseContracts": [3768, 3742], "name": "IERC20Metadata", "nameLocation": "287:14:9", "nodeType": "ContractDefinition", "nodes": [{"documentation": {"id": 3750, "nodeType": "StructuredDocumentation", "src": "318:54:9", "text": " @dev Returns the name of the token."}, "functionSelector": "06fdde03", "id": 3755, "implemented": false, "kind": "function", "modifiers": [], "name": "name", "nameLocation": "386:4:9", "nodeType": "FunctionDefinition", "parameters": {"id": 3751, "nodeType": "ParameterList", "parameters": [], "src": "390:2:9"}, "returnParameters": {"id": 3754, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3753, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3755, "src": "416:13:9", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3752, "name": "string", "nodeType": "ElementaryTypeName", "src": "416:6:9", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "415:15:9"}, "scope": 3768, "src": "377:54:9", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 3756, "nodeType": "StructuredDocumentation", "src": "437:56:9", "text": " @dev Returns the symbol of the token."}, "functionSelector": "95d89b41", "id": 3761, "implemented": false, "kind": "function", "modifiers": [], "name": "symbol", "nameLocation": "507:6:9", "nodeType": "FunctionDefinition", "parameters": {"id": 3757, "nodeType": "ParameterList", "parameters": [], "src": "513:2:9"}, "returnParameters": {"id": 3760, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3759, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3761, "src": "539:13:9", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3758, "name": "string", "nodeType": "ElementaryTypeName", "src": "539:6:9", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "538:15:9"}, "scope": 3768, "src": "498:56:9", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 3762, "nodeType": "StructuredDocumentation", "src": "560:65:9", "text": " @dev Returns the decimals places of the token."}, "functionSelector": "313ce567", "id": 3767, "implemented": false, "kind": "function", "modifiers": [], "name": "decimals", "nameLocation": "639:8:9", "nodeType": "FunctionDefinition", "parameters": {"id": 3763, "nodeType": "ParameterList", "parameters": [], "src": "647:2:9"}, "returnParameters": {"id": 3766, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3765, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3767, "src": "673:5:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "typeName": {"id": 3764, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "673:5:9", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "visibility": "internal"}], "src": "672:7:9"}, "scope": 3768, "src": "630:50:9", "stateMutability": "view", "virtual": false, "visibility": "external"}], "scope": 3769, "src": "277:405:9", "usedErrors": [], "usedEvents": [3676, 3685]}], "src": "125:558:9"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/utils/Context.sol": {"AST": {"absolutePath": "node_modules/@openzeppelin/contracts/utils/Context.sol", "exportedSymbols": {"Context": [3798]}, "id": 3799, "license": "MIT", "nodeType": "SourceUnit", "nodes": [{"id": 3770, "literals": ["solidity", "^", "0.8", ".20"], "nodeType": "PragmaDirective", "src": "101:24:10"}, {"abstract": true, "baseContracts": [], "canonicalName": "Context", "contractDependencies": [], "contractKind": "contract", "documentation": {"id": 3771, "nodeType": "StructuredDocumentation", "src": "127:496:10", "text": " @dev Provides information about the current execution context, including the\n sender of the transaction and its data. While these are generally available\n via msg.sender and msg.data, they should not be accessed in such a direct\n manner, since when dealing with meta-transactions the account sending and\n paying for execution may not be the actual sender (as far as an application\n is concerned).\n This contract is only required for intermediate, library-like contracts."}, "fullyImplemented": true, "id": 3798, "linearizedBaseContracts": [3798], "name": "Context", "nameLocation": "642:7:10", "nodeType": "ContractDefinition", "nodes": [{"body": {"id": 3779, "nodeType": "Block", "src": "718:34:10", "statements": [{"expression": {"expression": {"id": 3776, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "735:3:10", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 3777, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "739:6:10", "memberName": "sender", "nodeType": "MemberAccess", "src": "735:10:10", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "functionReturnParameters": 3775, "id": 3778, "nodeType": "Return", "src": "728:17:10"}]}, "id": 3780, "implemented": true, "kind": "function", "modifiers": [], "name": "_msgSender", "nameLocation": "665:10:10", "nodeType": "FunctionDefinition", "parameters": {"id": 3772, "nodeType": "ParameterList", "parameters": [], "src": "675:2:10"}, "returnParameters": {"id": 3775, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3774, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3780, "src": "709:7:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3773, "name": "address", "nodeType": "ElementaryTypeName", "src": "709:7:10", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "708:9:10"}, "scope": 3798, "src": "656:96:10", "stateMutability": "view", "virtual": true, "visibility": "internal"}, {"body": {"id": 3788, "nodeType": "Block", "src": "825:32:10", "statements": [{"expression": {"expression": {"id": 3785, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "842:3:10", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 3786, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "846:4:10", "memberName": "data", "nodeType": "MemberAccess", "src": "842:8:10", "typeDescriptions": {"typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata"}}, "functionReturnParameters": 3784, "id": 3787, "nodeType": "Return", "src": "835:15:10"}]}, "id": 3789, "implemented": true, "kind": "function", "modifiers": [], "name": "_msgData", "nameLocation": "767:8:10", "nodeType": "FunctionDefinition", "parameters": {"id": 3781, "nodeType": "ParameterList", "parameters": [], "src": "775:2:10"}, "returnParameters": {"id": 3784, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3783, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3789, "src": "809:14:10", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": {"typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes"}, "typeName": {"id": 3782, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "809:5:10", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "src": "808:16:10"}, "scope": 3798, "src": "758:99:10", "stateMutability": "view", "virtual": true, "visibility": "internal"}, {"body": {"id": 3796, "nodeType": "Block", "src": "935:25:10", "statements": [{"expression": {"hexValue": "30", "id": 3794, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "952:1:10", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "functionReturnParameters": 3793, "id": 3795, "nodeType": "Return", "src": "945:8:10"}]}, "id": 3797, "implemented": true, "kind": "function", "modifiers": [], "name": "_contextSuffixLength", "nameLocation": "872:20:10", "nodeType": "FunctionDefinition", "parameters": {"id": 3790, "nodeType": "ParameterList", "parameters": [], "src": "892:2:10"}, "returnParameters": {"id": 3793, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3792, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3797, "src": "926:7:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3791, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "926:7:10", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "925:9:10"}, "scope": 3798, "src": "863:97:10", "stateMutability": "view", "virtual": true, "visibility": "internal"}], "scope": 3799, "src": "624:338:10", "usedErrors": [], "usedEvents": []}], "src": "101:862:10"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/src/contracts/BToken.sol": {"AST": {"absolutePath": "src/contracts/BToken.sol", "exportedSymbols": {"BToken": [1345], "ERC20": [1959]}, "id": 1346, "license": "GPL-3.0-or-later", "nodeType": "SourceUnit", "nodes": [{"id": 1226, "literals": ["solidity", "0.8", ".23"], "nodeType": "PragmaDirective", "src": "45:23:11"}, {"absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol", "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", "id": 1228, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1346, "sourceUnit": 1960, "src": "70:68:11", "symbolAliases": [{"foreign": {"id": 1227, "name": "ERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1959, "src": "78:5:11", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"abstract": false, "baseContracts": [{"baseName": {"id": 1230, "name": "ERC20", "nameLocations": ["261:5:11"], "nodeType": "IdentifierPath", "referencedDeclaration": 1959, "src": "261:5:11"}, "id": 1231, "nodeType": "InheritanceSpecifier", "src": "261:5:11"}], "canonicalName": "BToken", "contractDependencies": [], "contractKind": "contract", "documentation": {"id": 1229, "nodeType": "StructuredDocumentation", "src": "140:101:11", "text": " @title BToken\n @notice Balancer Pool Token base contract, providing ERC20 functionality."}, "fullyImplemented": true, "id": 1345, "linearizedBaseContracts": [1345, 1959, 3569, 3768, 3742, 3798], "name": "BToken", "nameLocation": "251:6:11", "nodeType": "ContractDefinition", "nodes": [{"body": {"id": 1238, "nodeType": "Block", "src": "321:2:11", "statements": []}, "id": 1239, "implemented": true, "kind": "constructor", "modifiers": [{"arguments": [{"hexValue": "42616c616e63657220506f6f6c20546f6b656e", "id": 1234, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "291:21:11", "typeDescriptions": {"typeIdentifier": "t_stringliteral_86726d210cafef5a97cd8551cc3cd59ead4ad6b4a08f1b0e2ca14d5024839298", "typeString": "literal_string \"Balancer Pool Token\""}, "value": "Balancer Pool Token"}, {"hexValue": "425054", "id": 1235, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "314:5:11", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2c4469c3871c2223d094ce996c22463935f1f3c0f4a0177add993c1ee46e9606", "typeString": "literal_string \"BPT\""}, "value": "BPT"}], "id": 1236, "kind": "baseConstructorSpecifier", "modifierName": {"id": 1233, "name": "ERC20", "nameLocations": ["285:5:11"], "nodeType": "IdentifierPath", "referencedDeclaration": 1959, "src": "285:5:11"}, "nodeType": "ModifierInvocation", "src": "285:35:11"}], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": {"id": 1232, "nodeType": "ParameterList", "parameters": [], "src": "282:2:11"}, "returnParameters": {"id": 1237, "nodeType": "ParameterList", "parameters": [], "src": "321:0:11"}, "scope": 1345, "src": "271:52:11", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 1264, "nodeType": "Block", "src": "670:98:11", "statements": [{"expression": {"arguments": [{"expression": {"id": 1250, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "685:3:11", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1251, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "689:6:11", "memberName": "sender", "nodeType": "MemberAccess", "src": "685:10:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1252, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1242, "src": "697:7:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1259, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"expression": {"id": 1254, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "716:3:11", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1255, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "720:6:11", "memberName": "sender", "nodeType": "MemberAccess", "src": "716:10:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1256, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1242, "src": "728:7:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "id": 1253, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1586, "src": "706:9:11", "typeDescriptions": {"typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view returns (uint256)"}}, "id": 1257, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "706:30:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 1258, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1244, "src": "739:6:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "706:39:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1249, "name": "_approve", "nodeType": "Identifier", "overloadedDeclarations": [1850, 1910], "referencedDeclaration": 1850, "src": "676:8:11", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1260, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "676:70:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1261, "nodeType": "ExpressionStatement", "src": "676:70:11"}, {"expression": {"hexValue": "74727565", "id": 1262, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "759:4:11", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "functionReturnParameters": 1248, "id": 1263, "nodeType": "Return", "src": "752:11:11"}]}, "documentation": {"id": 1240, "nodeType": "StructuredDocumentation", "src": "327:249:11", "text": " @notice Increase the allowance of the spender.\n @param spender The address which will spend the funds.\n @param amount The amount of tokens to increase the allowance by.\n @return success True if the operation is successful."}, "functionSelector": "d73dd623", "id": 1265, "implemented": true, "kind": "function", "modifiers": [], "name": "increaseApproval", "nameLocation": "588:16:11", "nodeType": "FunctionDefinition", "parameters": {"id": 1245, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1242, "mutability": "mutable", "name": "spender", "nameLocation": "613:7:11", "nodeType": "VariableDeclaration", "scope": 1265, "src": "605:15:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1241, "name": "address", "nodeType": "ElementaryTypeName", "src": "605:7:11", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1244, "mutability": "mutable", "name": "amount", "nameLocation": "630:6:11", "nodeType": "VariableDeclaration", "scope": 1265, "src": "622:14:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1243, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "622:7:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "604:33:11"}, "returnParameters": {"id": 1248, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1247, "mutability": "mutable", "name": "success", "nameLocation": "661:7:11", "nodeType": "VariableDeclaration", "scope": 1265, "src": "656:12:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1246, "name": "bool", "nodeType": "ElementaryTypeName", "src": "656:4:11", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "655:14:11"}, "scope": 1345, "src": "579:189:11", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"body": {"id": 1307, "nodeType": "Block", "src": "1115:221:11", "statements": [{"assignments": [1276], "declarations": [{"constant": false, "id": 1276, "mutability": "mutable", "name": "oldValue", "nameLocation": "1129:8:11", "nodeType": "VariableDeclaration", "scope": 1307, "src": "1121:16:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1275, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1121:7:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 1282, "initialValue": {"arguments": [{"expression": {"id": 1278, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1150:3:11", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1279, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1154:6:11", "memberName": "sender", "nodeType": "MemberAccess", "src": "1150:10:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1280, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1268, "src": "1162:7:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "id": 1277, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1586, "src": "1140:9:11", "typeDescriptions": {"typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view returns (uint256)"}}, "id": 1281, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1140:30:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "1121:49:11"}, {"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1285, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1283, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1270, "src": "1180:6:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 1284, "name": "oldValue", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1276, "src": "1189:8:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "1180:17:11", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseBody": {"id": 1303, "nodeType": "Block", "src": "1252:63:11", "statements": [{"expression": {"arguments": [{"expression": {"id": 1295, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1269:3:11", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1296, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1273:6:11", "memberName": "sender", "nodeType": "MemberAccess", "src": "1269:10:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1297, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1268, "src": "1281:7:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1300, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1298, "name": "oldValue", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1276, "src": "1290:8:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 1299, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1270, "src": "1301:6:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "1290:17:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1294, "name": "_approve", "nodeType": "Identifier", "overloadedDeclarations": [1850, 1910], "referencedDeclaration": 1850, "src": "1260:8:11", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1301, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1260:48:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1302, "nodeType": "ExpressionStatement", "src": "1260:48:11"}]}, "id": 1304, "nodeType": "IfStatement", "src": "1176:139:11", "trueBody": {"id": 1293, "nodeType": "Block", "src": "1199:47:11", "statements": [{"expression": {"arguments": [{"expression": {"id": 1287, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1216:3:11", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1288, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1220:6:11", "memberName": "sender", "nodeType": "MemberAccess", "src": "1216:10:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1289, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1268, "src": "1228:7:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"hexValue": "30", "id": 1290, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1237:1:11", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}], "id": 1286, "name": "_approve", "nodeType": "Identifier", "overloadedDeclarations": [1850, 1910], "referencedDeclaration": 1850, "src": "1207:8:11", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1291, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1207:32:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1292, "nodeType": "ExpressionStatement", "src": "1207:32:11"}]}}, {"expression": {"hexValue": "74727565", "id": 1305, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1327:4:11", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "functionReturnParameters": 1274, "id": 1306, "nodeType": "Return", "src": "1320:11:11"}]}, "documentation": {"id": 1266, "nodeType": "StructuredDocumentation", "src": "772:249:11", "text": " @notice Decrease the allowance of the spender.\n @param spender The address which will spend the funds.\n @param amount The amount of tokens to decrease the allowance by.\n @return success True if the operation is successful."}, "functionSelector": "66188463", "id": 1308, "implemented": true, "kind": "function", "modifiers": [], "name": "decreaseApproval", "nameLocation": "1033:16:11", "nodeType": "FunctionDefinition", "parameters": {"id": 1271, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1268, "mutability": "mutable", "name": "spender", "nameLocation": "1058:7:11", "nodeType": "VariableDeclaration", "scope": 1308, "src": "1050:15:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1267, "name": "address", "nodeType": "ElementaryTypeName", "src": "1050:7:11", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1270, "mutability": "mutable", "name": "amount", "nameLocation": "1075:6:11", "nodeType": "VariableDeclaration", "scope": 1308, "src": "1067:14:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1269, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1067:7:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1049:33:11"}, "returnParameters": {"id": 1274, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1273, "mutability": "mutable", "name": "success", "nameLocation": "1106:7:11", "nodeType": "VariableDeclaration", "scope": 1308, "src": "1101:12:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1272, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1101:4:11", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "1100:14:11"}, "scope": 1345, "src": "1024:312:11", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"body": {"id": 1325, "nodeType": "Block", "src": "1593:47:11", "statements": [{"expression": {"arguments": [{"arguments": [{"id": 1319, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "1617:4:11", "typeDescriptions": {"typeIdentifier": "t_contract$_BToken_$1345", "typeString": "contract BToken"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_BToken_$1345", "typeString": "contract BToken"}], "id": 1318, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1609:7:11", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1317, "name": "address", "nodeType": "ElementaryTypeName", "src": "1609:7:11", "typeDescriptions": {}}}, "id": 1320, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1609:13:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1321, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1311, "src": "1624:2:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1322, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1313, "src": "1628:6:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1316, "name": "_transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1689, "src": "1599:9:11", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1323, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1599:36:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1324, "nodeType": "ExpressionStatement", "src": "1599:36:11"}]}, "documentation": {"id": 1309, "nodeType": "StructuredDocumentation", "src": "1340:190:11", "text": " @notice Transfer tokens from one this contract to another.\n @param to The address which you want to transfer to.\n @param amount The amount of tokens to be transferred."}, "id": 1326, "implemented": true, "kind": "function", "modifiers": [], "name": "_push", "nameLocation": "1542:5:11", "nodeType": "FunctionDefinition", "parameters": {"id": 1314, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1311, "mutability": "mutable", "name": "to", "nameLocation": "1556:2:11", "nodeType": "VariableDeclaration", "scope": 1326, "src": "1548:10:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1310, "name": "address", "nodeType": "ElementaryTypeName", "src": "1548:7:11", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1313, "mutability": "mutable", "name": "amount", "nameLocation": "1568:6:11", "nodeType": "VariableDeclaration", "scope": 1326, "src": "1560:14:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1312, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1560:7:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1547:28:11"}, "returnParameters": {"id": 1315, "nodeType": "ParameterList", "parameters": [], "src": "1593:0:11"}, "scope": 1345, "src": "1533:107:11", "stateMutability": "nonpayable", "virtual": true, "visibility": "internal"}, {"body": {"id": 1343, "nodeType": "Block", "src": "1903:49:11", "statements": [{"expression": {"arguments": [{"id": 1335, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1329, "src": "1919:4:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 1338, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "1933:4:11", "typeDescriptions": {"typeIdentifier": "t_contract$_BToken_$1345", "typeString": "contract BToken"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_BToken_$1345", "typeString": "contract BToken"}], "id": 1337, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1925:7:11", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1336, "name": "address", "nodeType": "ElementaryTypeName", "src": "1925:7:11", "typeDescriptions": {}}}, "id": 1339, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1925:13:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1340, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1331, "src": "1940:6:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1334, "name": "_transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1689, "src": "1909:9:11", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1341, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1909:38:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1342, "nodeType": "ExpressionStatement", "src": "1909:38:11"}]}, "documentation": {"id": 1327, "nodeType": "StructuredDocumentation", "src": "1644:194:11", "text": " @notice Pull tokens from another address to this contract.\n @param from The address which you want to transfer from.\n @param amount The amount of tokens to be transferred."}, "id": 1344, "implemented": true, "kind": "function", "modifiers": [], "name": "_pull", "nameLocation": "1850:5:11", "nodeType": "FunctionDefinition", "parameters": {"id": 1332, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1329, "mutability": "mutable", "name": "from", "nameLocation": "1864:4:11", "nodeType": "VariableDeclaration", "scope": 1344, "src": "1856:12:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1328, "name": "address", "nodeType": "ElementaryTypeName", "src": "1856:7:11", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1331, "mutability": "mutable", "name": "amount", "nameLocation": "1878:6:11", "nodeType": "VariableDeclaration", "scope": 1344, "src": "1870:14:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1330, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1870:7:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1855:30:11"}, "returnParameters": {"id": 1333, "nodeType": "ParameterList", "parameters": [], "src": "1903:0:11"}, "scope": 1345, "src": "1841:111:11", "stateMutability": "nonpayable", "virtual": true, "visibility": "internal"}], "scope": 1346, "src": "242:1712:11", "usedErrors": [3539, 3544, 3549, 3558, 3563, 3568], "usedEvents": [3676, 3685]}], "src": "45:1910:11"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/test/invariants/fuzz/external/BToken.sol": {"AST": {"absolutePath": "test/invariants/fuzz/external/BToken.sol", "exportedSymbols": {"BToken": [1345], "CryticERC20ExternalBasicProperties": [1131], "CryticERC20ExternalHarness": [37], "CryticTokenMock": [80], "ERC20": [1959], "ITokenMock": [1200], "PropertiesConstants": [1224]}, "id": 81, "nodeType": "SourceUnit", "nodes": [{"id": 1, "literals": ["solidity", "0.8", ".23"], "nodeType": "PragmaDirective", "src": "0:23:12"}, {"absolutePath": "src/contracts/BToken.sol", "file": "contracts/BToken.sol", "id": 2, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 81, "sourceUnit": 1346, "src": "24:30:12", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "node_modules/@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol", "file": "@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol", "id": 4, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 81, "sourceUnit": 1201, "src": "55:91:12", "symbolAliases": [{"foreign": {"id": 3, "name": "ITokenMock", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1200, "src": "63:10:12", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"absolutePath": "node_modules/@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol", "file": "@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol", "id": 6, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 81, "sourceUnit": 1132, "src": "147:139:12", "symbolAliases": [{"foreign": {"id": 5, "name": "CryticERC20ExternalBasicProperties", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1131, "src": "155:34:12", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"absolutePath": "node_modules/@crytic/properties/contracts/util/PropertiesConstants.sol", "file": "@crytic/properties/contracts/util/PropertiesConstants.sol", "id": 8, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 81, "sourceUnit": 1225, "src": "287:94:12", "symbolAliases": [{"foreign": {"id": 7, "name": "PropertiesConstants", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1224, "src": "295:19:12", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"abstract": false, "baseContracts": [{"baseName": {"id": 9, "name": "CryticERC20ExternalBasicProperties", "nameLocations": ["423:34:12"], "nodeType": "IdentifierPath", "referencedDeclaration": 1131, "src": "423:34:12"}, "id": 10, "nodeType": "InheritanceSpecifier", "src": "423:34:12"}], "canonicalName": "CryticERC20ExternalHarness", "contractDependencies": [80], "contractKind": "contract", "fullyImplemented": true, "id": 37, "linearizedBaseContracts": [37, 1131, 1362, 1224, 3325], "name": "CryticERC20ExternalHarness", "nameLocation": "393:26:12", "nodeType": "ContractDefinition", "nodes": [{"body": {"id": 25, "nodeType": "Block", "src": "478:91:12", "statements": [{"expression": {"id": 23, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 13, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "512:5:12", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"arguments": [{"arguments": [], "expression": {"argumentTypes": [], "id": 19, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "539:19:12", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_CryticTokenMock_$80_$", "typeString": "function () returns (contract CryticTokenMock)"}, "typeName": {"id": 18, "nodeType": "UserDefinedTypeName", "pathNode": {"id": 17, "name": "CryticTokenMock", "nameLocations": ["543:15:12"], "nodeType": "IdentifierPath", "referencedDeclaration": 80, "src": "543:15:12"}, "referencedDeclaration": 80, "src": "543:15:12", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticTokenMock_$80", "typeString": "contract CryticTokenMock"}}}, "id": 20, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "539:21:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_CryticTokenMock_$80", "typeString": "contract CryticTokenMock"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticTokenMock_$80", "typeString": "contract CryticTokenMock"}], "id": 16, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "531:7:12", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 15, "name": "address", "nodeType": "ElementaryTypeName", "src": "531:7:12", "typeDescriptions": {}}}, "id": 21, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "531:30:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 14, "name": "ITokenMock", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1200, "src": "520:10:12", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_ITokenMock_$1200_$", "typeString": "type(contract ITokenMock)"}}, "id": 22, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "520:42:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "src": "512:50:12", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 24, "nodeType": "ExpressionStatement", "src": "512:50:12"}]}, "id": 26, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": {"id": 11, "nodeType": "ParameterList", "parameters": [], "src": "475:2:12"}, "returnParameters": {"id": 12, "nodeType": "ParameterList", "parameters": [], "src": "478:0:12"}, "scope": 37, "src": "464:105:12", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 30, "nodeType": "Block", "src": "747:30:12", "statements": []}, "documentation": {"id": 27, "nodeType": "StructuredDocumentation", "src": "573:131:12", "text": "@custom:property-id 8\n @custom:property BToken increaseApproval should increase the approval of the address by the amount"}, "functionSelector": "f16dcaa6", "id": 31, "implemented": true, "kind": "function", "modifiers": [], "name": "fuzz_increaseApproval", "nameLocation": "716:21:12", "nodeType": "FunctionDefinition", "parameters": {"id": 28, "nodeType": "ParameterList", "parameters": [], "src": "737:2:12"}, "returnParameters": {"id": 29, "nodeType": "ParameterList", "parameters": [], "src": "747:0:12"}, "scope": 37, "src": "707:70:12", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 35, "nodeType": "Block", "src": "946:2:12", "statements": []}, "documentation": {"id": 32, "nodeType": "StructuredDocumentation", "src": "780:123:12", "text": "@custom:property-id 9\n @custom:property BToken decreaseApproval should decrease the approval to max(old-amount, 0)"}, "functionSelector": "aa2c209e", "id": 36, "implemented": true, "kind": "function", "modifiers": [], "name": "fuzz_decreaseApproval", "nameLocation": "915:21:12", "nodeType": "FunctionDefinition", "parameters": {"id": 33, "nodeType": "ParameterList", "parameters": [], "src": "936:2:12"}, "returnParameters": {"id": 34, "nodeType": "ParameterList", "parameters": [], "src": "946:0:12"}, "scope": 37, "src": "906:42:12", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 81, "src": "384:566:12", "usedErrors": [], "usedEvents": [1967, 1973, 1977, 1981, 1985, 1989, 1993, 1997, 2001, 2005]}, {"abstract": false, "baseContracts": [{"baseName": {"id": 38, "name": "BToken", "nameLocations": ["980:6:12"], "nodeType": "IdentifierPath", "referencedDeclaration": 1345, "src": "980:6:12"}, "id": 39, "nodeType": "InheritanceSpecifier", "src": "980:6:12"}, {"baseName": {"id": 40, "name": "PropertiesConstants", "nameLocations": ["988:19:12"], "nodeType": "IdentifierPath", "referencedDeclaration": 1224, "src": "988:19:12"}, "id": 41, "nodeType": "InheritanceSpecifier", "src": "988:19:12"}], "canonicalName": "CryticTokenMock", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 80, "linearizedBaseContracts": [80, 1224, 1345, 1959, 3569, 3768, 3742, 3798], "name": "CryticTokenMock", "nameLocation": "961:15:12", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "functionSelector": "ab789fa3", "id": 43, "mutability": "mutable", "name": "isMintableOrBurnable", "nameLocation": "1027:20:12", "nodeType": "VariableDeclaration", "scope": 80, "src": "1015:32:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 42, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1015:4:12", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "public"}, {"constant": false, "functionSelector": "378dc3dc", "id": 45, "mutability": "mutable", "name": "initialSupply", "nameLocation": "1068:13:12", "nodeType": "VariableDeclaration", "scope": 80, "src": "1053:28:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 44, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1053:7:12", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "public"}, {"body": {"id": 78, "nodeType": "Block", "src": "1102:245:12", "statements": [{"expression": {"arguments": [{"id": 49, "name": "USER1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1208, "src": "1118:5:12", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 50, "name": "INITIAL_BALANCE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1223, "src": "1125:15:12", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 48, "name": "_mint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1799, "src": "1112:5:12", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)"}}, "id": 51, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1112:29:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 52, "nodeType": "ExpressionStatement", "src": "1112:29:12"}, {"expression": {"arguments": [{"id": 54, "name": "USER2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1214, "src": "1157:5:12", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 55, "name": "INITIAL_BALANCE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1223, "src": "1164:15:12", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 53, "name": "_mint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1799, "src": "1151:5:12", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)"}}, "id": 56, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1151:29:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 57, "nodeType": "ExpressionStatement", "src": "1151:29:12"}, {"expression": {"arguments": [{"id": 59, "name": "USER3", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1220, "src": "1196:5:12", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 60, "name": "INITIAL_BALANCE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1223, "src": "1203:15:12", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 58, "name": "_mint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1799, "src": "1190:5:12", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)"}}, "id": 61, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1190:29:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 62, "nodeType": "ExpressionStatement", "src": "1190:29:12"}, {"expression": {"arguments": [{"expression": {"id": 64, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1235:3:12", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 65, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1239:6:12", "memberName": "sender", "nodeType": "MemberAccess", "src": "1235:10:12", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 66, "name": "INITIAL_BALANCE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1223, "src": "1247:15:12", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 63, "name": "_mint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1799, "src": "1229:5:12", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)"}}, "id": 67, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1229:34:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 68, "nodeType": "ExpressionStatement", "src": "1229:34:12"}, {"expression": {"id": 72, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 69, "name": "initialSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45, "src": "1274:13:12", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [], "expression": {"argumentTypes": [], "id": 70, "name": "totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1532, "src": "1290:11:12", "typeDescriptions": {"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)"}}, "id": 71, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1290:13:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "1274:29:12", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 73, "nodeType": "ExpressionStatement", "src": "1274:29:12"}, {"expression": {"id": 76, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 74, "name": "isMintableOrBurnable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 43, "src": "1313:20:12", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "74727565", "id": 75, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1336:4:12", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "1313:27:12", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 77, "nodeType": "ExpressionStatement", "src": "1313:27:12"}]}, "id": 79, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": {"id": 46, "nodeType": "ParameterList", "parameters": [], "src": "1099:2:12"}, "returnParameters": {"id": 47, "nodeType": "ParameterList", "parameters": [], "src": "1102:0:12"}, "scope": 80, "src": "1087:260:12", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 81, "src": "952:397:12", "usedErrors": [3539, 3544, 3549, 3558, 3563, 3568], "usedEvents": [3676, 3685]}], "src": "0:1349:12"}}}, "sourceList": ["/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/util/ERC20ExternalTestBase.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/IERC20.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/PropertiesConstants.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/PropertiesHelper.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/utils/Context.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/src/contracts/BToken.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/test/invariants/fuzz/external/BToken.sol"], "contracts": {"/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol:CryticERC20ExternalBasicProperties": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertEqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertNeqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"LogAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"LogString\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"LogUint256\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"test_ERC20external_constantSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_selfTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_selfTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_setAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_setAllowanceTwice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_spendAllowanceAfterTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferFromMoreThanBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_transferFromToZeroAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferFromZeroAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferMoreThanBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_transferToZeroAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferZeroAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_userBalanceNotHigherThanSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_userBalancesLessThanTotalSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_zeroAddressBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/util/ERC20ExternalTestBase.sol:CryticERC20ExternalTestBase": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertEqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertNeqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"LogAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"LogString\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"LogUint256\",\"type\":\"event\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol:ITokenMock": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMintableOrBurnable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {"allowance(address,address)": {"author": null, "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.", "params": {}, "return": null}, "approve(address,uint256)": {"author": null, "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.", "params": {}, "return": null}, "balanceOf(address)": {"author": null, "details": "Returns the amount of tokens owned by `account`.", "params": {}, "return": null}, "totalSupply()": {"author": null, "details": "Returns the amount of tokens in existence.", "params": {}, "return": null}, "transfer(address,uint256)": {"author": null, "details": "Moves `amount` tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}, "transferFrom(address,address,uint256)": {"author": null, "details": "Moves `amount` tokens from `from` to `to` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}}, "author": null, "details": null, "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/IERC20.sol:IERC20": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {"allowance(address,address)": {"author": null, "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.", "params": {}, "return": null}, "approve(address,uint256)": {"author": null, "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.", "params": {}, "return": null}, "balanceOf(address)": {"author": null, "details": "Returns the amount of tokens owned by `account`.", "params": {}, "return": null}, "totalSupply()": {"author": null, "details": "Returns the amount of tokens in existence.", "params": {}, "return": null}, "transfer(address,uint256)": {"author": null, "details": "Moves `amount` tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}, "transferFrom(address,address,uint256)": {"author": null, "details": "Moves `amount` tokens from `from` to `to` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}}, "author": null, "details": null, "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/PropertiesConstants.sol:PropertiesConstants": {"srcmap": "", "srcmap-runtime": "", "abi": "[]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/PropertiesHelper.sol:PropertiesAsserts": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertEqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertNeqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"LogAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"LogString\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"LogUint256\",\"type\":\"event\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/PropertiesHelper.sol:PropertiesLibString": {"srcmap": "15061:3029:5:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;15061:3029:5;;;;;;;;;;;;;;;;;", "srcmap-runtime": "15061:3029:5:-:0;;;;;;;;", "abi": "[]", "bin": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220f342b325b30554127841eeaf0da5b966b5f90632b2e4e9ae0a3ca3918b96441e64736f6c63430008170033", "bin-runtime": "730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220f342b325b30554127841eeaf0da5b966b5f90632b2e4e9ae0a3ca3918b96441e64736f6c63430008170033", "userdoc": {"methods": {}, "notice": "Efficient library for creating string representations of integers."}, "devdoc": {"methods": {}, "author": "Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/LibString.sol)Modified from Solady (https://github.com/Vectorized/solady/blob/main/src/utils/LibString.sol)", "details": "Name of the library is modified to prevent collisions with contract-under-test uses of LibString", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol:IERC1155Errors": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC1155InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"idsLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valuesLength\",\"type\":\"uint256\"}],\"name\":\"ERC1155InvalidArrayLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC1155MissingApprovalForAll\",\"type\":\"error\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": "Standard ERC1155 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol:IERC20Errors": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": "Standard ERC20 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol:IERC721Errors": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721IncorrectOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721InsufficientApproval\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC721InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721NonexistentToken\",\"type\":\"error\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": "Standard ERC721 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {"allowance(address,address)": {"author": null, "details": "See {IERC20-allowance}.", "params": {}, "return": null}, "approve(address,uint256)": {"author": null, "details": "See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.", "params": {}, "return": null}, "balanceOf(address)": {"author": null, "details": "See {IERC20-balanceOf}.", "params": {}, "return": null}, "constructor": {"author": null, "details": "Sets the values for {name} and {symbol}. All two of these values are immutable: they can only be set once during construction.", "params": {}, "return": null}, "decimals()": {"author": null, "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.", "params": {}, "return": null}, "name()": {"author": null, "details": "Returns the name of the token.", "params": {}, "return": null}, "symbol()": {"author": null, "details": "Returns the symbol of the token, usually a shorter version of the name.", "params": {}, "return": null}, "totalSupply()": {"author": null, "details": "See {IERC20-totalSupply}.", "params": {}, "return": null}, "transfer(address,uint256)": {"author": null, "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.", "params": {}, "return": null}, "transferFrom(address,address,uint256)": {"author": null, "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.", "params": {}, "return": null}}, "author": null, "details": "Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. TIP: For a detailed writeup see our guide https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. The default value of {decimals} is 18. To change this, you should override this function so it returns a different value. We have followed general OpenZeppelin Contracts guidelines: functions revert instead returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification.", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol:IERC20": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {"allowance(address,address)": {"author": null, "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.", "params": {}, "return": null}, "approve(address,uint256)": {"author": null, "details": "Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.", "params": {}, "return": null}, "balanceOf(address)": {"author": null, "details": "Returns the value of tokens owned by `account`.", "params": {}, "return": null}, "totalSupply()": {"author": null, "details": "Returns the value of tokens in existence.", "params": {}, "return": null}, "transfer(address,uint256)": {"author": null, "details": "Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}, "transferFrom(address,address,uint256)": {"author": null, "details": "Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}}, "author": null, "details": "Interface of the ERC20 standard as defined in the EIP.", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol:IERC20Metadata": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {"allowance(address,address)": {"author": null, "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.", "params": {}, "return": null}, "approve(address,uint256)": {"author": null, "details": "Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.", "params": {}, "return": null}, "balanceOf(address)": {"author": null, "details": "Returns the value of tokens owned by `account`.", "params": {}, "return": null}, "decimals()": {"author": null, "details": "Returns the decimals places of the token.", "params": {}, "return": null}, "name()": {"author": null, "details": "Returns the name of the token.", "params": {}, "return": null}, "symbol()": {"author": null, "details": "Returns the symbol of the token.", "params": {}, "return": null}, "totalSupply()": {"author": null, "details": "Returns the value of tokens in existence.", "params": {}, "return": null}, "transfer(address,uint256)": {"author": null, "details": "Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}, "transferFrom(address,address,uint256)": {"author": null, "details": "Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}}, "author": null, "details": "Interface for the optional metadata functions from the ERC20 standard.", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/utils/Context.sol:Context": {"srcmap": "", "srcmap-runtime": "", "abi": "[]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": "Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/src/contracts/BToken.sol:BToken": {"srcmap": "242:1712:11:-:0;;;271:52;;;;;;;;;;1896:113:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1896:113:7;;;1970:5;1962;:13;;;;;;:::i;:::-;-1:-1:-1;1985:7:7;:17;1995:7;1985;:17;:::i;:::-;;1896:113;;242:1712:11;;14:127:13;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:380;225:1;221:12;;;;268;;;289:61;;343:4;335:6;331:17;321:27;;289:61;396:2;388:6;385:14;365:18;362:38;359:161;;442:10;437:3;433:20;430:1;423:31;477:4;474:1;467:15;505:4;502:1;495:15;359:161;;146:380;;;:::o;657:518::-;759:2;754:3;751:11;748:421;;;795:5;792:1;785:16;839:4;836:1;826:18;909:2;897:10;893:19;890:1;886:27;880:4;876:38;945:4;933:10;930:20;927:47;;;-1:-1:-1;968:4:13;927:47;1023:2;1018:3;1014:12;1011:1;1007:20;1001:4;997:31;987:41;;1078:81;1096:2;1089:5;1086:13;1078:81;;;1155:1;1141:16;;1122:1;1111:13;1078:81;;;1082:3;;748:421;657:518;;;:::o;1351:1345::-;1471:10;;-1:-1:-1;;;;;1493:30:13;;1490:56;;;1526:18;;:::i;:::-;1555:97;1645:6;1605:38;1637:4;1631:11;1605:38;:::i;:::-;1599:4;1555:97;:::i;:::-;1707:4;;1764:2;1753:14;;1781:1;1776:663;;;;2483:1;2500:6;2497:89;;;-1:-1:-1;2552:19:13;;;2546:26;2497:89;-1:-1:-1;;1308:1:13;1304:11;;;1300:24;1296:29;1286:40;1332:1;1328:11;;;1283:57;2599:81;;1746:944;;1776:663;604:1;597:14;;;641:4;628:18;;-1:-1:-1;;1812:20:13;;;1930:236;1944:7;1941:1;1938:14;1930:236;;;2033:19;;;2027:26;2012:42;;2125:27;;;;2093:1;2081:14;;;;1960:19;;1930:236;;;1934:3;2194:6;2185:7;2182:19;2179:201;;;2255:19;;;2249:26;-1:-1:-1;;2338:1:13;2334:14;;;2350:3;2330:24;2326:37;2322:42;2307:58;2292:74;;2179:201;;;2426:1;2417:6;2414:1;2410:14;2406:22;2400:4;2393:36;1746:944;;;;;1351:1345;;:::o;:::-;242:1712:11;;;;;;", "srcmap-runtime": "242:1712:11:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89:7;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4293:186;;;;;;:::i;:::-;;:::i;:::-;;;1192:14:13;;1185:22;1167:41;;1155:2;1140:18;4293:186:7;1027:187:13;3144:97:7;3222:12;;3144:97;;;1365:25:13;;;1353:2;1338:18;3144:97:7;1219:177:13;5039:244:7;;;;;;:::i;:::-;;:::i;3002:82::-;;;3075:2;1876:36:13;;1864:2;1849:18;3002:82:7;1734:184:13;1024:312:11;;;;;;:::i;:::-;;:::i;3299:116:7:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3390:18:7;3364:7;3390:18;;;;;;;;;;;;3299:116;2276:93;;;:::i;3610:178::-;;;;;;:::i;:::-;;:::i;579:189:11:-;;;;;;:::i;:::-;;:::i;3846:140:7:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3952:18:7;;;3926:7;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3846:140;2074:89;2119:13;2151:5;2144:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89;:::o;4293:186::-;4366:4;735:10:10;4420:31:7;735:10:10;4436:7:7;4445:5;4420:8;:31::i;:::-;4468:4;4461:11;;;4293:186;;;;;:::o;5039:244::-;5126:4;735:10:10;5182:37:7;5198:4;735:10:10;5213:5:7;5182:15;:37::i;:::-;5229:26;5239:4;5245:2;5249:5;5229:9;:26::i;:::-;-1:-1:-1;5272:4:7;;5039:244;-1:-1:-1;;;;5039:244:7:o;1024:312:11:-;1150:10;1101:12;3952:18:7;;;:11;:18;;;;;;;;-1:-1:-1;;;;;3952:27:7;;;;;;;;;;1189:8:11;1180:6;:17;1176:139;;;1207:32;1216:10;1228:7;1237:1;1207:8;:32::i;:::-;1176:139;;;1260:48;1269:10;1281:7;1290:17;1301:6;1290:8;:17;:::i;:::-;1260:8;:48::i;2276:93:7:-;2323:13;2355:7;2348:14;;;;;:::i;3610:178::-;3679:4;735:10:10;3733:27:7;735:10:10;3750:2:7;3754:5;3733:9;:27::i;579:189:11:-;685:10;656:12;3952:18:7;;;:11;:18;;;;;;;;-1:-1:-1;;;;;3952:27:7;;;;;;;;;;656:12:11;;676:70;;3952:27:7;;706:39:11;;739:6;;706:39;:::i;676:70::-;-1:-1:-1;759:4:11;579:189;;;;:::o;8989:128:7:-;9073:37;9082:5;9089:7;9098:5;9105:4;9073:8;:37::i;:::-;8989:128;;;:::o;10663:477::-;-1:-1:-1;;;;;3952:18:7;;;10762:24;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;-1:-1:-1;;10828:37:7;;10824:310;;10904:5;10885:16;:24;10881:130;;;10936:60;;-1:-1:-1;;;10936:60:7;;-1:-1:-1;;;;;3379:55:13;;10936:60:7;;;3361:74:13;3451:18;;;3444:34;;;3494:18;;;3487:34;;;3334:18;;10936:60:7;;;;;;;;10881:130;11052:57;11061:5;11068:7;11096:5;11077:16;:24;11103:5;11052:8;:57::i;:::-;10752:388;10663:477;;;:::o;5656:300::-;-1:-1:-1;;;;;5739:18:7;;5735:86;;5780:30;;-1:-1:-1;;;5780:30:7;;5807:1;5780:30;;;3678:74:13;3651:18;;5780:30:7;3532:226:13;5735:86:7;-1:-1:-1;;;;;5834:16:7;;5830:86;;5873:32;;-1:-1:-1;;;5873:32:7;;5902:1;5873:32;;;3678:74:13;3651:18;;5873:32:7;3532:226:13;5830:86:7;5925:24;5933:4;5939:2;5943:5;5925:7;:24::i;9949:432::-;-1:-1:-1;;;;;10061:19:7;;10057:89;;10103:32;;-1:-1:-1;;;10103:32:7;;10132:1;10103:32;;;3678:74:13;3651:18;;10103:32:7;3532:226:13;10057:89:7;-1:-1:-1;;;;;10159:21:7;;10155:90;;10203:31;;-1:-1:-1;;;10203:31:7;;10231:1;10203:31;;;3678:74:13;3651:18;;10203:31:7;3532:226:13;10155:90:7;-1:-1:-1;;;;;10254:18:7;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;:35;;;10299:76;;;;10349:7;-1:-1:-1;;;;;10333:31:7;10342:5;-1:-1:-1;;;;;10333:31:7;;10358:5;10333:31;;;;1365:25:13;;1353:2;1338:18;;1219:177;10333:31:7;;;;;;;;9949:432;;;;:::o;6271:1107::-;-1:-1:-1;;;;;6360:18:7;;6356:540;;6512:5;6496:12;;:21;;;;;;;:::i;:::-;;;;-1:-1:-1;6356:540:7;;-1:-1:-1;6356:540:7;;-1:-1:-1;;;;;6570:15:7;;6548:19;6570:15;;;;;;;;;;;6603:19;;;6599:115;;;6649:50;;-1:-1:-1;;;6649:50:7;;-1:-1:-1;;;;;3379:55:13;;6649:50:7;;;3361:74:13;3451:18;;;3444:34;;;3494:18;;;3487:34;;;3334:18;;6649:50:7;3159:368:13;6599:115:7;-1:-1:-1;;;;;6834:15:7;;:9;:15;;;;;;;;;;6852:19;;;;6834:37;;6356:540;-1:-1:-1;;;;;6910:16:7;;6906:425;;7073:12;:21;;;;;;;6906:425;;;-1:-1:-1;;;;;7284:13:7;;:9;:13;;;;;;;;;;:22;;;;;;6906:425;7361:2;-1:-1:-1;;;;;7346:25:7;7355:4;-1:-1:-1;;;;;7346:25:7;;7365:5;7346:25;;;;1365::13;;1353:2;1338:18;;1219:177;7346:25:7;;;;;;;;6271:1107;;;:::o;14:548:13:-;126:4;155:2;184;173:9;166:21;216:6;210:13;259:6;254:2;243:9;239:18;232:34;284:1;294:140;308:6;305:1;302:13;294:140;;;403:14;;;399:23;;393:30;369:17;;;388:2;365:26;358:66;323:10;;294:140;;;298:3;483:1;478:2;469:6;458:9;454:22;450:31;443:42;553:2;546;542:7;537:2;529:6;525:15;521:29;510:9;506:45;502:54;494:62;;;;14:548;;;;:::o;567:196::-;635:20;;-1:-1:-1;;;;;684:54:13;;674:65;;664:93;;753:1;750;743:12;664:93;567:196;;;:::o;768:254::-;836:6;844;897:2;885:9;876:7;872:23;868:32;865:52;;;913:1;910;903:12;865:52;936:29;955:9;936:29;:::i;:::-;926:39;1012:2;997:18;;;;984:32;;-1:-1:-1;;;768:254:13:o;1401:328::-;1478:6;1486;1494;1547:2;1535:9;1526:7;1522:23;1518:32;1515:52;;;1563:1;1560;1553:12;1515:52;1586:29;1605:9;1586:29;:::i;:::-;1576:39;;1634:38;1668:2;1657:9;1653:18;1634:38;:::i;:::-;1624:48;;1719:2;1708:9;1704:18;1691:32;1681:42;;1401:328;;;;;:::o;1923:186::-;1982:6;2035:2;2023:9;2014:7;2010:23;2006:32;2003:52;;;2051:1;2048;2041:12;2003:52;2074:29;2093:9;2074:29;:::i;:::-;2064:39;1923:186;-1:-1:-1;;;1923:186:13:o;2114:260::-;2182:6;2190;2243:2;2231:9;2222:7;2218:23;2214:32;2211:52;;;2259:1;2256;2249:12;2211:52;2282:29;2301:9;2282:29;:::i;:::-;2272:39;;2330:38;2364:2;2353:9;2349:18;2330:38;:::i;:::-;2320:48;;2114:260;;;;;:::o;2379:380::-;2458:1;2454:12;;;;2501;;;2522:61;;2576:4;2568:6;2564:17;2554:27;;2522:61;2629:2;2621:6;2618:14;2598:18;2595:38;2592:161;;2675:10;2670:3;2666:20;2663:1;2656:31;2710:4;2707:1;2700:15;2738:4;2735:1;2728:15;2592:161;;2379:380;;;:::o;2764:127::-;2825:10;2820:3;2816:20;2813:1;2806:31;2856:4;2853:1;2846:15;2880:4;2877:1;2870:15;2896:128;2963:9;;;2984:11;;;2981:37;;;2998:18;;:::i;3029:125::-;3094:9;;;3115:10;;;3112:36;;;3128:18;;:::i", "abi": "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "608060405234801561000f575f80fd5b506040518060400160405280601381526020017f42616c616e63657220506f6f6c20546f6b656e000000000000000000000000008152506040518060400160405280600381526020016210941560ea1b8152508160039081610071919061011e565b50600461007e828261011e565b5050506101dd565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806100ae57607f821691505b6020821081036100cc57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561011957805f5260205f20601f840160051c810160208510156100f75750805b601f840160051c820191505b81811015610116575f8155600101610103565b50505b505050565b81516001600160401b0381111561013757610137610086565b61014b81610145845461009a565b846100d2565b602080601f83116001811461017e575f84156101675750858301515b5f19600386901b1c1916600185901b1785556101d5565b5f85815260208120601f198616915b828110156101ac5788860151825594840194600190910190840161018d565b50858210156101c957878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b6107ed806101ea5f395ff3fe608060405234801561000f575f80fd5b50600436106100b5575f3560e01c8063661884631161007d578063a9059cbb11610058578063a9059cbb14610171578063d73dd62314610184578063dd62ed3e14610197575f80fd5b8063661884631461012e57806370a082311461014157806395d89b4114610169575f80fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f575b5f80fd5b6100c16101cf565b6040516100ce919061062c565b60405180910390f35b6100ea6100e5366004610693565b61025f565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a3660046106bb565b610278565b604051601281526020016100ce565b6100ea61013c366004610693565b61029b565b6100fe61014f3660046106f4565b6001600160a01b03165f9081526020819052604090205490565b6100c16102ea565b6100ea61017f366004610693565b6102f9565b6100ea610192366004610693565b610306565b6100fe6101a5366004610714565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6060600380546101de90610745565b80601f016020809104026020016040519081016040528092919081815260200182805461020a90610745565b80156102555780601f1061022c57610100808354040283529160200191610255565b820191905f5260205f20905b81548152906001019060200180831161023857829003601f168201915b5050505050905090565b5f3361026c818585610345565b60019150505b92915050565b5f33610285858285610357565b6102908585856103d7565b506001949350505050565b335f9081526001602090815260408083206001600160a01b0386168452909152812054808311156102d6576102d133855f610345565b61026c565b61026c33856102e58685610791565b610345565b6060600480546101de90610745565b5f3361026c8185856103d7565b335f8181526001602090815260408083206001600160a01b0387168452909152812054909161033c9185906102e59086906107a4565b50600192915050565b6103528383836001610434565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f1981146103d157818110156103c357604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b6103d184848484035f610434565b50505050565b6001600160a01b03831661040057604051634b637e8f60e11b81525f60048201526024016103ba565b6001600160a01b0382166104295760405163ec442f0560e01b81525f60048201526024016103ba565b610352838383610506565b6001600160a01b03841661045d5760405163e602df0560e01b81525f60048201526024016103ba565b6001600160a01b03831661048657604051634a1406b160e11b81525f60048201526024016103ba565b6001600160a01b038085165f90815260016020908152604080832093871683529290522082905580156103d157826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104f891815260200190565b60405180910390a350505050565b6001600160a01b038316610530578060025f82825461052591906107a4565b909155506105a09050565b6001600160a01b0383165f90815260208190526040902054818110156105825760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016103ba565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166105bc576002805482900390556105da565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161061f91815260200190565b60405180910390a3505050565b5f602080835283518060208501525f5b818110156106585785810183015185820160400152820161063c565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461068e575f80fd5b919050565b5f80604083850312156106a4575f80fd5b6106ad83610678565b946020939093013593505050565b5f805f606084860312156106cd575f80fd5b6106d684610678565b92506106e460208501610678565b9150604084013590509250925092565b5f60208284031215610704575f80fd5b61070d82610678565b9392505050565b5f8060408385031215610725575f80fd5b61072e83610678565b915061073c60208401610678565b90509250929050565b600181811c9082168061075957607f821691505b60208210810361077757634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156102725761027261077d565b808201808211156102725761027261077d56fea2646970667358221220bc65a09f132480ba2ba11e9418b73c6befa11e01480f49cfc6a84d9532af748d64736f6c63430008170033", "bin-runtime": "608060405234801561000f575f80fd5b50600436106100b5575f3560e01c8063661884631161007d578063a9059cbb11610058578063a9059cbb14610171578063d73dd62314610184578063dd62ed3e14610197575f80fd5b8063661884631461012e57806370a082311461014157806395d89b4114610169575f80fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f575b5f80fd5b6100c16101cf565b6040516100ce919061062c565b60405180910390f35b6100ea6100e5366004610693565b61025f565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a3660046106bb565b610278565b604051601281526020016100ce565b6100ea61013c366004610693565b61029b565b6100fe61014f3660046106f4565b6001600160a01b03165f9081526020819052604090205490565b6100c16102ea565b6100ea61017f366004610693565b6102f9565b6100ea610192366004610693565b610306565b6100fe6101a5366004610714565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6060600380546101de90610745565b80601f016020809104026020016040519081016040528092919081815260200182805461020a90610745565b80156102555780601f1061022c57610100808354040283529160200191610255565b820191905f5260205f20905b81548152906001019060200180831161023857829003601f168201915b5050505050905090565b5f3361026c818585610345565b60019150505b92915050565b5f33610285858285610357565b6102908585856103d7565b506001949350505050565b335f9081526001602090815260408083206001600160a01b0386168452909152812054808311156102d6576102d133855f610345565b61026c565b61026c33856102e58685610791565b610345565b6060600480546101de90610745565b5f3361026c8185856103d7565b335f8181526001602090815260408083206001600160a01b0387168452909152812054909161033c9185906102e59086906107a4565b50600192915050565b6103528383836001610434565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f1981146103d157818110156103c357604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b6103d184848484035f610434565b50505050565b6001600160a01b03831661040057604051634b637e8f60e11b81525f60048201526024016103ba565b6001600160a01b0382166104295760405163ec442f0560e01b81525f60048201526024016103ba565b610352838383610506565b6001600160a01b03841661045d5760405163e602df0560e01b81525f60048201526024016103ba565b6001600160a01b03831661048657604051634a1406b160e11b81525f60048201526024016103ba565b6001600160a01b038085165f90815260016020908152604080832093871683529290522082905580156103d157826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104f891815260200190565b60405180910390a350505050565b6001600160a01b038316610530578060025f82825461052591906107a4565b909155506105a09050565b6001600160a01b0383165f90815260208190526040902054818110156105825760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016103ba565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166105bc576002805482900390556105da565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161061f91815260200190565b60405180910390a3505050565b5f602080835283518060208501525f5b818110156106585785810183015185820160400152820161063c565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461068e575f80fd5b919050565b5f80604083850312156106a4575f80fd5b6106ad83610678565b946020939093013593505050565b5f805f606084860312156106cd575f80fd5b6106d684610678565b92506106e460208501610678565b9150604084013590509250925092565b5f60208284031215610704575f80fd5b61070d82610678565b9392505050565b5f8060408385031215610725575f80fd5b61072e83610678565b915061073c60208401610678565b90509250929050565b600181811c9082168061075957607f821691505b60208210810361077757634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156102725761027261077d565b808201808211156102725761027261077d56fea2646970667358221220bc65a09f132480ba2ba11e9418b73c6befa11e01480f49cfc6a84d9532af748d64736f6c63430008170033", "userdoc": {"methods": {"decreaseApproval(address,uint256)": {"notice": "Decrease the allowance of the spender."}, "increaseApproval(address,uint256)": {"notice": "Increase the allowance of the spender."}}, "notice": "Balancer Pool Token base contract, providing ERC20 functionality."}, "devdoc": {"methods": {"allowance(address,address)": {"author": null, "details": "See {IERC20-allowance}.", "params": {}, "return": null}, "approve(address,uint256)": {"author": null, "details": "See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.", "params": {}, "return": null}, "balanceOf(address)": {"author": null, "details": "See {IERC20-balanceOf}.", "params": {}, "return": null}, "decimals()": {"author": null, "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.", "params": {}, "return": null}, "decreaseApproval(address,uint256)": {"author": null, "details": null, "params": {"amount": "The amount of tokens to decrease the allowance by.", "spender": "The address which will spend the funds."}, "return": null}, "increaseApproval(address,uint256)": {"author": null, "details": null, "params": {"amount": "The amount of tokens to increase the allowance by.", "spender": "The address which will spend the funds."}, "return": null}, "name()": {"author": null, "details": "Returns the name of the token.", "params": {}, "return": null}, "symbol()": {"author": null, "details": "Returns the symbol of the token, usually a shorter version of the name.", "params": {}, "return": null}, "totalSupply()": {"author": null, "details": "See {IERC20-totalSupply}.", "params": {}, "return": null}, "transfer(address,uint256)": {"author": null, "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.", "params": {}, "return": null}, "transferFrom(address,address,uint256)": {"author": null, "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.", "params": {}, "return": null}}, "author": null, "details": null, "title": "BToken"}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/test/invariants/fuzz/external/BToken.sol:CryticERC20ExternalHarness": {"srcmap": "384:566:12:-:0;;;464:105;;;;;;;;;;539:21;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;512:5:12;:50;;-1:-1:-1;;;;;;512:50:12;-1:-1:-1;;;;;512:50:12;;;;;;;;;;384:566;;;;;;;;;;:::o;:::-;;;;;;;", "srcmap-runtime": "384:566:12:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;656:231:0;;;:::i;:::-;;9669:646;;;;;;:::i;:::-;;:::i;8216:978::-;;;;;;:::i;:::-;;:::i;2009:604::-;;;;;;:::i;:::-;;:::i;349:252::-;;;:::i;9245:373::-;;;;;;:::i;:::-;;:::i;4953:763::-;;;;;;:::i;:::-;;:::i;1665:283::-;;;:::i;3971:905::-;;;;;;:::i;:::-;;:::i;1403:201::-;;;:::i;7343:815::-;;;;;;:::i;:::-;;:::i;3438:456::-;;;;;;:::i;:::-;;:::i;950:402::-;;;:::i;6506:779::-;;;;;;:::i;:::-;;:::i;5779:664::-;;;;;;:::i;:::-;;:::i;10367:1007::-;;;;;;:::i;:::-;;:::i;2669:713::-;;;;;;:::i;:::-;;:::i;656:231::-;757:5;;:27;;-1:-1:-1;;;757:27:0;;773:10;757:27;;;996:74:13;734:146:0;;-1:-1:-1;;;;;757:5:0;;:15;;969:18:13;;757:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;798:5;;;;;;;;-1:-1:-1;;;;;798:5:0;-1:-1:-1;;;;;798:17:0;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;734:146;;;;;;;;;;;;;;;;;:9;:146::i;:::-;656:231::o;9669:646::-;9786:6;9795:5;;:29;;-1:-1:-1;;;9795:29:0;;-1:-1:-1;;;;;1462:55:13;;;9795:29:0;;;1444:74:13;1534:18;;;1527:34;;;9795:5:0;;;;:13;;1417:18:13;;9795:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9786:38;;9834:63;9848:1;:9;;9853:4;9848:9;;;9834:63;;;;;;;;;;;;;;;;;:13;:63::i;:::-;9929:5;;:38;;-1:-1:-1;;;9929:38:0;;9953:4;9929:38;;;2089:34:13;-1:-1:-1;;;;;2159:15:13;;;2139:18;;;2132:43;9907:133:0;;9929:5;;:15;;2001:18:13;;9929:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9981:6;9907:133;;;;;;;;;;;;;;;;;:8;:133::i;:::-;10055:5;;-1:-1:-1;;;;;10055:5:0;:13;10069:6;10077:10;10086:1;10077:6;:10;:::i;:::-;10055:33;;-1:-1:-1;;;;;;10055:33:0;;;;;;;-1:-1:-1;;;;;1462:55:13;;;10055:33:0;;;1444:74:13;1534:18;;;1527:34;1417:18;;10055:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10051:37;;10098:63;10112:1;:9;;10117:4;10112:9;;;10098:63;;;;;;;;;;;;;;;;;:13;:63::i;:::-;10193:5;;:38;;-1:-1:-1;;;10193:38:0;;10217:4;10193:38;;;2089:34:13;-1:-1:-1;;;;;2159:15:13;;;2139:18;;;2132:43;10171:137:0;;10193:5;;:15;;2001:18:13;;10193:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10245:10;10254:1;10245:6;:10;:::i;:::-;10171:137;;;;;;;;;;;;;;;;;:8;:137::i;:::-;9776:539;9669:646;;:::o;8216:978::-;8354:4;-1:-1:-1;;;;;8336:23:0;;;8328:32;;;;;;8388:10;-1:-1:-1;;;;;8378:20:0;;;8370:29;;;;;;8409:22;8434:5;;:27;;-1:-1:-1;;;8434:27:0;;8450:10;8434:27;;;996:74:13;-1:-1:-1;;;;;8434:5:0;;;;:15;;969:18:13;;8434:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8471:24;8498:5;;:23;;-1:-1:-1;;;8498:23:0;;-1:-1:-1;;;;;1014:55:13;;;8498:23:0;;;996:74:13;8409:52:0;;-1:-1:-1;8471:24:0;;8498:5;;:15;;969:18:13;;8498:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8531:17;8551:5;;:42;;-1:-1:-1;;;8551:42:0;;8567:10;8551:42;;;2089:34:13;8587:4:0;2139:18:13;;;2132:43;8471:50:0;;-1:-1:-1;8531:17:0;;-1:-1:-1;;;;;8551:5:0;;;;:15;;2001:18:13;;8551:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8531:62;;8628:1;8611:14;:18;:48;;;;;8645:14;8633:9;:26;8611:48;8603:57;;;;;;8670:22;8696:23;8705:14;8696:6;:23;:::i;:::-;8695:29;;8723:1;8695:29;:::i;:::-;8735:6;8744:5;;:54;;-1:-1:-1;;;8744:54:0;;8763:10;8744:54;;;3085:34:13;-1:-1:-1;;;;;3155:15:13;;;3135:18;;;3128:43;3187:18;;;3180:34;;;8670:54:0;;-1:-1:-1;8735:6:0;;8744:5;;:18;;2997::13;;8744:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8735:63;;8808:43;8822:1;:9;;8827:4;8822:9;;;8808:43;;;;;;;;;;;;;-1:-1:-1;;;8808:43:0;;;:13;:43::i;:::-;8883:5;;:27;;-1:-1:-1;;;8883:27:0;;8899:10;8883:27;;;996:74:13;8861:159:0;;-1:-1:-1;;;;;8883:5:0;;:15;;969:18:13;;8883:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8924:31;8941:14;8924;:31;:::i;:::-;8861:159;;;;;;;;;;;;;;;;;:8;:159::i;:::-;9052:5;;:23;;-1:-1:-1;;;9052:23:0;;-1:-1:-1;;;;;1014:55:13;;;9052:23:0;;;996:74:13;9030:157:0;;9052:5;;:15;;969:18:13;;9052:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9089:33;9108:14;9089:16;:33;:::i;:::-;9030:157;;;;;;;;;;;;;;;;;:8;:157::i;:::-;8318:876;;;;;8216:978;;:::o;2009:604::-;2109:22;2134:5;;:27;;-1:-1:-1;;;2134:27:0;;2150:10;2134:27;;;996:74:13;-1:-1:-1;;;;;2134:5:0;;;;:15;;969:18:13;;2134:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2171:17;2191:5;;:42;;-1:-1:-1;;;2191:42:0;;2207:10;2191:42;;;2089:34:13;2227:4:0;2139:18:13;;;2132:43;2109:52:0;;-1:-1:-1;2171:17:0;;-1:-1:-1;;;;;2191:5:0;;;;:15;;2001:18:13;;2191:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2171:62;;2268:1;2251:14;:18;:35;;;;;2285:1;2273:9;:13;2251:35;2243:44;;;;;;2297:16;2334:9;2316:14;:27;;:80;;2382:14;2316:80;;;2358:9;2316:80;2407:6;2416:5;;2297:99;;-1:-1:-1;2407:6:0;-1:-1:-1;;;;;2416:5:0;:18;2448:10;2407:6;2505:12;2297:99;2416:5;2505:12;:::i;:::-;2496:22;;:5;:22;:::i;:::-;2416:112;;-1:-1:-1;;;;;;2416:112:0;;;;;;;-1:-1:-1;;;;;3103:15:13;;;2416:112:0;;;3085:34:13;3155:15;;;;3135:18;;;3128:43;3187:18;;;3180:34;2997:18;;2416:112:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2407:121;;2538:68;2552:1;:10;;2557:5;2552:10;;;2538:68;;;;;;;;;;;;;;;;;:13;:68::i;:::-;2099:514;;;;2009:604;:::o;349:252::-;428:5;;;;;;;;-1:-1:-1;;;;;428:5:0;-1:-1:-1;;;;;428:26:0;;:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;427:29;419:38;;;;;;467:127;489:5;;;;;;;;-1:-1:-1;;;;;489:5:0;-1:-1:-1;;;;;489:19:0;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;524:5;;;;;;;;-1:-1:-1;;;;;524:5:0;-1:-1:-1;;;;;524:17:0;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;467:127;;;;;;;;;;;;;;;;;:8;:127::i;9245:373::-;9357:6;9366:5;;:29;;-1:-1:-1;;;9366:29:0;;-1:-1:-1;;;;;1462:55:13;;;9366:29:0;;;1444:74:13;1534:18;;;1527:34;;;9366:5:0;;;;:13;;1417:18:13;;9366:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9357:38;;9405:63;9419:1;:9;;9424:4;9419:9;;;9405:63;;;;;;;;;;;;;;;;;:13;:63::i;:::-;9500:5;;:38;;-1:-1:-1;;;9500:38:0;;9524:4;9500:38;;;2089:34:13;-1:-1:-1;;;;;2159:15:13;;;2139:18;;;2132:43;9478:133:0;;9500:5;;:15;;2001:18:13;;9500:38:0;1854:327:13;4953:763:0;5038:22;5063:5;;:30;;-1:-1:-1;;;5063:30:0;;5087:4;5063:30;;;996:74:13;-1:-1:-1;;;;;5063:5:0;;;;:15;;969:18:13;;5063:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5103:24;5130:5;;:23;;-1:-1:-1;;;5130:23:0;;-1:-1:-1;;;;;1014:55:13;;;5130:23:0;;;996:74:13;5038:55:0;;-1:-1:-1;5103:24:0;;5130:5;;:15;;969:18:13;;5130:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5103:50;;5188:1;5171:14;:18;5163:27;;;;;;5201:6;5210:5;;-1:-1:-1;;;;;5210:5:0;:14;5225:6;5233:18;:14;5210:5;5233:18;:::i;:::-;5210:42;;-1:-1:-1;;;;;;5210:42:0;;;;;;;-1:-1:-1;;;;;1462:55:13;;;5210:42:0;;;1444:74:13;1534:18;;;1527:34;1417:18;;5210:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5201:51;;5262:112;5289:1;:10;;5294:5;5289:10;;;5262:112;;;;;;;;;;;;;;;;;:13;:112::i;:::-;5406:5;;:30;;-1:-1:-1;;;5406:30:0;;5430:4;5406:30;;;996:74:13;5384:160:0;;-1:-1:-1;;;;;5406:5:0;;:15;;969:18:13;;5406:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5450:14;5384:160;;;;;;;;;;;;;;;;;:8;:160::i;:::-;5576:5;;:23;;-1:-1:-1;;;5576:23:0;;-1:-1:-1;;;;;1014:55:13;;;5576:23:0;;;996:74:13;5554:155:0;;5576:5;;:15;;969:18:13;;5576:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5613:16;5554:155;;;;;;;;;;;;;;;;;:8;:155::i;:::-;5028:688;;;4953:763;:::o;1665:283::-;1734:15;1752:5;;:30;;-1:-1:-1;;;1752:30:0;;1776:4;1752:30;;;996:74:13;-1:-1:-1;;;;;1752:5:0;;;;:15;;969:18:13;;1752:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1734:48;;1810:1;1800:7;:11;1792:20;;;;;;1823:6;1832:5;;:35;;-1:-1:-1;;;1832:35:0;;;;;1444:74:13;;;1534:18;;;1527:34;;;-1:-1:-1;;;;;1832:5:0;;;;:14;;1417:18:13;;1832:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1823:44;;1877:64;1891:1;:10;;1896:5;1891:10;;;1877:64;;;;;;;;;;;;;;;;;:13;:64::i;:::-;1724:224;;1665:283::o;3971:905::-;4074:22;4099:5;;:27;;-1:-1:-1;;;4099:27:0;;4115:10;4099:27;;;996:74:13;-1:-1:-1;;;;;4099:5:0;;;;:15;;969:18:13;;4099:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4136:24;4163:5;;:23;;-1:-1:-1;;;4163:23:0;;-1:-1:-1;;;;;1014:55:13;;;4163:23:0;;;996:74:13;4074:52:0;;-1:-1:-1;4136:24:0;;4163:5;;:15;;969:18:13;;4163:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4196:17;4216:5;;:42;;-1:-1:-1;;;4216:42:0;;4232:10;4216:42;;;2089:34:13;4252:4:0;2139:18:13;;;2132:43;4136:50:0;;-1:-1:-1;4196:17:0;;-1:-1:-1;;;;;4216:5:0;;;;:15;;2001:18:13;;4216:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4196:62;;4293:1;4276:14;:18;:48;;;;;4310:14;4298:9;:26;4276:48;4268:57;;;;;;4336:6;4345:5;;-1:-1:-1;;;;;4345:5:0;:18;4364:10;4376:6;4384:18;:14;4345:5;4384:18;:::i;:::-;4345:58;;-1:-1:-1;;;;;;4345:58:0;;;;;;;-1:-1:-1;;;;;3103:15:13;;;4345:58:0;;;3085:34:13;3155:15;;;;3135:18;;;3128:43;3187:18;;;3180:34;2997:18;;4345:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4336:67;;4413:116;4440:1;:10;;4445:5;4440:10;;;4413:116;;;;;;;;;;;;;;;;;:13;:116::i;:::-;4561:5;;:27;;-1:-1:-1;;;4561:27:0;;4577:10;4561:27;;;996:74:13;4539:161:0;;-1:-1:-1;;;;;4561:5:0;;:15;;969:18:13;;4561:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4602:14;4539:161;;;;;;;;;;;;;;;;;:8;:161::i;:::-;4732:5;;:23;;-1:-1:-1;;;4732:23:0;;-1:-1:-1;;;;;1014:55:13;;;4732:23:0;;;996:74:13;4710:159:0;;4732:5;;:15;;969:18:13;;4732:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4769:16;4710:159;;;;;;;;;;;;;;;;;:8;:159::i;1403:201::-;1491:5;;;:27;;-1:-1:-1;;;1491:27:0;;;;;996:74:13;;;;1469:128:0;;-1:-1:-1;;;;;1491:5:0;;;;:15;;969:18:13;;1491:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1532:1;1469:128;;;;;;;;;;;;;;;;;:8;:128::i;7343:815::-;7477:4;-1:-1:-1;;;;;7459:23:0;;;7451:32;;;;;;7493:22;7518:5;;:30;;-1:-1:-1;;;7518:30:0;;7542:4;7518:30;;;996:74:13;-1:-1:-1;;;;;7518:5:0;;;;:15;;969:18:13;;7518:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7558:24;7585:5;;:23;;-1:-1:-1;;;7585:23:0;;-1:-1:-1;;;;;1014:55:13;;;7585:23:0;;;996:74:13;7493:55:0;;-1:-1:-1;7558:24:0;;7585:5;;:15;;969:18:13;;7585:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7558:50;;7643:1;7626:14;:18;7618:27;;;;;;7655:22;7681:23;7690:14;7681:6;:23;:::i;:::-;7680:29;;7708:1;7680:29;:::i;:::-;7720:6;7729:5;;:38;;-1:-1:-1;;;7729:38:0;;-1:-1:-1;;;;;1462:55:13;;;7729:38:0;;;1444:74:13;1534:18;;;1527:34;;;7655:54:0;;-1:-1:-1;7720:6:0;;7729:5;;:14;;1417:18:13;;7729:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7720:47;;7777:43;7791:1;:9;;7796:4;7791:9;;;7777:43;;;;;;;;;;;;;-1:-1:-1;;;7777:43:0;;;:13;:43::i;:::-;7852:5;;:30;;-1:-1:-1;;;7852:30:0;;7876:4;7852:30;;;996:74:13;7830:158:0;;-1:-1:-1;;;;;7852:5:0;;:15;;969:18:13;;7852:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7896:31;7913:14;7896;:31;:::i;:::-;7830:158;;;;;;;;;;;;;;;;;:8;:158::i;:::-;8020:5;;:23;;-1:-1:-1;;;8020:23:0;;-1:-1:-1;;;;;1014:55:13;;;8020:23:0;;;996:74:13;7998:153:0;;8020:5;;:15;;969:18:13;;8020:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8057:33;8076:14;8057:16;:33;:::i;:::-;7998:153;;;;;;;;;;;;;;;;;:8;:153::i;:::-;7441:717;;;;7343:815;;:::o;3438:456::-;3511:22;3536:5;;:30;;-1:-1:-1;;;3536:30:0;;3560:4;3536:30;;;996:74:13;-1:-1:-1;;;;;3536:5:0;;;;:15;;969:18:13;;3536:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3511:55;;3601:1;3584:14;:18;3576:27;;;;;;3614:6;3623:5;;-1:-1:-1;;;;;3623:5:0;:14;3646:4;3662:18;:14;3623:5;3662:18;:::i;:::-;3653:28;;:5;:28;:::i;:::-;3623:59;;-1:-1:-1;;;;;;3623:59:0;;;;;;;-1:-1:-1;;;;;1462:55:13;;;3623:59:0;;;1444:74:13;1534:18;;;1527:34;1417:18;;3623:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3614:68;;3692:48;3706:1;:9;;3711:4;3706:9;;;3692:48;;;;;;;;;;;;;;;;;:13;:48::i;:::-;3800:5;;:30;;-1:-1:-1;;;3800:30:0;;3824:4;3800:30;;;996:74:13;3750:137:0;;3772:14;;-1:-1:-1;;;;;3800:5:0;;;;:15;;969:18:13;;3800:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3750:137;;;;;;;;;;;;;;;;;:8;:137::i;950:402::-;1029:19;1170:5;;:22;;-1:-1:-1;;;1170:22:0;;230:7:4;1170:22:0;;;996:74:13;-1:-1:-1;;;;;1170:5:0;;;;:15;;969:18:13;;1170:22:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1133:5;;:22;;-1:-1:-1;;;1133:22:0;;183:7:4;1133:22:0;;;996:74:13;-1:-1:-1;;;;;1133:5:0;;;;:15;;969:18:13;;1133:22:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1096:5;;:22;;-1:-1:-1;;;1096:22:0;;136:7:4;1096:22:0;;;996:74:13;-1:-1:-1;;;;;1096:5:0;;;;:15;;969:18:13;;1096:22:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1051:5;;:30;;-1:-1:-1;;;1051:30:0;;1075:4;1051:30;;;996:74:13;-1:-1:-1;;;;;1051:5:0;;;;:15;;969:18:13;;1051:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:67;;;;:::i;:::-;:104;;;;:::i;:::-;:141;;;;:::i;:::-;1029:163;;1202:143;1225:11;1250:5;;;;;;;;-1:-1:-1;;;;;1250:5:0;-1:-1:-1;;;;;1250:17:0;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1202:143;;;;;;;;;;;;;;;;;:9;:143::i;:::-;1019:333;950:402::o;6506:779::-;6590:22;6615:5;;:27;;-1:-1:-1;;;6615:27:0;;6631:10;6615:27;;;996:74:13;-1:-1:-1;;;;;6615:5:0;;;;:15;;969:18:13;;6615:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6652:24;6679:5;;:23;;-1:-1:-1;;;6679:23:0;;-1:-1:-1;;;;;1014:55:13;;;6679:23:0;;;996:74:13;6590:52:0;;-1:-1:-1;6652:24:0;;6679:5;;:15;;969:18:13;;6679:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6712:17;6732:5;;:42;;-1:-1:-1;;;6732:42:0;;6748:10;6732:42;;;2089:34:13;6768:4:0;2139:18:13;;;2132:43;6652:50:0;;-1:-1:-1;6712:17:0;;-1:-1:-1;;;;;6732:5:0;;;;:15;;2001:18:13;;6732:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6712:62;;6809:1;6792:14;:18;:35;;;;;6826:1;6814:9;:13;6792:35;6784:44;;;;;;6839:6;6848:5;;:41;;-1:-1:-1;;;6848:41:0;;6867:10;6848:41;;;3085:34:13;-1:-1:-1;;;;;3155:15:13;;;3135:18;;;3128:43;3187:18;;;3180:34;;;6848:5:0;;;;:18;;2997::13;;6848:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6839:50;;6899:59;6913:1;:9;;6918:4;6913:9;;;6899:59;;;;;;;;;;;;;;;;;:13;:59::i;:::-;6990:5;;:27;;-1:-1:-1;;;6990:27:0;;7006:10;6990:27;;;996:74:13;6968:151:0;;-1:-1:-1;;;;;6990:5:0;;:15;;969:18:13;;6990:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7031:14;6968:151;;;;;;;;;;;;;;;;;:8;:151::i;:::-;7151:5;;:23;;-1:-1:-1;;;7151:23:0;;-1:-1:-1;;;;;1014:55:13;;;7151:23:0;;;996:74:13;7129:149:0;;7151:5;;:15;;969:18:13;;7151:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7188:16;7129:149;;;;;;;;;;;;;;;;;:8;:149::i;5779:664::-;5859:22;5884:5;;:30;;-1:-1:-1;;;5884:30:0;;5908:4;5884:30;;;996:74:13;-1:-1:-1;;;;;5884:5:0;;;;:15;;969:18:13;;5884:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5924:24;5951:5;;:23;;-1:-1:-1;;;5951:23:0;;-1:-1:-1;;;;;1014:55:13;;;5951:23:0;;;996:74:13;5859:55:0;;-1:-1:-1;5924:24:0;;5951:5;;:15;;969:18:13;;5951:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5924:50;;6009:1;5992:14;:18;5984:27;;;;;;6022:6;6031:5;;:25;;-1:-1:-1;;;6031:25:0;;-1:-1:-1;;;;;1462:55:13;;;6031:25:0;;;1444:74:13;1534:18;;;1527:34;;;6031:5:0;;;;:14;;1417:18:13;;6031:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6022:34;;6066:55;6080:1;:9;;6085:4;6080:9;;;6066:55;;;;;;;;;;;;;;;;;:13;:55::i;:::-;6153:5;;:30;;-1:-1:-1;;;6153:30:0;;6177:4;6153:30;;;996:74:13;6131:150:0;;-1:-1:-1;;;;;6153:5:0;;:15;;969:18:13;;6153:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6197:14;6131:150;;;;;;;;;;;;;;;;;:8;:150::i;:::-;6313:5;;:23;;-1:-1:-1;;;6313:23:0;;-1:-1:-1;;;;;1014:55:13;;;6313:23:0;;;996:74:13;6291:145:0;;6313:5;;:15;;969:18:13;;6313:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6350:16;6291:145;;;;;;;;;;;;;;;;;:8;:145::i;10367:1007::-;-1:-1:-1;;;;;10502:23:0;;10520:4;10502:23;;;;:47;;-1:-1:-1;;;;;;10529:20:0;;;;10502:47;10494:56;;;;;;10578:10;-1:-1:-1;;;;;10568:20:0;;;10560:29;;;;;;10599:22;10624:5;;:27;;-1:-1:-1;;;10624:27:0;;10640:10;10624:27;;;996:74:13;-1:-1:-1;;;;;10624:5:0;;;;:15;;969:18:13;;10624:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10661:25;10689:5;;:42;;-1:-1:-1;;;10689:42:0;;10705:10;10689:42;;;2089:34:13;10725:4:0;2139:18:13;;;2132:43;10599:52:0;;-1:-1:-1;10661:25:0;;-1:-1:-1;;;;;10689:5:0;;;;:15;;2001:18:13;;10689:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10661:70;;10766:1;10749:14;:18;:56;;;;;10791:14;10771:17;:34;10749:56;10741:65;;;;;;10816:22;10842:23;10851:14;10842:6;:23;:::i;:::-;10841:29;;10869:1;10841:29;:::i;:::-;10881:6;10890:5;;:54;;-1:-1:-1;;;10890:54:0;;10909:10;10890:54;;;3085:34:13;-1:-1:-1;;;;;3155:15:13;;;3135:18;;;3128:43;3187:18;;;3180:34;;;10816:54:0;;-1:-1:-1;10881:6:0;;10890:5;;:18;;2997::13;;10890:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10881:63;;10954:47;10968:1;:9;;10973:4;10968:9;;;10954:47;;;;;;;;;;;;;;;;;:13;:47::i;:::-;-1:-1:-1;;11118:17:0;:38;11114:254;;11198:5;;:42;;-1:-1:-1;;;11198:42:0;;11214:10;11198:42;;;2089:34:13;11234:4:0;2139:18:13;;;2132:43;11172:185:0;;-1:-1:-1;;;;;11198:5:0;;:15;;2001:18:13;;11198:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;11258:34;11278:14;11258:17;:34;:::i;:::-;11172:185;;;;;;;;;;;;;;;;;:8;:185::i;2669:713::-;2746:22;2771:5;;:27;;-1:-1:-1;;;2771:27:0;;2787:10;2771:27;;;996:74:13;-1:-1:-1;;;;;2771:5:0;;;;:15;;969:18:13;;2771:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2808:17;2828:5;;:42;;-1:-1:-1;;;2828:42:0;;2844:10;2828:42;;;2089:34:13;2864:4:0;2139:18:13;;;2132:43;2746:52:0;;-1:-1:-1;2808:17:0;;-1:-1:-1;;;;;2828:5:0;;;;:15;;2001:18:13;;2828:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2808:62;;2905:1;2888:14;:18;:35;;;;;2922:1;2910:9;:13;2888:35;2880:44;;;;;;2934:16;2971:9;2953:14;:27;;:80;;3019:14;2953:80;;;2995:9;2953:80;3044:6;3053:5;;2934:99;;-1:-1:-1;3044:6:0;-1:-1:-1;;;;;3053:5:0;:18;3085:10;;3142:12;2934:99;3053:5;3142:12;:::i;:::-;3133:22;;:5;:22;:::i;:::-;3053:112;;-1:-1:-1;;;;;;3053:112:0;;;;;;;-1:-1:-1;;;;;3103:15:13;;;3053:112:0;;;3085:34:13;3155:15;;;;3135:18;;;3128:43;3187:18;;;3180:34;2997:18;;3053:112:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3044:121;;3175:52;3189:1;:9;;3194:4;3189:9;;;3175:52;;;;;;;;;;;;;;;;;:13;:52::i;:::-;3287:5;;:27;;-1:-1:-1;;;3287:27:0;;3303:10;3287:27;;;996:74:13;3237:138:0;;3259:14;;-1:-1:-1;;;;;3287:5:0;;;;:15;;969:18:13;;3287:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3237:138;;;;;;;;;;;;;;;;;:8;:138::i;5569:548:5:-;5662:1;5657;:6;;5651:460;;5680:18;5701:31;5730:1;5701:28;:31::i;:::-;5680:52;;5746:18;5767:31;5796:1;5767:28;:31::i;:::-;5746:52;;5812:22;5900:4;5943;6002:6;5837:185;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;5812:210;;6041:32;6062:9;6041:32;;;;;;:::i;:::-;;;;;;;;6087:13;;:::i;401:161::-;478:1;473:83;;500:18;511:6;500:18;;;;;;:::i;:::-;;;;;;;;532:13;;:::i;650:537::-;740:1;735;:6;731:450;;757:18;778:31;807:1;778:28;:31::i;:::-;757:52;;823:18;844:31;873:1;844:28;:31::i;:::-;823:52;;889:22;977:4;1021;1073:6;914:179;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;889:204;;1112:31;1132:9;1112:31;;;;;;:::i;15380:2040::-;15436:17;15908:3;15901:4;15895:11;15891:21;16017:20;16011:4;16004:34;16161:2;16139:20;16135:29;16128:36;;;16262:1;16257:3;16250:14;16363:3;16597:5;16579:477;16700:1;16695:3;16691:11;16684:18;;16869:2;16863:4;16859:13;16855:2;16851:22;16846:3;16838:36;16960:2;16950:13;;17017:25;16579:477;17017:25;-1:-1:-1;17155:13:5;;;-1:-1:-1;;17269:12:5;;;17385:19;;;17269:12;15380:2040;-1:-1:-1;15380:2040:5:o;14:196:13:-;82:20;;-1:-1:-1;;;;;131:54:13;;121:65;;111:93;;200:1;197;190:12;111:93;14:196;;;:::o;215:254::-;283:6;291;344:2;332:9;323:7;319:23;315:32;312:52;;;360:1;357;350:12;312:52;383:29;402:9;383:29;:::i;:::-;373:39;459:2;444:18;;;;431:32;;-1:-1:-1;;;215:254:13:o;474:180::-;533:6;586:2;574:9;565:7;561:23;557:32;554:52;;;602:1;599;592:12;554:52;-1:-1:-1;625:23:13;;474:180;-1:-1:-1;474:180:13:o;659:186::-;718:6;771:2;759:9;750:7;746:23;742:32;739:52;;;787:1;784;777:12;739:52;810:29;829:9;810:29;:::i;:::-;800:39;659:186;-1:-1:-1;;;659:186:13:o;1081:184::-;1151:6;1204:2;1192:9;1183:7;1179:23;1175:32;1172:52;;;1220:1;1217;1210:12;1172:52;-1:-1:-1;1243:16:13;;1081:184;-1:-1:-1;1081:184:13:o;1572:277::-;1639:6;1692:2;1680:9;1671:7;1667:23;1663:32;1660:52;;;1708:1;1705;1698:12;1660:52;1740:9;1734:16;1793:5;1786:13;1779:21;1772:5;1769:32;1759:60;;1815:1;1812;1805:12;2186:127;2247:10;2242:3;2238:20;2235:1;2228:31;2278:4;2275:1;2268:15;2302:4;2299:1;2292:15;2318:127;2379:10;2374:3;2370:20;2367:1;2360:31;2410:4;2407:1;2400:15;2434:4;2431:1;2424:15;2450:120;2490:1;2516;2506:35;;2521:18;;:::i;:::-;-1:-1:-1;2555:9:13;;2450:120::o;2575:112::-;2607:1;2633;2623:35;;2638:18;;:::i;:::-;-1:-1:-1;2672:9:13;;2575:112::o;2692:125::-;2757:9;;;2778:10;;;2775:36;;;2791:18;;:::i;:::-;2692:125;;;;:::o;3225:128::-;3292:9;;;3313:11;;;3310:37;;;3327:18;;:::i;4079:250::-;4164:1;4174:113;4188:6;4185:1;4182:13;4174:113;;;4264:11;;;4258:18;4245:11;;;4238:39;4210:2;4203:10;4174:113;;;-1:-1:-1;;4321:1:13;4303:16;;4296:27;4079:250::o;4334:1137::-;-1:-1:-1;;;4889:3:13;4882:24;4864:3;4935:6;4929:13;4951:74;5018:6;5014:1;5009:3;5005:11;4998:4;4990:6;4986:17;4951:74;:::i;:::-;-1:-1:-1;;;5084:1:13;5044:16;;;5076:10;;;5069:23;5117:13;;5139:76;5117:13;5201:2;5193:11;;5186:4;5174:17;;5139:76;:::i;:::-;5280:19;5275:2;5234:17;;;;5267:11;;;5260:40;5325:13;;5347:76;5325:13;5409:2;5401:11;;5394:4;5382:17;;5347:76;:::i;:::-;5443:17;5462:2;5439:26;;4334:1137;-1:-1:-1;;;;;4334:1137:13:o;5476:396::-;5625:2;5614:9;5607:21;5588:4;5657:6;5651:13;5700:6;5695:2;5684:9;5680:18;5673:34;5716:79;5788:6;5783:2;5772:9;5768:18;5763:2;5755:6;5751:15;5716:79;:::i;:::-;5856:2;5835:15;-1:-1:-1;;5831:29:13;5816:45;;;;5863:2;5812:54;;5476:396;-1:-1:-1;;5476:396:13:o;5877:127::-;5938:10;5933:3;5929:20;5926:1;5919:31;5969:4;5966:1;5959:15;5993:4;5990:1;5983:15;6009:1131;-1:-1:-1;;;6564:3:13;6557:24;6539:3;6610:6;6604:13;6626:74;6693:6;6689:1;6684:3;6680:11;6673:4;6665:6;6661:17;6626:74;:::i;:::-;-1:-1:-1;;;6759:1:13;6719:16;;;6751:10;;;6744:24;6793:13;;6815:76;6793:13;6877:2;6869:11;;6862:4;6850:17;;6815:76;:::i;:::-;-1:-1:-1;;;6951:2:13;6910:17;;;;6943:11;;;6936:33;6994:13;;7016:76;6994:13;7078:2;7070:11;;7063:4;7051:17;;7016:76;:::i;:::-;7112:17;7131:2;7108:26;;6009:1131;-1:-1:-1;;;;;6009:1131:13:o", "abi": "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertEqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertNeqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"LogAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"LogString\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"LogUint256\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"fuzz_decreaseApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fuzz_increaseApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_constantSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_selfTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_selfTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_setAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_setAllowanceTwice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_spendAllowanceAfterTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferFromMoreThanBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_transferFromToZeroAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferFromZeroAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferMoreThanBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_transferToZeroAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferZeroAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_userBalanceNotHigherThanSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_userBalancesLessThanTotalSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_zeroAddressBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "608060405234801562000010575f80fd5b506040516200001f906200005f565b604051809103905ff08015801562000039573d5f803e3d5ffd5b505f80546001600160a01b0319166001600160a01b03929092169190911790556200006d565b610c37806200306183390190565b612fe6806200007b5f395ff3fe608060405234801561000f575f80fd5b506004361061011b575f3560e01c80639ece0e86116100a9578063cdbebc511161006e578063cdbebc51146101e1578063ecb9d4aa146101f4578063ee5f3aeb14610207578063f16dcaa614610127578063fd8593f91461021a575f80fd5b80639ece0e86146101ab578063a0662c50146101b3578063aa2c209e14610127578063be61b745146101c6578063c2698205146101d9575f80fd5b806331261479116100ef57806331261479146101625780635d1dfde01461016a5780636706ede01461017d5780636eee9ce4146101905780638c18671814610198575f80fd5b806269650b1461011f57806301b0710a146101295780632adaa1c91461013c5780632edf61871461014f575b5f80fd5b61012761022d565b005b61012761013736600461298e565b61032a565b61012761014a36600461298e565b6105ea565b61012761015d3660046129b6565b610977565b610127610b51565b61012761017836600461298e565b610cf0565b61012761018b3660046129cd565b610dc8565b61012761107d565b6101276101a63660046129cd565b611195565b6101276114ce565b6101276101c136600461298e565b61155d565b6101276101d43660046129b6565b61184f565b610127611a4b565b6101276101ef3660046129cd565b611cb0565b6101276102023660046129cd565b611fee565b61012761021536600461298e565b6122a6565b6101276102283660046129b6565b612573565b5f546040516370a0823160e01b8152336004820152610328916001600160a01b0316906370a0823190602401602060405180830381865afa158015610274573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061029891906129ed565b5f8054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102e6573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061030a91906129ed565b604051806060016040528060258152602001612f8c602591396127f1565b565b5f805460405163095ea7b360e01b81526001600160a01b038581166004830152602482018590529091169063095ea7b3906044016020604051808303815f875af115801561037a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061039e9190612a04565b90506103c98115156001151514604051806060016040528060238152602001612deb60239139612877565b5f54604051636eb1769f60e11b81523060048201526001600160a01b03858116602483015261047992169063dd62ed3e906044015b602060405180830381865afa158015610419573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043d91906129ed565b836040518060400160405280601b81526020017f416c6c6f77616e6365206e6f742073657420636f72726563746c7900000000008152506128bb565b5f546001600160a01b031663095ea7b384610495600286612a4b565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af11580156104dd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105019190612a04565b905061052c8115156001151514604051806060016040528060238152602001612deb60239139612877565b5f54604051636eb1769f60e11b81523060048201526001600160a01b0385811660248301526105e592169063dd62ed3e90604401602060405180830381865afa15801561057b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061059f91906129ed565b6105aa600285612a4b565b6040518060400160405280601b81526020017f416c6c6f77616e6365206e6f742073657420636f72726563746c7900000000008152506128bb565b505050565b306001600160a01b038316036105fe575f80fd5b336001600160a01b03831603610612575f80fd5b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610658573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061067c91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038781166004830152939450919216906370a0823190602401602060405180830381865afa1580156106c7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106eb91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa15801561073c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061076091906129ed565b905060028311801561077157508281115b610779575f80fd5b5f6107848486612a5e565b61078f906001612a71565b5f80546040516323b872dd60e01b81523360048201526001600160a01b038a8116602483015260448201859052939450919216906323b872dd906064016020604051808303815f875af11580156107e8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061080c9190612a04565b905061084681151560011515146040518060400160405280600f81526020016e1d1c985b9cd9995c8819985a5b1959608a1b815250612877565b5f546040516370a0823160e01b81523360048201526108d9916001600160a01b0316906370a0823190602401602060405180830381865afa15801561088d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b191906129ed565b6108bb8488612a8a565b604051806060016040528060278152602001612f1f602791396128bb565b5f546040516370a0823160e01b81526001600160a01b03898116600483015261096e9216906370a0823190602401602060405180830381865afa158015610922573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061094691906129ed565b6109508487612a71565b604051806060016040528060278152602001612ef8602791396128bb565b50505050505050565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156109bd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109e191906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa158015610a32573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a5691906129ed565b90505f82118015610a6657505f81115b610a6e575f80fd5b5f81831015610a7d5782610a7f565b815b5f8054919250906001600160a01b03166323b872dd3383610aa1866001612a71565b610aab908a612a5e565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af1158015610afc573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b209190612a04565b9050610b4a8115155f151514604051806060016040528060278152602001612ea160279139612877565b5050505050565b5f8054906101000a90046001600160a01b03166001600160a01b031663ab789fa36040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610ba0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bc49190612a04565b15610bcd575f80fd5b6103285f8054906101000a90046001600160a01b03166001600160a01b031663378dc3dc6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610c1f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c4391906129ed565b5f8054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c91573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cb591906129ed565b6040518060400160405280601981526020017f546f6b656e20737570706c7920776173206d6f646966696564000000000000008152506128bb565b5f805460405163095ea7b360e01b81526001600160a01b038581166004830152602482018590529091169063095ea7b3906044016020604051808303815f875af1158015610d40573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d649190612a04565b9050610d8f8115156001151514604051806060016040528060238152602001612deb60239139612877565b5f54604051636eb1769f60e11b81523060048201526001600160a01b0385811660248301526105e592169063dd62ed3e906044016103fe565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610e0e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e3291906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa158015610e7d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ea191906129ed565b90505f8211610eae575f80fd5b5f80546001600160a01b031663a9059cbb85610ecb866001612a71565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015610f13573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f379190612a04565b9050610f618115155f151514604051806060016040528060318152602001612d0160319139612877565b5f546040516370a0823160e01b8152306004820152610feb916001600160a01b0316906370a0823190602401602060405180830381865afa158015610fa8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fcc91906129ed565b84604051806060016040528060368152602001612e0e603691396128bb565b5f546040516370a0823160e01b81526001600160a01b0386811660048301526110779216906370a0823190602401602060405180830381865afa158015611034573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061105891906129ed565b83604051806060016040528060368152602001612c12603691396128bb565b50505050565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156110c3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110e791906129ed565b90505f81116110f4575f80fd5b5f805460405163a9059cbb60e01b815260048101839052602481018490526001600160a01b039091169063a9059cbb906044016020604051808303815f875af1158015611143573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111679190612a04565b90506111918115155f151514604051806060016040528060238152602001612e4460239139612877565b5050565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156111db573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111ff91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa15801561124a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061126e91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa1580156112bf573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112e391906129ed565b90505f831180156112f357508281115b6112fb575f80fd5b5f80546001600160a01b03166323b872dd3387611319886001612a71565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af115801561136a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061138e9190612a04565b90506113b88115155f151514604051806060016040528060358152602001612c7460359139612877565b5f546040516370a0823160e01b8152336004820152611442916001600160a01b0316906370a0823190602401602060405180830381865afa1580156113ff573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061142391906129ed565b856040518060600160405280603a8152602001612e67603a91396128bb565b5f546040516370a0823160e01b81526001600160a01b038781166004830152610b4a9216906370a0823190602401602060405180830381865afa15801561148b573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114af91906129ed565b846040518060600160405280603a8152602001612d8e603a91396128bb565b5f80546040516370a0823160e01b81526004810192909252610328916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561151a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061153e91906129ed565b5f604051806060016040528060268152602001612cdb602691396128bb565b306001600160a01b03831603611571575f80fd5b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156115b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115db91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038781166004830152939450919216906370a0823190602401602060405180830381865afa158015611626573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061164a91906129ed565b905060028211611658575f80fd5b5f6116638385612a5e565b61166e906001612a71565b5f805460405163a9059cbb60e01b81526001600160a01b038981166004830152602482018590529394509192169063a9059cbb906044016020604051808303815f875af11580156116c1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116e59190612a04565b905061171f81151560011515146040518060400160405280600f81526020016e1d1c985b9cd9995c8819985a5b1959608a1b815250612877565b5f546040516370a0823160e01b81523060048201526117b2916001600160a01b0316906370a0823190602401602060405180830381865afa158015611766573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061178a91906129ed565b6117948487612a8a565b604051806060016040528060238152602001612dc8602391396128bb565b5f546040516370a0823160e01b81526001600160a01b0388811660048301526118479216906370a0823190602401602060405180830381865afa1580156117fb573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061181f91906129ed565b6118298486612a71565b604051806060016040528060238152602001612f46602391396128bb565b505050505050565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611895573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118b991906129ed565b90505f81116118c6575f80fd5b5f80546001600160a01b031663a9059cbb306118e3856001612a71565b6118ed9087612a5e565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015611935573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119599190612a04565b90506119a181151560011515146040518060400160405280601481526020017f4661696c65642073656c66207472616e73666572000000000000000000000000815250612877565b5f546040516370a0823160e01b81523060048201526105e59184916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156119ec573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a1091906129ed565b6040518060400160405280601f81526020017f53656c66207472616e7366657220627265616b73206163636f756e74696e67008152506128bb565b5f80546040516370a0823160e01b81526203000060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611a94573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ab891906129ed565b5f546040516370a0823160e01b81526202000060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611b00573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b2491906129ed565b5f546040516370a0823160e01b81526201000060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611b6c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b9091906129ed565b5f546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611bd5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bf991906129ed565b611c039190612a71565b611c0d9190612a71565b611c179190612a71565b9050611cad815f8054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c6b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c8f91906129ed565b604051806060016040528060328152602001612ca9603291396127f1565b50565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611cf6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d1a91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa158015611d65573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d8991906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa158015611dda573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dfe91906129ed565b90505f83118015611e0e57505f81115b611e16575f80fd5b5f80546040516323b872dd60e01b81523360048201526001600160a01b03878116602483015260448201849052909116906323b872dd906064016020604051808303815f875af1158015611e6c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e909190612a04565b9050611ed881151560011515146040518060400160405280601f81526020017f5a65726f20616d6f756e74207472616e7366657246726f6d206661696c656400815250612877565b5f546040516370a0823160e01b8152336004820152611f62916001600160a01b0316906370a0823190602401602060405180830381865afa158015611f1f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f4391906129ed565b85604051806060016040528060308152602001612d32603091396128bb565b5f546040516370a0823160e01b81526001600160a01b038781166004830152610b4a9216906370a0823190602401602060405180830381865afa158015611fab573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fcf91906129ed565b84604051806060016040528060308152602001612ec8603091396128bb565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612034573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061205891906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa1580156120a3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120c791906129ed565b90505f82116120d4575f80fd5b5f805460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018490529091169063a9059cbb906044016020604051808303815f875af1158015612124573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121489190612a04565b905061219081151560011515146040518060400160405280601b81526020017f5a65726f20616d6f756e74207472616e73666572206661696c65640000000000815250612877565b5f546040516370a0823160e01b815230600482015261221a916001600160a01b0316906370a0823190602401602060405180830381865afa1580156121d7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121fb91906129ed565b846040518060600160405280602c8152602001612d62602c91396128bb565b5f546040516370a0823160e01b81526001600160a01b0386811660048301526110779216906370a0823190602401602060405180830381865afa158015612263573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061228791906129ed565b836040518060600160405280602c8152602001612c48602c91396128bb565b6001600160a01b03821630148015906122c757506001600160a01b03821615155b6122cf575f80fd5b336001600160a01b038316036122e3575f80fd5b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612329573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234d91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa15801561239e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123c291906129ed565b90505f821180156123d257508181115b6123da575f80fd5b5f6123e58385612a5e565b6123f0906001612a71565b5f80546040516323b872dd60e01b81523360048201526001600160a01b03898116602483015260448201859052939450919216906323b872dd906064016020604051808303815f875af1158015612449573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061246d9190612a04565b90506124b581151560011515146040518060400160405280601381526020017f7472616e7366657246726f6d206661696c656400000000000000000000000000815250612877565b5f198314611847575f54604051636eb1769f60e11b8152336004820152306024820152611847916001600160a01b03169063dd62ed3e90604401602060405180830381865afa15801561250a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061252e91906129ed565b6125388486612a8a565b6040518060400160405280601f81526020017f416c6c6f77616e6365206e6f74207570646174656420636f72726563746c79008152506128bb565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156125b9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125dd91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa15801561262e573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061265291906129ed565b90505f8211801561266257505f81115b61266a575f80fd5b5f81831015612679578261267b565b815b5f8054919250906001600160a01b03166323b872dd338061269d866001612a71565b6126a7908a612a5e565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af11580156126f8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061271c9190612a04565b905061276481151560011515146040518060400160405280601881526020017f4661696c65642073656c66207472616e7366657246726f6d0000000000000000815250612877565b5f546040516370a0823160e01b8152336004820152610b4a9186916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156127af573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127d391906129ed565b604051806060016040528060238152602001612f69602391396128bb565b818311156105e5575f61280384612930565b90505f61280f84612930565b90505f82828560405160200161282793929190612abf565b60405160208183030381529060405290507f62bdda9a05cdbcdbf905cbad99c6ebdc098b6f0933d8f2eb3cfab7400b602514816040516128679190612b4e565b60405180910390a1611847612b80565b81611191577feb03ca8c87c7849bef8f54cfdd2c6b967b2734fe872f751978c34bb91e13d351816040516128ab9190612b4e565b60405180910390a1611191612b80565b8183146105e5575f6128cc84612930565b90505f6128d884612930565b90505f8282856040516020016128f093929190612b94565b60405160208183030381529060405290507f2d2d38c9a34df9887a6dcb2a54c1f79ff8bf9c4d4cafacd7d1f7277f57baab6f816040516128679190612b4e565b606060a06040510180604052602081039150505f815280825b600183039250600a81066030018353600a9004806129495750819003601f19909101908152919050565b80356001600160a01b0381168114612989575f80fd5b919050565b5f806040838503121561299f575f80fd5b6129a883612973565b946020939093013593505050565b5f602082840312156129c6575f80fd5b5035919050565b5f602082840312156129dd575f80fd5b6129e682612973565b9392505050565b5f602082840312156129fd575f80fd5b5051919050565b5f60208284031215612a14575f80fd5b815180151581146129e6575f80fd5b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f82612a5957612a59612a23565b500490565b5f82612a6c57612a6c612a23565b500690565b80820180821115612a8457612a84612a37565b92915050565b81810381811115612a8457612a84612a37565b5f5b83811015612ab7578181015183820152602001612a9f565b50505f910152565b68024b73b30b634b21d160bd1b81525f8451612ae2816009850160208901612a9d565b601f60f91b6009918401918201528451612b0381600a840160208901612a9d565b7f206661696c65642c20726561736f6e3a20000000000000000000000000000000600a92909101918201528351612b4181601b840160208801612a9d565b01601b0195945050505050565b602081525f8251806020840152612b6c816040850160208701612a9d565b601f01601f19169190910160400192915050565b634e487b7160e01b5f52600160045260245ffd5b68024b73b30b634b21d160bd1b81525f8451612bb7816009850160208901612a9d565b61213d60f01b6009918401918201528451612bd981600b840160208901612a9d565b69016103932b0b9b7b71d160b51b600b92909101918201528351612c04816015840160208801612a9d565b016015019594505050505056fe5472616e7366657220666f72206d6f7265207468616e2062616c616e6365206d6f646966696564207461726765742062616c616e63655a65726f20616d6f756e74207472616e73666572206d6f646966696564207461726765742062616c616e63655375636365737366756c207472616e7366657246726f6d20666f72206d6f7265207468616e206163636f756e742062616c616e636553756d206f6620757365722062616c616e636573206172652067726561746572207468616e20746f74616c20737570706c7941646472657373207a65726f2062616c616e6365206e6f7420657175616c20746f207a65726f5375636365737366756c207472616e7366657220666f72206d6f7265207468616e206163636f756e742062616c616e63655a65726f20616d6f756e74207472616e7366657246726f6d206d6f64696669656420736f757263652062616c616e63655a65726f20616d6f756e74207472616e73666572206d6f64696669656420736f757263652062616c616e63655472616e7366657246726f6d20666f72206d6f7265207468616e2062616c616e6365206d6f646966696564207461726765742062616c616e636557726f6e6720736f757263652062616c616e6365206166746572207472616e736665724661696c656420746f2073657420616c6c6f77616e63652076696120617070726f76655472616e7366657220666f72206d6f7265207468616e2062616c616e6365206d6f64696669656420736f757263652062616c616e63655375636365737366756c207472616e7366657220746f2061646472657373207a65726f5472616e7366657246726f6d20666f72206d6f7265207468616e2062616c616e6365206d6f64696669656420736f757263652062616c616e63655375636365737366756c207472616e7366657246726f6d20746f2061646472657373207a65726f5a65726f20616d6f756e74207472616e7366657246726f6d206d6f646966696564207461726765742062616c616e636557726f6e67207461726765742062616c616e6365206166746572207472616e7366657246726f6d57726f6e6720736f757263652062616c616e6365206166746572207472616e7366657246726f6d57726f6e67207461726765742062616c616e6365206166746572207472616e7366657253656c66207472616e7366657246726f6d20627265616b73206163636f756e74696e67557365722062616c616e636520686967686572207468616e20746f74616c20737570706c79a2646970667358221220b8b9df3ec01a97c95b52873c4caa1d11a083a5bc26d71ddba8ab30afc73abaa164736f6c63430008170033608060405234801562000010575f80fd5b506040518060400160405280601381526020017f42616c616e63657220506f6f6c20546f6b656e000000000000000000000000008152506040518060400160405280600381526020016210941560ea1b81525081600390816200007491906200030f565b5060046200008382826200030f565b505050620000a462010000683635c9adc5dea000006200010260201b60201c565b620000bc62020000683635c9adc5dea0000062000102565b620000d462030000683635c9adc5dea0000062000102565b620000e933683635c9adc5dea0000062000102565b6002546006556005805460ff1916600117905562000401565b6001600160a01b038216620001315760405163ec442f0560e01b81525f60048201526024015b60405180910390fd5b6200013e5f838362000142565b5050565b6001600160a01b03831662000170578060025f828254620001649190620003db565b90915550620001e29050565b6001600160a01b0383165f9081526020819052604090205481811015620001c45760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640162000128565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821662000200576002805482900390556200021e565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200026491815260200190565b60405180910390a3505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200029a57607f821691505b602082108103620002b957634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200030a57805f5260205f20601f840160051c81016020851015620002e65750805b601f840160051c820191505b8181101562000307575f8155600101620002f2565b50505b505050565b81516001600160401b038111156200032b576200032b62000271565b62000343816200033c845462000285565b84620002bf565b602080601f83116001811462000379575f8415620003615750858301515b5f19600386901b1c1916600185901b178555620003d3565b5f85815260208120601f198616915b82811015620003a95788860151825594840194600190910190840162000388565b5085821015620003c757878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b80820180821115620003fb57634e487b7160e01b5f52601160045260245ffd5b92915050565b610828806200040f5f395ff3fe608060405234801561000f575f80fd5b50600436106100da575f3560e01c80636618846311610088578063a9059cbb11610063578063a9059cbb1461019f578063ab789fa3146101b2578063d73dd623146101bf578063dd62ed3e146101d2575f80fd5b8063661884631461015c57806370a082311461016f57806395d89b4114610197575f80fd5b806323b872dd116100b857806323b872dd14610131578063313ce56714610144578063378dc3dc14610153575f80fd5b806306fdde03146100de578063095ea7b3146100fc57806318160ddd1461011f575b5f80fd5b6100e661020a565b6040516100f39190610667565b60405180910390f35b61010f61010a3660046106ce565b61029a565b60405190151581526020016100f3565b6002545b6040519081526020016100f3565b61010f61013f3660046106f6565b6102b3565b604051601281526020016100f3565b61012360065481565b61010f61016a3660046106ce565b6102d6565b61012361017d36600461072f565b6001600160a01b03165f9081526020819052604090205490565b6100e6610325565b61010f6101ad3660046106ce565b610334565b60055461010f9060ff1681565b61010f6101cd3660046106ce565b610341565b6101236101e036600461074f565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b60606003805461021990610780565b80601f016020809104026020016040519081016040528092919081815260200182805461024590610780565b80156102905780601f1061026757610100808354040283529160200191610290565b820191905f5260205f20905b81548152906001019060200180831161027357829003601f168201915b5050505050905090565b5f336102a7818585610380565b60019150505b92915050565b5f336102c0858285610392565b6102cb858585610412565b506001949350505050565b335f9081526001602090815260408083206001600160a01b0386168452909152812054808311156103115761030c33855f610380565b6102a7565b6102a7338561032086856107cc565b610380565b60606004805461021990610780565b5f336102a7818585610412565b335f8181526001602090815260408083206001600160a01b038716845290915281205490916103779185906103209086906107df565b50600192915050565b61038d838383600161046f565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461040c57818110156103fe57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61040c84848484035f61046f565b50505050565b6001600160a01b03831661043b57604051634b637e8f60e11b81525f60048201526024016103f5565b6001600160a01b0382166104645760405163ec442f0560e01b81525f60048201526024016103f5565b61038d838383610541565b6001600160a01b0384166104985760405163e602df0560e01b81525f60048201526024016103f5565b6001600160a01b0383166104c157604051634a1406b160e11b81525f60048201526024016103f5565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561040c57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161053391815260200190565b60405180910390a350505050565b6001600160a01b03831661056b578060025f82825461056091906107df565b909155506105db9050565b6001600160a01b0383165f90815260208190526040902054818110156105bd5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016103f5565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166105f757600280548290039055610615565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161065a91815260200190565b60405180910390a3505050565b5f602080835283518060208501525f5b8181101561069357858101830151858201604001528201610677565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146106c9575f80fd5b919050565b5f80604083850312156106df575f80fd5b6106e8836106b3565b946020939093013593505050565b5f805f60608486031215610708575f80fd5b610711846106b3565b925061071f602085016106b3565b9150604084013590509250925092565b5f6020828403121561073f575f80fd5b610748826106b3565b9392505050565b5f8060408385031215610760575f80fd5b610769836106b3565b9150610777602084016106b3565b90509250929050565b600181811c9082168061079457607f821691505b6020821081036107b257634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156102ad576102ad6107b8565b808201808211156102ad576102ad6107b856fea264697066735822122045d198b9eef0f86a3260bb5ca902ab5aa3b444a24d3d4e593ead7080bdd0166864736f6c63430008170033", "bin-runtime": "608060405234801561000f575f80fd5b506004361061011b575f3560e01c80639ece0e86116100a9578063cdbebc511161006e578063cdbebc51146101e1578063ecb9d4aa146101f4578063ee5f3aeb14610207578063f16dcaa614610127578063fd8593f91461021a575f80fd5b80639ece0e86146101ab578063a0662c50146101b3578063aa2c209e14610127578063be61b745146101c6578063c2698205146101d9575f80fd5b806331261479116100ef57806331261479146101625780635d1dfde01461016a5780636706ede01461017d5780636eee9ce4146101905780638c18671814610198575f80fd5b806269650b1461011f57806301b0710a146101295780632adaa1c91461013c5780632edf61871461014f575b5f80fd5b61012761022d565b005b61012761013736600461298e565b61032a565b61012761014a36600461298e565b6105ea565b61012761015d3660046129b6565b610977565b610127610b51565b61012761017836600461298e565b610cf0565b61012761018b3660046129cd565b610dc8565b61012761107d565b6101276101a63660046129cd565b611195565b6101276114ce565b6101276101c136600461298e565b61155d565b6101276101d43660046129b6565b61184f565b610127611a4b565b6101276101ef3660046129cd565b611cb0565b6101276102023660046129cd565b611fee565b61012761021536600461298e565b6122a6565b6101276102283660046129b6565b612573565b5f546040516370a0823160e01b8152336004820152610328916001600160a01b0316906370a0823190602401602060405180830381865afa158015610274573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061029891906129ed565b5f8054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102e6573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061030a91906129ed565b604051806060016040528060258152602001612f8c602591396127f1565b565b5f805460405163095ea7b360e01b81526001600160a01b038581166004830152602482018590529091169063095ea7b3906044016020604051808303815f875af115801561037a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061039e9190612a04565b90506103c98115156001151514604051806060016040528060238152602001612deb60239139612877565b5f54604051636eb1769f60e11b81523060048201526001600160a01b03858116602483015261047992169063dd62ed3e906044015b602060405180830381865afa158015610419573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043d91906129ed565b836040518060400160405280601b81526020017f416c6c6f77616e6365206e6f742073657420636f72726563746c7900000000008152506128bb565b5f546001600160a01b031663095ea7b384610495600286612a4b565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af11580156104dd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105019190612a04565b905061052c8115156001151514604051806060016040528060238152602001612deb60239139612877565b5f54604051636eb1769f60e11b81523060048201526001600160a01b0385811660248301526105e592169063dd62ed3e90604401602060405180830381865afa15801561057b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061059f91906129ed565b6105aa600285612a4b565b6040518060400160405280601b81526020017f416c6c6f77616e6365206e6f742073657420636f72726563746c7900000000008152506128bb565b505050565b306001600160a01b038316036105fe575f80fd5b336001600160a01b03831603610612575f80fd5b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610658573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061067c91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038781166004830152939450919216906370a0823190602401602060405180830381865afa1580156106c7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106eb91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa15801561073c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061076091906129ed565b905060028311801561077157508281115b610779575f80fd5b5f6107848486612a5e565b61078f906001612a71565b5f80546040516323b872dd60e01b81523360048201526001600160a01b038a8116602483015260448201859052939450919216906323b872dd906064016020604051808303815f875af11580156107e8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061080c9190612a04565b905061084681151560011515146040518060400160405280600f81526020016e1d1c985b9cd9995c8819985a5b1959608a1b815250612877565b5f546040516370a0823160e01b81523360048201526108d9916001600160a01b0316906370a0823190602401602060405180830381865afa15801561088d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b191906129ed565b6108bb8488612a8a565b604051806060016040528060278152602001612f1f602791396128bb565b5f546040516370a0823160e01b81526001600160a01b03898116600483015261096e9216906370a0823190602401602060405180830381865afa158015610922573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061094691906129ed565b6109508487612a71565b604051806060016040528060278152602001612ef8602791396128bb565b50505050505050565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156109bd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109e191906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa158015610a32573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a5691906129ed565b90505f82118015610a6657505f81115b610a6e575f80fd5b5f81831015610a7d5782610a7f565b815b5f8054919250906001600160a01b03166323b872dd3383610aa1866001612a71565b610aab908a612a5e565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af1158015610afc573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b209190612a04565b9050610b4a8115155f151514604051806060016040528060278152602001612ea160279139612877565b5050505050565b5f8054906101000a90046001600160a01b03166001600160a01b031663ab789fa36040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610ba0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bc49190612a04565b15610bcd575f80fd5b6103285f8054906101000a90046001600160a01b03166001600160a01b031663378dc3dc6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610c1f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c4391906129ed565b5f8054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c91573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cb591906129ed565b6040518060400160405280601981526020017f546f6b656e20737570706c7920776173206d6f646966696564000000000000008152506128bb565b5f805460405163095ea7b360e01b81526001600160a01b038581166004830152602482018590529091169063095ea7b3906044016020604051808303815f875af1158015610d40573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d649190612a04565b9050610d8f8115156001151514604051806060016040528060238152602001612deb60239139612877565b5f54604051636eb1769f60e11b81523060048201526001600160a01b0385811660248301526105e592169063dd62ed3e906044016103fe565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610e0e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e3291906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa158015610e7d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ea191906129ed565b90505f8211610eae575f80fd5b5f80546001600160a01b031663a9059cbb85610ecb866001612a71565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015610f13573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f379190612a04565b9050610f618115155f151514604051806060016040528060318152602001612d0160319139612877565b5f546040516370a0823160e01b8152306004820152610feb916001600160a01b0316906370a0823190602401602060405180830381865afa158015610fa8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fcc91906129ed565b84604051806060016040528060368152602001612e0e603691396128bb565b5f546040516370a0823160e01b81526001600160a01b0386811660048301526110779216906370a0823190602401602060405180830381865afa158015611034573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061105891906129ed565b83604051806060016040528060368152602001612c12603691396128bb565b50505050565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156110c3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110e791906129ed565b90505f81116110f4575f80fd5b5f805460405163a9059cbb60e01b815260048101839052602481018490526001600160a01b039091169063a9059cbb906044016020604051808303815f875af1158015611143573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111679190612a04565b90506111918115155f151514604051806060016040528060238152602001612e4460239139612877565b5050565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156111db573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111ff91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa15801561124a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061126e91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa1580156112bf573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112e391906129ed565b90505f831180156112f357508281115b6112fb575f80fd5b5f80546001600160a01b03166323b872dd3387611319886001612a71565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af115801561136a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061138e9190612a04565b90506113b88115155f151514604051806060016040528060358152602001612c7460359139612877565b5f546040516370a0823160e01b8152336004820152611442916001600160a01b0316906370a0823190602401602060405180830381865afa1580156113ff573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061142391906129ed565b856040518060600160405280603a8152602001612e67603a91396128bb565b5f546040516370a0823160e01b81526001600160a01b038781166004830152610b4a9216906370a0823190602401602060405180830381865afa15801561148b573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114af91906129ed565b846040518060600160405280603a8152602001612d8e603a91396128bb565b5f80546040516370a0823160e01b81526004810192909252610328916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561151a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061153e91906129ed565b5f604051806060016040528060268152602001612cdb602691396128bb565b306001600160a01b03831603611571575f80fd5b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156115b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115db91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038781166004830152939450919216906370a0823190602401602060405180830381865afa158015611626573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061164a91906129ed565b905060028211611658575f80fd5b5f6116638385612a5e565b61166e906001612a71565b5f805460405163a9059cbb60e01b81526001600160a01b038981166004830152602482018590529394509192169063a9059cbb906044016020604051808303815f875af11580156116c1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116e59190612a04565b905061171f81151560011515146040518060400160405280600f81526020016e1d1c985b9cd9995c8819985a5b1959608a1b815250612877565b5f546040516370a0823160e01b81523060048201526117b2916001600160a01b0316906370a0823190602401602060405180830381865afa158015611766573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061178a91906129ed565b6117948487612a8a565b604051806060016040528060238152602001612dc8602391396128bb565b5f546040516370a0823160e01b81526001600160a01b0388811660048301526118479216906370a0823190602401602060405180830381865afa1580156117fb573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061181f91906129ed565b6118298486612a71565b604051806060016040528060238152602001612f46602391396128bb565b505050505050565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611895573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118b991906129ed565b90505f81116118c6575f80fd5b5f80546001600160a01b031663a9059cbb306118e3856001612a71565b6118ed9087612a5e565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015611935573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119599190612a04565b90506119a181151560011515146040518060400160405280601481526020017f4661696c65642073656c66207472616e73666572000000000000000000000000815250612877565b5f546040516370a0823160e01b81523060048201526105e59184916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156119ec573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a1091906129ed565b6040518060400160405280601f81526020017f53656c66207472616e7366657220627265616b73206163636f756e74696e67008152506128bb565b5f80546040516370a0823160e01b81526203000060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611a94573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ab891906129ed565b5f546040516370a0823160e01b81526202000060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611b00573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b2491906129ed565b5f546040516370a0823160e01b81526201000060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611b6c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b9091906129ed565b5f546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611bd5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bf991906129ed565b611c039190612a71565b611c0d9190612a71565b611c179190612a71565b9050611cad815f8054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c6b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c8f91906129ed565b604051806060016040528060328152602001612ca9603291396127f1565b50565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611cf6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d1a91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa158015611d65573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d8991906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa158015611dda573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dfe91906129ed565b90505f83118015611e0e57505f81115b611e16575f80fd5b5f80546040516323b872dd60e01b81523360048201526001600160a01b03878116602483015260448201849052909116906323b872dd906064016020604051808303815f875af1158015611e6c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e909190612a04565b9050611ed881151560011515146040518060400160405280601f81526020017f5a65726f20616d6f756e74207472616e7366657246726f6d206661696c656400815250612877565b5f546040516370a0823160e01b8152336004820152611f62916001600160a01b0316906370a0823190602401602060405180830381865afa158015611f1f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f4391906129ed565b85604051806060016040528060308152602001612d32603091396128bb565b5f546040516370a0823160e01b81526001600160a01b038781166004830152610b4a9216906370a0823190602401602060405180830381865afa158015611fab573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fcf91906129ed565b84604051806060016040528060308152602001612ec8603091396128bb565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612034573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061205891906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa1580156120a3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120c791906129ed565b90505f82116120d4575f80fd5b5f805460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018490529091169063a9059cbb906044016020604051808303815f875af1158015612124573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121489190612a04565b905061219081151560011515146040518060400160405280601b81526020017f5a65726f20616d6f756e74207472616e73666572206661696c65640000000000815250612877565b5f546040516370a0823160e01b815230600482015261221a916001600160a01b0316906370a0823190602401602060405180830381865afa1580156121d7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121fb91906129ed565b846040518060600160405280602c8152602001612d62602c91396128bb565b5f546040516370a0823160e01b81526001600160a01b0386811660048301526110779216906370a0823190602401602060405180830381865afa158015612263573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061228791906129ed565b836040518060600160405280602c8152602001612c48602c91396128bb565b6001600160a01b03821630148015906122c757506001600160a01b03821615155b6122cf575f80fd5b336001600160a01b038316036122e3575f80fd5b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612329573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234d91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa15801561239e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123c291906129ed565b90505f821180156123d257508181115b6123da575f80fd5b5f6123e58385612a5e565b6123f0906001612a71565b5f80546040516323b872dd60e01b81523360048201526001600160a01b03898116602483015260448201859052939450919216906323b872dd906064016020604051808303815f875af1158015612449573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061246d9190612a04565b90506124b581151560011515146040518060400160405280601381526020017f7472616e7366657246726f6d206661696c656400000000000000000000000000815250612877565b5f198314611847575f54604051636eb1769f60e11b8152336004820152306024820152611847916001600160a01b03169063dd62ed3e90604401602060405180830381865afa15801561250a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061252e91906129ed565b6125388486612a8a565b6040518060400160405280601f81526020017f416c6c6f77616e6365206e6f74207570646174656420636f72726563746c79008152506128bb565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156125b9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125dd91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa15801561262e573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061265291906129ed565b90505f8211801561266257505f81115b61266a575f80fd5b5f81831015612679578261267b565b815b5f8054919250906001600160a01b03166323b872dd338061269d866001612a71565b6126a7908a612a5e565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af11580156126f8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061271c9190612a04565b905061276481151560011515146040518060400160405280601881526020017f4661696c65642073656c66207472616e7366657246726f6d0000000000000000815250612877565b5f546040516370a0823160e01b8152336004820152610b4a9186916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156127af573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127d391906129ed565b604051806060016040528060238152602001612f69602391396128bb565b818311156105e5575f61280384612930565b90505f61280f84612930565b90505f82828560405160200161282793929190612abf565b60405160208183030381529060405290507f62bdda9a05cdbcdbf905cbad99c6ebdc098b6f0933d8f2eb3cfab7400b602514816040516128679190612b4e565b60405180910390a1611847612b80565b81611191577feb03ca8c87c7849bef8f54cfdd2c6b967b2734fe872f751978c34bb91e13d351816040516128ab9190612b4e565b60405180910390a1611191612b80565b8183146105e5575f6128cc84612930565b90505f6128d884612930565b90505f8282856040516020016128f093929190612b94565b60405160208183030381529060405290507f2d2d38c9a34df9887a6dcb2a54c1f79ff8bf9c4d4cafacd7d1f7277f57baab6f816040516128679190612b4e565b606060a06040510180604052602081039150505f815280825b600183039250600a81066030018353600a9004806129495750819003601f19909101908152919050565b80356001600160a01b0381168114612989575f80fd5b919050565b5f806040838503121561299f575f80fd5b6129a883612973565b946020939093013593505050565b5f602082840312156129c6575f80fd5b5035919050565b5f602082840312156129dd575f80fd5b6129e682612973565b9392505050565b5f602082840312156129fd575f80fd5b5051919050565b5f60208284031215612a14575f80fd5b815180151581146129e6575f80fd5b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f82612a5957612a59612a23565b500490565b5f82612a6c57612a6c612a23565b500690565b80820180821115612a8457612a84612a37565b92915050565b81810381811115612a8457612a84612a37565b5f5b83811015612ab7578181015183820152602001612a9f565b50505f910152565b68024b73b30b634b21d160bd1b81525f8451612ae2816009850160208901612a9d565b601f60f91b6009918401918201528451612b0381600a840160208901612a9d565b7f206661696c65642c20726561736f6e3a20000000000000000000000000000000600a92909101918201528351612b4181601b840160208801612a9d565b01601b0195945050505050565b602081525f8251806020840152612b6c816040850160208701612a9d565b601f01601f19169190910160400192915050565b634e487b7160e01b5f52600160045260245ffd5b68024b73b30b634b21d160bd1b81525f8451612bb7816009850160208901612a9d565b61213d60f01b6009918401918201528451612bd981600b840160208901612a9d565b69016103932b0b9b7b71d160b51b600b92909101918201528351612c04816015840160208801612a9d565b016015019594505050505056fe5472616e7366657220666f72206d6f7265207468616e2062616c616e6365206d6f646966696564207461726765742062616c616e63655a65726f20616d6f756e74207472616e73666572206d6f646966696564207461726765742062616c616e63655375636365737366756c207472616e7366657246726f6d20666f72206d6f7265207468616e206163636f756e742062616c616e636553756d206f6620757365722062616c616e636573206172652067726561746572207468616e20746f74616c20737570706c7941646472657373207a65726f2062616c616e6365206e6f7420657175616c20746f207a65726f5375636365737366756c207472616e7366657220666f72206d6f7265207468616e206163636f756e742062616c616e63655a65726f20616d6f756e74207472616e7366657246726f6d206d6f64696669656420736f757263652062616c616e63655a65726f20616d6f756e74207472616e73666572206d6f64696669656420736f757263652062616c616e63655472616e7366657246726f6d20666f72206d6f7265207468616e2062616c616e6365206d6f646966696564207461726765742062616c616e636557726f6e6720736f757263652062616c616e6365206166746572207472616e736665724661696c656420746f2073657420616c6c6f77616e63652076696120617070726f76655472616e7366657220666f72206d6f7265207468616e2062616c616e6365206d6f64696669656420736f757263652062616c616e63655375636365737366756c207472616e7366657220746f2061646472657373207a65726f5472616e7366657246726f6d20666f72206d6f7265207468616e2062616c616e6365206d6f64696669656420736f757263652062616c616e63655375636365737366756c207472616e7366657246726f6d20746f2061646472657373207a65726f5a65726f20616d6f756e74207472616e7366657246726f6d206d6f646966696564207461726765742062616c616e636557726f6e67207461726765742062616c616e6365206166746572207472616e7366657246726f6d57726f6e6720736f757263652062616c616e6365206166746572207472616e7366657246726f6d57726f6e67207461726765742062616c616e6365206166746572207472616e7366657253656c66207472616e7366657246726f6d20627265616b73206163636f756e74696e67557365722062616c616e636520686967686572207468616e20746f74616c20737570706c79a2646970667358221220b8b9df3ec01a97c95b52873c4caa1d11a083a5bc26d71ddba8ab30afc73abaa164736f6c63430008170033", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {"fuzz_decreaseApproval()": {"author": null, "details": null, "params": {}, "return": null}, "fuzz_increaseApproval()": {"author": null, "details": null, "params": {}, "return": null}}, "author": null, "details": null, "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/test/invariants/fuzz/external/BToken.sol:CryticTokenMock": {"srcmap": "952:397:12:-:0;;;1087:260;;;;;;;;;;1896:113:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1896:113:7;;;1970:5;1962;:13;;;;;;:::i;:::-;-1:-1:-1;1985:7:7;:17;1995:7;1985;:17;:::i;:::-;;1896:113;;1112:29:12;136:7:4;279;1112:5:12;;;:29;;:::i;:::-;1151;183:7:4;279;1151:5:12;:29::i;:::-;1190;230:7:4;279;1190:5:12;:29::i;:::-;1229:34;1235:10;279:7:4;1229:5:12;:34::i;:::-;3222:12:7;;1274:13:12;:29;1313:20;:27;;-1:-1:-1;;1313:27:12;1336:4;1313:27;;;952:397;;7721:208:7;-1:-1:-1;;;;;7791:21:7;;7787:91;;7835:32;;-1:-1:-1;;;7835:32:7;;7864:1;7835:32;;;2847:51:13;2820:18;;7835:32:7;;;;;;;;7787:91;7887:35;7903:1;7907:7;7916:5;7887:7;:35::i;:::-;7721:208;;:::o;6271:1107::-;-1:-1:-1;;;;;6360:18:7;;6356:540;;6512:5;6496:12;;:21;;;;;;;:::i;:::-;;;;-1:-1:-1;6356:540:7;;-1:-1:-1;6356:540:7;;-1:-1:-1;;;;;6570:15:7;;6548:19;6570:15;;;;;;;;;;;6603:19;;;6599:115;;;6649:50;;-1:-1:-1;;;6649:50:7;;-1:-1:-1;;;;;3356:32:13;;6649:50:7;;;3338:51:13;3405:18;;;3398:34;;;3448:18;;;3441:34;;;3311:18;;6649:50:7;3136:345:13;6599:115:7;-1:-1:-1;;;;;6834:15:7;;:9;:15;;;;;;;;;;6852:19;;;;6834:37;;6356:540;-1:-1:-1;;;;;6910:16:7;;6906:425;;7073:12;:21;;;;;;;6906:425;;;-1:-1:-1;;;;;7284:13:7;;:9;:13;;;;;;;;;;:22;;;;;;6906:425;7361:2;-1:-1:-1;;;;;7346:25:7;7355:4;-1:-1:-1;;;;;7346:25:7;;7365:5;7346:25;;;;3632::13;;3620:2;3605:18;;3486:177;7346:25:7;;;;;;;;6271:1107;;;:::o;14:127:13:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:380;225:1;221:12;;;;268;;;289:61;;343:4;335:6;331:17;321:27;;289:61;396:2;388:6;385:14;365:18;362:38;359:161;;442:10;437:3;433:20;430:1;423:31;477:4;474:1;467:15;505:4;502:1;495:15;359:161;;146:380;;;:::o;657:518::-;759:2;754:3;751:11;748:421;;;795:5;792:1;785:16;839:4;836:1;826:18;909:2;897:10;893:19;890:1;886:27;880:4;876:38;945:4;933:10;930:20;927:47;;;-1:-1:-1;968:4:13;927:47;1023:2;1018:3;1014:12;1011:1;1007:20;1001:4;997:31;987:41;;1078:81;1096:2;1089:5;1086:13;1078:81;;;1155:1;1141:16;;1122:1;1111:13;1078:81;;;1082:3;;748:421;657:518;;;:::o;1351:1345::-;1471:10;;-1:-1:-1;;;;;1493:30:13;;1490:56;;;1526:18;;:::i;:::-;1555:97;1645:6;1605:38;1637:4;1631:11;1605:38;:::i;:::-;1599:4;1555:97;:::i;:::-;1707:4;;1764:2;1753:14;;1781:1;1776:663;;;;2483:1;2500:6;2497:89;;;-1:-1:-1;2552:19:13;;;2546:26;2497:89;-1:-1:-1;;1308:1:13;1304:11;;;1300:24;1296:29;1286:40;1332:1;1328:11;;;1283:57;2599:81;;1746:944;;1776:663;604:1;597:14;;;641:4;628:18;;-1:-1:-1;;1812:20:13;;;1930:236;1944:7;1941:1;1938:14;1930:236;;;2033:19;;;2027:26;2012:42;;2125:27;;;;2093:1;2081:14;;;;1960:19;;1930:236;;;1934:3;2194:6;2185:7;2182:19;2179:201;;;2255:19;;;2249:26;-1:-1:-1;;2338:1:13;2334:14;;;2350:3;2330:24;2326:37;2322:42;2307:58;2292:74;;2179:201;;;2426:1;2417:6;2414:1;2410:14;2406:22;2400:4;2393:36;1746:944;;;;;1351:1345;;:::o;2909:222::-;2974:9;;;2995:10;;;2992:133;;;3047:10;3042:3;3038:20;3035:1;3028:31;3082:4;3079:1;3072:15;3110:4;3107:1;3100:15;2992:133;2909:222;;;;:::o;3486:177::-;952:397:12;;;;;;", "srcmap-runtime": "952:397:12:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89:7;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4293:186;;;;;;:::i;:::-;;:::i;:::-;;;1192:14:13;;1185:22;1167:41;;1155:2;1140:18;4293:186:7;1027:187:13;3144:97:7;3222:12;;3144:97;;;1365:25:13;;;1353:2;1338:18;3144:97:7;1219:177:13;5039:244:7;;;;;;:::i;:::-;;:::i;3002:82::-;;;3075:2;1876:36:13;;1864:2;1849:18;3002:82:7;1734:184:13;1053:28:12;;;;;;1024:312:11;;;;;;:::i;:::-;;:::i;3299:116:7:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3390:18:7;3364:7;3390:18;;;;;;;;;;;;3299:116;2276:93;;;:::i;3610:178::-;;;;;;:::i;:::-;;:::i;1015:32:12:-;;;;;;;;;579:189:11;;;;;;:::i;:::-;;:::i;3846:140:7:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3952:18:7;;;3926:7;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3846:140;2074:89;2119:13;2151:5;2144:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89;:::o;4293:186::-;4366:4;735:10:10;4420:31:7;735:10:10;4436:7:7;4445:5;4420:8;:31::i;:::-;4468:4;4461:11;;;4293:186;;;;;:::o;5039:244::-;5126:4;735:10:10;5182:37:7;5198:4;735:10:10;5213:5:7;5182:15;:37::i;:::-;5229:26;5239:4;5245:2;5249:5;5229:9;:26::i;:::-;-1:-1:-1;5272:4:7;;5039:244;-1:-1:-1;;;;5039:244:7:o;1024:312:11:-;1150:10;1101:12;3952:18:7;;;:11;:18;;;;;;;;-1:-1:-1;;;;;3952:27:7;;;;;;;;;;1189:8:11;1180:6;:17;1176:139;;;1207:32;1216:10;1228:7;1237:1;1207:8;:32::i;:::-;1176:139;;;1260:48;1269:10;1281:7;1290:17;1301:6;1290:8;:17;:::i;:::-;1260:8;:48::i;2276:93:7:-;2323:13;2355:7;2348:14;;;;;:::i;3610:178::-;3679:4;735:10:10;3733:27:7;735:10:10;3750:2:7;3754:5;3733:9;:27::i;579:189:11:-;685:10;656:12;3952:18:7;;;:11;:18;;;;;;;;-1:-1:-1;;;;;3952:27:7;;;;;;;;;;656:12:11;;676:70;;3952:27:7;;706:39:11;;739:6;;706:39;:::i;676:70::-;-1:-1:-1;759:4:11;579:189;;;;:::o;8989:128:7:-;9073:37;9082:5;9089:7;9098:5;9105:4;9073:8;:37::i;:::-;8989:128;;;:::o;10663:477::-;-1:-1:-1;;;;;3952:18:7;;;10762:24;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;-1:-1:-1;;10828:37:7;;10824:310;;10904:5;10885:16;:24;10881:130;;;10936:60;;-1:-1:-1;;;10936:60:7;;-1:-1:-1;;;;;3379:55:13;;10936:60:7;;;3361:74:13;3451:18;;;3444:34;;;3494:18;;;3487:34;;;3334:18;;10936:60:7;;;;;;;;10881:130;11052:57;11061:5;11068:7;11096:5;11077:16;:24;11103:5;11052:8;:57::i;:::-;10752:388;10663:477;;;:::o;5656:300::-;-1:-1:-1;;;;;5739:18:7;;5735:86;;5780:30;;-1:-1:-1;;;5780:30:7;;5807:1;5780:30;;;3678:74:13;3651:18;;5780:30:7;3532:226:13;5735:86:7;-1:-1:-1;;;;;5834:16:7;;5830:86;;5873:32;;-1:-1:-1;;;5873:32:7;;5902:1;5873:32;;;3678:74:13;3651:18;;5873:32:7;3532:226:13;5830:86:7;5925:24;5933:4;5939:2;5943:5;5925:7;:24::i;9949:432::-;-1:-1:-1;;;;;10061:19:7;;10057:89;;10103:32;;-1:-1:-1;;;10103:32:7;;10132:1;10103:32;;;3678:74:13;3651:18;;10103:32:7;3532:226:13;10057:89:7;-1:-1:-1;;;;;10159:21:7;;10155:90;;10203:31;;-1:-1:-1;;;10203:31:7;;10231:1;10203:31;;;3678:74:13;3651:18;;10203:31:7;3532:226:13;10155:90:7;-1:-1:-1;;;;;10254:18:7;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;:35;;;10299:76;;;;10349:7;-1:-1:-1;;;;;10333:31:7;10342:5;-1:-1:-1;;;;;10333:31:7;;10358:5;10333:31;;;;1365:25:13;;1353:2;1338:18;;1219:177;10333:31:7;;;;;;;;9949:432;;;;:::o;6271:1107::-;-1:-1:-1;;;;;6360:18:7;;6356:540;;6512:5;6496:12;;:21;;;;;;;:::i;:::-;;;;-1:-1:-1;6356:540:7;;-1:-1:-1;6356:540:7;;-1:-1:-1;;;;;6570:15:7;;6548:19;6570:15;;;;;;;;;;;6603:19;;;6599:115;;;6649:50;;-1:-1:-1;;;6649:50:7;;-1:-1:-1;;;;;3379:55:13;;6649:50:7;;;3361:74:13;3451:18;;;3444:34;;;3494:18;;;3487:34;;;3334:18;;6649:50:7;3159:368:13;6599:115:7;-1:-1:-1;;;;;6834:15:7;;:9;:15;;;;;;;;;;6852:19;;;;6834:37;;6356:540;-1:-1:-1;;;;;6910:16:7;;6906:425;;7073:12;:21;;;;;;;6906:425;;;-1:-1:-1;;;;;7284:13:7;;:9;:13;;;;;;;;;;:22;;;;;;6906:425;7361:2;-1:-1:-1;;;;;7346:25:7;7355:4;-1:-1:-1;;;;;7346:25:7;;7365:5;7346:25;;;;1365::13;;1353:2;1338:18;;1219:177;7346:25:7;;;;;;;;6271:1107;;;:::o;14:548:13:-;126:4;155:2;184;173:9;166:21;216:6;210:13;259:6;254:2;243:9;239:18;232:34;284:1;294:140;308:6;305:1;302:13;294:140;;;403:14;;;399:23;;393:30;369:17;;;388:2;365:26;358:66;323:10;;294:140;;;298:3;483:1;478:2;469:6;458:9;454:22;450:31;443:42;553:2;546;542:7;537:2;529:6;525:15;521:29;510:9;506:45;502:54;494:62;;;;14:548;;;;:::o;567:196::-;635:20;;-1:-1:-1;;;;;684:54:13;;674:65;;664:93;;753:1;750;743:12;664:93;567:196;;;:::o;768:254::-;836:6;844;897:2;885:9;876:7;872:23;868:32;865:52;;;913:1;910;903:12;865:52;936:29;955:9;936:29;:::i;:::-;926:39;1012:2;997:18;;;;984:32;;-1:-1:-1;;;768:254:13:o;1401:328::-;1478:6;1486;1494;1547:2;1535:9;1526:7;1522:23;1518:32;1515:52;;;1563:1;1560;1553:12;1515:52;1586:29;1605:9;1586:29;:::i;:::-;1576:39;;1634:38;1668:2;1657:9;1653:18;1634:38;:::i;:::-;1624:48;;1719:2;1708:9;1704:18;1691:32;1681:42;;1401:328;;;;;:::o;1923:186::-;1982:6;2035:2;2023:9;2014:7;2010:23;2006:32;2003:52;;;2051:1;2048;2041:12;2003:52;2074:29;2093:9;2074:29;:::i;:::-;2064:39;1923:186;-1:-1:-1;;;1923:186:13:o;2114:260::-;2182:6;2190;2243:2;2231:9;2222:7;2218:23;2214:32;2211:52;;;2259:1;2256;2249:12;2211:52;2282:29;2301:9;2282:29;:::i;:::-;2272:39;;2330:38;2364:2;2353:9;2349:18;2330:38;:::i;:::-;2320:48;;2114:260;;;;;:::o;2379:380::-;2458:1;2454:12;;;;2501;;;2522:61;;2576:4;2568:6;2564:17;2554:27;;2522:61;2629:2;2621:6;2618:14;2598:18;2595:38;2592:161;;2675:10;2670:3;2666:20;2663:1;2656:31;2710:4;2707:1;2700:15;2738:4;2735:1;2728:15;2592:161;;2379:380;;;:::o;2764:127::-;2825:10;2820:3;2816:20;2813:1;2806:31;2856:4;2853:1;2846:15;2880:4;2877:1;2870:15;2896:128;2963:9;;;2984:11;;;2981:37;;;2998:18;;:::i;3029:125::-;3094:9;;;3115:10;;;3112:36;;;3128:18;;:::i", "abi": "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMintableOrBurnable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "608060405234801562000010575f80fd5b506040518060400160405280601381526020017f42616c616e63657220506f6f6c20546f6b656e000000000000000000000000008152506040518060400160405280600381526020016210941560ea1b81525081600390816200007491906200030f565b5060046200008382826200030f565b505050620000a462010000683635c9adc5dea000006200010260201b60201c565b620000bc62020000683635c9adc5dea0000062000102565b620000d462030000683635c9adc5dea0000062000102565b620000e933683635c9adc5dea0000062000102565b6002546006556005805460ff1916600117905562000401565b6001600160a01b038216620001315760405163ec442f0560e01b81525f60048201526024015b60405180910390fd5b6200013e5f838362000142565b5050565b6001600160a01b03831662000170578060025f828254620001649190620003db565b90915550620001e29050565b6001600160a01b0383165f9081526020819052604090205481811015620001c45760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640162000128565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821662000200576002805482900390556200021e565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200026491815260200190565b60405180910390a3505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200029a57607f821691505b602082108103620002b957634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200030a57805f5260205f20601f840160051c81016020851015620002e65750805b601f840160051c820191505b8181101562000307575f8155600101620002f2565b50505b505050565b81516001600160401b038111156200032b576200032b62000271565b62000343816200033c845462000285565b84620002bf565b602080601f83116001811462000379575f8415620003615750858301515b5f19600386901b1c1916600185901b178555620003d3565b5f85815260208120601f198616915b82811015620003a95788860151825594840194600190910190840162000388565b5085821015620003c757878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b80820180821115620003fb57634e487b7160e01b5f52601160045260245ffd5b92915050565b610828806200040f5f395ff3fe608060405234801561000f575f80fd5b50600436106100da575f3560e01c80636618846311610088578063a9059cbb11610063578063a9059cbb1461019f578063ab789fa3146101b2578063d73dd623146101bf578063dd62ed3e146101d2575f80fd5b8063661884631461015c57806370a082311461016f57806395d89b4114610197575f80fd5b806323b872dd116100b857806323b872dd14610131578063313ce56714610144578063378dc3dc14610153575f80fd5b806306fdde03146100de578063095ea7b3146100fc57806318160ddd1461011f575b5f80fd5b6100e661020a565b6040516100f39190610667565b60405180910390f35b61010f61010a3660046106ce565b61029a565b60405190151581526020016100f3565b6002545b6040519081526020016100f3565b61010f61013f3660046106f6565b6102b3565b604051601281526020016100f3565b61012360065481565b61010f61016a3660046106ce565b6102d6565b61012361017d36600461072f565b6001600160a01b03165f9081526020819052604090205490565b6100e6610325565b61010f6101ad3660046106ce565b610334565b60055461010f9060ff1681565b61010f6101cd3660046106ce565b610341565b6101236101e036600461074f565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b60606003805461021990610780565b80601f016020809104026020016040519081016040528092919081815260200182805461024590610780565b80156102905780601f1061026757610100808354040283529160200191610290565b820191905f5260205f20905b81548152906001019060200180831161027357829003601f168201915b5050505050905090565b5f336102a7818585610380565b60019150505b92915050565b5f336102c0858285610392565b6102cb858585610412565b506001949350505050565b335f9081526001602090815260408083206001600160a01b0386168452909152812054808311156103115761030c33855f610380565b6102a7565b6102a7338561032086856107cc565b610380565b60606004805461021990610780565b5f336102a7818585610412565b335f8181526001602090815260408083206001600160a01b038716845290915281205490916103779185906103209086906107df565b50600192915050565b61038d838383600161046f565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461040c57818110156103fe57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61040c84848484035f61046f565b50505050565b6001600160a01b03831661043b57604051634b637e8f60e11b81525f60048201526024016103f5565b6001600160a01b0382166104645760405163ec442f0560e01b81525f60048201526024016103f5565b61038d838383610541565b6001600160a01b0384166104985760405163e602df0560e01b81525f60048201526024016103f5565b6001600160a01b0383166104c157604051634a1406b160e11b81525f60048201526024016103f5565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561040c57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161053391815260200190565b60405180910390a350505050565b6001600160a01b03831661056b578060025f82825461056091906107df565b909155506105db9050565b6001600160a01b0383165f90815260208190526040902054818110156105bd5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016103f5565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166105f757600280548290039055610615565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161065a91815260200190565b60405180910390a3505050565b5f602080835283518060208501525f5b8181101561069357858101830151858201604001528201610677565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146106c9575f80fd5b919050565b5f80604083850312156106df575f80fd5b6106e8836106b3565b946020939093013593505050565b5f805f60608486031215610708575f80fd5b610711846106b3565b925061071f602085016106b3565b9150604084013590509250925092565b5f6020828403121561073f575f80fd5b610748826106b3565b9392505050565b5f8060408385031215610760575f80fd5b610769836106b3565b9150610777602084016106b3565b90509250929050565b600181811c9082168061079457607f821691505b6020821081036107b257634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156102ad576102ad6107b8565b808201808211156102ad576102ad6107b856fea264697066735822122045d198b9eef0f86a3260bb5ca902ab5aa3b444a24d3d4e593ead7080bdd0166864736f6c63430008170033", "bin-runtime": "608060405234801561000f575f80fd5b50600436106100da575f3560e01c80636618846311610088578063a9059cbb11610063578063a9059cbb1461019f578063ab789fa3146101b2578063d73dd623146101bf578063dd62ed3e146101d2575f80fd5b8063661884631461015c57806370a082311461016f57806395d89b4114610197575f80fd5b806323b872dd116100b857806323b872dd14610131578063313ce56714610144578063378dc3dc14610153575f80fd5b806306fdde03146100de578063095ea7b3146100fc57806318160ddd1461011f575b5f80fd5b6100e661020a565b6040516100f39190610667565b60405180910390f35b61010f61010a3660046106ce565b61029a565b60405190151581526020016100f3565b6002545b6040519081526020016100f3565b61010f61013f3660046106f6565b6102b3565b604051601281526020016100f3565b61012360065481565b61010f61016a3660046106ce565b6102d6565b61012361017d36600461072f565b6001600160a01b03165f9081526020819052604090205490565b6100e6610325565b61010f6101ad3660046106ce565b610334565b60055461010f9060ff1681565b61010f6101cd3660046106ce565b610341565b6101236101e036600461074f565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b60606003805461021990610780565b80601f016020809104026020016040519081016040528092919081815260200182805461024590610780565b80156102905780601f1061026757610100808354040283529160200191610290565b820191905f5260205f20905b81548152906001019060200180831161027357829003601f168201915b5050505050905090565b5f336102a7818585610380565b60019150505b92915050565b5f336102c0858285610392565b6102cb858585610412565b506001949350505050565b335f9081526001602090815260408083206001600160a01b0386168452909152812054808311156103115761030c33855f610380565b6102a7565b6102a7338561032086856107cc565b610380565b60606004805461021990610780565b5f336102a7818585610412565b335f8181526001602090815260408083206001600160a01b038716845290915281205490916103779185906103209086906107df565b50600192915050565b61038d838383600161046f565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461040c57818110156103fe57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61040c84848484035f61046f565b50505050565b6001600160a01b03831661043b57604051634b637e8f60e11b81525f60048201526024016103f5565b6001600160a01b0382166104645760405163ec442f0560e01b81525f60048201526024016103f5565b61038d838383610541565b6001600160a01b0384166104985760405163e602df0560e01b81525f60048201526024016103f5565b6001600160a01b0383166104c157604051634a1406b160e11b81525f60048201526024016103f5565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561040c57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161053391815260200190565b60405180910390a350505050565b6001600160a01b03831661056b578060025f82825461056091906107df565b909155506105db9050565b6001600160a01b0383165f90815260208190526040902054818110156105bd5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016103f5565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166105f757600280548290039055610615565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161065a91815260200190565b60405180910390a3505050565b5f602080835283518060208501525f5b8181101561069357858101830151858201604001528201610677565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146106c9575f80fd5b919050565b5f80604083850312156106df575f80fd5b6106e8836106b3565b946020939093013593505050565b5f805f60608486031215610708575f80fd5b610711846106b3565b925061071f602085016106b3565b9150604084013590509250925092565b5f6020828403121561073f575f80fd5b610748826106b3565b9392505050565b5f8060408385031215610760575f80fd5b610769836106b3565b9150610777602084016106b3565b90509250929050565b600181811c9082168061079457607f821691505b6020821081036107b257634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156102ad576102ad6107b8565b808201808211156102ad576102ad6107b856fea264697066735822122045d198b9eef0f86a3260bb5ca902ab5aa3b444a24d3d4e593ead7080bdd0166864736f6c63430008170033", "userdoc": {"methods": {"decreaseApproval(address,uint256)": {"notice": "Decrease the allowance of the spender."}, "increaseApproval(address,uint256)": {"notice": "Increase the allowance of the spender."}}, "notice": null}, "devdoc": {"methods": {"allowance(address,address)": {"author": null, "details": "See {IERC20-allowance}.", "params": {}, "return": null}, "approve(address,uint256)": {"author": null, "details": "See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.", "params": {}, "return": null}, "balanceOf(address)": {"author": null, "details": "See {IERC20-balanceOf}.", "params": {}, "return": null}, "decimals()": {"author": null, "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.", "params": {}, "return": null}, "decreaseApproval(address,uint256)": {"author": null, "details": null, "params": {"amount": "The amount of tokens to decrease the allowance by.", "spender": "The address which will spend the funds."}, "return": null}, "increaseApproval(address,uint256)": {"author": null, "details": null, "params": {"amount": "The amount of tokens to increase the allowance by.", "spender": "The address which will spend the funds."}, "return": null}, "name()": {"author": null, "details": "Returns the name of the token.", "params": {}, "return": null}, "symbol()": {"author": null, "details": "Returns the symbol of the token, usually a shorter version of the name.", "params": {}, "return": null}, "totalSupply()": {"author": null, "details": "See {IERC20-totalSupply}.", "params": {}, "return": null}, "transfer(address,uint256)": {"author": null, "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.", "params": {}, "return": null}, "transferFrom(address,address,uint256)": {"author": null, "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.", "params": {}, "return": null}}, "author": null, "details": null, "title": null}, "libraries": {}}}} \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index 9fd206be..928cacb1 100644 --- a/foundry.toml +++ b/foundry.toml @@ -9,7 +9,7 @@ multiline_func_header = 'params_first' sort_imports = true [profile.default] -solc_version = '0.8.25' +solc_version = '0.8.23' libs = ["node_modules", "lib"] optimizer_runs = 500 evm_version = 'cancun' @@ -17,7 +17,8 @@ fs_permissions = [{ access = "read-write", path = ".forge-snapshots/"}] # 2018: function can be view, so far only caused by mocks # 2394: solc insists on reporting on every transient storage use # 5574, 3860: bytecode size limit, so far only caused by test contracts -ignored_error_codes = [2018, 2394, 5574, 3860] +# 1858: Some imports don't have the license identifier +ignored_error_codes = [2018, 2394, 5574, 3860, 1878] deny_warnings = true [profile.optimized] diff --git a/package.json b/package.json index f9a416c9..20611680 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ }, "dependencies": { "@cowprotocol/contracts": "github:cowprotocol/contracts.git#a10f40788a", + "@crytic/properties": "https://github.com/crytic/properties.git", "@openzeppelin/contracts": "5.0.2", "composable-cow": "github:cowprotocol/composable-cow.git#24d556b", "solmate": "github:transmissions11/solmate#c892309" diff --git a/remappings.txt b/remappings.txt index 0f64872c..2a9f46d0 100644 --- a/remappings.txt +++ b/remappings.txt @@ -6,6 +6,7 @@ solmate/=node_modules/solmate/src cowprotocol/=node_modules/@cowprotocol/contracts/src/ @composable-cow/=node_modules/composable-cow/ halmos-cheatcodes=node_modules/halmos-cheatcodes +@crytic/=node_modules/@crytic/ contracts/=src/contracts interfaces/=src/interfaces diff --git a/script/DeployBCoWFactory.s.sol b/script/DeployBCoWFactory.s.sol index a2abfbdd..6e479423 100644 --- a/script/DeployBCoWFactory.s.sol +++ b/script/DeployBCoWFactory.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BCoWFactory} from 'contracts/BCoWFactory.sol'; import {Script} from 'forge-std/Script.sol'; diff --git a/script/DeployBFactory.s.sol b/script/DeployBFactory.s.sol index 5d0c33bc..28d21d28 100644 --- a/script/DeployBFactory.s.sol +++ b/script/DeployBFactory.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BFactory} from 'contracts/BFactory.sol'; import {Script} from 'forge-std/Script.sol'; diff --git a/script/Params.s.sol b/script/Params.s.sol index b2f0eeab..9d49fe59 100644 --- a/script/Params.s.sol +++ b/script/Params.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; contract Params { struct BFactoryDeploymentParams { diff --git a/src/contracts/BCoWConst.sol b/src/contracts/BCoWConst.sol index c16c8f25..dc4e7032 100644 --- a/src/contracts/BCoWConst.sol +++ b/src/contracts/BCoWConst.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.23; /** * @title BCoWConst diff --git a/src/contracts/BCoWFactory.sol b/src/contracts/BCoWFactory.sol index 1eadeefe..2549db9a 100644 --- a/src/contracts/BCoWFactory.sol +++ b/src/contracts/BCoWFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BCoWPool} from './BCoWPool.sol'; import {BFactory} from './BFactory.sol'; diff --git a/src/contracts/BCoWPool.sol b/src/contracts/BCoWPool.sol index 6ac87bec..f136c034 100644 --- a/src/contracts/BCoWPool.sol +++ b/src/contracts/BCoWPool.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.23; /* diff --git a/src/contracts/BConst.sol b/src/contracts/BConst.sol index 3a184a01..d4a0bb0f 100644 --- a/src/contracts/BConst.sol +++ b/src/contracts/BConst.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.23; /** * @title BConst diff --git a/src/contracts/BFactory.sol b/src/contracts/BFactory.sol index 60619bb6..eff79dfe 100644 --- a/src/contracts/BFactory.sol +++ b/src/contracts/BFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BPool} from './BPool.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; diff --git a/src/contracts/BMath.sol b/src/contracts/BMath.sol index 25d7e123..ce986681 100644 --- a/src/contracts/BMath.sol +++ b/src/contracts/BMath.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BConst} from './BConst.sol'; import {BNum} from './BNum.sol'; diff --git a/src/contracts/BNum.sol b/src/contracts/BNum.sol index 99824543..e4470ad8 100644 --- a/src/contracts/BNum.sol +++ b/src/contracts/BNum.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BConst} from './BConst.sol'; diff --git a/src/contracts/BPool.sol b/src/contracts/BPool.sol index 2af48596..15224a8f 100644 --- a/src/contracts/BPool.sol +++ b/src/contracts/BPool.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BMath} from './BMath.sol'; import {BToken} from './BToken.sol'; @@ -30,6 +30,10 @@ contract BPool is BToken, BMath, IBPool { /// @dev Sum of all token weights uint256 internal _totalWeight; + /// TEST TEST TEST TEST TEST TEST TEST TEST + bytes32 internal _reenteringMutex; + /// TEST TEST TEST TEST TEST TEST TEST TEST + /// @dev Logs the call data modifier _logs_() { emit LOG_CALL(msg.sig, msg.sender, msg.data); @@ -148,8 +152,8 @@ contract BPool is BToken, BMath, IBPool { _pullUnderlying(token, msg.sender, balance); } - /// @inheritdoc IBPool + function unbind(address token) external _logs_ _lock_ _controller_ _notFinalized_ { if (!_records[token].bound) { revert BPool_TokenNotBound(); @@ -597,9 +601,10 @@ contract BPool is BToken, BMath, IBPool { * be interpreted as locked */ function _setLock(bytes32 value) internal virtual { - assembly ("memory-safe") { - tstore(_MUTEX_TRANSIENT_STORAGE_SLOT, value) - } + // assembly ("memory-safe") { + // tstore(_MUTEX_TRANSIENT_STORAGE_SLOT, value) + // } + _reenteringMutex = value; } /** @@ -670,8 +675,9 @@ contract BPool is BToken, BMath, IBPool { * allowing calls */ function _getLock() internal view virtual returns (bytes32 value) { - assembly ("memory-safe") { - value := tload(_MUTEX_TRANSIENT_STORAGE_SLOT) - } + // assembly ("memory-safe") { + // value := tload(_MUTEX_TRANSIENT_STORAGE_SLOT) + // } + value = _reenteringMutex; } } diff --git a/src/contracts/BToken.sol b/src/contracts/BToken.sol index 0491b17d..c7c1f231 100644 --- a/src/contracts/BToken.sol +++ b/src/contracts/BToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol'; diff --git a/src/interfaces/IBCoWFactory.sol b/src/interfaces/IBCoWFactory.sol index da757ef4..9c1bf1f6 100644 --- a/src/interfaces/IBCoWFactory.sol +++ b/src/interfaces/IBCoWFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {IBFactory} from 'interfaces/IBFactory.sol'; diff --git a/src/interfaces/IBCoWPool.sol b/src/interfaces/IBCoWPool.sol index 0c362221..236f56ad 100644 --- a/src/interfaces/IBCoWPool.sol +++ b/src/interfaces/IBCoWPool.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {GPv2Order} from '@cowprotocol/libraries/GPv2Order.sol'; import {IERC1271} from '@openzeppelin/contracts/interfaces/IERC1271.sol'; diff --git a/src/interfaces/IBFactory.sol b/src/interfaces/IBFactory.sol index edaff060..b93a6e22 100644 --- a/src/interfaces/IBFactory.sol +++ b/src/interfaces/IBFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {IBPool} from 'interfaces/IBPool.sol'; diff --git a/src/interfaces/IBPool.sol b/src/interfaces/IBPool.sol index 9b18cfa4..c8fb0ba6 100644 --- a/src/interfaces/IBPool.sol +++ b/src/interfaces/IBPool.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; diff --git a/src/interfaces/ISettlement.sol b/src/interfaces/ISettlement.sol index 1b176cc1..5905220f 100644 --- a/src/interfaces/ISettlement.sol +++ b/src/interfaces/ISettlement.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {IERC20} from '@cowprotocol/interfaces/IERC20.sol'; import {GPv2Interaction} from '@cowprotocol/libraries/GPv2Interaction.sol'; diff --git a/test/integration/BCowPool.t.sol b/test/integration/BCowPool.t.sol index 83a16922..9095f3bf 100644 --- a/test/integration/BCowPool.t.sol +++ b/test/integration/BCowPool.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BPoolIntegrationTest} from './BPool.t.sol'; import {GPv2TradeEncoder} from '@composable-cow/test/vendored/GPv2TradeEncoder.sol'; diff --git a/test/integration/BPool.t.sol b/test/integration/BPool.t.sol index 36deb047..976c6962 100644 --- a/test/integration/BPool.t.sol +++ b/test/integration/BPool.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {IERC20} from '@cowprotocol/interfaces/IERC20.sol'; import {BFactory} from 'contracts/BFactory.sol'; diff --git a/test/integration/DeploymentGas.t.sol b/test/integration/DeploymentGas.t.sol index e2b32d95..2d2419ed 100644 --- a/test/integration/DeploymentGas.t.sol +++ b/test/integration/DeploymentGas.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BFactory} from 'contracts/BFactory.sol'; diff --git a/test/invariant/fuzz/external/Protocol.t.sol b/test/invariant/fuzz/external/Protocol.t.sol deleted file mode 100644 index 05899d92..00000000 --- a/test/invariant/fuzz/external/Protocol.t.sol +++ /dev/null @@ -1,121 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; - -import {EchidnaTest, FuzzERC20} from '../../AdvancedTestsUtils.sol'; - -import {BCoWFactory, BCoWPool} from 'contracts/BCoWFactory.sol'; -import {BConst} from 'contracts/BConst.sol'; - -import {MockSettler} from './MockSettler.sol'; - -contract EchidnaBalancer is EchidnaTest { - // System under test - BCoWFactory factory; - BConst bconst; - - address solutionSettler; - bytes32 appData; - - bool alreadySetup; - - FuzzERC20[] tokens; - BCoWPool[] deployedPools; - mapping(BCoWPool => bool) finalizedPools; - - constructor() { - solutionSettler = address(new MockSettler()); - - factory = new BCoWFactory(solutionSettler, appData); - bconst = new BConst(); - } - - modifier providedEnoughTokenCaller(FuzzERC20 _token, uint256 _amount) { - _token.mint(currentCaller, _amount); - _; - } - - function setup_tokens() public AgentOrDeployer { - if (!alreadySetup) { - // max bound token is 8 - for (uint256 i; i < 8; i++) { - FuzzERC20 _token = new FuzzERC20(); - _token.initialize('', '', 18); - tokens.push(_token); - } - - alreadySetup = true; - } - } - - function setup_poolLiquidity(uint256 _numberOfTokens, uint256 _poolIndex) public { - _poolIndex = _poolIndex % deployedPools.length; - - _numberOfTokens = clamp(_numberOfTokens, bconst.MIN_BOUND_TOKENS(), bconst.MAX_BOUND_TOKENS()); - - BCoWPool pool = deployedPools[_poolIndex]; - require(!deployedPools[_poolIndex].isFinalized()); - - for (uint256 i; i < _numberOfTokens; i++) { - FuzzERC20 _token = tokens[i]; - uint256 _amount = bconst.INIT_POOL_SUPPLY() / _numberOfTokens; - pool.bind(address(_token), _amount, bconst.MIN_WEIGHT()); - } - - // require(_amountA >= bconst.MIN_BALANCE() && _amountB >= bconst.MIN_BALANCE()); - // require(_denormA + _denormB <= bconst.MAX_TOTAL_WEIGHT()); - - // tokenA.approve(address(pool), _amountA); - // tokenB.approve(address(pool), _amountB); - // pool.bind(address(tokenA), _amountA, _denormA); - // pool.bind(address(tokenB), _amountB, _denormB); - // pool.finalize(); - } - - // Probably wants to have a pool setup with more than 2 tokens too + swap - /// @custom:property-id 1 - /// @custom:property BFactory should always be able to deploy new pools - function fuzz_BFactoryAlwaysDeploy() public AgentOrDeployer { - // Precondition - require(deployedPools.length < 4); // Avoid too many pools to interact with - hevm.prank(currentCaller); - - // Action - BCoWPool _newPool = BCoWPool(address(factory.newBPool())); - - // Postcondition - deployedPools.push(_newPool); - - assert(address(_newPool).code.length > 0); - assert(factory.isBPool(address(_newPool))); - assert(!_newPool.isFinalized()); - } - - /// @custom:property-id 2 - /// @custom:property BFactory's blab should always be modifiable by the current blabs - function fuzz_blabAlwaysModByBLab() public AgentOrDeployer { - // Precondition - address _currentBLab = factory.getBLabs(); - - hevm.prank(currentCaller); - - // Action - try factory.setBLabs(address(123)) { - // Postcondition - assert(_currentBLab == currentCaller); - } catch { - assert(_currentBLab != currentCaller); - } - } - - /// @custom:property-id 3 - /// @custom:property BFactory should always be able to transfer the BToken to the blab, if called by it - function fuzz_alwayCollect() public AgentOrDeployer {} - - /// @custom:property-id 8 - /// @custom:property BToken increaseApproval should increase the approval of the address by the amount - function fuzz_increaseApproval() public AgentOrDeployer {} - - /// @custom:property-id 9 - /// @custom:property BToken decreaseApproval should decrease the approval to max(old-amount, 0) - function fuzz_decreaseApproval() public AgentOrDeployer {} -} diff --git a/test/invariant/AdvancedTestsUtils.sol b/test/invariants/AdvancedTestsUtils.sol similarity index 98% rename from test/invariant/AdvancedTestsUtils.sol rename to test/invariants/AdvancedTestsUtils.sol index 3ad99e77..de0fbc70 100644 --- a/test/invariant/AdvancedTestsUtils.sol +++ b/test/invariants/AdvancedTestsUtils.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {MockERC20} from 'forge-std/mocks/MockERC20.sol'; import {SymTest} from 'halmos-cheatcodes/src/SymTest.sol'; diff --git a/test/invariant/PROPERTIES.md b/test/invariants/PROPERTIES.md similarity index 99% rename from test/invariant/PROPERTIES.md rename to test/invariants/PROPERTIES.md index df1571a2..e7a7e6be 100644 --- a/test/invariant/PROPERTIES.md +++ b/test/invariants/PROPERTIES.md @@ -1,7 +1,7 @@ | Properties | Type | Id | Halmos | Echidna | | ------------------------------------------------------------------------------------------- | ------------------- | --- | ------ | ------- | -| BFactory should always be able to deploy new pools | Unit | 1 | [ ] | [ ] | -| BFactory's blab should always be modifiable by the current blabs | Unit | 2 | [ ] | [ ] | +| BFactory should always be able to deploy new pools | Unit | 1 | [ ] | [x] | +| BFactory's blab should always be modifiable by the current blabs | Unit | 2 | [ ] | [x] | | BFactory should always be able to transfer the BToken to the blab, if called by it | Unit | 3 | [ ] | [ ] | | the amount received can never be less than min amount out | Unit | 4 | [ ] | [ ] | | the amount spent can never be greater than max amount in | Unit | 5 | [ ] | [ ] | diff --git a/test/invariant/fuzz/config.yaml b/test/invariants/fuzz/config.yaml similarity index 72% rename from test/invariant/fuzz/config.yaml rename to test/invariants/fuzz/config.yaml index 92d3e480..216bd5bb 100644 --- a/test/invariant/fuzz/config.yaml +++ b/test/invariants/fuzz/config.yaml @@ -1,5 +1,5 @@ # https://github.com/crytic/echidna/blob/master/tests/solidity/basic/default.yaml for more options testMode: assertion -corpusDir: test/invariant/fuzz/corpus/ +corpusDir: test/invariants/fuzz/corpus/ coverageFormats: ["html","lcov"] -allContracts: true \ No newline at end of file +allContracts: false \ No newline at end of file diff --git a/test/invariants/fuzz/external/BToken.sol b/test/invariants/fuzz/external/BToken.sol new file mode 100644 index 00000000..e22b6fe9 --- /dev/null +++ b/test/invariants/fuzz/external/BToken.sol @@ -0,0 +1,38 @@ +pragma solidity 0.8.23; + +import {CryticERC20ExternalBasicProperties} from + '@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol'; +import {ITokenMock} from '@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol'; +import {PropertiesConstants} from '@crytic/properties/contracts/util/PropertiesConstants.sol'; +import 'contracts/BToken.sol'; + +contract EchidnaBToken is CryticERC20ExternalBasicProperties { + constructor() { + // Deploy ERC20 + token = ITokenMock(address(new CryticTokenMock())); + } + + /// @custom:property-id 8 + /// @custom:property BToken increaseApproval should increase the approval of the address by the amount + function fuzz_increaseApproval() public { + // Precondition + } + /// @custom:property-id 9 + /// @custom:property BToken decreaseApproval should decrease the approval to max(old-amount, 0) + function fuzz_decreaseApproval() public {} +} + +contract CryticTokenMock is BToken, PropertiesConstants { + bool public isMintableOrBurnable; + uint256 public initialSupply; + + constructor() { + _mint(USER1, INITIAL_BALANCE); + _mint(USER2, INITIAL_BALANCE); + _mint(USER3, INITIAL_BALANCE); + _mint(msg.sender, INITIAL_BALANCE); + + initialSupply = totalSupply(); + isMintableOrBurnable = true; + } +} diff --git a/test/invariant/fuzz/external/MockSettler.sol b/test/invariants/fuzz/external/MockSettler.sol similarity index 95% rename from test/invariant/fuzz/external/MockSettler.sol rename to test/invariants/fuzz/external/MockSettler.sol index f7a97e8f..d79dfa4b 100644 --- a/test/invariant/fuzz/external/MockSettler.sol +++ b/test/invariants/fuzz/external/MockSettler.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {GPv2Interaction, GPv2Trade, IERC20, ISettlement} from 'interfaces/ISettlement.sol'; diff --git a/test/invariants/fuzz/external/Protocol.t.sol b/test/invariants/fuzz/external/Protocol.t.sol new file mode 100644 index 00000000..87721ab7 --- /dev/null +++ b/test/invariants/fuzz/external/Protocol.t.sol @@ -0,0 +1,282 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.23; + +import {EchidnaTest, FuzzERC20} from '../../AdvancedTestsUtils.sol'; + +import {BCoWFactory, BCoWPool, IBPool} from 'contracts/BCoWFactory.sol'; +import {BConst} from 'contracts/BConst.sol'; +import {BMath} from 'contracts/BMath.sol'; + +import {MockSettler} from './MockSettler.sol'; + +contract EchidnaBalancer is EchidnaTest { + // System under test + BCoWFactory factory; + BConst bconst; + BMath bmath; + + address solutionSettler; + bytes32 appData; + + FuzzERC20[] tokens; + BCoWPool pool; + bool poolIsFinalized; + + constructor() { + solutionSettler = address(new MockSettler()); + + factory = new BCoWFactory(solutionSettler, appData); + bconst = new BConst(); + bmath = new BMath(); + + // max bound token is 8 + for (uint256 i; i < 4; i++) { + FuzzERC20 _token = new FuzzERC20(); + _token.initialize('', '', 18); + tokens.push(_token); + } + } + + function provideEnoughTokenCaller(FuzzERC20 _token, uint256 _amount) internal { + _token.mint(currentCaller, _amount); + } + + function setup_poolLiquidity() public { + if (poolIsFinalized) return; + + pool = BCoWPool(address(factory.newBPool())); + + for (uint256 i; i < 4; i++) { + FuzzERC20 _token = new FuzzERC20(); + _token.initialize('', '', 18); + tokens.push(_token); + + _token.mint(address(this), 10 ether); + _token.approve(address(pool), 10 ether); + + uint256 _poolWeight = bconst.MAX_WEIGHT() / 5; + + try pool.bind(address(_token), 10 ether, _poolWeight) {} + catch { + emit AssertionFailed(); + } + } + + pool.finalize(); + + poolIsFinalized = true; + } + + // function test_test() public { + // fuzz_BFactoryAlwaysDeploy(); + // setup_poolLiquidity(2, 0, 1000); + // } + + // Probably wants to have a pool setup with more than 2 tokens too + swap + /// @custom:property-id 1 + /// @custom:property BFactory should always be able to deploy new pools + function fuzz_BFactoryAlwaysDeploy() public AgentOrDeployer { + // Precondition + hevm.prank(currentCaller); + + // Action + try factory.newBPool() returns (IBPool _newPool) { + // Postcondition + assert(address(_newPool).code.length > 0); + assert(factory.isBPool(address(_newPool))); + assert(!_newPool.isFinalized()); + } catch { + assert(false); + } + } + + /// @custom:property-id 2 + /// @custom:property BFactory's blab should always be modifiable by the current blabs + function fuzz_blabAlwaysModByBLab() public AgentOrDeployer { + // Precondition + address _currentBLab = factory.getBLabs(); + + hevm.prank(currentCaller); + + // Action + try factory.setBLabs(address(123)) { + // Postcondition + assert(_currentBLab == currentCaller); + } catch { + assert(_currentBLab != currentCaller); + } + } + + /// @custom:property-id 3 + /// @custom:property BFactory should always be able to transfer the BToken to the blab, if called by it + function fuzz_alwaysCollect() public AgentOrDeployer { + // Precondition + address _currentBLab = factory.getBLabs(); + + if (address(pool) == address(0)) { + return; + } + + hevm.prank(currentCaller); + + // Action + try factory.collect(pool) { + // Postcondition + assert(_currentBLab == currentCaller); + } catch { + assert(_currentBLab != currentCaller); + } + } + + /// @custom:property-id 4 + /// @custom:property the amount received can never be less than min amount out + /// @custom:property-id 15 + /// @custom:property there can't be any amount out for a 0 amount in + function amountReceivedFloored( + uint256 _minAmountOut, + uint256 _amountIn, + uint256 _tokenIn, + uint256 _tokenOut + ) public AgentOrDeployer { + // Precondition + require(pool.isFinalized()); + + _tokenIn = clamp(_tokenIn, 0, tokens.length - 1); + _tokenOut = clamp(_tokenOut, 0, tokens.length - 1); + _amountIn = clamp(_amountIn, 0, 10 ether); + + require(_tokenIn != _tokenOut); // todo: dig this, it should pass without this precondition + + tokens[_tokenIn].mint(currentCaller, _amountIn); + + hevm.prank(currentCaller); + tokens[_tokenIn].approve(address(pool), type(uint256).max); // approval isn't limiting + + uint256 _balanceOutBefore = tokens[_tokenOut].balanceOf(currentCaller); + + hevm.prank(currentCaller); + + // Action + try pool.swapExactAmountIn( + address(tokens[_tokenIn]), _amountIn, address(tokens[_tokenOut]), _minAmountOut, type(uint256).max + ) { + // Postcondition + uint256 _balanceOutAfter = tokens[_tokenOut].balanceOf(currentCaller); + + // 4 + if (_amountIn != 0) assert(_balanceOutBefore <= _balanceOutAfter + _minAmountOut); + // 15 + else assert(_balanceOutBefore == _balanceOutAfter); + } catch {} + } + + /// @custom:property-id 5 + /// @custom:property the amount spent can never be greater than max amount in + /// @custom:property-id 15 + /// @custom:property there can't be any amount out for a 0 amount in + function amountSpentCapped( + uint256 _maxAmountIn, + uint256 _amountOut, + uint256 _tokenIn, + uint256 _tokenOut + ) public AgentOrDeployer { + // Precondition + require(pool.isFinalized()); + + _tokenIn = clamp(_tokenIn, 0, tokens.length - 1); + _tokenOut = clamp(_tokenOut, 0, tokens.length - 1); + + _maxAmountIn = clamp(_maxAmountIn, 0, 10 ether); + + tokens[_tokenIn].mint(currentCaller, _maxAmountIn); + + hevm.prank(currentCaller); + tokens[_tokenIn].approve(address(pool), type(uint256).max); // approval isn't limiting + + uint256 _balanceInBefore = tokens[_tokenIn].balanceOf(currentCaller); + uint256 _balanceOutBefore = tokens[_tokenOut].balanceOf(currentCaller); + + hevm.prank(currentCaller); + + // Action + try pool.swapExactAmountOut( + address(tokens[_tokenIn]), _maxAmountIn, address(tokens[_tokenOut]), _amountOut, type(uint256).max + ) { + // Postcondition + uint256 _balanceInAfter = tokens[_tokenIn].balanceOf(currentCaller); + uint256 _balanceOutAfter = tokens[_tokenOut].balanceOf(currentCaller); + + // 5 + assert(_balanceInBefore - _balanceInAfter <= _maxAmountIn); + + // 15 + if (_maxAmountIn == 0) assert(_balanceOutBefore == _balanceOutAfter); + } catch {} + } + + /// @custom:property-id 6 + /// @custom:property swap fee can only be 0 (cow pool) + function fuzz_swapFeeAlwaysZero() public { + assert(pool.getSwapFee() == bconst.MIN_FEE()); // todo: check if this is the intended property (min fee == 0?) + } + + /// @custom:property-id 7 + /// @custom:property total weight can be up to 50e18 + function totalWeightMax(uint256 _numberTokens, uint256[8] calldata _weights) public { + // Precondition + BCoWPool _pool = BCoWPool(address(factory.newBPool())); + + _numberTokens = clamp(_numberTokens, bconst.MIN_BOUND_TOKENS(), bconst.MAX_BOUND_TOKENS()); + + uint256 _totalWeight = 0; + + for (uint256 i; i < _numberTokens; i++) { + FuzzERC20 _token = new FuzzERC20(); + _token.initialize('', '', 18); + _token.mint(address(this), 10 ether); + _token.approve(address(_pool), 10 ether); + + uint256 _poolWeight = _weights[i]; + _poolWeight = clamp(_poolWeight, bconst.MIN_WEIGHT(), bconst.MAX_WEIGHT()); + + // Action + try _pool.bind(address(_token), 10 ether, _poolWeight) { + // Postcondition + _totalWeight += _poolWeight; + + // 7 + assert(_totalWeight <= bconst.MAX_TOTAL_WEIGHT()); + } catch { + // 7 + assert(_totalWeight + _poolWeight > bconst.MAX_TOTAL_WEIGHT()); + break; + } + } + } + + /// @custom:property-id 10 + /// @custom:property a pool can either be finalized or not finalized + + /// @custom:property-id 11 + /// @custom:property a finalized pool cannot switch back to non-finalized + + /// @custom:property-id 12 + /// @custom:property a non-finalized pool can only be finalized when the controller calls finalize() + + /// @custom:property-id 13 + /// @custom:property an exact amount in should always earn the amount out calculated in bmath + + /// @custom:property-id 14 + /// @custom:property an exact amount out is earned only if the amount in calculated in bmath is transfered + + /// @custom:property there can't be any amount out for a 0 amount in + /// @custom:property the pool btoken can only be minted/burned in the join and exit operations + /// @custom:property a direct token transfer can never reduce the underlying amount of a given token per BPT + /// @custom:property the amount of underlying token when exiting should always be the amount calculated in bmath + /// @custom:property a swap can only happen when the pool is finalized + /// @custom:property bounding and unbounding token can only be done on a non-finalized pool, by the controller + /// @custom:property there always should be between MIN_BOUND_TOKENS and MAX_BOUND_TOKENS bound in a pool + /// @custom:property only the settler can commit a hash + /// @custom:property when a hash has been commited, only this order can be settled + /// @custom:property BToken should not break the ToB ERC20 properties* +} diff --git a/test/invariants/fuzz/internal/BMath.t.sol b/test/invariants/fuzz/internal/BMath.t.sol new file mode 100644 index 00000000..e6c3d1c5 --- /dev/null +++ b/test/invariants/fuzz/internal/BMath.t.sol @@ -0,0 +1,130 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.23; + +import {EchidnaTest} from '../../AdvancedTestsUtils.sol'; + +import {BMath} from 'contracts/BMath.sol'; + +contract EchidnaBMath is BMath, EchidnaTest { + // calcOutGivenIn should be inverse of calcInGivenOut + function testCalcInGivenOut_InvCalcInGivenOut( + uint256 tokenBalanceIn, + uint256 tokenWeightIn, + uint256 tokenBalanceOut, + uint256 tokenWeightOut, + uint256 tokenAmountIn, + uint256 swapFee + ) public { + tokenWeightIn = clamp(tokenWeightIn, MIN_WEIGHT, MAX_WEIGHT); + tokenWeightOut = clamp(tokenWeightOut, MIN_WEIGHT, MAX_WEIGHT); + tokenBalanceIn = clamp(tokenBalanceIn, 1, type(uint256).max); + + uint256 calc_tokenAmountOut = + calcOutGivenIn(tokenBalanceIn, tokenWeightIn, tokenBalanceOut, tokenWeightOut, tokenAmountIn, swapFee); + + uint256 calc_tokenAmountIn = + calcInGivenOut(tokenBalanceOut, tokenWeightOut, tokenBalanceIn, tokenWeightIn, calc_tokenAmountOut, swapFee); + + assert(tokenAmountIn == calc_tokenAmountIn); + } + + event log_uint(uint256 value); + + function test_debug() public { + uint256 tokenBalanceIn = 0; + uint256 tokenWeightIn = 0; + uint256 tokenBalanceOut = 0; + uint256 tokenWeightOut = 0; + uint256 tokenAmountIn = 1; + uint256 swapFee = 0; + + tokenWeightIn = clamp(tokenWeightIn, MIN_WEIGHT, MAX_WEIGHT); + tokenWeightOut = clamp(tokenWeightOut, MIN_WEIGHT, MAX_WEIGHT); + tokenAmountIn = clamp(tokenAmountIn, 1, type(uint256).max); + tokenBalanceOut = clamp(tokenBalanceOut, 1, type(uint256).max); + tokenBalanceIn = clamp(tokenBalanceIn, 1, type(uint256).max); + swapFee = clamp(swapFee, MIN_FEE, MAX_FEE); + + emit log_uint(tokenWeightIn); + emit log_uint(tokenWeightOut); + emit log_uint(tokenAmountIn); + emit log_uint(tokenBalanceOut); + emit log_uint(tokenBalanceIn); + emit log_uint(swapFee); + + uint256 calc_tokenAmountOut = + calcOutGivenIn(tokenBalanceIn, tokenWeightIn, tokenBalanceOut, tokenWeightOut, tokenAmountIn, swapFee); + emit log_uint(calc_tokenAmountOut); + + uint256 calc_tokenAmountIn = + calcInGivenOut(tokenBalanceOut, tokenWeightOut, tokenBalanceIn, tokenWeightIn, calc_tokenAmountOut, swapFee); + + emit log_uint(calc_tokenAmountIn); + assert(calc_tokenAmountOut == calc_tokenAmountIn); + } + + // calcInGivenOut should be inverse of calcOutGivenIn + function testCalcOutGivenIn_InvCalcOutGivenIn( + uint256 tokenBalanceIn, + uint256 tokenWeightIn, + uint256 tokenBalanceOut, + uint256 tokenWeightOut, + uint256 tokenAmountOut, + uint256 swapFee + ) public { + tokenWeightIn = clamp(tokenWeightIn, MIN_WEIGHT, MAX_WEIGHT); + tokenWeightOut = clamp(tokenWeightOut, MIN_WEIGHT, MAX_WEIGHT); + + uint256 calc_tokenAmountIn = + calcInGivenOut(tokenBalanceOut, tokenWeightOut, tokenBalanceIn, tokenWeightIn, tokenAmountOut, swapFee); + + uint256 calc_tokenAmountOut = + calcOutGivenIn(tokenBalanceIn, tokenWeightIn, tokenBalanceOut, tokenWeightOut, calc_tokenAmountIn, swapFee); + + assert(tokenAmountOut == calc_tokenAmountOut); + } + + // calcSingleInGivenPoolOut should be inverse of calcPoolOutGivenSingleIn + function testCalcSingleInGivenPoolOut_InvCalcPoolOutGivenSingle( + uint256 tokenBalanceIn, + uint256 tokenWeightIn, + uint256 poolSupply, + uint256 totalWeight, + uint256 tokenAmountOut, + uint256 swapFee + ) public { + tokenWeightIn = clamp(tokenWeightIn, MIN_WEIGHT, MAX_WEIGHT); + totalWeight = clamp(totalWeight, MIN_WEIGHT, MAX_TOTAL_WEIGHT); + tokenBalanceIn = clamp(tokenBalanceIn, 1, type(uint256).max); + + uint256 calc_tokenAmountIn = + calcSingleInGivenPoolOut(tokenBalanceIn, tokenWeightIn, poolSupply, totalWeight, tokenAmountOut, swapFee); + + uint256 calc_poolAmountOut = + calcPoolOutGivenSingleIn(tokenBalanceIn, tokenWeightIn, poolSupply, totalWeight, calc_tokenAmountIn, swapFee); + + assert(tokenAmountOut == calc_poolAmountOut); + } + + // calcPoolOutGivenSingleIn should be inverse of calcSingleInGivenPoolOut + function testCalcPoolOutGivenSingle_InvCalcSingleInGivenPoolOut( + uint256 tokenBalanceIn, + uint256 tokenWeightIn, + uint256 poolSupply, + uint256 totalWeight, + uint256 poolAmountOut, + uint256 swapFee + ) public { + tokenWeightIn = clamp(tokenWeightIn, MIN_WEIGHT, MAX_WEIGHT); + totalWeight = clamp(totalWeight, MIN_WEIGHT, MAX_TOTAL_WEIGHT); + tokenBalanceIn = clamp(tokenBalanceIn, 1, type(uint256).max); + + uint256 calc_poolAmountIn = + calcPoolOutGivenSingleIn(tokenBalanceIn, tokenWeightIn, poolSupply, totalWeight, poolAmountOut, swapFee); + + uint256 calc_tokenAmountOut = + calcSingleInGivenPoolOut(tokenBalanceIn, tokenWeightIn, poolSupply, totalWeight, calc_poolAmountIn, swapFee); + + assert(poolAmountOut == calc_tokenAmountOut); + } +} diff --git a/test/invariant/fuzz/internal/BNum.t.sol b/test/invariants/fuzz/internal/BNum.t.sol similarity index 99% rename from test/invariant/fuzz/internal/BNum.t.sol rename to test/invariants/fuzz/internal/BNum.t.sol index 125302db..a095eeec 100644 --- a/test/invariant/fuzz/internal/BNum.t.sol +++ b/test/invariants/fuzz/internal/BNum.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {EchidnaTest} from '../../AdvancedTestsUtils.sol'; diff --git a/test/invariant/symbolic/BMath.t.sol b/test/invariants/symbolic/BMath.t.sol similarity index 98% rename from test/invariant/symbolic/BMath.t.sol rename to test/invariants/symbolic/BMath.t.sol index 96af26dd..ea3cdc90 100644 --- a/test/invariant/symbolic/BMath.t.sol +++ b/test/invariants/symbolic/BMath.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {HalmosTest} from '../AdvancedTestsUtils.sol'; import {BMath} from 'contracts/BMath.sol'; diff --git a/test/invariant/symbolic/BNum.t.sol b/test/invariants/symbolic/BNum.t.sol similarity index 99% rename from test/invariant/symbolic/BNum.t.sol rename to test/invariants/symbolic/BNum.t.sol index c7af270a..e8460821 100644 --- a/test/invariant/symbolic/BNum.t.sol +++ b/test/invariants/symbolic/BNum.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {HalmosTest} from '../AdvancedTestsUtils.sol'; import {BNum} from 'contracts/BNum.sol'; diff --git a/test/unit/BCoWFactory.t.sol b/test/unit/BCoWFactory.t.sol index 1ff8070a..71f2583e 100644 --- a/test/unit/BCoWFactory.t.sol +++ b/test/unit/BCoWFactory.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BCoWPool} from 'contracts/BCoWPool.sol'; import {Test} from 'forge-std/Test.sol'; diff --git a/test/unit/BCoWPool.t.sol b/test/unit/BCoWPool.t.sol index 7c7e566c..02eea7f9 100644 --- a/test/unit/BCoWPool.t.sol +++ b/test/unit/BCoWPool.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BasePoolTest, SwapExactAmountInUtils} from './BPool.t.sol'; import {IERC20} from '@cowprotocol/interfaces/IERC20.sol'; diff --git a/test/unit/BFactory.t.sol b/test/unit/BFactory.t.sol index b1426432..bcadfebd 100644 --- a/test/unit/BFactory.t.sol +++ b/test/unit/BFactory.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {IERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; diff --git a/test/unit/BMath.t.sol b/test/unit/BMath.t.sol index 25158305..94190063 100644 --- a/test/unit/BMath.t.sol +++ b/test/unit/BMath.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BConst} from 'contracts/BConst.sol'; import {BMath, BNum} from 'contracts/BMath.sol'; diff --git a/test/unit/BNum.t.sol b/test/unit/BNum.t.sol index 58041f73..be09d4c7 100644 --- a/test/unit/BNum.t.sol +++ b/test/unit/BNum.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BConst} from 'contracts/BConst.sol'; import {BNum} from 'contracts/BNum.sol'; diff --git a/test/unit/BPool.t.sol b/test/unit/BPool.t.sol index 4611daf6..003ffec1 100644 --- a/test/unit/BPool.t.sol +++ b/test/unit/BPool.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; diff --git a/test/unit/BPool/BPool.t.sol b/test/unit/BPool/BPool.t.sol index b3bebdee..ac86c4d0 100644 --- a/test/unit/BPool/BPool.t.sol +++ b/test/unit/BPool/BPool.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BPoolBase} from './BPoolBase.sol'; import {IBPool} from 'interfaces/IBPool.sol'; diff --git a/test/unit/BPool/BPoolBase.sol b/test/unit/BPool/BPoolBase.sol index 41dd6c88..3f34ec12 100644 --- a/test/unit/BPool/BPoolBase.sol +++ b/test/unit/BPool/BPoolBase.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {BConst} from 'contracts/BConst.sol'; diff --git a/test/unit/BPool/BPool_Bind.t.sol b/test/unit/BPool/BPool_Bind.t.sol index 95ede7d6..80c01363 100644 --- a/test/unit/BPool/BPool_Bind.t.sol +++ b/test/unit/BPool/BPool_Bind.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BPoolBase} from './BPoolBase.sol'; import {IBPool} from 'interfaces/IBPool.sol'; diff --git a/test/unit/BPool/BPool_JoinPool.t.sol b/test/unit/BPool/BPool_JoinPool.t.sol index 6cc9f9a9..d091a95d 100644 --- a/test/unit/BPool/BPool_JoinPool.t.sol +++ b/test/unit/BPool/BPool_JoinPool.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BPoolBase} from './BPoolBase.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; diff --git a/test/unit/BPool/BPool_Unbind.t.sol b/test/unit/BPool/BPool_Unbind.t.sol index f854c0c7..5d6a3c27 100644 --- a/test/unit/BPool/BPool_Unbind.t.sol +++ b/test/unit/BPool/BPool_Unbind.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BPoolBase} from './BPoolBase.sol'; diff --git a/test/unit/BToken.t.sol b/test/unit/BToken.t.sol index ac16f760..5601d545 100644 --- a/test/unit/BToken.t.sol +++ b/test/unit/BToken.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3 -pragma solidity ^0.8.25; +pragma solidity 0.8.23; import {IERC20Errors} from '@openzeppelin/contracts/interfaces/draft-IERC6093.sol'; import {Test} from 'forge-std/Test.sol'; diff --git a/test/utils/Pow.sol b/test/utils/Pow.sol index e9142c57..b8f15d85 100644 --- a/test/utils/Pow.sol +++ b/test/utils/Pow.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {BNum} from 'contracts/BNum.sol'; diff --git a/test/utils/Utils.sol b/test/utils/Utils.sol index 19225f9d..db195352 100644 --- a/test/utils/Utils.sol +++ b/test/utils/Utils.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.23; import {Test} from 'forge-std/Test.sol'; import {LibString} from 'solmate/utils/LibString.sol'; diff --git a/yarn.lock b/yarn.lock index 2e77bf67..4c8f1e88 100644 --- a/yarn.lock +++ b/yarn.lock @@ -185,6 +185,16 @@ version "1.6.0" resolved "https://codeload.github.com/cowprotocol/contracts/tar.gz/a10f40788af29467e87de3dbf2196662b0a6b500" +"@crytic/properties@https://github.com/crytic/properties.git": + version "0.0.1" + resolved "https://github.com/crytic/properties.git#f1ff61b8e90ce0c9ab138dfe23e80a8afa7f5e37" + dependencies: + "@openzeppelin/contracts" "^4.7.3" + markdown-link-check "^3.11.0" + prettier "^2.8.7" + prettier-plugin-solidity "^1.1.3" + solmate "^6.6.1" + "@defi-wonderland/natspec-smells@1.1.3": version "1.1.3" resolved "https://registry.yarnpkg.com/@defi-wonderland/natspec-smells/-/natspec-smells-1.1.3.tgz#6d4c7e289b24264856170fec33e0cae0c844bd32" @@ -242,6 +252,11 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-5.0.2.tgz#b1d03075e49290d06570b2fd42154d76c2a5d210" integrity sha512-ytPc6eLGcHHnapAZ9S+5qsdomhjo6QBHTDRRBFfTxXIpsicMhVPouPgmUPebZZZGX7vt9USA+Z+0M0dSVtSUEA== +"@openzeppelin/contracts@^4.7.3": + version "4.9.6" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.6.tgz#2a880a24eb19b4f8b25adc2a5095f2aa27f39677" + integrity sha512-xSmezSupL+y9VkHZJGDoCBpmnB2ogM13ccaYDWqJTfS3dbuHkgjuwDFUmaFauBCboQMGB/S5UqUl2y54X99BmA== + "@scure/base@~1.1.4": version "1.1.6" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.6.tgz#8ce5d304b436e4c84f896e0550c83e4d88cb917d" @@ -271,6 +286,16 @@ dependencies: antlr4ts "^0.5.0-alpha.4" +"@solidity-parser/parser@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.17.0.tgz#52a2fcc97ff609f72011014e4c5b485ec52243ef" + integrity sha512-Nko8R0/kUo391jsEHHxrGM07QFdnPGvlmox4rmH0kNiNAashItAilhy4Mv4pK5gQmW5f4sXAF58fwJbmlkGcVw== + +"@tootallnate/quickjs-emscripten@^0.23.0": + version "0.23.0" + resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" + integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA== + "@types/conventional-commits-parser@^5.0.0": version "5.0.0" resolved "https://registry.yarnpkg.com/@types/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz#8c9d23e0b415b24b91626d07017303755d542dc8" @@ -298,6 +323,13 @@ abitype@0.7.1: resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.7.1.tgz#16db20abe67de80f6183cf75f3de1ff86453b745" integrity sha512-VBkRHTDZf9Myaek/dO3yMmOzB/y2s3Zo6nVU7yaw1G+TvCHAjwaJzNGN9yo4K5D8bU/VZXKP1EJpRhFr862PlQ== +agent-base@^7.0.2, agent-base@^7.1.0, agent-base@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" + integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== + dependencies: + debug "^4.3.4" + ajv@^6.12.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -377,11 +409,23 @@ ast-parents@^0.0.1: resolved "https://registry.yarnpkg.com/ast-parents/-/ast-parents-0.0.1.tgz#508fd0f05d0c48775d9eccda2e174423261e8dd3" integrity sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA== +ast-types@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" + integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== + dependencies: + tslib "^2.0.1" + astral-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== +async@^3.2.5: + version "3.2.5" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" + integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -408,6 +452,16 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= +basic-ftp@^5.0.2: + version "5.0.5" + resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.0.5.tgz#14a474f5fffecca1f4f406f1c26b18f800225ac0" + integrity sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg== + +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== + brace-expansion@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" @@ -460,6 +514,31 @@ chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" +cheerio-select@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-2.1.0.tgz#4d8673286b8126ca2a8e42740d5e3c4884ae21b4" + integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== + dependencies: + boolbase "^1.0.0" + css-select "^5.1.0" + css-what "^6.1.0" + domelementtype "^2.3.0" + domhandler "^5.0.3" + domutils "^3.0.1" + +cheerio@^1.0.0-rc.10: + version "1.0.0-rc.12" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" + integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== + dependencies: + cheerio-select "^2.1.0" + dom-serializer "^2.0.0" + domhandler "^5.0.3" + domutils "^3.0.1" + htmlparser2 "^8.0.1" + parse5 "^7.0.0" + parse5-htmlparser2-tree-adapter "^7.0.0" + cli-cursor@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" @@ -535,6 +614,11 @@ commander@^12.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-12.0.0.tgz#b929db6df8546080adfd004ab215ed48cf6f2592" integrity sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA== +commander@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" + integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== + commander@^8.1.0: version "8.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" @@ -612,11 +696,39 @@ cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +css-select@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" + integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== + dependencies: + boolbase "^1.0.0" + css-what "^6.1.0" + domhandler "^5.0.2" + domutils "^3.0.1" + nth-check "^2.0.1" + +css-what@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" + integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== + dargs@^8.0.0: version "8.1.0" resolved "https://registry.yarnpkg.com/dargs/-/dargs-8.1.0.tgz#a34859ea509cbce45485e5aa356fef70bfcc7272" integrity sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw== +data-uri-to-buffer@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz#8a58bb67384b261a38ef18bea1810cb01badd28b" + integrity sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw== + +debug@4, debug@^4.3.4: + version "4.3.5" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + dependencies: + ms "2.1.2" + debug@4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -638,6 +750,15 @@ define-data-property@^1.1.4: es-errors "^1.3.0" gopd "^1.0.1" +degenerator@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-5.0.1.tgz#9403bf297c6dad9a1ece409b37db27954f91f2f5" + integrity sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ== + dependencies: + ast-types "^0.13.4" + escodegen "^2.1.0" + esprima "^4.0.1" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -665,6 +786,36 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" +dom-serializer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" + integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.2" + entities "^4.2.0" + +domelementtype@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + +domhandler@^5.0.2, domhandler@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" + integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== + dependencies: + domelementtype "^2.3.0" + +domutils@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e" + integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== + dependencies: + dom-serializer "^2.0.0" + domelementtype "^2.3.0" + domhandler "^5.0.3" + dot-prop@^5.1.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -682,6 +833,11 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +entities@^4.2.0, entities@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" + integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== + env-paths@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" @@ -716,6 +872,32 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escodegen@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" + integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionalDependencies: + source-map "~0.6.1" + +esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + ethereum-cryptography@^2.0.0: version "2.1.3" resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz#1352270ed3b339fe25af5ceeadcf1b9c8e30768a" @@ -891,6 +1073,16 @@ get-stream@^8.0.1: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== +get-uri@^6.0.1: + version "6.0.3" + resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.3.tgz#0d26697bc13cf91092e519aa63aa60ee5b6f385a" + integrity sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw== + dependencies: + basic-ftp "^5.0.2" + data-uri-to-buffer "^6.0.2" + debug "^4.3.4" + fs-extra "^11.2.0" + git-hooks-list@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/git-hooks-list/-/git-hooks-list-3.1.0.tgz#386dc531dcc17474cf094743ff30987a3d3e70fc" @@ -1042,6 +1234,39 @@ homedir-polyfill@^1.0.1: dependencies: parse-passwd "^1.0.0" +html-link-extractor@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/html-link-extractor/-/html-link-extractor-1.0.5.tgz#a4be345cb13b8c3352d82b28c8b124bb7bf5dd6f" + integrity sha512-ADd49pudM157uWHwHQPUSX4ssMsvR/yHIswOR5CUfBdK9g9ZYGMhVSE6KZVHJ6kCkR0gH4htsfzU6zECDNVwyw== + dependencies: + cheerio "^1.0.0-rc.10" + +htmlparser2@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21" + integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.3" + domutils "^3.0.1" + entities "^4.4.0" + +http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + +https-proxy-agent@^7.0.3, https-proxy-agent@^7.0.5: + version "7.0.5" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2" + integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== + dependencies: + agent-base "^7.0.2" + debug "4" + human-signals@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" @@ -1052,6 +1277,13 @@ husky@>=8: resolved "https://registry.yarnpkg.com/husky/-/husky-9.0.11.tgz#fc91df4c756050de41b3e478b2158b87c1e79af9" integrity sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw== +iconv-lite@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + ignore@^5.2.4: version "5.3.1" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" @@ -1093,6 +1325,19 @@ ini@^1.3.4: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +ip-address@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" + integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== + dependencies: + jsbn "1.1.0" + sprintf-js "^1.1.3" + +is-absolute-url@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-4.0.1.tgz#16e4d487d4fded05cfe0685e53ec86804a5e94dc" + integrity sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A== + is-arguments@^1.0.4: version "1.1.1" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" @@ -1169,6 +1414,13 @@ is-plain-obj@^4.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz#d65025edec3657ce032fd7db63c97883eaed71f0" integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg== +is-relative-url@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-relative-url/-/is-relative-url-4.0.0.tgz#4d8371999ff6033b76e4d9972fb5bf496fddfa97" + integrity sha512-PkzoL1qKAYXNFct5IKdKRH/iBQou/oCC85QhXj6WKtUQBliZ4Yfd3Zk27RHu9KQG8r6zgvAA2AQKC9p+rqTszg== + dependencies: + is-absolute-url "^4.0.1" + is-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" @@ -1193,6 +1445,13 @@ is-windows@^1.0.1: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== +isemail@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/isemail/-/isemail-3.2.0.tgz#59310a021931a9fb06bbb51e155ce0b3f236832c" + integrity sha512-zKqkK+O+dGqevc93KNsbZ/TqTUFd46MwWjYOoMrjIMZ51eU7DtQG3Wmd9SQQT7i7RVnuTPEiYEWHU3MSbxC1Tg== + dependencies: + punycode "2.x.x" + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -1220,6 +1479,11 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +jsbn@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== + jsel@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/jsel/-/jsel-1.1.6.tgz#9257fee6c6e8ad8e75d5706503fe84f376035896" @@ -1264,6 +1528,17 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +link-check@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/link-check/-/link-check-5.3.0.tgz#641f907a76858f18e32d457fe2811d431d1b8aec" + integrity sha512-Jhb7xueDgQgBaZzkfOtAyOZEZAIMJQIjUpYD2QY/zEB+LKTY1tWiBwZg8QIDbzQdPBOcqzg7oLQDNcES/tQmXg== + dependencies: + is-relative-url "^4.0.0" + isemail "^3.2.0" + ms "^2.1.3" + needle "^3.3.1" + proxy-agent "^6.4.0" + lint-staged@>=10: version "15.2.2" resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.2.2.tgz#ad7cbb5b3ab70e043fa05bff82a09ed286bc4c5f" @@ -1365,6 +1640,39 @@ log-update@^6.0.0: strip-ansi "^7.1.0" wrap-ansi "^9.0.0" +lru-cache@^7.14.1: + version "7.18.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" + integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== + +markdown-link-check@^3.11.0: + version "3.12.2" + resolved "https://registry.yarnpkg.com/markdown-link-check/-/markdown-link-check-3.12.2.tgz#05606ccfdfc14e75d28a15cf31297aa273f1f754" + integrity sha512-GWMwSvxuZn+uGGydi5yywnnDZy08SGps4I/63xqvWT7lxtH4cVLnhgZZYtEcPz/QvgPg9vbH2rvWpa29owMtHA== + dependencies: + async "^3.2.5" + chalk "^5.3.0" + commander "^12.1.0" + link-check "^5.3.0" + lodash "^4.17.21" + markdown-link-extractor "^4.0.2" + needle "^3.3.1" + progress "^2.0.3" + proxy-agent "^6.4.0" + +markdown-link-extractor@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/markdown-link-extractor/-/markdown-link-extractor-4.0.2.tgz#464ff8935d7388f75a354b877d750a7bb705ea32" + integrity sha512-5cUOu4Vwx1wenJgxaudsJ8xwLUMN7747yDJX3V/L7+gi3e4MsCm7w5nbrDQQy8nEfnl4r5NV3pDXMAjhGXYXAw== + dependencies: + html-link-extractor "^1.0.5" + marked "^12.0.1" + +marked@^12.0.1: + version "12.0.2" + resolved "https://registry.yarnpkg.com/marked/-/marked-12.0.2.tgz#b31578fe608b599944c69807b00f18edab84647e" + integrity sha512-qXUm7e/YKFoqFPYPa3Ukg9xlI5cyAtGmyEIzMfW//m6kXwCy2Ps9DYf5ioijFKQ8qyuscrHoY04iJGctu2Kg0Q== + memorystream@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" @@ -1432,11 +1740,29 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +needle@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/needle/-/needle-3.3.1.tgz#63f75aec580c2e77e209f3f324e2cdf3d29bd049" + integrity sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q== + dependencies: + iconv-lite "^0.6.3" + sax "^1.2.4" + neo-async@^2.6.0: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== +netmask@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.0.2.tgz#8b01a07644065d536383835823bc52004ebac5e7" + integrity sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg== + npm-run-path@^5.1.0: version "5.3.0" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.3.0.tgz#e23353d0ebb9317f174e93417e4a4d82d0249e9f" @@ -1444,6 +1770,13 @@ npm-run-path@^5.1.0: dependencies: path-key "^4.0.0" +nth-check@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" + integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== + dependencies: + boolbase "^1.0.0" + once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -1484,6 +1817,28 @@ p-locate@^6.0.0: dependencies: p-limit "^4.0.0" +pac-proxy-agent@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz#0fb02496bd9fb8ae7eb11cfd98386daaac442f58" + integrity sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg== + dependencies: + "@tootallnate/quickjs-emscripten" "^0.23.0" + agent-base "^7.0.2" + debug "^4.3.4" + get-uri "^6.0.1" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.5" + pac-resolver "^7.0.1" + socks-proxy-agent "^8.0.4" + +pac-resolver@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-7.0.1.tgz#54675558ea368b64d210fd9c92a640b5f3b8abb6" + integrity sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg== + dependencies: + degenerator "^5.0.0" + netmask "^2.0.2" + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -1506,6 +1861,21 @@ parse-passwd@^1.0.0: resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== +parse5-htmlparser2-tree-adapter@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" + integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== + dependencies: + domhandler "^5.0.2" + parse5 "^7.0.0" + +parse5@^7.0.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" + integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== + dependencies: + entities "^4.4.0" + path-exists@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-5.0.0.tgz#a6aad9489200b21fab31e49cf09277e5116fb9e7" @@ -1551,16 +1921,49 @@ possible-typed-array-names@^1.0.0: resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== -prettier@^2.8.3: +prettier-plugin-solidity@^1.1.3: + version "1.3.1" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.3.1.tgz#59944d3155b249f7f234dee29f433524b9a4abcf" + integrity sha512-MN4OP5I2gHAzHZG1wcuJl0FsLS3c4Cc5494bbg+6oQWBPuEamjwDvmGfFMZ6NFzsh3Efd9UUxeT7ImgjNH4ozA== + dependencies: + "@solidity-parser/parser" "^0.17.0" + semver "^7.5.4" + solidity-comments-extractor "^0.0.8" + +prettier@^2.8.3, prettier@^2.8.7: version "2.8.8" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +progress@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +proxy-agent@^6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.4.0.tgz#b4e2dd51dee2b377748aef8d45604c2d7608652d" + integrity sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ== + dependencies: + agent-base "^7.0.2" + debug "^4.3.4" + http-proxy-agent "^7.0.1" + https-proxy-agent "^7.0.3" + lru-cache "^7.14.1" + pac-proxy-agent "^7.0.1" + proxy-from-env "^1.1.0" + socks-proxy-agent "^8.0.2" + proxy-from-env@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== +punycode@2.x.x: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + punycode@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -1624,6 +2027,16 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +"safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sax@^1.2.4: + version "1.4.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.4.1.tgz#44cc8988377f126304d3b3fc1010c733b929ef0f" + integrity sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg== + semver@^5.5.0: version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" @@ -1634,7 +2047,7 @@ semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.6.0: +semver@^7.5.4, semver@^7.6.0: version "7.6.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== @@ -1703,6 +2116,28 @@ slice-ansi@^7.0.0: ansi-styles "^6.2.1" is-fullwidth-code-point "^5.0.0" +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + +socks-proxy-agent@^8.0.2, socks-proxy-agent@^8.0.4: + version "8.0.4" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz#9071dca17af95f483300316f4b063578fa0db08c" + integrity sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw== + dependencies: + agent-base "^7.1.1" + debug "^4.3.4" + socks "^2.8.3" + +socks@^2.8.3: + version "2.8.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" + integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== + dependencies: + ip-address "^9.0.5" + smart-buffer "^4.2.0" + solc-typed-ast@18.1.3: version "18.1.3" resolved "https://registry.yarnpkg.com/solc-typed-ast/-/solc-typed-ast-18.1.3.tgz#243cc0c5a4f701445ac10341224bf8c18a6ed252" @@ -1773,6 +2208,16 @@ solhint-community@4.0.0: optionalDependencies: prettier "^2.8.3" +solidity-comments-extractor@^0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.8.tgz#f6e148ab0c49f30c1abcbecb8b8df01ed8e879f8" + integrity sha512-htM7Vn6LhHreR+EglVMd2s+sZhcXAirB1Zlyrv5zBuTxieCvjfnRpd7iZk75m/u6NOlEyQ94C6TWbBn2cY7w8g== + +solmate@^6.6.1: + version "6.7.0" + resolved "https://registry.yarnpkg.com/solmate/-/solmate-6.7.0.tgz#5e07b62498babec273aceb322a3e45d0e058e042" + integrity sha512-iMPr+gKbKjXBB12a+Iz5Tua5r7T4yugHaGXDWSJbBZB4Gr3vLeUUvKeLyMxCWWqk1xlLhFDFFuAmOzeyVBuyvQ== + "solmate@github:transmissions11/solmate#c892309": version "6.2.0" resolved "https://codeload.github.com/transmissions11/solmate/tar.gz/c892309933b25c03d32b1b0d674df7ae292ba925" @@ -1796,7 +2241,7 @@ sort-package-json@2.10.0: semver "^7.6.0" sort-object-keys "^1.1.3" -source-map@^0.6.1: +source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -1806,6 +2251,11 @@ split2@^4.0.0: resolved "https://registry.yarnpkg.com/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4" integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== +sprintf-js@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" + integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== + src-location@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/src-location/-/src-location-1.1.0.tgz#3f50eeb0c7169432e55b426be6e3a68ebba16218" @@ -1923,6 +2373,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +tslib@^2.0.1: + version "2.6.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== + uglify-js@^3.1.4: version "3.17.4" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" From b01b4e6f67fbc48bc5b5dbb29c1d1527f18f0082 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:27:02 +0200 Subject: [PATCH 07/37] test(echidna): protocol prop (part) --- test/invariants/fuzz/external/Protocol.t.sol | 148 +++++++++++++++---- 1 file changed, 120 insertions(+), 28 deletions(-) diff --git a/test/invariants/fuzz/external/Protocol.t.sol b/test/invariants/fuzz/external/Protocol.t.sol index 87721ab7..37f89413 100644 --- a/test/invariants/fuzz/external/Protocol.t.sol +++ b/test/invariants/fuzz/external/Protocol.t.sol @@ -20,7 +20,8 @@ contract EchidnaBalancer is EchidnaTest { FuzzERC20[] tokens; BCoWPool pool; - bool poolIsFinalized; + + IBPool[] poolsToFinalize; constructor() { solutionSettler = address(new MockSettler()); @@ -35,14 +36,6 @@ contract EchidnaBalancer is EchidnaTest { _token.initialize('', '', 18); tokens.push(_token); } - } - - function provideEnoughTokenCaller(FuzzERC20 _token, uint256 _amount) internal { - _token.mint(currentCaller, _amount); - } - - function setup_poolLiquidity() public { - if (poolIsFinalized) return; pool = BCoWPool(address(factory.newBPool())); @@ -63,16 +56,8 @@ contract EchidnaBalancer is EchidnaTest { } pool.finalize(); - - poolIsFinalized = true; } - // function test_test() public { - // fuzz_BFactoryAlwaysDeploy(); - // setup_poolLiquidity(2, 0, 1000); - // } - - // Probably wants to have a pool setup with more than 2 tokens too + swap /// @custom:property-id 1 /// @custom:property BFactory should always be able to deploy new pools function fuzz_BFactoryAlwaysDeploy() public AgentOrDeployer { @@ -85,6 +70,7 @@ contract EchidnaBalancer is EchidnaTest { assert(address(_newPool).code.length > 0); assert(factory.isBPool(address(_newPool))); assert(!_newPool.isFinalized()); + poolsToFinalize.push(_newPool); } catch { assert(false); } @@ -130,9 +116,14 @@ contract EchidnaBalancer is EchidnaTest { /// @custom:property-id 4 /// @custom:property the amount received can never be less than min amount out + /// @custom:property-id 13 + /// @custom:property an exact amount in should always earn the amount out calculated in bmath /// @custom:property-id 15 /// @custom:property there can't be any amount out for a 0 amount in - function amountReceivedFloored( + /// @custom:property-id 19 + /// @custom:property a swap can only happen when the pool is finalized + + function fuzz_swapExactIn( uint256 _minAmountOut, uint256 _amountIn, uint256 _tokenIn, @@ -154,6 +145,15 @@ contract EchidnaBalancer is EchidnaTest { uint256 _balanceOutBefore = tokens[_tokenOut].balanceOf(currentCaller); + uint256 _outComputed = bmath.calcOutGivenIn( + tokens[_tokenIn].balanceOf(address(pool)), + pool.getDenormalizedWeight(address(tokens[_tokenIn])), + tokens[_tokenOut].balanceOf(address(pool)), + pool.getDenormalizedWeight(address(tokens[_tokenOut])), + _amountIn, + bconst.MIN_FEE() + ); + hevm.prank(currentCaller); // Action @@ -163,10 +163,16 @@ contract EchidnaBalancer is EchidnaTest { // Postcondition uint256 _balanceOutAfter = tokens[_tokenOut].balanceOf(currentCaller); + // 13 + assert(_balanceOutAfter - _balanceOutBefore == _outComputed); + // 4 if (_amountIn != 0) assert(_balanceOutBefore <= _balanceOutAfter + _minAmountOut); // 15 else assert(_balanceOutBefore == _balanceOutAfter); + + // 19 + assert(pool.isFinalized()); } catch {} } @@ -174,7 +180,10 @@ contract EchidnaBalancer is EchidnaTest { /// @custom:property the amount spent can never be greater than max amount in /// @custom:property-id 15 /// @custom:property there can't be any amount out for a 0 amount in - function amountSpentCapped( + /// @custom:property-id 19 + /// @custom:property a swap can only happen when the pool is finalized + + function fuzz_swapExactOut( uint256 _maxAmountIn, uint256 _amountOut, uint256 _tokenIn, @@ -196,6 +205,15 @@ contract EchidnaBalancer is EchidnaTest { uint256 _balanceInBefore = tokens[_tokenIn].balanceOf(currentCaller); uint256 _balanceOutBefore = tokens[_tokenOut].balanceOf(currentCaller); + uint256 _inComputed = bmath.calcInGivenOut( + tokens[_tokenIn].balanceOf(address(pool)), + pool.getDenormalizedWeight(address(tokens[_tokenIn])), + tokens[_tokenOut].balanceOf(address(pool)), + pool.getDenormalizedWeight(address(tokens[_tokenOut])), + _amountOut, + bconst.MIN_FEE() + ); + hevm.prank(currentCaller); // Action @@ -209,8 +227,14 @@ contract EchidnaBalancer is EchidnaTest { // 5 assert(_balanceInBefore - _balanceInAfter <= _maxAmountIn); + // 14 + assert(_balanceInBefore - _balanceInAfter == _inComputed); + // 15 - if (_maxAmountIn == 0) assert(_balanceOutBefore == _balanceOutAfter); + if (_balanceInBefore == _balanceInAfter) assert(_balanceOutBefore == _balanceOutAfter); + + // 19 + assert(pool.isFinalized()); } catch {} } @@ -222,7 +246,7 @@ contract EchidnaBalancer is EchidnaTest { /// @custom:property-id 7 /// @custom:property total weight can be up to 50e18 - function totalWeightMax(uint256 _numberTokens, uint256[8] calldata _weights) public { + function fuzz_totalWeightMax(uint256 _numberTokens, uint256[8] calldata _weights) public { // Precondition BCoWPool _pool = BCoWPool(address(factory.newBPool())); @@ -256,27 +280,95 @@ contract EchidnaBalancer is EchidnaTest { /// @custom:property-id 10 /// @custom:property a pool can either be finalized or not finalized + /// @dev included to be exhaustive/future-proof if more states are added, as rn, it + /// basically tests the tautological (a || !a) + function fuzz_poolFinalized() public { + assert(pool.isFinalized() || !pool.isFinalized()); + } /// @custom:property-id 11 /// @custom:property a finalized pool cannot switch back to non-finalized + function fuzz_poolFinalizedOnce() public { + assert(pool.isFinalized()); + } /// @custom:property-id 12 /// @custom:property a non-finalized pool can only be finalized when the controller calls finalize() + function fuzz_poolFinalizedByController() public AgentOrDeployer { + // Precondition + if (poolsToFinalize.length == 0) { + return; + } - /// @custom:property-id 13 - /// @custom:property an exact amount in should always earn the amount out calculated in bmath + IBPool _pool = poolsToFinalize[poolsToFinalize.length - 1]; - /// @custom:property-id 14 - /// @custom:property an exact amount out is earned only if the amount in calculated in bmath is transfered + hevm.prank(currentCaller); - /// @custom:property there can't be any amount out for a 0 amount in + // Action + try _pool.finalize() { + // Postcondition + assert(currentCaller == _pool.getController()); + poolsToFinalize.pop(); + } catch { + assert(currentCaller != _pool.getController()); + } + } + + /// @custom:property-id 16 /// @custom:property the pool btoken can only be minted/burned in the join and exit operations + /// @custom:property a direct token transfer can never reduce the underlying amount of a given token per BPT + function fuzz_directTransfer(uint256 _amount, uint256 _token) public AgentOrDeployer { + // Mint bpt + // get quote + // transfer token to the pool + // compare new quote + } + /// @custom:property the amount of underlying token when exiting should always be the amount calculated in bmath - /// @custom:property a swap can only happen when the pool is finalized + + /// @custom:property-id 20 /// @custom:property bounding and unbounding token can only be done on a non-finalized pool, by the controller + function fuzz_boundOnlyNotFinalized() public AgentOrDeployer { + // Precondition + if (poolsToFinalize.length == 0) { + return; + } + + IBPool _pool = poolsToFinalize[poolsToFinalize.length - 1]; + + for (uint256 i; i < 4; i++) { + tokens[i].mint(address(this), 10 ether); + tokens[i].approve(address(pool), 10 ether); + + uint256 _poolWeight = bconst.MAX_WEIGHT() / 5; + + hevm.prank(currentCaller); + + // Action + try _pool.bind(address(tokens[i]), 10 ether, _poolWeight) { + // Postcondition + assert(currentCaller == pool.getController()); + assert(!_pool.isFinalized()); + } catch { + assert(currentCaller != pool.getController()); + } + } + } + + /// @custom:property-id 21 /// @custom:property there always should be between MIN_BOUND_TOKENS and MAX_BOUND_TOKENS bound in a pool + function fuzz_minMaxBoundToken() public { + assert(pool.getNumTokens() >= bconst.MIN_BOUND_TOKENS()); + assert(pool.getNumTokens() <= bconst.MAX_BOUND_TOKENS()); + + for (uint256 i; i < poolsToFinalize.length; i++) { + assert(poolsToFinalize[i].getNumTokens() >= bconst.MIN_BOUND_TOKENS()); + assert(poolsToFinalize[i].getNumTokens() <= bconst.MAX_BOUND_TOKENS()); + } + } + /// @custom:property only the settler can commit a hash + /// @custom:property when a hash has been commited, only this order can be settled - /// @custom:property BToken should not break the ToB ERC20 properties* } From 3753371c6574ff247473991491abe23016c48e8a Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:37:42 +0200 Subject: [PATCH 08/37] test(echidna): swap/join prop (part) --- test/SUMMARY.md | 3 + test/invariants/fuzz/external/Protocol.t.sol | 111 +++++++++++++++---- 2 files changed, 92 insertions(+), 22 deletions(-) diff --git a/test/SUMMARY.md b/test/SUMMARY.md index 5d254ea8..e37a2331 100644 --- a/test/SUMMARY.md +++ b/test/SUMMARY.md @@ -24,6 +24,9 @@ Then slither-mutate on the whole test base Setup for protocol-wide *looks* pretty simple (using the factory) - tbc +nb 14 means if token in == token out, people just give tokens to the pool, intended? + + ## Notes The bmath corresponding equations are: diff --git a/test/invariants/fuzz/external/Protocol.t.sol b/test/invariants/fuzz/external/Protocol.t.sol index 37f89413..514cbb88 100644 --- a/test/invariants/fuzz/external/Protocol.t.sol +++ b/test/invariants/fuzz/external/Protocol.t.sol @@ -3,17 +3,18 @@ pragma solidity 0.8.23; import {EchidnaTest, FuzzERC20} from '../../AdvancedTestsUtils.sol'; +import {MockSettler} from './MockSettler.sol'; import {BCoWFactory, BCoWPool, IBPool} from 'contracts/BCoWFactory.sol'; import {BConst} from 'contracts/BConst.sol'; import {BMath} from 'contracts/BMath.sol'; - -import {MockSettler} from './MockSettler.sol'; +import {BNum} from 'contracts/BNum.sol'; contract EchidnaBalancer is EchidnaTest { // System under test BCoWFactory factory; BConst bconst; BMath bmath; + BNum_exposed bnum; address solutionSettler; bytes32 appData; @@ -23,12 +24,16 @@ contract EchidnaBalancer is EchidnaTest { IBPool[] poolsToFinalize; + uint256 ghost_bptMinted; + uint256 ghost_bptBurned; + constructor() { solutionSettler = address(new MockSettler()); factory = new BCoWFactory(solutionSettler, appData); bconst = new BConst(); bmath = new BMath(); + bnum = new BNum_exposed(); // max bound token is 8 for (uint256 i; i < 4; i++) { @@ -56,6 +61,7 @@ contract EchidnaBalancer is EchidnaTest { } pool.finalize(); + ghost_bptMinted = pool.INIT_POOL_SUPPLY(); } /// @custom:property-id 1 @@ -228,7 +234,8 @@ contract EchidnaBalancer is EchidnaTest { assert(_balanceInBefore - _balanceInAfter <= _maxAmountIn); // 14 - assert(_balanceInBefore - _balanceInAfter == _inComputed); + if (_tokenIn != _tokenOut) assert(_balanceOutAfter - _balanceOutBefore == _amountOut); + else assert(_balanceOutAfter == _balanceOutBefore - _inComputed + _amountOut); // 15 if (_balanceInBefore == _balanceInAfter) assert(_balanceOutBefore == _balanceOutAfter); @@ -300,22 +307,54 @@ contract EchidnaBalancer is EchidnaTest { return; } - IBPool _pool = poolsToFinalize[poolsToFinalize.length - 1]; + IBPool _nonFinalizedPool = poolsToFinalize[poolsToFinalize.length - 1]; hevm.prank(currentCaller); // Action - try _pool.finalize() { + try _nonFinalizedPool.finalize() { // Postcondition - assert(currentCaller == _pool.getController()); + assert(currentCaller == _nonFinalizedPool.getController()); poolsToFinalize.pop(); - } catch { - assert(currentCaller != _pool.getController()); + } catch {} + } + + function setup_joinExitPool(bool _join, uint256 _amountBpt) public AgentOrDeployer { + if (_join) { + uint256[] memory _maxAmountsIn; + + _maxAmountsIn = new uint256[](4); + + for (uint256 i; i < _maxAmountsIn.length; i++) { + uint256 _maxIn = + bnum.bmul_exposed(bnum.bdiv_exposed(_amountBpt, pool.totalSupply()), pool.getBalance(address(tokens[i]))); + _maxAmountsIn[i] = _maxIn; + + tokens[i].mint(currentCaller, _maxIn); + hevm.prank(currentCaller); + tokens[i].approve(address(pool), _maxIn); + } + + hevm.prank(currentCaller); + try pool.joinPool(_amountBpt, _maxAmountsIn) { + ghost_bptMinted += _amountBpt; + } catch {} + } else { + hevm.prank(currentCaller); + pool.approve(address(pool), _amountBpt); + + hevm.prank(currentCaller); + try pool.exitPool(_amountBpt, new uint256[](4)) { + ghost_bptBurned += _amountBpt; + } catch {} } } /// @custom:property-id 16 /// @custom:property the pool btoken can only be minted/burned in the join and exit operations + function fuzz_mintBurnBPT() public { + assert(ghost_bptMinted - ghost_bptBurned == pool.totalSupply()); + } /// @custom:property a direct token transfer can never reduce the underlying amount of a given token per BPT function fuzz_directTransfer(uint256 _amount, uint256 _token) public AgentOrDeployer { @@ -326,6 +365,7 @@ contract EchidnaBalancer is EchidnaTest { } /// @custom:property the amount of underlying token when exiting should always be the amount calculated in bmath + function correctBPTBurnAmount() public AgentOrDeployer {} /// @custom:property-id 20 /// @custom:property bounding and unbounding token can only be done on a non-finalized pool, by the controller @@ -335,23 +375,38 @@ contract EchidnaBalancer is EchidnaTest { return; } - IBPool _pool = poolsToFinalize[poolsToFinalize.length - 1]; + IBPool _nonFinalizedPool = poolsToFinalize[poolsToFinalize.length - 1]; for (uint256 i; i < 4; i++) { - tokens[i].mint(address(this), 10 ether); - tokens[i].approve(address(pool), 10 ether); - - uint256 _poolWeight = bconst.MAX_WEIGHT() / 5; + tokens[i].mint(currentCaller, 10 ether); hevm.prank(currentCaller); + tokens[i].approve(address(_nonFinalizedPool), 10 ether); - // Action - try _pool.bind(address(tokens[i]), 10 ether, _poolWeight) { - // Postcondition - assert(currentCaller == pool.getController()); - assert(!_pool.isFinalized()); - } catch { - assert(currentCaller != pool.getController()); + uint256 _poolWeight = bconst.MAX_WEIGHT() / 5; + + if (_nonFinalizedPool.isBound(address(tokens[i]))) { + uint256 _balanceUnboundBefore = tokens[i].balanceOf(currentCaller); + + hevm.prank(currentCaller); + // Action + try _nonFinalizedPool.unbind(address(tokens[i])) { + // Postcondition + assert(currentCaller == _nonFinalizedPool.getController()); + assert(!_nonFinalizedPool.isFinalized()); + assert(tokens[i].balanceOf(currentCaller) > _balanceUnboundBefore); + } catch { + assert(currentCaller != _nonFinalizedPool.getController() || _nonFinalizedPool.isFinalized()); + } + } else { + hevm.prank(currentCaller); + try _nonFinalizedPool.bind(address(tokens[i]), 10 ether, _poolWeight) { + // Postcondition + assert(currentCaller == _nonFinalizedPool.getController()); + assert(!_nonFinalizedPool.isFinalized()); + } catch { + assert(currentCaller != _nonFinalizedPool.getController() || _nonFinalizedPool.isFinalized()); + } } } } @@ -363,8 +418,10 @@ contract EchidnaBalancer is EchidnaTest { assert(pool.getNumTokens() <= bconst.MAX_BOUND_TOKENS()); for (uint256 i; i < poolsToFinalize.length; i++) { - assert(poolsToFinalize[i].getNumTokens() >= bconst.MIN_BOUND_TOKENS()); - assert(poolsToFinalize[i].getNumTokens() <= bconst.MAX_BOUND_TOKENS()); + if (poolsToFinalize[i].isFinalized()) { + assert(poolsToFinalize[i].getNumTokens() >= bconst.MIN_BOUND_TOKENS()); + assert(poolsToFinalize[i].getNumTokens() <= bconst.MAX_BOUND_TOKENS()); + } } } @@ -372,3 +429,13 @@ contract EchidnaBalancer is EchidnaTest { /// @custom:property when a hash has been commited, only this order can be settled } + +contract BNum_exposed is BNum { + function bdiv_exposed(uint256 a, uint256 b) public pure returns (uint256) { + return bdiv(a, b); + } + + function bmul_exposed(uint256 a, uint256 b) public pure returns (uint256) { + return bmul(a, b); + } +} From d12abd421af89c54cd7691a070704b0b2310b0e3 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Mon, 15 Jul 2024 13:57:10 +0200 Subject: [PATCH 09/37] test(echidna): all properties --- test/invariants/PROPERTIES.md | 50 +++--- test/invariants/fuzz/config.yaml | 2 +- test/invariants/fuzz/external/BToken.sol | 30 +++- test/invariants/fuzz/external/Protocol.t.sol | 161 ++++++++++++++----- 4 files changed, 174 insertions(+), 69 deletions(-) diff --git a/test/invariants/PROPERTIES.md b/test/invariants/PROPERTIES.md index e7a7e6be..5d0377d4 100644 --- a/test/invariants/PROPERTIES.md +++ b/test/invariants/PROPERTIES.md @@ -2,30 +2,32 @@ | ------------------------------------------------------------------------------------------- | ------------------- | --- | ------ | ------- | | BFactory should always be able to deploy new pools | Unit | 1 | [ ] | [x] | | BFactory's blab should always be modifiable by the current blabs | Unit | 2 | [ ] | [x] | -| BFactory should always be able to transfer the BToken to the blab, if called by it | Unit | 3 | [ ] | [ ] | -| the amount received can never be less than min amount out | Unit | 4 | [ ] | [ ] | -| the amount spent can never be greater than max amount in | Unit | 5 | [ ] | [ ] | -| swap fee can only be 0 (cow pool) | Valid state | 6 | [ ] | [ ] | -| total weight can be up to 50e18 | Variable transition | 7 | [ ] | [ ] | -| BToken increaseApproval should increase the approval of the address by the amount | Variable transition | 8 | [ ] | [ ] | -| BToken decreaseApproval should decrease the approval to max(old-amount, 0) | Variable transition | 9 | [ ] | [ ] | -| a pool can either be finalized or not finalized | Valid state | 10 | [ ] | [ ] | -| a finalized pool cannot switch back to non-finalized | State transition | 11 | [ ] | [ ] | -| a non-finalized pool can only be finalized when the controller calls finalize() | State transition | 12 | [ ] | [ ] | -| an exact amount in should always earn the amount out calculated in bmath | High level | 13 | [ ] | [ ] | -| an exact amount out is earned only if the amount in calculated in bmath is transfered | High level | 14 | [ ] | [ ] | -| there can't be any amount out for a 0 amount in | High level | 15 | [ ] | [ ] | -| the pool btoken can only be minted/burned in the join and exit operations | High level | 16 | [ ] | [ ] | -| a direct token transfer can never reduce the underlying amount of a given token per BPT | High level | 17 | [ ] | [ ] | -| the amount of underlying token when exiting should always be the amount calculated in bmath | High level | 18 | [ ] | [ ] | -| a swap can only happen when the pool is finalized | High level | 19 | [ ] | [ ] | -| bounding and unbounding token can only be done on a non-finalized pool, by the controller | High level | 20 | [ ] | [ ] | -| there always should be between MIN_BOUND_TOKENS and MAX_BOUND_TOKENS bound in a pool | High level | 21 | [ ] | [ ] | -| only the settler can commit a hash | High level | 22 | [ ] | [ ] | -| when a hash has been commited, only this order can be settled | High level | 23 | [ ] | [ ] | -| BToken should not break the ToB ERC20 properties* | High level | 24 | [ ] | [ ] | - -* ERC20 properties +| BFactory should always be able to transfer the BToken to the blab, if called by it | Unit | 3 | [ ] | [x] | +| the amount received can never be less than min amount out | Unit | 4 | [ ] | [x] | +| the amount spent can never be greater than max amount in | Unit | 5 | [ ] | [x] | +| swap fee can only be 0 (cow pool) | Valid state | 6 | [ ] | [x] | +| total weight can be up to 50e18 | Variable transition | 7 | [ ] | [x] | +| BToken increaseApproval should increase the approval of the address by the amount* | Variable transition | 8 | [ ] | [x] | +| BToken decreaseApproval should decrease the approval to max(old-amount, 0)* | Variable transition | 9 | [ ] | [x] | +| a pool can either be finalized or not finalized | Valid state | 10 | [ ] | [x] | +| a finalized pool cannot switch back to non-finalized | State transition | 11 | [ ] | [x] | +| a non-finalized pool can only be finalized when the controller calls finalize() | State transition | 12 | [ ] | [x] | +| an exact amount in should always earn the amount out calculated in bmath | High level | 13 | [ ] | [x] | +| an exact amount out is earned only if the amount in calculated in bmath is transfered | High level | 14 | [ ] | [x] | +| there can't be any amount out for a 0 amount in | High level | 15 | [ ] | [x] | +| the pool btoken can only be minted/burned in the join and exit operations | High level | 16 | [ ] | [x] | +| a direct token transfer can never reduce the underlying amount of a given token per BPT | High level | 17 | [ ] | [x] | +| the amount of underlying token when exiting should always be the amount calculated in bmath | High level | 18 | [ ] | [x] | +| a swap can only happen when the pool is finalized | High level | 19 | [ ] | [x] | +| bounding and unbounding token can only be done on a non-finalized pool, by the controller | High level | 20 | [ ] | [x] | +| there always should be between MIN_BOUND_TOKENS and MAX_BOUND_TOKENS bound in a pool | High level | 21 | [ ] | [x] | +| only the settler can commit a hash | High level | 22 | [ ] | [x] | +| when a hash has been commited, only this order can be settled | High level | 23 | [ ] | | +| BToken should not break the ToB ERC20 properties** | High level | 24 | [ ] | [x] | + +* Bundled with 24 + +** ERC20 properties (https://github.com/crytic/properties?tab=readme-ov-file#erc20-tests) # Unit for the math libs (BNum and BMath): diff --git a/test/invariants/fuzz/config.yaml b/test/invariants/fuzz/config.yaml index 216bd5bb..07c6cd1c 100644 --- a/test/invariants/fuzz/config.yaml +++ b/test/invariants/fuzz/config.yaml @@ -2,4 +2,4 @@ testMode: assertion corpusDir: test/invariants/fuzz/corpus/ coverageFormats: ["html","lcov"] -allContracts: false \ No newline at end of file +allContracts: true \ No newline at end of file diff --git a/test/invariants/fuzz/external/BToken.sol b/test/invariants/fuzz/external/BToken.sol index e22b6fe9..a8880cdb 100644 --- a/test/invariants/fuzz/external/BToken.sol +++ b/test/invariants/fuzz/external/BToken.sol @@ -1,12 +1,13 @@ pragma solidity 0.8.23; +import {EchidnaTest} from '../../AdvancedTestsUtils.sol'; import {CryticERC20ExternalBasicProperties} from '@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol'; import {ITokenMock} from '@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol'; import {PropertiesConstants} from '@crytic/properties/contracts/util/PropertiesConstants.sol'; import 'contracts/BToken.sol'; -contract EchidnaBToken is CryticERC20ExternalBasicProperties { +contract EchidnaBToken is CryticERC20ExternalBasicProperties, EchidnaTest { constructor() { // Deploy ERC20 token = ITokenMock(address(new CryticTokenMock())); @@ -14,12 +15,35 @@ contract EchidnaBToken is CryticERC20ExternalBasicProperties { /// @custom:property-id 8 /// @custom:property BToken increaseApproval should increase the approval of the address by the amount - function fuzz_increaseApproval() public { + function fuzz_increaseApproval(uint256 _approvalToAdd) public { // Precondition + uint256 _approvalBefore = token.allowance(USER1, USER2); + + hevm.prank(USER1); + + // Action + BToken(address(token)).increaseApproval(USER2, _approvalToAdd); + + // Postcondition + assert(token.allowance(USER1, USER2) == _approvalBefore + _approvalToAdd); } /// @custom:property-id 9 /// @custom:property BToken decreaseApproval should decrease the approval to max(old-amount, 0) - function fuzz_decreaseApproval() public {} + + function fuzz_decreaseApproval(uint256 _approvalToLower) public { + // Precondition + uint256 _approvalBefore = token.allowance(USER1, USER2); + + hevm.prank(USER1); + + // Action + BToken(address(token)).decreaseApproval(USER2, _approvalToLower); + + // Postcondition + assert( + token.allowance(USER1, USER2) == (_approvalBefore > _approvalToLower ? _approvalBefore - _approvalToLower : 0) + ); + } } contract CryticTokenMock is BToken, PropertiesConstants { diff --git a/test/invariants/fuzz/external/Protocol.t.sol b/test/invariants/fuzz/external/Protocol.t.sol index 514cbb88..044eadc3 100644 --- a/test/invariants/fuzz/external/Protocol.t.sol +++ b/test/invariants/fuzz/external/Protocol.t.sol @@ -64,6 +64,39 @@ contract EchidnaBalancer is EchidnaTest { ghost_bptMinted = pool.INIT_POOL_SUPPLY(); } + // Randomly add or remove tokens to a finalized pool + // Insure caller has enough token + function setup_joinExitPool(bool _join, uint256 _amountBpt) public AgentOrDeployer { + if (_join) { + uint256[] memory _maxAmountsIn; + + _maxAmountsIn = new uint256[](4); + + for (uint256 i; i < _maxAmountsIn.length; i++) { + uint256 _maxIn = + bnum.bmul_exposed(bnum.bdiv_exposed(_amountBpt, pool.totalSupply()), pool.getBalance(address(tokens[i]))); + _maxAmountsIn[i] = _maxIn; + + tokens[i].mint(currentCaller, _maxIn); + hevm.prank(currentCaller); + tokens[i].approve(address(pool), _maxIn); + } + + hevm.prank(currentCaller); + try pool.joinPool(_amountBpt, _maxAmountsIn) { + ghost_bptMinted += _amountBpt; + } catch {} + } else { + hevm.prank(currentCaller); + pool.approve(address(pool), _amountBpt); + + hevm.prank(currentCaller); + try pool.exitPool(_amountBpt, new uint256[](4)) { + ghost_bptBurned += _amountBpt; + } catch {} + } + } + /// @custom:property-id 1 /// @custom:property BFactory should always be able to deploy new pools function fuzz_BFactoryAlwaysDeploy() public AgentOrDeployer { @@ -128,14 +161,13 @@ contract EchidnaBalancer is EchidnaTest { /// @custom:property there can't be any amount out for a 0 amount in /// @custom:property-id 19 /// @custom:property a swap can only happen when the pool is finalized - function fuzz_swapExactIn( uint256 _minAmountOut, uint256 _amountIn, uint256 _tokenIn, uint256 _tokenOut ) public AgentOrDeployer { - // Precondition + // Preconditions require(pool.isFinalized()); _tokenIn = clamp(_tokenIn, 0, tokens.length - 1); @@ -184,11 +216,12 @@ contract EchidnaBalancer is EchidnaTest { /// @custom:property-id 5 /// @custom:property the amount spent can never be greater than max amount in + /// @custom:property-id 14 + /// @custom:property an exact amount out is earned only if the amount in calculated in bmath is transfere /// @custom:property-id 15 /// @custom:property there can't be any amount out for a 0 amount in /// @custom:property-id 19 /// @custom:property a swap can only happen when the pool is finalized - function fuzz_swapExactOut( uint256 _maxAmountIn, uint256 _amountOut, @@ -200,7 +233,6 @@ contract EchidnaBalancer is EchidnaTest { _tokenIn = clamp(_tokenIn, 0, tokens.length - 1); _tokenOut = clamp(_tokenOut, 0, tokens.length - 1); - _maxAmountIn = clamp(_maxAmountIn, 0, 10 ether); tokens[_tokenIn].mint(currentCaller, _maxAmountIn); @@ -285,6 +317,8 @@ contract EchidnaBalancer is EchidnaTest { } } + /// properties 8 and 9 are tested with the BToken internal tests + /// @custom:property-id 10 /// @custom:property a pool can either be finalized or not finalized /// @dev included to be exhaustive/future-proof if more states are added, as rn, it @@ -319,53 +353,84 @@ contract EchidnaBalancer is EchidnaTest { } catch {} } - function setup_joinExitPool(bool _join, uint256 _amountBpt) public AgentOrDeployer { - if (_join) { - uint256[] memory _maxAmountsIn; - - _maxAmountsIn = new uint256[](4); - - for (uint256 i; i < _maxAmountsIn.length; i++) { - uint256 _maxIn = - bnum.bmul_exposed(bnum.bdiv_exposed(_amountBpt, pool.totalSupply()), pool.getBalance(address(tokens[i]))); - _maxAmountsIn[i] = _maxIn; - - tokens[i].mint(currentCaller, _maxIn); - hevm.prank(currentCaller); - tokens[i].approve(address(pool), _maxIn); - } - - hevm.prank(currentCaller); - try pool.joinPool(_amountBpt, _maxAmountsIn) { - ghost_bptMinted += _amountBpt; - } catch {} - } else { - hevm.prank(currentCaller); - pool.approve(address(pool), _amountBpt); - - hevm.prank(currentCaller); - try pool.exitPool(_amountBpt, new uint256[](4)) { - ghost_bptBurned += _amountBpt; - } catch {} - } - } - /// @custom:property-id 16 /// @custom:property the pool btoken can only be minted/burned in the join and exit operations function fuzz_mintBurnBPT() public { assert(ghost_bptMinted - ghost_bptBurned == pool.totalSupply()); } + /// @custom:property-id 17 /// @custom:property a direct token transfer can never reduce the underlying amount of a given token per BPT - function fuzz_directTransfer(uint256 _amount, uint256 _token) public AgentOrDeployer { - // Mint bpt - // get quote - // transfer token to the pool - // compare new quote + function fuzz_directTransfer( + uint256 _amountPoolToken, + uint256 _amountToTransfer, + uint256 _tokenIdx + ) public AgentOrDeployer { + _tokenIdx = clamp(_tokenIdx, 0, tokens.length - 1); + FuzzERC20 _token = tokens[_tokenIdx]; + + uint256 _redeemedAmountBeforeTransfer = bmath.calcSingleOutGivenPoolIn( + _token.balanceOf(address(pool)), + pool.getDenormalizedWeight(address(_token)), + pool.totalSupply(), + pool.getTotalDenormalizedWeight(), + _amountPoolToken, + bconst.MIN_FEE() + ); + + _token.mint(address(this), _amountToTransfer); + // Action + _token.transfer(address(pool), _amountToTransfer); + + // Postcondition + uint256 _redeemedAmountAfter = bmath.calcSingleOutGivenPoolIn( + _token.balanceOf(address(pool)), + pool.getDenormalizedWeight(address(_token)), + pool.totalSupply(), + pool.getTotalDenormalizedWeight(), + _amountPoolToken, + bconst.MIN_FEE() + ); + + assert(_redeemedAmountAfter >= _redeemedAmountBeforeTransfer); } + /// @custom:property-id 18 /// @custom:property the amount of underlying token when exiting should always be the amount calculated in bmath - function correctBPTBurnAmount() public AgentOrDeployer {} + function correctBPTBurnAmount(uint256 _amountPoolToken) public AgentOrDeployer { + _amountPoolToken = clamp(_amountPoolToken, 0, pool.balanceOf(currentCaller)); + + uint256[] memory _amountsToReceive = new uint256[](4); + uint256[] memory _previousBalances = new uint256[](4); + + for (uint256 i; i < tokens.length; i++) { + FuzzERC20 _token = tokens[i]; + + _amountsToReceive[i] = bmath.calcSingleOutGivenPoolIn( + _token.balanceOf(address(pool)), + pool.getDenormalizedWeight(address(_token)), + pool.totalSupply(), + pool.getTotalDenormalizedWeight(), + _amountPoolToken, + bconst.MIN_FEE() + ); + + _previousBalances[i] = _token.balanceOf(currentCaller); + } + + hevm.prank(currentCaller); + pool.approve(address(pool), _amountPoolToken); + + hevm.prank(currentCaller); + + // Action + pool.exitPool(_amountPoolToken, new uint256[](4)); + + // PostCondition + for (uint256 i; i < tokens.length; i++) { + assert(tokens[i].balanceOf(currentCaller) == _previousBalances[i] + _amountsToReceive[i]); + } + } /// @custom:property-id 20 /// @custom:property bounding and unbounding token can only be done on a non-finalized pool, by the controller @@ -425,9 +490,23 @@ contract EchidnaBalancer is EchidnaTest { } } + /// @custom:property-id 22 /// @custom:property only the settler can commit a hash + function fuzz_settlerCommit() public AgentOrDeployer { + // Precondition + hevm.prank(currentCaller); + + // Action + try pool.commit(hex'1234') { + // Postcondition + assert(currentCaller == solutionSettler); + } catch {} + } + /// @custom:property-id 23 /// @custom:property when a hash has been commited, only this order can be settled + /// @custom:property-not-implemented + function fuzz_settlerSettle() public {} } contract BNum_exposed is BNum { From 8cde0c0f30fe8c55f8e1f2851bbe2097c144dce5 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Mon, 15 Jul 2024 22:00:56 +0200 Subject: [PATCH 10/37] test(halmos): part --- test/invariants/fuzz/external/BToken.sol | 2 +- test/invariants/fuzz/external/Protocol.t.sol | 2 +- test/invariants/fuzz/internal/BMath.t.sol | 2 +- test/invariants/fuzz/internal/BNum.t.sol | 2 +- .../{ => helpers}/AdvancedTestsUtils.sol | 3 +- test/invariants/helpers/MockSettler.sol | 21 + test/invariants/symbolic/BMath.t.sol | 2 +- test/invariants/symbolic/BNum.t.sol | 5 +- test/invariants/symbolic/Protocol.t.sol | 448 ++++++++++++++++++ 9 files changed, 478 insertions(+), 9 deletions(-) rename test/invariants/{ => helpers}/AdvancedTestsUtils.sol (94%) create mode 100644 test/invariants/helpers/MockSettler.sol create mode 100644 test/invariants/symbolic/Protocol.t.sol diff --git a/test/invariants/fuzz/external/BToken.sol b/test/invariants/fuzz/external/BToken.sol index a8880cdb..dc541b05 100644 --- a/test/invariants/fuzz/external/BToken.sol +++ b/test/invariants/fuzz/external/BToken.sol @@ -1,6 +1,6 @@ pragma solidity 0.8.23; -import {EchidnaTest} from '../../AdvancedTestsUtils.sol'; +import {EchidnaTest} from '../../helpers/AdvancedTestsUtils.sol'; import {CryticERC20ExternalBasicProperties} from '@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol'; import {ITokenMock} from '@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol'; diff --git a/test/invariants/fuzz/external/Protocol.t.sol b/test/invariants/fuzz/external/Protocol.t.sol index 044eadc3..2fbd1d5b 100644 --- a/test/invariants/fuzz/external/Protocol.t.sol +++ b/test/invariants/fuzz/external/Protocol.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.23; -import {EchidnaTest, FuzzERC20} from '../../AdvancedTestsUtils.sol'; +import {EchidnaTest, FuzzERC20} from '../../helpers/AdvancedTestsUtils.sol'; import {MockSettler} from './MockSettler.sol'; import {BCoWFactory, BCoWPool, IBPool} from 'contracts/BCoWFactory.sol'; diff --git a/test/invariants/fuzz/internal/BMath.t.sol b/test/invariants/fuzz/internal/BMath.t.sol index e6c3d1c5..71b18891 100644 --- a/test/invariants/fuzz/internal/BMath.t.sol +++ b/test/invariants/fuzz/internal/BMath.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.23; -import {EchidnaTest} from '../../AdvancedTestsUtils.sol'; +import {EchidnaTest} from '../../helpers/AdvancedTestsUtils.sol'; import {BMath} from 'contracts/BMath.sol'; diff --git a/test/invariants/fuzz/internal/BNum.t.sol b/test/invariants/fuzz/internal/BNum.t.sol index a095eeec..0fad60c2 100644 --- a/test/invariants/fuzz/internal/BNum.t.sol +++ b/test/invariants/fuzz/internal/BNum.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.23; -import {EchidnaTest} from '../../AdvancedTestsUtils.sol'; +import {EchidnaTest} from '../../helpers/AdvancedTestsUtils.sol'; import {BNum} from 'contracts/BNum.sol'; diff --git a/test/invariants/AdvancedTestsUtils.sol b/test/invariants/helpers/AdvancedTestsUtils.sol similarity index 94% rename from test/invariants/AdvancedTestsUtils.sol rename to test/invariants/helpers/AdvancedTestsUtils.sol index de0fbc70..b0f0fca1 100644 --- a/test/invariants/AdvancedTestsUtils.sol +++ b/test/invariants/helpers/AdvancedTestsUtils.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.23; +import {Test} from 'forge-std/Test.sol'; import {MockERC20} from 'forge-std/mocks/MockERC20.sol'; import {SymTest} from 'halmos-cheatcodes/src/SymTest.sol'; @@ -60,4 +61,4 @@ contract EchidnaTest is AgentsHandler { } } -contract HalmosTest is SymTest {} +contract HalmosTest is SymTest, Test {} diff --git a/test/invariants/helpers/MockSettler.sol b/test/invariants/helpers/MockSettler.sol new file mode 100644 index 00000000..d79dfa4b --- /dev/null +++ b/test/invariants/helpers/MockSettler.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.23; + +import {GPv2Interaction, GPv2Trade, IERC20, ISettlement} from 'interfaces/ISettlement.sol'; + +contract MockSettler is ISettlement { + function domainSeparator() external view override returns (bytes32) { + return bytes32(hex'1234'); + } + + function vaultRelayer() external view override returns (address) { + return address(123); + } + + function settle( + IERC20[] calldata tokens, + uint256[] calldata clearingPrices, + GPv2Trade.Data[] calldata trades, + GPv2Interaction.Data[][3] calldata interactions + ) external {} +} diff --git a/test/invariants/symbolic/BMath.t.sol b/test/invariants/symbolic/BMath.t.sol index ea3cdc90..e98f6aad 100644 --- a/test/invariants/symbolic/BMath.t.sol +++ b/test/invariants/symbolic/BMath.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.23; -import {HalmosTest} from '../AdvancedTestsUtils.sol'; +import {HalmosTest} from '../helpers/AdvancedTestsUtils.sol'; import {BMath} from 'contracts/BMath.sol'; contract SymbolicBMath is BMath, HalmosTest { diff --git a/test/invariants/symbolic/BNum.t.sol b/test/invariants/symbolic/BNum.t.sol index e8460821..1d7b6c61 100644 --- a/test/invariants/symbolic/BNum.t.sol +++ b/test/invariants/symbolic/BNum.t.sol @@ -1,11 +1,10 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.23; -import {HalmosTest} from '../AdvancedTestsUtils.sol'; +import {HalmosTest} from '../helpers/AdvancedTestsUtils.sol'; import {BNum} from 'contracts/BNum.sol'; -import {Test} from 'forge-std/Test.sol'; -contract SymbolicBNum is BNum, Test, HalmosTest { +contract SymbolicBNum is BNum, HalmosTest { ///////////////////////////////////////////////////////////////////// // Bnum::btoi // ///////////////////////////////////////////////////////////////////// diff --git a/test/invariants/symbolic/Protocol.t.sol b/test/invariants/symbolic/Protocol.t.sol new file mode 100644 index 00000000..bb9619e6 --- /dev/null +++ b/test/invariants/symbolic/Protocol.t.sol @@ -0,0 +1,448 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.23; + +import {FuzzERC20, HalmosTest} from '../helpers/AdvancedTestsUtils.sol'; + +import {MockSettler} from '../helpers/MockSettler.sol'; +import {BCoWFactory, BCoWPool, IBPool} from 'contracts/BCoWFactory.sol'; +import {BConst} from 'contracts/BConst.sol'; +import {BMath} from 'contracts/BMath.sol'; +import {BNum} from 'contracts/BNum.sol'; + +contract HalmosBalancer is HalmosTest { + // System under test + BCoWFactory factory; + BConst bconst; + BMath bmath; + BNum_exposed bnum; + + address solutionSettler; + bytes32 appData; + + FuzzERC20[] tokens; + BCoWPool pool; + + address currentCaller = svm.createAddress('currentCaller'); + + constructor() { + solutionSettler = address(new MockSettler()); + factory = new BCoWFactory(solutionSettler, appData); + bconst = new BConst(); + bmath = new BMath(); + bnum = new BNum_exposed(); + pool = BCoWPool(address(factory.newBPool())); + + // max bound token is 8 + for (uint256 i; i < 5; i++) { + FuzzERC20 _token = new FuzzERC20(); + _token.initialize('', '', 18); + tokens.push(_token); + + _token.mint(address(this), 10 ether); + _token.approve(address(pool), 10 ether); + + uint256 _poolWeight = bconst.MAX_WEIGHT() / 5; + + pool.bind(address(_token), 10 ether, _poolWeight); + } + + pool.finalize(); + } + + /// @custom:property-id 0 + /// @custom:property BFactory should always be able to deploy new pools + function check_deploy() public { + assert(factory.SOLUTION_SETTLER() == solutionSettler); + assert(pool.isFinalized()); + } + + /// @custom:property-id 1 + /// @custom:property BFactory should always be able to deploy new pools + function check_BFactoryAlwaysDeploy(address _caller) public { + // Precondition + vm.assume(_caller != address(0)); + vm.prank(_caller); + + // Action + try factory.newBPool() returns (IBPool _newPool) { + // Postcondition + assert(address(_newPool).code.length > 0); + assert(factory.isBPool(address(_newPool))); + assert(!_newPool.isFinalized()); + } catch { + assert(false); + } + } + + /// @custom:property-id 2 + /// @custom:property BFactory's blab should always be modifiable by the current blabs + function check_blabAlwaysModByBLab() public { + // Precondition + address _currentBLab = factory.getBLabs(); + + vm.prank(currentCaller); + + // Action + try factory.setBLabs(address(123)) { + // Postcondition + assert(_currentBLab == currentCaller); + } catch { + assert(_currentBLab != currentCaller); + } + } + + /// @custom:property-id 3 + /// @custom:property BFactory should always be able to transfer the BToken to the blab, if called by it + function check_alwaysCollect() public { + // Precondition + address _currentBLab = factory.getBLabs(); + + vm.prank(currentCaller); + + // Action + try factory.collect(pool) { + // Postcondition + assert(_currentBLab == currentCaller); + } catch { + assert(_currentBLab != currentCaller); + } + } + + /// @custom:property-id 4 + /// @custom:property the amount received can never be less than min amount out + /// @custom:property-id 13 + /// @custom:property an exact amount in should always earn the amount out calculated in bmath + /// @custom:property-id 15 + /// @custom:property there can't be any amount out for a 0 amount in + /// @custom:property-id 19 + /// @custom:property a swap can only happen when the pool is finalized + function skipped_swapExactIn(uint256 _minAmountOut, uint256 _amountIn, uint256 _tokenIn, uint256 _tokenOut) public { + // Preconditions + vm.assume(_tokenIn < tokens.length); + vm.assume(_tokenOut < tokens.length); + vm.assume(_tokenIn != _tokenOut); // todo: dig this, it should pass without this precondition + + tokens[_tokenIn].mint(currentCaller, _amountIn); + + vm.prank(currentCaller); + tokens[_tokenIn].approve(address(pool), type(uint256).max); // approval isn't limiting + + uint256 _balanceOutBefore = tokens[_tokenOut].balanceOf(currentCaller); + + uint256 _outComputed = bmath.calcOutGivenIn( + tokens[_tokenIn].balanceOf(address(pool)), + pool.getDenormalizedWeight(address(tokens[_tokenIn])), + tokens[_tokenOut].balanceOf(address(pool)), + pool.getDenormalizedWeight(address(tokens[_tokenOut])), + _amountIn, + bconst.MIN_FEE() + ); + + vm.prank(currentCaller); + + // Action + try pool.swapExactAmountIn( + address(tokens[_tokenIn]), _amountIn, address(tokens[_tokenOut]), _minAmountOut, type(uint256).max + ) { + // Postcondition + uint256 _balanceOutAfter = tokens[_tokenOut].balanceOf(currentCaller); + + // 13 + assert(_balanceOutAfter - _balanceOutBefore == _outComputed); + + // 4 + if (_amountIn != 0) assert(_balanceOutBefore <= _balanceOutAfter + _minAmountOut); + // 15 + else assert(_balanceOutBefore == _balanceOutAfter); + + // 19 + assert(pool.isFinalized()); + } catch {} + } + + /// @custom:property-id 5 + /// @custom:property the amount spent can never be greater than max amount in + /// @custom:property-id 14 + /// @custom:property an exact amount out is earned only if the amount in calculated in bmath is transfere + /// @custom:property-id 15 + /// @custom:property there can't be any amount out for a 0 amount in + /// @custom:property-id 19 + /// @custom:property a swap can only happen when the pool is finalized + function skipped_swapExactOut(uint256 _maxAmountIn, uint256 _amountOut, uint256 _tokenIn, uint256 _tokenOut) public { + // Precondition + vm.assume(_tokenIn < tokens.length); + vm.assume(_tokenOut < tokens.length); + + tokens[_tokenIn].mint(currentCaller, _maxAmountIn); + + vm.prank(currentCaller); + tokens[_tokenIn].approve(address(pool), type(uint256).max); // approval isn't limiting + + uint256 _balanceInBefore = tokens[_tokenIn].balanceOf(currentCaller); + uint256 _balanceOutBefore = tokens[_tokenOut].balanceOf(currentCaller); + + uint256 _inComputed = bmath.calcInGivenOut( + tokens[_tokenIn].balanceOf(address(pool)), + pool.getDenormalizedWeight(address(tokens[_tokenIn])), + tokens[_tokenOut].balanceOf(address(pool)), + pool.getDenormalizedWeight(address(tokens[_tokenOut])), + _amountOut, + bconst.MIN_FEE() + ); + + vm.prank(currentCaller); + + // Action + try pool.swapExactAmountOut( + address(tokens[_tokenIn]), _maxAmountIn, address(tokens[_tokenOut]), _amountOut, type(uint256).max + ) { + // Postcondition + uint256 _balanceInAfter = tokens[_tokenIn].balanceOf(currentCaller); + uint256 _balanceOutAfter = tokens[_tokenOut].balanceOf(currentCaller); + + // 5 + assert(_balanceInBefore - _balanceInAfter <= _maxAmountIn); + + // 14 + if (_tokenIn != _tokenOut) assert(_balanceOutAfter - _balanceOutBefore == _amountOut); + else assert(_balanceOutAfter == _balanceOutBefore - _inComputed + _amountOut); + + // 15 + if (_balanceInBefore == _balanceInAfter) assert(_balanceOutBefore == _balanceOutAfter); + + // 19 + assert(pool.isFinalized()); + } catch {} + } + + /// @custom:property-id 6 + /// @custom:property swap fee can only be 0 (cow pool) + + /// @custom:property-id 7 + /// @custom:property total weight can be up to 50e18 + /// @dev Only 2 tokens are used, to avoid hitting the limit in loop unrolling + function check_totalWeightMax(uint256[2] calldata _weights) public { + // Precondition + BCoWPool _pool = BCoWPool(address(factory.newBPool())); + + uint256 _totalWeight = 0; + + for (uint256 i; i < 2; i++) { + vm.assume(_weights[i] >= bconst.MIN_WEIGHT() && _weights[i] <= bconst.MAX_WEIGHT()); + } + + for (uint256 i; i < 2; i++) { + FuzzERC20 _token = new FuzzERC20(); + _token.initialize('', '', 18); + _token.mint(address(this), 10 ether); + _token.approve(address(_pool), 10 ether); + + uint256 _poolWeight = _weights[i]; + + // Action + try _pool.bind(address(_token), 10 ether, _poolWeight) { + // Postcondition + _totalWeight += _poolWeight; + + // 7 + assert(_totalWeight <= bconst.MAX_TOTAL_WEIGHT()); + } catch { + // 7 + assert(_totalWeight + _poolWeight > bconst.MAX_TOTAL_WEIGHT()); + break; + } + } + } + + /// properties 8 and 9 are tested with the BToken internal tests + + /// @custom:property-id 10 + /// @custom:property a pool can either be finalized or not finalized + /// @dev included to be exhaustive/future-proof if more states are added, as rn, it + /// basically tests the tautological (a || !a) + + /// @custom:property-id 11 + /// @custom:property a finalized pool cannot switch back to non-finalized + + /// @custom:property-id 12 + /// @custom:property a non-finalized pool can only be finalized when the controller calls finalize() + function check_poolFinalizedByController() public { + // Precondition + IBPool _nonFinalizedPool = factory.newBPool(); + + vm.prank(_nonFinalizedPool.getController()); + + for (uint256 i; i < 3; i++) { + FuzzERC20 _token = new FuzzERC20(); + + _token.initialize('', '', 18); + _token.mint(_nonFinalizedPool.getController(), 10 ether); + _token.approve(address(_nonFinalizedPool), 10 ether); + + uint256 _poolWeight = bconst.MAX_WEIGHT() / 5; + + _nonFinalizedPool.bind(address(_token), 10 ether, _poolWeight); + } + vm.stopPrank(); + + vm.prank(currentCaller); + + // Action + try _nonFinalizedPool.finalize() { + // Postcondition + assert(currentCaller == _nonFinalizedPool.getController()); + } catch {} + } + + /// @custom:property-id 16 + /// @custom:property the pool btoken can only be minted/burned in the join and exit operations + + /// @custom:property-id 17 + /// @custom:property a direct token transfer can never reduce the underlying amount of a given token per BPT + function skipped_directTransfer(uint256 _amountPoolToken, uint256 _amountToTransfer, uint256 _tokenIdx) public { + vm.assume(_tokenIdx < tokens.length); + + FuzzERC20 _token = tokens[2]; + + uint256 _redeemedAmountBeforeTransfer = bmath.calcSingleOutGivenPoolIn( + _token.balanceOf(address(pool)), + pool.getDenormalizedWeight(address(_token)), + pool.totalSupply(), + pool.getTotalDenormalizedWeight(), + _amountPoolToken, + bconst.MIN_FEE() + ); + + _token.mint(address(this), _amountToTransfer); + // Action + _token.transfer(address(pool), _amountToTransfer); + + // Postcondition + uint256 _redeemedAmountAfter = bmath.calcSingleOutGivenPoolIn( + _token.balanceOf(address(pool)), + pool.getDenormalizedWeight(address(_token)), + pool.totalSupply(), + pool.getTotalDenormalizedWeight(), + _amountPoolToken, + bconst.MIN_FEE() + ); + + assert(_redeemedAmountAfter >= _redeemedAmountBeforeTransfer); + } + + /// @custom:property-id 18 + /// @custom:property the amount of underlying token when exiting should always be the amount calculated in bmath + function correctBPTBurnAmount(uint256 _amountPoolToken) public { + _amountPoolToken = bound(_amountPoolToken, 0, pool.balanceOf(currentCaller)); + + uint256[] memory _amountsToReceive = new uint256[](4); + uint256[] memory _previousBalances = new uint256[](4); + + for (uint256 i; i < tokens.length; i++) { + FuzzERC20 _token = tokens[i]; + + _amountsToReceive[i] = bmath.calcSingleOutGivenPoolIn( + _token.balanceOf(address(pool)), + pool.getDenormalizedWeight(address(_token)), + pool.totalSupply(), + pool.getTotalDenormalizedWeight(), + _amountPoolToken, + bconst.MIN_FEE() + ); + + _previousBalances[i] = _token.balanceOf(currentCaller); + } + + vm.prank(currentCaller); + pool.approve(address(pool), _amountPoolToken); + + vm.prank(currentCaller); + + // Action + pool.exitPool(_amountPoolToken, new uint256[](4)); + + // PostCondition + for (uint256 i; i < tokens.length; i++) { + assert(tokens[i].balanceOf(currentCaller) == _previousBalances[i] + _amountsToReceive[i]); + } + } + + /// @custom:property-id 20 + /// @custom:property bounding and unbounding token can only be done on a non-finalized pool, by the controller + function check_boundOnlyNotFinalized() public { + // Precondition + IBPool _nonFinalizedPool = factory.newBPool(); + + address _callerBind = svm.createAddress('callerBind'); + address _callerUnbind = svm.createAddress('callerUnbind'); + address _callerFinalize = svm.createAddress('callerFinalize'); + + for (uint256 i; i < 2; i++) { + tokens[i].mint(_callerBind, 10 ether); + + vm.startPrank(_callerBind); + tokens[i].approve(address(pool), 10 ether); + + uint256 _poolWeight = bconst.MAX_WEIGHT() / 5; + + try _nonFinalizedPool.bind(address(tokens[i]), 10 ether, _poolWeight) { + assert(_callerBind == _nonFinalizedPool.getController()); + } catch { + assert(_callerBind != _nonFinalizedPool.getController()); + } + + vm.stopPrank(); + } + + vm.prank(_callerUnbind); + try _nonFinalizedPool.unbind(address(tokens[1])) { + assert(_callerUnbind == _nonFinalizedPool.getController()); + } catch { + assert(_callerUnbind != _nonFinalizedPool.getController()); + } + + vm.prank(_callerFinalize); + try _nonFinalizedPool.finalize() { + assert(_callerFinalize == _nonFinalizedPool.getController()); + } catch { + // assert(_callerFinalize != _nonFinalizedPool.getController()); + } + + vm.stopPrank(); + } + + /// @custom:property-id 21 + /// @custom:property there always should be between MIN_BOUND_TOKENS and MAX_BOUND_TOKENS bound in a pool + function fuzz_minMaxBoundToken() public { + assert(pool.getNumTokens() >= bconst.MIN_BOUND_TOKENS()); + assert(pool.getNumTokens() <= bconst.MAX_BOUND_TOKENS()); + } + + /// @custom:property-id 22 + /// @custom:property only the settler can commit a hash + function fuzz_settlerCommit() public { + // Precondition + vm.prank(currentCaller); + + // Action + try pool.commit(hex'1234') { + // Postcondition + assert(currentCaller == solutionSettler); + } catch {} + } + + /// @custom:property-id 23 + /// @custom:property when a hash has been commited, only this order can be settled + /// @custom:property-not-implemented + function fuzz_settlerSettle() public {} +} + +contract BNum_exposed is BNum { + function bdiv_exposed(uint256 a, uint256 b) public pure returns (uint256) { + return bdiv(a, b); + } + + function bmul_exposed(uint256 a, uint256 b) public pure returns (uint256) { + return bmul(a, b); + } +} From 0d0ca16d956032e2d42a189aac9cc4f1db2589e6 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:41:14 +0200 Subject: [PATCH 11/37] feat: summary prop md and last tests --- test/SUMMARY.md | 46 ++-- test/invariants/PROPERTIES.md | 74 +++--- test/invariants/symbolic/BMath.t.sol | 32 --- test/invariants/symbolic/BNum.t.sol | 218 ----------------- test/invariants/symbolic/Protocol.t.sol | 298 ++++++------------------ 5 files changed, 139 insertions(+), 529 deletions(-) delete mode 100644 test/invariants/symbolic/BMath.t.sol diff --git a/test/SUMMARY.md b/test/SUMMARY.md index e37a2331..098dce15 100644 --- a/test/SUMMARY.md +++ b/test/SUMMARY.md @@ -1,13 +1,19 @@ -# Outline +# Tests Summary + +There are 9 solidity files, totalling 939 sloc. + +| filename | language | code | comment | blank | total | +| :---------------------------- | :------- | :--- | :------ | :---- | :---- | +| src/contracts/BCoWConst.sol | solidity | 4 | 10 | 2 | 16 | +| src/contracts/BCoWFactory.sol | solidity | 20 | 13 | 7 | 40 | +| src/contracts/BCoWPool.sol | solidity | 90 | 41 | 24 | 155 | +| src/contracts/BConst.sol | solidity | 23 | 29 | 9 | 61 | +| src/contracts/BFactory.sol | solidity | 44 | 17 | 11 | 72 | +| src/contracts/BMath.sol | solidity | 128 | 156 | 18 | 302 | +| src/contracts/BNum.sol | solidity | 133 | 40 | 28 | 201 | +| src/contracts/BPool.sol | solidity | 473 | 104 | 107 | 684 | +| src/contracts/BToken.sol | solidity | 24 | 27 | 7 | 58 | -There are 7 files to cover (B(cow)Const are contracts containing public protocol-wide constants): -BCoWFactory: deployer for cow pools -BCoWPool: adding signature validation to BPool -BFactory: deployer, approx 40sloc -BMath: contract wrapping math logic -BNum: contract wrapping arithmetic op -BPool: the main contract, roughly 400sloc -BToken: extends erc20 ## Interdependencies BCoWFactory deploys a bcowpool @@ -16,15 +22,27 @@ Factory deploys a pool and can "collect" from the pool Pool inherit btoken (which represents a LP) and bmath Bmath uses bnum -## Approach +# Unit tests +Current coverage is XXX % for the 9 contracts, accross XXX tests. All tests are passing. Unit tests are writtent using the branched-tree technique and Bulloak as templating tool. + +< TABLE > + +# Integration tests + +# Property tests +We identified 24 properties. We challenged these either in a long-running fuzzing campaign (targeting 23 of these in XXX runs) or via symbolic execution (for 8 properties). + +## Fuzzing campaign -Echidna should be prioritized, then halmos should be particularly easy especially for the math libs, for which the implementations will be pretty similar. +We used echidna to test these 23 properties. In addition to these, another fuzzing campaign as been led against the mathematical contracts (BNum and BMath), insuring the operation properties were holding. -Then slither-mutate on the whole test base +Limitations/future improvements +Currently, the swap logic are tested against the swap in/out functions (and, in a similar way, liquidity management via the join/exit function). The combined equivalent (joinswapExternAmountIn, joinswapPoolAmountOut, etc) should be tested too. -Setup for protocol-wide *looks* pretty simple (using the factory) - tbc +## Formal verification: Symbolic Execution +We managed to test 10 properties out of the 23. Properties not tested are either not easily challenged with symbolic execution (statefullness needed) or limited by Halmos itself (hitting loops in the implementation for instance). -nb 14 means if token in == token out, people just give tokens to the pool, intended? +Additional properties from BNum were tested independently too (with severe limitations due to loop unrolling boundaries). ## Notes diff --git a/test/invariants/PROPERTIES.md b/test/invariants/PROPERTIES.md index 5d0377d4..96a17439 100644 --- a/test/invariants/PROPERTIES.md +++ b/test/invariants/PROPERTIES.md @@ -1,36 +1,41 @@ | Properties | Type | Id | Halmos | Echidna | | ------------------------------------------------------------------------------------------- | ------------------- | --- | ------ | ------- | -| BFactory should always be able to deploy new pools | Unit | 1 | [ ] | [x] | -| BFactory's blab should always be modifiable by the current blabs | Unit | 2 | [ ] | [x] | -| BFactory should always be able to transfer the BToken to the blab, if called by it | Unit | 3 | [ ] | [x] | -| the amount received can never be less than min amount out | Unit | 4 | [ ] | [x] | -| the amount spent can never be greater than max amount in | Unit | 5 | [ ] | [x] | -| swap fee can only be 0 (cow pool) | Valid state | 6 | [ ] | [x] | -| total weight can be up to 50e18 | Variable transition | 7 | [ ] | [x] | -| BToken increaseApproval should increase the approval of the address by the amount* | Variable transition | 8 | [ ] | [x] | -| BToken decreaseApproval should decrease the approval to max(old-amount, 0)* | Variable transition | 9 | [ ] | [x] | -| a pool can either be finalized or not finalized | Valid state | 10 | [ ] | [x] | -| a finalized pool cannot switch back to non-finalized | State transition | 11 | [ ] | [x] | -| a non-finalized pool can only be finalized when the controller calls finalize() | State transition | 12 | [ ] | [x] | -| an exact amount in should always earn the amount out calculated in bmath | High level | 13 | [ ] | [x] | -| an exact amount out is earned only if the amount in calculated in bmath is transfered | High level | 14 | [ ] | [x] | -| there can't be any amount out for a 0 amount in | High level | 15 | [ ] | [x] | -| the pool btoken can only be minted/burned in the join and exit operations | High level | 16 | [ ] | [x] | -| a direct token transfer can never reduce the underlying amount of a given token per BPT | High level | 17 | [ ] | [x] | -| the amount of underlying token when exiting should always be the amount calculated in bmath | High level | 18 | [ ] | [x] | -| a swap can only happen when the pool is finalized | High level | 19 | [ ] | [x] | -| bounding and unbounding token can only be done on a non-finalized pool, by the controller | High level | 20 | [ ] | [x] | -| there always should be between MIN_BOUND_TOKENS and MAX_BOUND_TOKENS bound in a pool | High level | 21 | [ ] | [x] | -| only the settler can commit a hash | High level | 22 | [ ] | [x] | -| when a hash has been commited, only this order can be settled | High level | 23 | [ ] | | -| BToken should not break the ToB ERC20 properties** | High level | 24 | [ ] | [x] | +| BFactory should always be able to deploy new pools | Unit | 1 | [x] | [x] | +| BFactory's blab should always be modifiable by the current blabs | Unit | 2 | [x] | [x] | +| BFactory should always be able to transfer the BToken to the blab, if called by it | Unit | 3 | [x] | [x] | +| the amount received can never be less than min amount out | Unit | 4 | :( | [x] | +| the amount spent can never be greater than max amount in | Unit | 5 | :( | [x] | +| swap fee can only be 0 (cow pool) | Valid state | 6 | [x] | [x] | +| total weight can be up to 50e18 | Variable transition | 7 | [x] | [x] | +| BToken increaseApproval should increase the approval of the address by the amount* | Variable transition | 8 | [x] | [x] | +| BToken decreaseApproval should decrease the approval to max(old-amount, 0)* | Variable transition | 9 | [x] | [x] | +| a pool can either be finalized or not finalized | Valid state | 10 | | [x] | +| a finalized pool cannot switch back to non-finalized | State transition | 11 | | [x] | +| a non-finalized pool can only be finalized when the controller calls finalize() | State transition | 12 | [x] | [x] | +| an exact amount in should always earn the amount out calculated in bmath | High level | 13 | :( | [x] | +| an exact amount out is earned only if the amount in calculated in bmath is transfered | High level | 14 | :( | [x] | +| there can't be any amount out for a 0 amount in | High level | 15 | :( | [x] | +| the pool btoken can only be minted/burned in the join and exit operations | High level | 16 | | [x] | +| a direct token transfer can never reduce the underlying amount of a given token per BPT | High level | 17 | :( | [x] | +| the amount of underlying token when exiting should always be the amount calculated in bmath | High level | 18 | :( | [x] | +| a swap can only happen when the pool is finalized | High level | 19 | | [x] | +| bounding and unbounding token can only be done on a non-finalized pool, by the controller | High level | 20 | [x] | [x] | +| there always should be between MIN_BOUND_TOKENS and MAX_BOUND_TOKENS bound in a pool | High level | 21 | | [x] | +| only the settler can commit a hash | High level | 22 | [x] | [x] | +| when a hash has been commited, only this order can be settled | High level | 23 | [ ] | [ ] | +| BToken should not break the ToB ERC20 properties** | High level | 24 | | [x] | * Bundled with 24 ** ERC20 properties (https://github.com/crytic/properties?tab=readme-ov-file#erc20-tests) -# Unit for the math libs (BNum and BMath): +[ ] planed to implement and still to do +
[x] implemented and tested +
:( implemented but judged as incorrect (tool limitation, etc) +
empty not implemented and will not be (design, etc) + +# Unit-test properties for the math libs (BNum and BMath): btoi should always return the floor(a / BONE) == (a - a%BONE) / BONE bfloor should always return (a - a % BONE) @@ -79,23 +84,6 @@ bpow should be distributive over mult of the same base x^a * x^b == x^(a+b) bpow should be distributive over mult of the same exp a^x * b^x == (a*b)^x power of a power should mult the exp (x^a)^b == x^(a*b) - -bpowApprox - -calcOutGivenIn - calcOutGivenIn should be inv with calcInGivenOut - -calcInGivenOut - -calcPoolOutGivenSingleIn - calcPoolOutGivenSingleIn should be inv with calcSingleInGivenPoolOut - -calcSingleInGivenPoolOut - -calcSingleOutGivenPoolIn - -calcSingleOutGivenPoolIn should be inv with calcPoolInGivenSingleOut - -calcPoolInGivenSingleOut \ No newline at end of file +calcSingleOutGivenPoolIn should be inv with calcPoolInGivenSingleOut \ No newline at end of file diff --git a/test/invariants/symbolic/BMath.t.sol b/test/invariants/symbolic/BMath.t.sol deleted file mode 100644 index e98f6aad..00000000 --- a/test/invariants/symbolic/BMath.t.sol +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; - -import {HalmosTest} from '../helpers/AdvancedTestsUtils.sol'; -import {BMath} from 'contracts/BMath.sol'; - -contract SymbolicBMath is BMath, HalmosTest { -// todo crashes (pow -> loop...) -// calcOutGivenIn should be inv with calcInGivenOut -// function check_calcOutGivenInEquiv() public { -// uint256 tokenBalanceIn = svm.createUint256('tokenBalanceIn'); -// uint256 tokenWeightIn = svm.createUint256('tokenWeightIn'); -// uint256 tokenBalanceOut = svm.createUint256('tokenBalanceOut'); -// uint256 tokenWeightOut = svm.createUint256('tokenWeightOut'); -// uint256 tokenAmountIn = svm.createUint256('tokenAmountIn'); -// uint256 swapFee = svm.createUint256('swapFee'); - -// vm.assume(tokenWeightIn != 0); -// vm.assume(tokenWeightOut != 0); -// vm.assume(tokenAmountIn != 0); -// vm.assume(tokenBalanceIn > BONE - swapFee); - -// uint256 tokenAmountOut = calcOutGivenIn(tokenBalanceIn, tokenWeightIn, tokenBalanceOut, tokenWeightOut, tokenAmountIn, swapFee); -// vm.assume(tokenAmountOut != tokenBalanceOut); - -// uint256 tokenAmountIn2 = calcInGivenOut(tokenBalanceOut, tokenWeightOut, tokenBalanceIn, tokenWeightIn, tokenAmountOut, swapFee); - -// assert(tokenAmountIn == tokenAmountIn2); -// } -// calcPoolOutGivenSingleIn should be inv with calcSingleInGivenPoolOut -// calcSingleOutGivenPoolIn should be inv with calcPoolInGivenSingleOut -} diff --git a/test/invariants/symbolic/BNum.t.sol b/test/invariants/symbolic/BNum.t.sol index 1d7b6c61..122f0eec 100644 --- a/test/invariants/symbolic/BNum.t.sol +++ b/test/invariants/symbolic/BNum.t.sol @@ -10,7 +10,6 @@ contract SymbolicBNum is BNum, HalmosTest { ///////////////////////////////////////////////////////////////////// // btoi should always return the floor(a / BONE) == (a - a%BONE) / BONE - // TODO: Too tightly coupled function check_btoi_alwaysFloor(uint256 _input) public pure { // action uint256 _result = btoi(_input); @@ -149,13 +148,6 @@ contract SymbolicBNum is BNum, HalmosTest { assert(_result <= _a); } - // todo - // bsub should alway revert if b > a (duplicate with previous tho) - function check_bsub_revert(uint256 _a, uint256 _b) public pure { - vm.assume(_b > _a); - //bsub(_a, _b); - } - ///////////////////////////////////////////////////////////////////// // Bnum::bsubSign // ///////////////////////////////////////////////////////////////////// @@ -210,43 +202,6 @@ contract SymbolicBNum is BNum, HalmosTest { assert(_result1 == _result2); } - //todo hangs - // bmul should be associative - function testCheck_bmul_associative(uint256 _a, uint256 _b, uint256 _c) public pure { - // precondition - if (_b != 0) vm.assume(_a < type(uint256).max / _b); // Avoid mul overflow - if (_c != 0) vm.assume(_b < type(uint256).max / _c); // Avoid mul overflow - vm.assume(_a * _b + _c / 2 < type(uint256).max); // Avoid add overflow - - vm.assume(_a >= BONE); - vm.assume(_b >= BONE); - vm.assume(_c >= BONE); - - // action - uint256 _result1 = bmul(bmul(_a, _b), _c); - uint256 _result2 = bmul(_a, bmul(_b, _c)); - - // post condition - // assert(_result1 == _result2); - assertApproxEqAbs(_result1, _result2, 10 * BONE); - } - - //todo hangs - // bmul should be distributive - // function check_bmul_distributive(uint256 _a, uint256 _b, uint256 _c) public pure { - // uint256 _result1 = bmul(_a, badd(_b, _c)); - // uint256 _result2 = badd(bmul(_a, _b), bmul(_a, _c)); - // assert(_result1 == _result2); - // } - - //todo - // 1 should be identity for bmul - // function check_bmul_identity(uint256 _a) public pure { - // vm.assume(_a < type(uint256).max / BONE); // Avoid mul overflow - // uint256 _result = bmul(_a, BONE); - // assert(_result == _a); - // } - // 0 should be absorbing for mul function check_bmul_absorbing(uint256 _a) public pure { // action @@ -256,95 +211,6 @@ contract SymbolicBNum is BNum, HalmosTest { assert(_result == 0); } - //todo hangs - // bmul result should always be gte a and b - // function check_bmul_resultGTE(uint256 _a, uint256 _b) public pure { - // vm.assume(_a != 0 && _b != 0); // Avoid absorbing - // vm.assume(_a < type(uint256).max / BONE); // Avoid mul overflow - // vm.assume(_b < type(uint256).max / BONE); // Avoid mul overflow - // vm.assume(_a * BONE + _b / 2 < type(uint256).max); // Avoid add overflow - - // uint256 _result = bmul(_a, _b); - // assert(_result >= _a); - // assert(_result >= _b); - // } - - ///////////////////////////////////////////////////////////////////// - // Bnum::bdiv // - ///////////////////////////////////////////////////////////////////// - - //todo: Halmos times out vs foundry passes - // 1 should be identity for bdiv - // function check_bdiv_identity(uint256 _a) public pure { - // vm.assume(_a < type(uint256).max / BONE); // Avoid add overflow - // uint256 _result = bdiv(_a, BONE); - // assert(_result == _a); - // } - - // uint256[] public fixtureA = [ - // BONE, - // BONE * 2, - // BONE / 2, - // BONE * 2 - 1, - // BONE * 2 + 1, - // BONE / 2 - 1, - // BONE / 2 + 1, - // BONE * 3, - // BONE * 4, - // BONE * 5, - // BONE * 6, - // BONE * 7, - // BONE * 8, - // BONE * 9, - // BONE * 10, - // type(uint256).max / 10**18, - // type(uint256).max / 10**18 - 1, - // type(uint256).max / 10**18 - 10, - // type(uint256).max / 10**18 - BONE / 2, - // type(uint256).max / 10**18 - BONE / 2 + 1, - // type(uint256).max / 10**18 - BONE / 2 - 1, - // type(uint256).max / 10**18 - BONE / 2 - 10, - // 0, - // 1, - // 2 - // ]; - - // /// forge-config: default.fuzz.runs = 1000000 - // function test_bdiv_identity(uint256 a) public pure { - // a = bound(a, 0, type(uint256).max / 10**18); - // uint256 _result = bdiv(a, BONE); - // assertEq(_result, a); - // } - - //todo - // bdiv should revert if b is 0 - // function check_bdiv_revert(uint256 _a) public pure { - // } - - //todo hangs - // bdiv result should be lte a - function test_bdiv_resultLTE(uint256 _a, uint256 _b) public pure { - vm.assume(_b != 0); - vm.assume(_a < type(uint256).max / BONE); // Avoid mul overflow - //todo: overconstrained next line? Too tightly coupled? - vm.assume(_a * BONE + _b / 2 < type(uint256).max); // Avoid add overflow - - uint256 _result = bdiv(_a, _b); - assert(_result <= _a * BONE); - assertLe(_result, _a * BONE); - } - - //todo hangs - // bdiv should be bmul reverse operation - // function check_bdiv_bmul(uint256 _a, uint256 _b) public pure { - // vm.assume(_b > 0); - // vm.assume(_a > _b); // todo: overconstrained? - - // uint256 _bdivResult = bdiv(_a, _b); - // uint256 _result = bmul(_bdivResult, _b); - // assert(_result == _a); - // } - ///////////////////////////////////////////////////////////////////// // Bnum::bpowi // ///////////////////////////////////////////////////////////////////// @@ -358,52 +224,6 @@ contract SymbolicBNum is BNum, HalmosTest { assert(_result == BONE); } - //todo echidna (loop unrolling bound hit) - // 0 should be absorbing if base - // function check_bpowi_absorbingBase(uint256 _exp) public pure { - // vm.assume(_exp != 0); // Consider 0^0 as undetermined - - // uint256 _result = bpowi(0, _exp); - // assert(_result == 0); - // } - - //todo echidna (loop unrolling bound hit) - // 1 should be identity if base - // function check_bpowi_identityBase(uint256 _exp) public pure { - // uint256 _result = bpowi(BONE, _exp); - // assert(_result == BONE); - // } - - //todo echidna (loop unrolling bound hit) - // 1 should be identity if exp - // function check_bpowi_identityExp(uint256 _base) public pure { - // uint256 _result = bpowi(_base, BONE); - // assert(_result == _base); - // } - - /** - * // bpowi should be distributive over mult of the same base x^a * x^b == x^(a+b) - * function check_bpowi_distributiveBase(uint256 _base, uint256 _a, uint256 _b) public pure { - * uint256 _result1 = bpowi(_base, badd(_a, _b)); - * uint256 _result2 = bmul(bpowi(_base, _a), bpowi(_base, _b)); - * assert(_result1 == _result2); - * } - * - * // bpowi should be distributive over mult of the same exp a^x * b^x == (a*b)^x - * function check_bpowi_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public pure { - * uint256 _result1 = bpowi(bmul(_a, _b), _exp); - * uint256 _result2 = bmul(bpowi(_a, _exp), bpowi(_b, _exp)); - * assert(_result1 == _result2); - * } - * - * // power of a power should mult the exp (x^a)^b == x^(a*b) - * function check_bpowi_powerOfPower(uint256 _base, uint256 _a, uint256 _b) public pure { - * uint256 _result1 = bpowi(bpowi(_base, _a), _b); - * uint256 _result2 = bpowi(_base, bmul(_a, _b)); - * assert(_result1 == _result2); - * } - */ - ///////////////////////////////////////////////////////////////////// // Bnum::bpow // ///////////////////////////////////////////////////////////////////// @@ -417,20 +237,6 @@ contract SymbolicBNum is BNum, HalmosTest { assert(_result == BONE); } - //todo min base is 1wei -> can never be 0 instead (echidna) - // 0 should be absorbing if base - // function check_bpow_absorbingBase(uint256 _exp) public pure { - // uint256 _result = bpow(0, _exp); - // assert(_result == 0); - // } - - //todo echidna (loop unrolling bound hit) - // 1 should be identity if base - // function check_bpow_identityBase(uint256 _exp) public pure { - // uint256 _result = bpow(BONE, _exp); - // assert(_result == BONE); - // } - // 1 should be identity if exp function check_bpow_identityExp(uint256 _base) public pure { // action @@ -439,28 +245,4 @@ contract SymbolicBNum is BNum, HalmosTest { // post condition assert(_result == _base); } - - //todo infinite loop - // bpow should be distributive over mult of the same base x^a * x^b == x^(a+b) - // function check_bpow_distributiveBase(uint256 _base, uint256 _a, uint256 _b) public pure { - // uint256 _result1 = bpow(_base, badd(_a, _b)); - // uint256 _result2 = bmul(bpow(_base, _a), bpow(_base, _b)); - // assert(_result1 == _result2); - // } - - //todo loop - // bpow should be distributive over mult of the same exp a^x * b^x == (a*b)^x - // function check_bpow_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public pure { - // uint256 _result1 = bpow(bmul(_a, _b), _exp); - // uint256 _result2 = bmul(bpow(_a, _exp), bpow(_b, _exp)); - // assert(_result1 == _result2); - // } - - // todo - // // power of a power should mult the exp (x^a)^b == x^(a*b) - // function check_bpow_powerOfPower(uint256 _base, uint256 _a, uint256 _b) public pure { - // uint256 _result1 = bpow(bpow(_base, _a), _b); - // uint256 _result2 = bpow(_base, bmul(_a, _b)); - // assert(_result1 == _result2); - // } } diff --git a/test/invariants/symbolic/Protocol.t.sol b/test/invariants/symbolic/Protocol.t.sol index bb9619e6..69c6b360 100644 --- a/test/invariants/symbolic/Protocol.t.sol +++ b/test/invariants/symbolic/Protocol.t.sol @@ -5,9 +5,11 @@ import {FuzzERC20, HalmosTest} from '../helpers/AdvancedTestsUtils.sol'; import {MockSettler} from '../helpers/MockSettler.sol'; import {BCoWFactory, BCoWPool, IBPool} from 'contracts/BCoWFactory.sol'; + import {BConst} from 'contracts/BConst.sol'; import {BMath} from 'contracts/BMath.sol'; import {BNum} from 'contracts/BNum.sol'; +import {BToken} from 'contracts/BToken.sol'; contract HalmosBalancer is HalmosTest { // System under test @@ -23,6 +25,7 @@ contract HalmosBalancer is HalmosTest { BCoWPool pool; address currentCaller = svm.createAddress('currentCaller'); + // address currentCaller = address(234); constructor() { solutionSettler = address(new MockSettler()); @@ -107,120 +110,10 @@ contract HalmosBalancer is HalmosTest { assert(_currentBLab != currentCaller); } } - - /// @custom:property-id 4 - /// @custom:property the amount received can never be less than min amount out - /// @custom:property-id 13 - /// @custom:property an exact amount in should always earn the amount out calculated in bmath - /// @custom:property-id 15 - /// @custom:property there can't be any amount out for a 0 amount in - /// @custom:property-id 19 - /// @custom:property a swap can only happen when the pool is finalized - function skipped_swapExactIn(uint256 _minAmountOut, uint256 _amountIn, uint256 _tokenIn, uint256 _tokenOut) public { - // Preconditions - vm.assume(_tokenIn < tokens.length); - vm.assume(_tokenOut < tokens.length); - vm.assume(_tokenIn != _tokenOut); // todo: dig this, it should pass without this precondition - - tokens[_tokenIn].mint(currentCaller, _amountIn); - - vm.prank(currentCaller); - tokens[_tokenIn].approve(address(pool), type(uint256).max); // approval isn't limiting - - uint256 _balanceOutBefore = tokens[_tokenOut].balanceOf(currentCaller); - - uint256 _outComputed = bmath.calcOutGivenIn( - tokens[_tokenIn].balanceOf(address(pool)), - pool.getDenormalizedWeight(address(tokens[_tokenIn])), - tokens[_tokenOut].balanceOf(address(pool)), - pool.getDenormalizedWeight(address(tokens[_tokenOut])), - _amountIn, - bconst.MIN_FEE() - ); - - vm.prank(currentCaller); - - // Action - try pool.swapExactAmountIn( - address(tokens[_tokenIn]), _amountIn, address(tokens[_tokenOut]), _minAmountOut, type(uint256).max - ) { - // Postcondition - uint256 _balanceOutAfter = tokens[_tokenOut].balanceOf(currentCaller); - - // 13 - assert(_balanceOutAfter - _balanceOutBefore == _outComputed); - - // 4 - if (_amountIn != 0) assert(_balanceOutBefore <= _balanceOutAfter + _minAmountOut); - // 15 - else assert(_balanceOutBefore == _balanceOutAfter); - - // 19 - assert(pool.isFinalized()); - } catch {} - } - - /// @custom:property-id 5 - /// @custom:property the amount spent can never be greater than max amount in - /// @custom:property-id 14 - /// @custom:property an exact amount out is earned only if the amount in calculated in bmath is transfere - /// @custom:property-id 15 - /// @custom:property there can't be any amount out for a 0 amount in - /// @custom:property-id 19 - /// @custom:property a swap can only happen when the pool is finalized - function skipped_swapExactOut(uint256 _maxAmountIn, uint256 _amountOut, uint256 _tokenIn, uint256 _tokenOut) public { - // Precondition - vm.assume(_tokenIn < tokens.length); - vm.assume(_tokenOut < tokens.length); - - tokens[_tokenIn].mint(currentCaller, _maxAmountIn); - - vm.prank(currentCaller); - tokens[_tokenIn].approve(address(pool), type(uint256).max); // approval isn't limiting - - uint256 _balanceInBefore = tokens[_tokenIn].balanceOf(currentCaller); - uint256 _balanceOutBefore = tokens[_tokenOut].balanceOf(currentCaller); - - uint256 _inComputed = bmath.calcInGivenOut( - tokens[_tokenIn].balanceOf(address(pool)), - pool.getDenormalizedWeight(address(tokens[_tokenIn])), - tokens[_tokenOut].balanceOf(address(pool)), - pool.getDenormalizedWeight(address(tokens[_tokenOut])), - _amountOut, - bconst.MIN_FEE() - ); - - vm.prank(currentCaller); - - // Action - try pool.swapExactAmountOut( - address(tokens[_tokenIn]), _maxAmountIn, address(tokens[_tokenOut]), _amountOut, type(uint256).max - ) { - // Postcondition - uint256 _balanceInAfter = tokens[_tokenIn].balanceOf(currentCaller); - uint256 _balanceOutAfter = tokens[_tokenOut].balanceOf(currentCaller); - - // 5 - assert(_balanceInBefore - _balanceInAfter <= _maxAmountIn); - - // 14 - if (_tokenIn != _tokenOut) assert(_balanceOutAfter - _balanceOutBefore == _amountOut); - else assert(_balanceOutAfter == _balanceOutBefore - _inComputed + _amountOut); - - // 15 - if (_balanceInBefore == _balanceInAfter) assert(_balanceOutBefore == _balanceOutAfter); - - // 19 - assert(pool.isFinalized()); - } catch {} - } - - /// @custom:property-id 6 - /// @custom:property swap fee can only be 0 (cow pool) - /// @custom:property-id 7 /// @custom:property total weight can be up to 50e18 /// @dev Only 2 tokens are used, to avoid hitting the limit in loop unrolling + function check_totalWeightMax(uint256[2] calldata _weights) public { // Precondition BCoWPool _pool = BCoWPool(address(factory.newBPool())); @@ -254,15 +147,37 @@ contract HalmosBalancer is HalmosTest { } } - /// properties 8 and 9 are tested with the BToken internal tests + /// @custom:property-id 8 + /// @custom:property BToken increaseApproval should increase the approval of the address by the amount + function check_increaseApproval(uint256 _approvalToAdd, address _owner, address _spender) public { + // Precondition + uint256 _approvalBefore = pool.allowance(_owner, _spender); - /// @custom:property-id 10 - /// @custom:property a pool can either be finalized or not finalized - /// @dev included to be exhaustive/future-proof if more states are added, as rn, it - /// basically tests the tautological (a || !a) + vm.prank(_owner); - /// @custom:property-id 11 - /// @custom:property a finalized pool cannot switch back to non-finalized + // Action + BToken(address(pool)).increaseApproval(_spender, _approvalToAdd); + + // Postcondition + assert(pool.allowance(_owner, _spender) == _approvalBefore + _approvalToAdd); + } + /// @custom:property-id 9 + /// @custom:property BToken decreaseApproval should decrease the approval to max(old-amount, 0) + + function check_decreaseApproval(uint256 _approvalToLower, address _owner, address _spender) public { + // Precondition + uint256 _approvalBefore = pool.allowance(_owner, _spender); + + vm.prank(_owner); + + // Action + BToken(address(pool)).decreaseApproval(_spender, _approvalToLower); + + // Postcondition + assert( + pool.allowance(_owner, _spender) == (_approvalBefore > _approvalToLower ? _approvalBefore - _approvalToLower : 0) + ); + } /// @custom:property-id 12 /// @custom:property a non-finalized pool can only be finalized when the controller calls finalize() @@ -294,79 +209,6 @@ contract HalmosBalancer is HalmosTest { } catch {} } - /// @custom:property-id 16 - /// @custom:property the pool btoken can only be minted/burned in the join and exit operations - - /// @custom:property-id 17 - /// @custom:property a direct token transfer can never reduce the underlying amount of a given token per BPT - function skipped_directTransfer(uint256 _amountPoolToken, uint256 _amountToTransfer, uint256 _tokenIdx) public { - vm.assume(_tokenIdx < tokens.length); - - FuzzERC20 _token = tokens[2]; - - uint256 _redeemedAmountBeforeTransfer = bmath.calcSingleOutGivenPoolIn( - _token.balanceOf(address(pool)), - pool.getDenormalizedWeight(address(_token)), - pool.totalSupply(), - pool.getTotalDenormalizedWeight(), - _amountPoolToken, - bconst.MIN_FEE() - ); - - _token.mint(address(this), _amountToTransfer); - // Action - _token.transfer(address(pool), _amountToTransfer); - - // Postcondition - uint256 _redeemedAmountAfter = bmath.calcSingleOutGivenPoolIn( - _token.balanceOf(address(pool)), - pool.getDenormalizedWeight(address(_token)), - pool.totalSupply(), - pool.getTotalDenormalizedWeight(), - _amountPoolToken, - bconst.MIN_FEE() - ); - - assert(_redeemedAmountAfter >= _redeemedAmountBeforeTransfer); - } - - /// @custom:property-id 18 - /// @custom:property the amount of underlying token when exiting should always be the amount calculated in bmath - function correctBPTBurnAmount(uint256 _amountPoolToken) public { - _amountPoolToken = bound(_amountPoolToken, 0, pool.balanceOf(currentCaller)); - - uint256[] memory _amountsToReceive = new uint256[](4); - uint256[] memory _previousBalances = new uint256[](4); - - for (uint256 i; i < tokens.length; i++) { - FuzzERC20 _token = tokens[i]; - - _amountsToReceive[i] = bmath.calcSingleOutGivenPoolIn( - _token.balanceOf(address(pool)), - pool.getDenormalizedWeight(address(_token)), - pool.totalSupply(), - pool.getTotalDenormalizedWeight(), - _amountPoolToken, - bconst.MIN_FEE() - ); - - _previousBalances[i] = _token.balanceOf(currentCaller); - } - - vm.prank(currentCaller); - pool.approve(address(pool), _amountPoolToken); - - vm.prank(currentCaller); - - // Action - pool.exitPool(_amountPoolToken, new uint256[](4)); - - // PostCondition - for (uint256 i; i < tokens.length; i++) { - assert(tokens[i].balanceOf(currentCaller) == _previousBalances[i] + _amountsToReceive[i]); - } - } - /// @custom:property-id 20 /// @custom:property bounding and unbounding token can only be done on a non-finalized pool, by the controller function check_boundOnlyNotFinalized() public { @@ -377,50 +219,67 @@ contract HalmosBalancer is HalmosTest { address _callerUnbind = svm.createAddress('callerUnbind'); address _callerFinalize = svm.createAddress('callerFinalize'); - for (uint256 i; i < 2; i++) { - tokens[i].mint(_callerBind, 10 ether); + // Avoid hitting the max unrolled loop limit - vm.startPrank(_callerBind); - tokens[i].approve(address(pool), 10 ether); + // Bind 3 tokens + tokens[0].mint(_callerBind, 10 ether); + tokens[1].mint(_callerBind, 10 ether); + tokens[2].mint(_callerBind, 10 ether); - uint256 _poolWeight = bconst.MAX_WEIGHT() / 5; + vm.startPrank(_callerBind); + tokens[0].approve(address(_nonFinalizedPool), 10 ether); + tokens[1].approve(address(_nonFinalizedPool), 10 ether); + tokens[2].approve(address(_nonFinalizedPool), 10 ether); - try _nonFinalizedPool.bind(address(tokens[i]), 10 ether, _poolWeight) { - assert(_callerBind == _nonFinalizedPool.getController()); - } catch { - assert(_callerBind != _nonFinalizedPool.getController()); - } + uint256 _poolWeight = bconst.MAX_WEIGHT() / 4; + uint256 _bindCount; - vm.stopPrank(); + try _nonFinalizedPool.bind(address(tokens[0]), 10 ether, _poolWeight) { + assert(_callerBind == _nonFinalizedPool.getController()); + _bindCount++; + } catch { + assert(_callerBind != _nonFinalizedPool.getController()); } - vm.prank(_callerUnbind); - try _nonFinalizedPool.unbind(address(tokens[1])) { - assert(_callerUnbind == _nonFinalizedPool.getController()); + try _nonFinalizedPool.bind(address(tokens[1]), 10 ether, _poolWeight) { + assert(_callerBind == _nonFinalizedPool.getController()); + _bindCount++; } catch { - assert(_callerUnbind != _nonFinalizedPool.getController()); + assert(_callerBind != _nonFinalizedPool.getController()); } - vm.prank(_callerFinalize); - try _nonFinalizedPool.finalize() { - assert(_callerFinalize == _nonFinalizedPool.getController()); + try _nonFinalizedPool.bind(address(tokens[2]), 10 ether, _poolWeight) { + assert(_callerBind == _nonFinalizedPool.getController()); + _bindCount++; } catch { - // assert(_callerFinalize != _nonFinalizedPool.getController()); + assert(_callerBind != _nonFinalizedPool.getController()); } vm.stopPrank(); - } - /// @custom:property-id 21 - /// @custom:property there always should be between MIN_BOUND_TOKENS and MAX_BOUND_TOKENS bound in a pool - function fuzz_minMaxBoundToken() public { - assert(pool.getNumTokens() >= bconst.MIN_BOUND_TOKENS()); - assert(pool.getNumTokens() <= bconst.MAX_BOUND_TOKENS()); + if (_bindCount == 3) { + vm.prank(_callerUnbind); + // Action + // Unbind one + try _nonFinalizedPool.unbind(address(tokens[0])) { + assert(_callerUnbind == _nonFinalizedPool.getController()); + } catch { + assert(_callerUnbind != _nonFinalizedPool.getController()); + } + } + + vm.prank(_callerFinalize); + // Action + try _nonFinalizedPool.finalize() { + assert(_callerFinalize == _nonFinalizedPool.getController()); + } catch { + assert(_callerFinalize != _nonFinalizedPool.getController() || _bindCount < 2); + } } /// @custom:property-id 22 /// @custom:property only the settler can commit a hash - function fuzz_settlerCommit() public { + function check_settlerCommit() public { // Precondition vm.prank(currentCaller); @@ -430,11 +289,6 @@ contract HalmosBalancer is HalmosTest { assert(currentCaller == solutionSettler); } catch {} } - - /// @custom:property-id 23 - /// @custom:property when a hash has been commited, only this order can be settled - /// @custom:property-not-implemented - function fuzz_settlerSettle() public {} } contract BNum_exposed is BNum { From 87a9acb41cf6d71c035ac4fbbbc9e09f7396f3df Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:19:24 +0200 Subject: [PATCH 12/37] chore: reorg --- .gitignore | 3 + test/SUMMARY.md | 2 +- test/invariants/PROPERTIES.md | 9 +-- .../fuzz/{internal => }/BMath.t.sol | 2 +- test/invariants/fuzz/BMath.yaml | 6 ++ .../invariants/fuzz/{internal => }/BNum.t.sol | 70 ++++++++++--------- .../fuzz/{config.yaml => BNum.yaml} | 5 +- .../invariants/fuzz/{external => }/BToken.sol | 2 +- test/invariants/fuzz/BToken.yaml | 6 ++ .../fuzz/{external => }/Protocol.t.sol | 4 +- test/invariants/fuzz/Protocol.yaml | 6 ++ test/invariants/fuzz/external/MockSettler.sol | 21 ------ 12 files changed, 71 insertions(+), 65 deletions(-) rename test/invariants/fuzz/{internal => }/BMath.t.sol (98%) create mode 100644 test/invariants/fuzz/BMath.yaml rename test/invariants/fuzz/{internal => }/BNum.t.sol (90%) rename test/invariants/fuzz/{config.yaml => BNum.yaml} (64%) rename test/invariants/fuzz/{external => }/BToken.sol (96%) create mode 100644 test/invariants/fuzz/BToken.yaml rename test/invariants/fuzz/{external => }/Protocol.t.sol (99%) create mode 100644 test/invariants/fuzz/Protocol.yaml delete mode 100644 test/invariants/fuzz/external/MockSettler.sol diff --git a/.gitignore b/.gitignore index 9209344d..3a54c827 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ broadcast/*/*/* # Out dir out + +# echidna corpuses +**/corpuses/* \ No newline at end of file diff --git a/test/SUMMARY.md b/test/SUMMARY.md index 098dce15..84a0c2ad 100644 --- a/test/SUMMARY.md +++ b/test/SUMMARY.md @@ -34,7 +34,7 @@ We identified 24 properties. We challenged these either in a long-running fuzzin ## Fuzzing campaign -We used echidna to test these 23 properties. In addition to these, another fuzzing campaign as been led against the mathematical contracts (BNum and BMath), insuring the operation properties were holding. +We used echidna to test these 23 properties. In addition to these, another fuzzing campaign as been led against the mathematical contracts (BNum and BMath), insuring the operation properties were holding. Limitations/future improvements Currently, the swap logic are tested against the swap in/out functions (and, in a similar way, liquidity management via the join/exit function). The combined equivalent (joinswapExternAmountIn, joinswapPoolAmountOut, etc) should be tested too. diff --git a/test/invariants/PROPERTIES.md b/test/invariants/PROPERTIES.md index 96a17439..ccabac50 100644 --- a/test/invariants/PROPERTIES.md +++ b/test/invariants/PROPERTIES.md @@ -25,10 +25,9 @@ | when a hash has been commited, only this order can be settled | High level | 23 | [ ] | [ ] | | BToken should not break the ToB ERC20 properties** | High level | 24 | | [x] | -* Bundled with 24 +(*) Bundled with 24 -** ERC20 properties -(https://github.com/crytic/properties?tab=readme-ov-file#erc20-tests) +(**) [Trail of Bits ERC20 properties](https://github.com/crytic/properties?tab=readme-ov-file#erc20-tests) [ ] planed to implement and still to do
[x] implemented and tested @@ -38,10 +37,12 @@ # Unit-test properties for the math libs (BNum and BMath): btoi should always return the floor(a / BONE) == (a - a%BONE) / BONE + bfloor should always return (a - a % BONE) + badd should be commutative badd should be associative -0 should be identity for badd +badd should have 0 as identity badd result should always be gte its terms badd should never sum terms which have a sum gt uint max badd should have bsub as reverse operation diff --git a/test/invariants/fuzz/internal/BMath.t.sol b/test/invariants/fuzz/BMath.t.sol similarity index 98% rename from test/invariants/fuzz/internal/BMath.t.sol rename to test/invariants/fuzz/BMath.t.sol index 71b18891..ff8282df 100644 --- a/test/invariants/fuzz/internal/BMath.t.sol +++ b/test/invariants/fuzz/BMath.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.23; -import {EchidnaTest} from '../../helpers/AdvancedTestsUtils.sol'; +import {EchidnaTest} from '../helpers/AdvancedTestsUtils.sol'; import {BMath} from 'contracts/BMath.sol'; diff --git a/test/invariants/fuzz/BMath.yaml b/test/invariants/fuzz/BMath.yaml new file mode 100644 index 00000000..b14f887c --- /dev/null +++ b/test/invariants/fuzz/BMath.yaml @@ -0,0 +1,6 @@ +# https://github.com/crytic/echidna/blob/master/tests/solidity/basic/default.yaml for more options +testMode: assertion +corpusDir: test/invariants/fuzz/corpuses/BMath/ +coverageFormats: ["html","lcov"] +allContracts: true +testLimit: 50000 diff --git a/test/invariants/fuzz/internal/BNum.t.sol b/test/invariants/fuzz/BNum.t.sol similarity index 90% rename from test/invariants/fuzz/internal/BNum.t.sol rename to test/invariants/fuzz/BNum.t.sol index 0fad60c2..c58bbd8a 100644 --- a/test/invariants/fuzz/internal/BNum.t.sol +++ b/test/invariants/fuzz/BNum.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.23; -import {EchidnaTest} from '../../helpers/AdvancedTestsUtils.sol'; +import {EchidnaTest} from '../helpers/AdvancedTestsUtils.sol'; import {BNum} from 'contracts/BNum.sol'; @@ -81,9 +81,6 @@ contract EchidnaBNum is BNum, EchidnaTest { // badd should never sum terms which have a sum gt uint max function badd_overflow(uint256 _a, uint256 _b) public pure { - // precondition - // vm.assume(_a != type(uint256).max); - // action uint256 _result = badd(_a, _b); @@ -152,9 +149,13 @@ contract EchidnaBNum is BNum, EchidnaTest { // bsub should alway revert if b > a function bsub_revert(uint256 _a, uint256 _b) public { - require(_b > _a); + // Precondition + _b = clamp(_b, _a + 1, type(uint256).max); + // Action (bool succ,) = address(this).call(abi.encodeCall(EchidnaBNum.bsub_exposed, (_a, _b))); + + // Postcondition assert(!succ); } @@ -163,9 +164,9 @@ contract EchidnaBNum is BNum, EchidnaTest { ///////////////////////////////////////////////////////////////////// // bsubSign result should always be negative if b > a - function bsubSign_negative(uint256 _a, uint256 _b) public pure { + function bsubSign_negative(uint256 _a, uint256 _b) public { // precondition - require(_b > _a); + _b = clamp(_b, _a + 1, type(uint256).max); // action (uint256 _result, bool _flag) = bsubSign(_a, _b); @@ -176,9 +177,10 @@ contract EchidnaBNum is BNum, EchidnaTest { } // bsubSign result should always be positive if a > b - function bsubSign_positive(uint256 _a, uint256 _b) public pure { + function bsubSign_positive(uint256 _a, uint256 _b) public { // precondition - require(_a > _b); + _b = clamp(_b, 0, type(uint256).max - 1); + _a = clamp(_a, _b + 1, type(uint256).max); // action (uint256 _result, bool _flag) = bsubSign(_a, _b); @@ -214,14 +216,12 @@ contract EchidnaBNum is BNum, EchidnaTest { //todo this one fails // bmul should be associative - function bmul_associative(uint256 _a, uint256 _b, uint256 _c) public pure { + function bmul_associative(uint256 _a, uint256 _b, uint256 _c) public { // precondition - require(_a >= BONE); - require(_b >= BONE); - require(_c >= BONE); + _c = clamp(_c, BONE, type(uint256).max); + _b = clamp(_b, BONE, type(uint256).max / _c); + _a = clamp(_a, BONE, type(uint256).max / _b); - require(_a < type(uint256).max / _b); // Avoid mul overflow - require(_b < type(uint256).max / _c); // Avoid mul overflow require(_a * _b + _c / 2 < type(uint256).max); // Avoid add overflow // action @@ -262,14 +262,17 @@ contract EchidnaBNum is BNum, EchidnaTest { // Type: bool // └ Value: false // bmul result should always be gte a and b - function bmul_resultGTE(uint256 _a, uint256 _b) public pure { - require(_a >= BONE && _b >= BONE); // Avoid absorbing - require(_a < type(uint256).max / BONE); // Avoid mul overflow - require(_b < type(uint256).max / BONE); // Avoid mul overflow + function bmul_resultGTE(uint256 _a, uint256 _b) public { + // Precondition + _a = clamp(_a, BONE, type(uint256).max / BONE); + _b = clamp(_b, BONE, type(uint256).max / BONE); + require(_a * BONE + _b / 2 < type(uint256).max); // Avoid add overflow + // Action uint256 _result = bmul(_a, _b); + // Postcondition assert(_result >= _a); assert(_result >= _b); } @@ -340,9 +343,9 @@ contract EchidnaBNum is BNum, EchidnaTest { //todo hangs // bdiv should be bmul reverse operation - function bdiv_bmul(uint256 _a, uint256 _b) public pure { - require(_b > 0); - require(_a > _b); // todo: overconstrained? + function bdiv_bmul(uint256 _a, uint256 _b) public { + _a = clamp(_a, 2, type(uint256).max); + _b = clamp(_b, 1, _a - 1); uint256 _bdivResult = bdiv(_a, _b); uint256 _result = bmul(_bdivResult, _b); @@ -364,8 +367,8 @@ contract EchidnaBNum is BNum, EchidnaTest { } // 0 should be absorbing if base - function bpowi_absorbingBase(uint256 _exp) public pure { - require(_exp != 0); // Consider 0^0 as undetermined + function bpowi_absorbingBase(uint256 _exp) public { + _exp = clamp(_exp, 1, type(uint256).max); uint256 _result = bpowi(0, _exp); assert(_result == 0); @@ -379,8 +382,8 @@ contract EchidnaBNum is BNum, EchidnaTest { } // 1 should be identity if exp - function bpowi_identityExp(uint256 _base) public pure { - require(_base >= BONE); + function bpowi_identityExp(uint256 _base) public { + _base = clamp(_base, BONE, type(uint256).max); uint256 _result = bpowi(_base, BONE); @@ -388,8 +391,9 @@ contract EchidnaBNum is BNum, EchidnaTest { } // bpowi should be distributive over mult of the same base x^a x^b == x^(a+b) - function bpowi_distributiveBase(uint256 _base, uint256 _a, uint256 _b) public pure { - require(_a >= BONE && _b >= BONE); + function bpowi_distributiveBase(uint256 _base, uint256 _a, uint256 _b) public { + _a = clamp(_a, BONE, type(uint256).max); + _b = clamp(_b, BONE, type(uint256).max); uint256 _result1 = bpowi(_base, badd(_a, _b)); uint256 _result2 = bmul(bpowi(_base, _a), bpowi(_base, _b)); @@ -404,9 +408,9 @@ contract EchidnaBNum is BNum, EchidnaTest { } // power of a power should mult the exp (x^a)^b == x^(ab) - function bpowi_powerOfPower(uint256 _base, uint256 _a, uint256 _b) public pure { - require(_a >= BONE); - require(_b >= BONE); + function bpowi_powerOfPower(uint256 _base, uint256 _a, uint256 _b) public { + _a = clamp(_a, BONE, type(uint256).max); + _b = clamp(_b, BONE, type(uint256).max); uint256 _result1 = bpowi(bpowi(_base, _a), _b); uint256 _result2 = bpowi(_base, bmul(_a, _b)); @@ -459,8 +463,8 @@ contract EchidnaBNum is BNum, EchidnaTest { //todo loop // bpow should be distributive over mult of the same exp a^x * b^x == (a*b)^x - function bpow_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public pure { - require(_exp >= BONE); + function bpow_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public { + _exp = clamp(_exp, BONE, type(uint256).max); uint256 _result1 = bpow(bmul(_a, _b), _exp); uint256 _result2 = bmul(bpow(_a, _exp), bpow(_b, _exp)); diff --git a/test/invariants/fuzz/config.yaml b/test/invariants/fuzz/BNum.yaml similarity index 64% rename from test/invariants/fuzz/config.yaml rename to test/invariants/fuzz/BNum.yaml index 07c6cd1c..85dc34ed 100644 --- a/test/invariants/fuzz/config.yaml +++ b/test/invariants/fuzz/BNum.yaml @@ -1,5 +1,6 @@ # https://github.com/crytic/echidna/blob/master/tests/solidity/basic/default.yaml for more options testMode: assertion -corpusDir: test/invariants/fuzz/corpus/ +corpusDir: test/invariants/fuzz/corpuses/BNum/ coverageFormats: ["html","lcov"] -allContracts: true \ No newline at end of file +allContracts: true +testLimit: 50000 \ No newline at end of file diff --git a/test/invariants/fuzz/external/BToken.sol b/test/invariants/fuzz/BToken.sol similarity index 96% rename from test/invariants/fuzz/external/BToken.sol rename to test/invariants/fuzz/BToken.sol index dc541b05..b2e40f69 100644 --- a/test/invariants/fuzz/external/BToken.sol +++ b/test/invariants/fuzz/BToken.sol @@ -1,6 +1,6 @@ pragma solidity 0.8.23; -import {EchidnaTest} from '../../helpers/AdvancedTestsUtils.sol'; +import {EchidnaTest} from '../helpers/AdvancedTestsUtils.sol'; import {CryticERC20ExternalBasicProperties} from '@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol'; import {ITokenMock} from '@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol'; diff --git a/test/invariants/fuzz/BToken.yaml b/test/invariants/fuzz/BToken.yaml new file mode 100644 index 00000000..1a2e45ad --- /dev/null +++ b/test/invariants/fuzz/BToken.yaml @@ -0,0 +1,6 @@ +# https://github.com/crytic/echidna/blob/master/tests/solidity/basic/default.yaml for more options +testMode: assertion +corpusDir: test/invariants/fuzz/corpuses/BToken/ +coverageFormats: ["html","lcov"] +allContracts: true +testLimit: 50000 diff --git a/test/invariants/fuzz/external/Protocol.t.sol b/test/invariants/fuzz/Protocol.t.sol similarity index 99% rename from test/invariants/fuzz/external/Protocol.t.sol rename to test/invariants/fuzz/Protocol.t.sol index 2fbd1d5b..281e7e76 100644 --- a/test/invariants/fuzz/external/Protocol.t.sol +++ b/test/invariants/fuzz/Protocol.t.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.23; -import {EchidnaTest, FuzzERC20} from '../../helpers/AdvancedTestsUtils.sol'; +import {EchidnaTest, FuzzERC20} from '../helpers/AdvancedTestsUtils.sol'; -import {MockSettler} from './MockSettler.sol'; +import {MockSettler} from '../helpers/MockSettler.sol'; import {BCoWFactory, BCoWPool, IBPool} from 'contracts/BCoWFactory.sol'; import {BConst} from 'contracts/BConst.sol'; import {BMath} from 'contracts/BMath.sol'; diff --git a/test/invariants/fuzz/Protocol.yaml b/test/invariants/fuzz/Protocol.yaml new file mode 100644 index 00000000..068cab40 --- /dev/null +++ b/test/invariants/fuzz/Protocol.yaml @@ -0,0 +1,6 @@ +# https://github.com/crytic/echidna/blob/master/tests/solidity/basic/default.yaml for more options +testMode: assertion +corpusDir: test/invariants/fuzz/corpuses/Protocol/ +coverageFormats: ["html","lcov"] +allContracts: true +testLimit: 50000 diff --git a/test/invariants/fuzz/external/MockSettler.sol b/test/invariants/fuzz/external/MockSettler.sol deleted file mode 100644 index d79dfa4b..00000000 --- a/test/invariants/fuzz/external/MockSettler.sol +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; - -import {GPv2Interaction, GPv2Trade, IERC20, ISettlement} from 'interfaces/ISettlement.sol'; - -contract MockSettler is ISettlement { - function domainSeparator() external view override returns (bytes32) { - return bytes32(hex'1234'); - } - - function vaultRelayer() external view override returns (address) { - return address(123); - } - - function settle( - IERC20[] calldata tokens, - uint256[] calldata clearingPrices, - GPv2Trade.Data[] calldata trades, - GPv2Interaction.Data[][3] calldata interactions - ) external {} -} From e946f09878e0aba60d57c65766ec0a2b59195592 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:56:52 +0200 Subject: [PATCH 13/37] feat: more bnum pain --- test/invariants/fuzz/BMath.t.sol | 2 +- test/invariants/fuzz/BNum.t.sol | 117 +++++++----------- test/invariants/fuzz/BToken.sol | 2 +- test/invariants/fuzz/Protocol.t.sol | 2 +- .../invariants/helpers/AdvancedTestsUtils.sol | 4 + 5 files changed, 55 insertions(+), 72 deletions(-) diff --git a/test/invariants/fuzz/BMath.t.sol b/test/invariants/fuzz/BMath.t.sol index ff8282df..3dbb4df4 100644 --- a/test/invariants/fuzz/BMath.t.sol +++ b/test/invariants/fuzz/BMath.t.sol @@ -5,7 +5,7 @@ import {EchidnaTest} from '../helpers/AdvancedTestsUtils.sol'; import {BMath} from 'contracts/BMath.sol'; -contract EchidnaBMath is BMath, EchidnaTest { +contract FuzzBMath is BMath, EchidnaTest { // calcOutGivenIn should be inverse of calcInGivenOut function testCalcInGivenOut_InvCalcInGivenOut( uint256 tokenBalanceIn, diff --git a/test/invariants/fuzz/BNum.t.sol b/test/invariants/fuzz/BNum.t.sol index c58bbd8a..e809d483 100644 --- a/test/invariants/fuzz/BNum.t.sol +++ b/test/invariants/fuzz/BNum.t.sol @@ -5,7 +5,7 @@ import {EchidnaTest} from '../helpers/AdvancedTestsUtils.sol'; import {BNum} from 'contracts/BNum.sol'; -contract EchidnaBNum is BNum, EchidnaTest { +contract FuzzBNum is BNum, EchidnaTest { function bsub_exposed(uint256 a, uint256 b) external pure returns (uint256) { return bsub(a, b); } @@ -153,7 +153,7 @@ contract EchidnaBNum is BNum, EchidnaTest { _b = clamp(_b, _a + 1, type(uint256).max); // Action - (bool succ,) = address(this).call(abi.encodeCall(EchidnaBNum.bsub_exposed, (_a, _b))); + (bool succ,) = address(this).call(abi.encodeCall(FuzzBNum.bsub_exposed, (_a, _b))); // Postcondition assert(!succ); @@ -214,37 +214,39 @@ contract EchidnaBNum is BNum, EchidnaTest { assert(_result1 == _result2); } - //todo this one fails // bmul should be associative - function bmul_associative(uint256 _a, uint256 _b, uint256 _c) public { + function test_bmul_associative(uint256 _a, uint256 _b, uint256 _c) public { // precondition - _c = clamp(_c, BONE, type(uint256).max); - _b = clamp(_b, BONE, type(uint256).max / _c); - _a = clamp(_a, BONE, type(uint256).max / _b); - - require(_a * _b + _c / 2 < type(uint256).max); // Avoid add overflow + _c = clamp(_c, BONE, 9_999_999_999_999 * BONE); + _b = clamp(_b, BONE, 9_999_999_999_999 * BONE); + _a = clamp(_a, BONE, 9_999_999_999_999 * BONE); // action uint256 _result1 = bmul(bmul(_a, _b), _c); uint256 _result2 = bmul(_a, bmul(_b, _c)); // post condition - assert(_result1 == _result2); + assert(_result1 / BONE == _result2 / BONE); } - //todo hangs // bmul should be distributive - function bmul_distributive(uint256 _a, uint256 _b, uint256 _c) public pure { + function bmul_distributive(uint256 _a, uint256 _b, uint256 _c) public { + _c = clamp(_c, BONE, 9_999_999_999_999 * BONE); + _b = clamp(_b, BONE, 9_999_999_999_999 * BONE); + _a = clamp(_a, BONE, 9_999_999_999_999 * BONE); + uint256 _result1 = bmul(_a, badd(_b, _c)); uint256 _result2 = badd(bmul(_a, _b), bmul(_a, _c)); + assert(_result1 == _result2); } - //todo // 1 should be identity for bmul - function bmul_identity(uint256 _a) public pure { - // vm.assume(_a < type(uint256).max / BONE); // Avoid mul overflow + function bmul_identity(uint256 _a) public { + _a = clamp(_a, BONE, 9_999_999_999_999 * BONE); + uint256 _result = bmul(_a, BONE); + assert(_result == _a); } @@ -257,10 +259,6 @@ contract EchidnaBNum is BNum, EchidnaTest { assert(_result == 0); } - //todo - //➜ bmul(57896044618658097711785492504343953926634992332820282019728792003956564819968, 1) >= 57896044618658097711785492504343953926634992332820282019728792003956564819968 - // Type: bool - // └ Value: false // bmul result should always be gte a and b function bmul_resultGTE(uint256 _a, uint256 _b) public { // Precondition @@ -289,41 +287,6 @@ contract EchidnaBNum is BNum, EchidnaTest { assert(_result == _a); } - // uint256[] public fixtureA = [ - // BONE, - // BONE * 2, - // BONE / 2, - // BONE * 2 - 1, - // BONE * 2 + 1, - // BONE / 2 - 1, - // BONE / 2 + 1, - // BONE * 3, - // BONE * 4, - // BONE * 5, - // BONE * 6, - // BONE * 7, - // BONE * 8, - // BONE * 9, - // BONE * 10, - // type(uint256).max / 10**18, - // type(uint256).max / 10**18 - 1, - // type(uint256).max / 10**18 - 10, - // type(uint256).max / 10**18 - BONE / 2, - // type(uint256).max / 10**18 - BONE / 2 + 1, - // type(uint256).max / 10**18 - BONE / 2 - 1, - // type(uint256).max / 10**18 - BONE / 2 - 10, - // 0, - // 1, - // 2 - // ]; - - // /// forge-config: default.fuzz.runs = 1000000 - // function test_bdiv_identity(uint256 a) public pure { - // a = bound(a, 0, type(uint256).max / 10**18); - // uint256 _result = bdiv(a, BONE); - // assertEq(_result, a); - // } - //todo // bdiv should revert if b is 0 // function bdiv_revert(uint256 _a) public pure { @@ -383,7 +346,7 @@ contract EchidnaBNum is BNum, EchidnaTest { // 1 should be identity if exp function bpowi_identityExp(uint256 _base) public { - _base = clamp(_base, BONE, type(uint256).max); + _base = clamp(_base, 1, 10_000); uint256 _result = bpowi(_base, BONE); @@ -392,11 +355,13 @@ contract EchidnaBNum is BNum, EchidnaTest { // bpowi should be distributive over mult of the same base x^a x^b == x^(a+b) function bpowi_distributiveBase(uint256 _base, uint256 _a, uint256 _b) public { - _a = clamp(_a, BONE, type(uint256).max); - _b = clamp(_b, BONE, type(uint256).max); + _base = clamp(_base, 1, 10_000); + _a = clamp(_a, 1, 1000 * BONE); + _b = clamp(_b, 1, 1000 * BONE); uint256 _result1 = bpowi(_base, badd(_a, _b)); uint256 _result2 = bmul(bpowi(_base, _a), bpowi(_base, _b)); + assert(_result1 == _result2); } @@ -409,12 +374,14 @@ contract EchidnaBNum is BNum, EchidnaTest { // power of a power should mult the exp (x^a)^b == x^(ab) function bpowi_powerOfPower(uint256 _base, uint256 _a, uint256 _b) public { - _a = clamp(_a, BONE, type(uint256).max); - _b = clamp(_b, BONE, type(uint256).max); + _base = clamp(_base, 1, 10_000); + _a = clamp(_a, 1, 1000 * BONE); + _b = clamp(_b, 1, 1000 * BONE); uint256 _result1 = bpowi(bpowi(_base, _a), _b); uint256 _result2 = bpowi(_base, bmul(_a, _b)); - assert(_result1 == _result2); + + assert(_result1 == _result2 || _result1 == _result2 - 1 || _result1 == _result2 + 1); } ///////////////////////////////////////////////////////////////////// @@ -453,29 +420,41 @@ contract EchidnaBNum is BNum, EchidnaTest { assert(_result == _base); } - //todo infinite loop // bpow should be distributive over mult of the same base x^a * x^b == x^(a+b) - function bpow_distributiveBase(uint256 _base, uint256 _a, uint256 _b) public pure { + function bpow_distributiveBase(uint256 _base, uint256 _a, uint256 _b) public { + _base = clamp(_base, MIN_BPOW_BASE, MAX_BPOW_BASE); + _a = clamp(_a, 1, 1000); + _b = clamp(_b, 1, 1000); + uint256 _result1 = bpow(_base, badd(_a, _b)); uint256 _result2 = bmul(bpow(_base, _a), bpow(_base, _b)); - assert(_result1 == _result2); + + assert(_result1 == _result2 || _result1 == _result2 - 1 || _result1 == _result2 + 1); } - //todo loop // bpow should be distributive over mult of the same exp a^x * b^x == (a*b)^x - function bpow_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public { - _exp = clamp(_exp, BONE, type(uint256).max); + function test_bpow_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public { + _exp = clamp(_exp, 1, 100); + _a = clamp(_a, MIN_BPOW_BASE, MAX_BPOW_BASE); + _b = clamp(_b, MIN_BPOW_BASE, MAX_BPOW_BASE); + + require(_a * _b < MAX_BPOW_BASE && _a * _b > MIN_BPOW_BASE); uint256 _result1 = bpow(bmul(_a, _b), _exp); uint256 _result2 = bmul(bpow(_a, _exp), bpow(_b, _exp)); - assert(_result1 == _result2); + + assert(_result1 == _result2 || _result1 == _result2 - 1 || _result1 == _result2 + 1); } - // todo // power of a power should mult the exp (x^a)^b == x^(a*b) - function bpow_powerOfPower(uint256 _base, uint256 _a, uint256 _b) public pure { + function bpow_powerOfPower(uint256 _base, uint256 _a, uint256 _b) public { + _base = clamp(_base, MIN_BPOW_BASE, MAX_BPOW_BASE); + _a = clamp(_a, 1, 1000); + _b = clamp(_b, 1, 1000); + uint256 _result1 = bpow(bpow(_base, _a), _b); uint256 _result2 = bpow(_base, bmul(_a, _b)); + assert(_result1 == _result2); } } diff --git a/test/invariants/fuzz/BToken.sol b/test/invariants/fuzz/BToken.sol index b2e40f69..dfdb76f8 100644 --- a/test/invariants/fuzz/BToken.sol +++ b/test/invariants/fuzz/BToken.sol @@ -7,7 +7,7 @@ import {ITokenMock} from '@crytic/properties/contracts/ERC20/external/util/IToke import {PropertiesConstants} from '@crytic/properties/contracts/util/PropertiesConstants.sol'; import 'contracts/BToken.sol'; -contract EchidnaBToken is CryticERC20ExternalBasicProperties, EchidnaTest { +contract FuzzBToken is CryticERC20ExternalBasicProperties, EchidnaTest { constructor() { // Deploy ERC20 token = ITokenMock(address(new CryticTokenMock())); diff --git a/test/invariants/fuzz/Protocol.t.sol b/test/invariants/fuzz/Protocol.t.sol index 281e7e76..4c7bf31b 100644 --- a/test/invariants/fuzz/Protocol.t.sol +++ b/test/invariants/fuzz/Protocol.t.sol @@ -9,7 +9,7 @@ import {BConst} from 'contracts/BConst.sol'; import {BMath} from 'contracts/BMath.sol'; import {BNum} from 'contracts/BNum.sol'; -contract EchidnaBalancer is EchidnaTest { +contract FuzzBalancer is EchidnaTest { // System under test BCoWFactory factory; BConst bconst; diff --git a/test/invariants/helpers/AdvancedTestsUtils.sol b/test/invariants/helpers/AdvancedTestsUtils.sol index b0f0fca1..c5db8c98 100644 --- a/test/invariants/helpers/AdvancedTestsUtils.sol +++ b/test/invariants/helpers/AdvancedTestsUtils.sol @@ -54,6 +54,10 @@ contract EchidnaTest is AgentsHandler { constructor() AgentsHandler(5) {} function clamp(uint256 _value, uint256 _min, uint256 _max) internal returns (uint256) { + if (_min > _max) { + emit AssertionFailed(); + } + if (_value < _min || _value > _max) { return _min + (_value % (_max - _min + 1)); } From 59c26867b1676c15e61a788bda4c4249b8a977c9 Mon Sep 17 00:00:00 2001 From: "Dr. GoNoGo" <83670532+drgorillamd@users.noreply.github.com> Date: Sat, 20 Jul 2024 21:06:55 +0200 Subject: [PATCH 14/37] chore: format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Weißer Hase --- test/invariants/PROPERTIES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/invariants/PROPERTIES.md b/test/invariants/PROPERTIES.md index ccabac50..3f3a319d 100644 --- a/test/invariants/PROPERTIES.md +++ b/test/invariants/PROPERTIES.md @@ -60,8 +60,8 @@ bsubSign result should always be 0 if a == b bmul should be commutative bmul should be associative bmul should be distributive -1 should be identity for bmul -0 should be absorbing for mul +bmul should have 1 as identity +bmul should have 0 as absorving bmul result should always be gte a and b bdiv should be bmul reverse operation // <-- unsolved From 462c38e4e238922a64425b62ec06afec8f04832a Mon Sep 17 00:00:00 2001 From: "Dr. GoNoGo" <83670532+drgorillamd@users.noreply.github.com> Date: Sat, 20 Jul 2024 21:07:14 +0200 Subject: [PATCH 15/37] chore: format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Weißer Hase --- test/invariants/PROPERTIES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/invariants/PROPERTIES.md b/test/invariants/PROPERTIES.md index 3f3a319d..b5bc2976 100644 --- a/test/invariants/PROPERTIES.md +++ b/test/invariants/PROPERTIES.md @@ -65,7 +65,7 @@ bmul should have 0 as absorving bmul result should always be gte a and b bdiv should be bmul reverse operation // <-- unsolved -1 should be identity for bdiv +bdiv should have 1 as identity bdiv should revert if b is 0 // <-- impl with wrapper to have low lvl call bdiv result should be lte a From 68a6b59f41d6210a27f60febd4cb64002114fb4d Mon Sep 17 00:00:00 2001 From: "Dr. GoNoGo" <83670532+drgorillamd@users.noreply.github.com> Date: Sat, 20 Jul 2024 21:09:39 +0200 Subject: [PATCH 16/37] chore: typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Weißer Hase --- test/invariants/symbolic/Protocol.t.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/test/invariants/symbolic/Protocol.t.sol b/test/invariants/symbolic/Protocol.t.sol index 69c6b360..7a603ed5 100644 --- a/test/invariants/symbolic/Protocol.t.sol +++ b/test/invariants/symbolic/Protocol.t.sol @@ -113,7 +113,6 @@ contract HalmosBalancer is HalmosTest { /// @custom:property-id 7 /// @custom:property total weight can be up to 50e18 /// @dev Only 2 tokens are used, to avoid hitting the limit in loop unrolling - function check_totalWeightMax(uint256[2] calldata _weights) public { // Precondition BCoWPool _pool = BCoWPool(address(factory.newBPool())); From fdd46179255c60df145bd73ef854c65259bf57d3 Mon Sep 17 00:00:00 2001 From: "Dr. GoNoGo" <83670532+drgorillamd@users.noreply.github.com> Date: Sat, 20 Jul 2024 21:10:07 +0200 Subject: [PATCH 17/37] chore: typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Weißer Hase --- test/invariants/symbolic/Protocol.t.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/test/invariants/symbolic/Protocol.t.sol b/test/invariants/symbolic/Protocol.t.sol index 7a603ed5..3ac29518 100644 --- a/test/invariants/symbolic/Protocol.t.sol +++ b/test/invariants/symbolic/Protocol.t.sol @@ -162,7 +162,6 @@ contract HalmosBalancer is HalmosTest { } /// @custom:property-id 9 /// @custom:property BToken decreaseApproval should decrease the approval to max(old-amount, 0) - function check_decreaseApproval(uint256 _approvalToLower, address _owner, address _spender) public { // Precondition uint256 _approvalBefore = pool.allowance(_owner, _spender); From cad698a889b34be9e1dee4ba5deb68541168c86a Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:52:29 +0200 Subject: [PATCH 18/37] test(echidna): more bnum tests --- test/invariants/fuzz/BNum.t.sol | 55 ++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/test/invariants/fuzz/BNum.t.sol b/test/invariants/fuzz/BNum.t.sol index e809d483..7d940a0a 100644 --- a/test/invariants/fuzz/BNum.t.sol +++ b/test/invariants/fuzz/BNum.t.sol @@ -5,16 +5,21 @@ import {EchidnaTest} from '../helpers/AdvancedTestsUtils.sol'; import {BNum} from 'contracts/BNum.sol'; -contract FuzzBNum is BNum, EchidnaTest { +import {Test} from 'forge-std/Test.sol'; + +contract FuzzBNum is BNum, EchidnaTest, Test { function bsub_exposed(uint256 a, uint256 b) external pure returns (uint256) { return bsub(a, b); } + + function bdiv_exposed(uint256 _a, uint256 _b) external pure returns (uint256) { + return bdiv(_a, _b); + } ///////////////////////////////////////////////////////////////////// // Bnum::btoi // ///////////////////////////////////////////////////////////////////// // btoi should always return the floor(a / BONE) == (a - a%BONE) / BONE - // TODO: Too tightly coupled function btoi_alwaysFloor(uint256 _input) public pure { // action uint256 _result = btoi(_input); @@ -215,7 +220,7 @@ contract FuzzBNum is BNum, EchidnaTest { } // bmul should be associative - function test_bmul_associative(uint256 _a, uint256 _b, uint256 _c) public { + function bmul_associative(uint256 _a, uint256 _b, uint256 _c) public { // precondition _c = clamp(_c, BONE, 9_999_999_999_999 * BONE); _b = clamp(_b, BONE, 9_999_999_999_999 * BONE); @@ -231,14 +236,14 @@ contract FuzzBNum is BNum, EchidnaTest { // bmul should be distributive function bmul_distributive(uint256 _a, uint256 _b, uint256 _c) public { - _c = clamp(_c, BONE, 9_999_999_999_999 * BONE); - _b = clamp(_b, BONE, 9_999_999_999_999 * BONE); - _a = clamp(_a, BONE, 9_999_999_999_999 * BONE); + _c = clamp(_c, BONE, 10_000 * BONE); + _b = clamp(_b, BONE, 10_000 * BONE); + _a = clamp(_a, BONE, 10_000 * BONE); uint256 _result1 = bmul(_a, badd(_b, _c)); uint256 _result2 = badd(bmul(_a, _b), bmul(_a, _c)); - assert(_result1 == _result2); + assert(_result1 == _result2 || _result1 == _result2 - 1 || _result1 == _result2 + 1); } // 1 should be identity for bmul @@ -279,22 +284,23 @@ contract FuzzBNum is BNum, EchidnaTest { // Bnum::bdiv // ///////////////////////////////////////////////////////////////////// - //todo: Halmos times out vs foundry passes // 1 should be identity for bdiv function bdiv_identity(uint256 _a) public pure { - // vm.assume(_a < type(uint256).max / BONE); // Avoid add overflow uint256 _result = bdiv(_a, BONE); assert(_result == _a); } - //todo // bdiv should revert if b is 0 - // function bdiv_revert(uint256 _a) public pure { - // } + function bdiv_revert(uint256 _a) public { + // action + (bool succ,) = address(this).call(abi.encodeCall(FuzzBNum.bdiv_exposed, (_a, 0))); + + // post condition + assert(!succ); + } - //todo hangs // bdiv result should be lte a - function test_bdiv_resultLTE(uint256 _a, uint256 _b) public pure { + function bdiv_resultLTE(uint256 _a, uint256 _b) public pure { // vm.assume(_b != 0); // vm.assume(_a < type(uint256).max / BONE); // Avoid mul overflow //todo: overconstrained next line? Too tightly coupled? @@ -304,16 +310,18 @@ contract FuzzBNum is BNum, EchidnaTest { assert(_result <= _a * BONE); } - //todo hangs // bdiv should be bmul reverse operation function bdiv_bmul(uint256 _a, uint256 _b) public { - _a = clamp(_a, 2, type(uint256).max); - _b = clamp(_b, 1, _a - 1); + _a = clamp(_a, BONE + 1, 10e12 * BONE); + _b = clamp(_b, BONE, _a - 1); uint256 _bdivResult = bdiv(_a, _b); uint256 _result = bmul(_bdivResult, _b); - assert(_result == _a); + _result /= BONE; + _a /= BONE; + + assert(_result == _a || _result == _a - 1 || _result == _a + 1); } ///////////////////////////////////////////////////////////////////// @@ -337,7 +345,6 @@ contract FuzzBNum is BNum, EchidnaTest { assert(_result == 0); } - //todo echidna (loop unrolling bound hit) // 1 should be identity if base function bpowi_identityBase(uint256 _exp) public pure { uint256 _result = bpowi(BONE, _exp); @@ -348,7 +355,7 @@ contract FuzzBNum is BNum, EchidnaTest { function bpowi_identityExp(uint256 _base) public { _base = clamp(_base, 1, 10_000); - uint256 _result = bpowi(_base, BONE); + uint256 _result = bpowi(_base, 1); assert(_result == _base); } @@ -379,7 +386,7 @@ contract FuzzBNum is BNum, EchidnaTest { _b = clamp(_b, 1, 1000 * BONE); uint256 _result1 = bpowi(bpowi(_base, _a), _b); - uint256 _result2 = bpowi(_base, bmul(_a, _b)); + uint256 _result2 = bpowi(_base, bmul(_a, _b)) / BONE; assert(_result1 == _result2 || _result1 == _result2 - 1 || _result1 == _result2 + 1); } @@ -397,14 +404,12 @@ contract FuzzBNum is BNum, EchidnaTest { assert(_result == BONE); } - //todo min base is 1wei -> can never be 0 instead (echidna) // 0 should be absorbing if base function bpow_absorbingBase(uint256 _exp) public pure { uint256 _result = bpow(0, _exp); assert(_result == 0); } - //todo echidna (loop unrolling bound hit) // 1 should be identity if base function bpow_identityBase(uint256 _exp) public pure { uint256 _result = bpow(BONE, _exp); @@ -433,7 +438,7 @@ contract FuzzBNum is BNum, EchidnaTest { } // bpow should be distributive over mult of the same exp a^x * b^x == (a*b)^x - function test_bpow_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public { + function bpow_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public { _exp = clamp(_exp, 1, 100); _a = clamp(_a, MIN_BPOW_BASE, MAX_BPOW_BASE); _b = clamp(_b, MIN_BPOW_BASE, MAX_BPOW_BASE); @@ -443,7 +448,7 @@ contract FuzzBNum is BNum, EchidnaTest { uint256 _result1 = bpow(bmul(_a, _b), _exp); uint256 _result2 = bmul(bpow(_a, _exp), bpow(_b, _exp)); - assert(_result1 == _result2 || _result1 == _result2 - 1 || _result1 == _result2 + 1); + assert(_result1 == _result2 || _result1 > _result2 ? _result1 - _result2 < BONE : _result2 - _result1 < BONE); } // power of a power should mult the exp (x^a)^b == x^(a*b) From c143808c1ee330fa27ad5b36902e7fd377cec7d8 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:53:57 +0200 Subject: [PATCH 19/37] chore: unused import --- test/invariants/symbolic/Protocol.t.sol | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/test/invariants/symbolic/Protocol.t.sol b/test/invariants/symbolic/Protocol.t.sol index 3ac29518..16228d47 100644 --- a/test/invariants/symbolic/Protocol.t.sol +++ b/test/invariants/symbolic/Protocol.t.sol @@ -8,7 +8,6 @@ import {BCoWFactory, BCoWPool, IBPool} from 'contracts/BCoWFactory.sol'; import {BConst} from 'contracts/BConst.sol'; import {BMath} from 'contracts/BMath.sol'; -import {BNum} from 'contracts/BNum.sol'; import {BToken} from 'contracts/BToken.sol'; contract HalmosBalancer is HalmosTest { @@ -16,7 +15,6 @@ contract HalmosBalancer is HalmosTest { BCoWFactory factory; BConst bconst; BMath bmath; - BNum_exposed bnum; address solutionSettler; bytes32 appData; @@ -32,7 +30,6 @@ contract HalmosBalancer is HalmosTest { factory = new BCoWFactory(solutionSettler, appData); bconst = new BConst(); bmath = new BMath(); - bnum = new BNum_exposed(); pool = BCoWPool(address(factory.newBPool())); // max bound token is 8 @@ -113,6 +110,7 @@ contract HalmosBalancer is HalmosTest { /// @custom:property-id 7 /// @custom:property total weight can be up to 50e18 /// @dev Only 2 tokens are used, to avoid hitting the limit in loop unrolling + function check_totalWeightMax(uint256[2] calldata _weights) public { // Precondition BCoWPool _pool = BCoWPool(address(factory.newBPool())); @@ -162,6 +160,7 @@ contract HalmosBalancer is HalmosTest { } /// @custom:property-id 9 /// @custom:property BToken decreaseApproval should decrease the approval to max(old-amount, 0) + function check_decreaseApproval(uint256 _approvalToLower, address _owner, address _spender) public { // Precondition uint256 _approvalBefore = pool.allowance(_owner, _spender); @@ -288,13 +287,3 @@ contract HalmosBalancer is HalmosTest { } catch {} } } - -contract BNum_exposed is BNum { - function bdiv_exposed(uint256 a, uint256 b) public pure returns (uint256) { - return bdiv(a, b); - } - - function bmul_exposed(uint256 a, uint256 b) public pure returns (uint256) { - return bmul(a, b); - } -} From a65a9c0a3529693d0bf0a4044a881f1dbdef39cb Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Mon, 22 Jul 2024 14:56:57 +0200 Subject: [PATCH 20/37] chore: more assert in protocol --- test/invariants/fuzz/Protocol.t.sol | 53 +++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/test/invariants/fuzz/Protocol.t.sol b/test/invariants/fuzz/Protocol.t.sol index 4c7bf31b..c19b5548 100644 --- a/test/invariants/fuzz/Protocol.t.sol +++ b/test/invariants/fuzz/Protocol.t.sol @@ -9,7 +9,7 @@ import {BConst} from 'contracts/BConst.sol'; import {BMath} from 'contracts/BMath.sol'; import {BNum} from 'contracts/BNum.sol'; -contract FuzzBalancer is EchidnaTest { +contract FuzzProtocol is EchidnaTest { // System under test BCoWFactory factory; BConst bconst; @@ -56,7 +56,7 @@ contract FuzzBalancer is EchidnaTest { try pool.bind(address(_token), 10 ether, _poolWeight) {} catch { - emit AssertionFailed(); + assert(false); } } @@ -64,8 +64,10 @@ contract FuzzBalancer is EchidnaTest { ghost_bptMinted = pool.INIT_POOL_SUPPLY(); } - // Randomly add or remove tokens to a finalized pool + // Randomly add or remove tokens to a pool // Insure caller has enough token + // Main objective is to have an arbitrary number of tokens in the pool, peripheral objective is another + // test of min/max token bound (properties 20 and 21) function setup_joinExitPool(bool _join, uint256 _amountBpt) public AgentOrDeployer { if (_join) { uint256[] memory _maxAmountsIn; @@ -85,7 +87,12 @@ contract FuzzBalancer is EchidnaTest { hevm.prank(currentCaller); try pool.joinPool(_amountBpt, _maxAmountsIn) { ghost_bptMinted += _amountBpt; - } catch {} + } catch { + assert( + pool.isFinalized() || pool.getCurrentTokens().length > bconst.MAX_BOUND_TOKENS() + || currentCaller != pool.getController() + ); + } } else { hevm.prank(currentCaller); pool.approve(address(pool), _amountBpt); @@ -93,7 +100,9 @@ contract FuzzBalancer is EchidnaTest { hevm.prank(currentCaller); try pool.exitPool(_amountBpt, new uint256[](4)) { ghost_bptBurned += _amountBpt; - } catch {} + } catch { + assert(pool.isFinalized() || pool.getCurrentTokens().length == 0 || currentCaller != pool.getController()); + } } } @@ -172,9 +181,7 @@ contract FuzzBalancer is EchidnaTest { _tokenIn = clamp(_tokenIn, 0, tokens.length - 1); _tokenOut = clamp(_tokenOut, 0, tokens.length - 1); - _amountIn = clamp(_amountIn, 0, 10 ether); - - require(_tokenIn != _tokenOut); // todo: dig this, it should pass without this precondition + _amountIn = clamp(_amountIn, 1 ether, 10 ether); tokens[_tokenIn].mint(currentCaller, _amountIn); @@ -211,7 +218,14 @@ contract FuzzBalancer is EchidnaTest { // 19 assert(pool.isFinalized()); - } catch {} + } catch { + assert( + // above max ratio + _amountIn > bnum.bmul_exposed(tokens[_tokenIn].balanceOf(address(pool)), bconst.MAX_IN_RATIO()) + // below min amount out + || _outComputed < _minAmountOut + ); + } } /// @custom:property-id 5 @@ -233,7 +247,8 @@ contract FuzzBalancer is EchidnaTest { _tokenIn = clamp(_tokenIn, 0, tokens.length - 1); _tokenOut = clamp(_tokenOut, 0, tokens.length - 1); - _maxAmountIn = clamp(_maxAmountIn, 0, 10 ether); + _amountOut = clamp(_amountOut, 1 ether, 10 ether); + _maxAmountIn = clamp(_maxAmountIn, 1 ether, 10 ether); tokens[_tokenIn].mint(currentCaller, _maxAmountIn); @@ -274,7 +289,9 @@ contract FuzzBalancer is EchidnaTest { // 19 assert(pool.isFinalized()); - } catch {} + } catch { + assert(_inComputed > _maxAmountIn); + } } /// @custom:property-id 6 @@ -350,7 +367,13 @@ contract FuzzBalancer is EchidnaTest { // Postcondition assert(currentCaller == _nonFinalizedPool.getController()); poolsToFinalize.pop(); - } catch {} + } catch { + assert( + currentCaller != _nonFinalizedPool.getController() + || _nonFinalizedPool.getCurrentTokens().length > bconst.MAX_BOUND_TOKENS() + || _nonFinalizedPool.getCurrentTokens().length < bconst.MIN_BOUND_TOKENS() + ); + } } /// @custom:property-id 16 @@ -397,7 +420,7 @@ contract FuzzBalancer is EchidnaTest { /// @custom:property-id 18 /// @custom:property the amount of underlying token when exiting should always be the amount calculated in bmath - function correctBPTBurnAmount(uint256 _amountPoolToken) public AgentOrDeployer { + function fuzz_correctBPTBurnAmount(uint256 _amountPoolToken) public AgentOrDeployer { _amountPoolToken = clamp(_amountPoolToken, 0, pool.balanceOf(currentCaller)); uint256[] memory _amountsToReceive = new uint256[](4); @@ -500,7 +523,9 @@ contract FuzzBalancer is EchidnaTest { try pool.commit(hex'1234') { // Postcondition assert(currentCaller == solutionSettler); - } catch {} + } catch { + assert(currentCaller != solutionSettler); + } } /// @custom:property-id 23 From 350c39db312197d53c0a5b2cc56123f4a17712c4 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Tue, 23 Jul 2024 12:36:53 +0200 Subject: [PATCH 21/37] feat: evm version --- crytic-export/combined_solc.json | 1 - foundry.toml | 4 +- script/DeployBCoWFactory.s.sol | 2 +- script/DeployBFactory.s.sol | 2 +- script/Params.s.sol | 2 +- src/contracts/BCoWConst.sol | 2 +- src/contracts/BCoWFactory.sol | 2 +- src/contracts/BCoWPool.sol | 2 +- src/contracts/BConst.sol | 2 +- src/contracts/BFactory.sol | 2 +- src/contracts/BMath.sol | 2 +- src/contracts/BNum.sol | 2 +- src/contracts/BPool.sol | 2 +- src/contracts/BToken.sol | 2 +- src/interfaces/IBCoWFactory.sol | 2 +- src/interfaces/IBCoWPool.sol | 2 +- src/interfaces/IBFactory.sol | 2 +- src/interfaces/IBPool.sol | 2 +- src/interfaces/ISettlement.sol | 2 +- test/integration/BCowPool.t.sol | 2 +- test/integration/BPool.t.sol | 2 +- test/integration/DeploymentGas.t.sol | 2 +- test/invariants/PROPERTIES.md | 7 ++-- .../fuzz/{BMath.t.sol => BMath.t.sol.invalid} | 42 +++---------------- test/invariants/fuzz/BNum.t.sol | 16 +++++-- test/invariants/fuzz/BToken.sol | 2 +- test/invariants/fuzz/Protocol.t.sol | 7 +++- test/invariants/fuzz/Protocol.yaml | 2 +- .../invariants/helpers/AdvancedTestsUtils.sol | 2 +- test/invariants/helpers/MockSettler.sol | 2 +- test/invariants/symbolic/BNum.t.sol | 2 +- test/invariants/symbolic/Protocol.t.sol | 2 +- test/unit/BCoWFactory.t.sol | 2 +- test/unit/BCoWPool.t.sol | 2 +- test/unit/BFactory.t.sol | 2 +- test/unit/BMath.t.sol | 2 +- test/unit/BNum.t.sol | 2 +- test/unit/BPool.t.sol | 2 +- test/unit/BPool/BPool.t.sol | 2 +- test/unit/BPool/BPoolBase.sol | 2 +- test/unit/BPool/BPool_Bind.t.sol | 2 +- test/unit/BPool/BPool_JoinPool.t.sol | 2 +- test/unit/BPool/BPool_Unbind.t.sol | 2 +- test/unit/BToken.t.sol | 2 +- test/utils/Pow.sol | 2 +- test/utils/Utils.sol | 2 +- 46 files changed, 68 insertions(+), 89 deletions(-) delete mode 100644 crytic-export/combined_solc.json rename test/invariants/fuzz/{BMath.t.sol => BMath.t.sol.invalid} (71%) diff --git a/crytic-export/combined_solc.json b/crytic-export/combined_solc.json deleted file mode 100644 index 9fe552ee..00000000 --- a/crytic-export/combined_solc.json +++ /dev/null @@ -1 +0,0 @@ -{"sources": {"/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol": {"AST": {"absolutePath": "node_modules/@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol", "exportedSymbols": {"CryticERC20ExternalBasicProperties": [1131], "CryticERC20ExternalTestBase": [1362]}, "id": 1132, "nodeType": "SourceUnit", "nodes": [{"id": 82, "literals": ["solidity", "^", "0.8", ".0"], "nodeType": "PragmaDirective", "src": "0:23:0"}, {"absolutePath": "node_modules/@crytic/properties/contracts/ERC20/external/util/ERC20ExternalTestBase.sol", "file": "../util/ERC20ExternalTestBase.sol", "id": 84, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1132, "sourceUnit": 1363, "src": "25:78:0", "symbolAliases": [{"foreign": {"id": 83, "name": "CryticERC20ExternalTestBase", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1362, "src": "33:27:0", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"abstract": true, "baseContracts": [{"baseName": {"id": 85, "name": "CryticERC20ExternalTestBase", "nameLocations": ["165:27:0"], "nodeType": "IdentifierPath", "referencedDeclaration": 1362, "src": "165:27:0"}, "id": 86, "nodeType": "InheritanceSpecifier", "src": "165:27:0"}], "canonicalName": "CryticERC20ExternalBasicProperties", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 1131, "linearizedBaseContracts": [1131, 1362, 1224, 3325], "name": "CryticERC20ExternalBasicProperties", "nameLocation": "123:34:0", "nodeType": "ContractDefinition", "nodes": [{"body": {"id": 89, "nodeType": "Block", "src": "213:2:0", "statements": []}, "id": 90, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": {"id": 87, "nodeType": "ParameterList", "parameters": [], "src": "210:2:0"}, "returnParameters": {"id": 88, "nodeType": "ParameterList", "parameters": [], "src": "213:0:0"}, "scope": 1131, "src": "199:16:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 110, "nodeType": "Block", "src": "409:192:0", "statements": [{"expression": {"arguments": [{"id": 97, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "427:29:0", "subExpression": {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 94, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "428:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 95, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "434:20:0", "memberName": "isMintableOrBurnable", "nodeType": "MemberAccess", "referencedDeclaration": 1141, "src": "428:26:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$__$returns$_t_bool_$", "typeString": "function () external returns (bool)"}}, "id": 96, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "428:28:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 93, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "419:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 98, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "419:38:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 99, "nodeType": "ExpressionStatement", "src": "419:38:0"}, {"expression": {"arguments": [{"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 101, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "489:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 102, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "495:13:0", "memberName": "initialSupply", "nodeType": "MemberAccess", "referencedDeclaration": 1146, "src": "489:19:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$__$returns$_t_uint256_$", "typeString": "function () external returns (uint256)"}}, "id": 103, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "489:21:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 104, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "524:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 105, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "530:11:0", "memberName": "totalSupply", "nodeType": "MemberAccess", "referencedDeclaration": 1388, "src": "524:17:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 106, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "524:19:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "546f6b656e20737570706c7920776173206d6f646966696564", "id": 107, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "557:27:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_5fd8329cae6c7af670da228bf73390d26ca120aba549f06ed9cf9aeff6bbd76e", "typeString": "literal_string \"Token supply was modified\""}, "value": "Token supply was modified"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_5fd8329cae6c7af670da228bf73390d26ca120aba549f06ed9cf9aeff6bbd76e", "typeString": "literal_string \"Token supply was modified\""}], "id": 100, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "467:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 108, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "467:127:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 109, "nodeType": "ExpressionStatement", "src": "467:127:0"}]}, "functionSelector": "31261479", "id": 111, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_constantSupply", "nameLocation": "358:33:0", "nodeType": "FunctionDefinition", "parameters": {"id": 91, "nodeType": "ParameterList", "parameters": [], "src": "391:2:0"}, "returnParameters": {"id": 92, "nodeType": "ParameterList", "parameters": [], "src": "409:0:0"}, "scope": 1131, "src": "349:252:0", "stateMutability": "nonpayable", "virtual": true, "visibility": "public"}, {"body": {"id": 126, "nodeType": "Block", "src": "724:163:0", "statements": [{"expression": {"arguments": [{"arguments": [{"expression": {"id": 117, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "773:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 118, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "777:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "773:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 115, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "757:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 116, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "763:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "757:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 119, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "757:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 120, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "798:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 121, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "804:11:0", "memberName": "totalSupply", "nodeType": "MemberAccess", "referencedDeclaration": 1388, "src": "798:17:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 122, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "798:19:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "557365722062616c616e636520686967686572207468616e20746f74616c20737570706c79", "id": 123, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "831:39:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_fc17b6f27a93af589f9dcf143bf95098f749b75a37a180b89d78e0862c9f1485", "typeString": "literal_string \"User balance higher than total supply\""}, "value": "User balance higher than total supply"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_fc17b6f27a93af589f9dcf143bf95098f749b75a37a180b89d78e0862c9f1485", "typeString": "literal_string \"User balance higher than total supply\""}], "id": 114, "name": "assertLte", "nodeType": "Identifier", "overloadedDeclarations": [2512, 2567], "referencedDeclaration": 2512, "src": "734:9:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 124, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "734:146:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 125, "nodeType": "ExpressionStatement", "src": "734:146:0"}]}, "functionSelector": "0069650b", "id": 127, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_userBalanceNotHigherThanSupply", "nameLocation": "665:49:0", "nodeType": "FunctionDefinition", "parameters": {"id": 112, "nodeType": "ParameterList", "parameters": [], "src": "714:2:0"}, "returnParameters": {"id": 113, "nodeType": "ParameterList", "parameters": [], "src": "724:0:0"}, "scope": 1131, "src": "656:231:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 163, "nodeType": "Block", "src": "1019:333:0", "statements": [{"assignments": [131], "declarations": [{"constant": false, "id": 131, "mutability": "mutable", "name": "sumBalances", "nameLocation": "1037:11:0", "nodeType": "VariableDeclaration", "scope": 163, "src": "1029:19:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 130, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1029:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 154, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 153, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 148, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 143, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"arguments": [{"id": 136, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "1075:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 135, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1067:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 134, "name": "address", "nodeType": "ElementaryTypeName", "src": "1067:7:0", "typeDescriptions": {}}}, "id": 137, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1067:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 132, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1051:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 133, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1057:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "1051:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 138, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1051:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [{"id": 141, "name": "USER1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1208, "src": "1112:5:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 139, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1096:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 140, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1102:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "1096:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 142, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1096:22:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "1051:67:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [{"id": 146, "name": "USER2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1214, "src": "1149:5:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 144, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1133:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 145, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1139:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "1133:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 147, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1133:22:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "1051:104:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"arguments": [{"id": 151, "name": "USER3", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1220, "src": "1186:5:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 149, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1170:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 150, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1176:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "1170:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 152, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1170:22:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "1051:141:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "1029:163:0"}, {"expression": {"arguments": [{"id": 156, "name": "sumBalances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 131, "src": "1225:11:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"arguments": [], "expression": {"argumentTypes": [], "expression": {"id": 157, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1250:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 158, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1256:11:0", "memberName": "totalSupply", "nodeType": "MemberAccess", "referencedDeclaration": 1388, "src": "1250:17:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", "typeString": "function () view external returns (uint256)"}}, "id": 159, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1250:19:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "53756d206f6620757365722062616c616e636573206172652067726561746572207468616e20746f74616c20737570706c79", "id": 160, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1283:52:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2b68efa9d0b9bdfa91b0bac2ba9aeff1bfab41285a495d9bf1dcc1786336a5a8", "typeString": "literal_string \"Sum of user balances are greater than total supply\""}, "value": "Sum of user balances are greater than total supply"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_2b68efa9d0b9bdfa91b0bac2ba9aeff1bfab41285a495d9bf1dcc1786336a5a8", "typeString": "literal_string \"Sum of user balances are greater than total supply\""}], "id": 155, "name": "assertLte", "nodeType": "Identifier", "overloadedDeclarations": [2512, 2567], "referencedDeclaration": 2512, "src": "1202:9:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 161, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1202:143:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 162, "nodeType": "ExpressionStatement", "src": "1202:143:0"}]}, "functionSelector": "c2698205", "id": 164, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_userBalancesLessThanTotalSupply", "nameLocation": "959:50:0", "nodeType": "FunctionDefinition", "parameters": {"id": 128, "nodeType": "ParameterList", "parameters": [], "src": "1009:2:0"}, "returnParameters": {"id": 129, "nodeType": "ParameterList", "parameters": [], "src": "1019:0:0"}, "scope": 1131, "src": "950:402:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 179, "nodeType": "Block", "src": "1459:145:0", "statements": [{"expression": {"arguments": [{"arguments": [{"arguments": [{"hexValue": "30", "id": 172, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1515: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": 171, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1507:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 170, "name": "address", "nodeType": "ElementaryTypeName", "src": "1507:7:0", "typeDescriptions": {}}}, "id": 173, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1507:10:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 168, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1491:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 169, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1497:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "1491:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 174, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1491:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "30", "id": 175, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1532:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, {"hexValue": "41646472657373207a65726f2062616c616e6365206e6f7420657175616c20746f207a65726f", "id": 176, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1547:40:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_301dfce7022f554126c054056a35137d7aaf72c7160cd4206a6c2358bfb77516", "typeString": "literal_string \"Address zero balance not equal to zero\""}, "value": "Address zero balance not equal to zero"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, {"typeIdentifier": "t_stringliteral_301dfce7022f554126c054056a35137d7aaf72c7160cd4206a6c2358bfb77516", "typeString": "literal_string \"Address zero balance not equal to zero\""}], "id": 167, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "1469:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 177, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1469:128:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 178, "nodeType": "ExpressionStatement", "src": "1469:128:0"}]}, "functionSelector": "9ece0e86", "id": 180, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_zeroAddressBalance", "nameLocation": "1412:37:0", "nodeType": "FunctionDefinition", "parameters": {"id": 165, "nodeType": "ParameterList", "parameters": [], "src": "1449:2:0"}, "returnParameters": {"id": 166, "nodeType": "ParameterList", "parameters": [], "src": "1459:0:0"}, "scope": 1131, "src": "1403:201:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 217, "nodeType": "Block", "src": "1724:224:0", "statements": [{"assignments": [184], "declarations": [{"constant": false, "id": 184, "mutability": "mutable", "name": "balance", "nameLocation": "1742:7:0", "nodeType": "VariableDeclaration", "scope": 217, "src": "1734:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 183, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1734:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 192, "initialValue": {"arguments": [{"arguments": [{"id": 189, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "1776:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 188, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1768:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 187, "name": "address", "nodeType": "ElementaryTypeName", "src": "1768:7:0", "typeDescriptions": {}}}, "id": 190, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1768:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 185, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1752:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 186, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1758:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "1752:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 191, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1752:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "1734:48:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 196, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 194, "name": "balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 184, "src": "1800:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 195, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1810:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "1800:11:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 193, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "1792:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 197, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1792:20:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 198, "nodeType": "ExpressionStatement", "src": "1792:20:0"}, {"assignments": [200], "declarations": [{"constant": false, "id": 200, "mutability": "mutable", "name": "r", "nameLocation": "1828:1:0", "nodeType": "VariableDeclaration", "scope": 217, "src": "1823:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 199, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1823:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 209, "initialValue": {"arguments": [{"arguments": [{"hexValue": "30", "id": 205, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1855: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": 204, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1847:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 203, "name": "address", "nodeType": "ElementaryTypeName", "src": "1847:7:0", "typeDescriptions": {}}}, "id": 206, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1847:10:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 207, "name": "balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 184, "src": "1859:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 201, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "1832:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 202, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1838:8:0", "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 1406, "src": "1832:14:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 208, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1832:35:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "1823:44:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 213, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 211, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 200, "src": "1891:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "66616c7365", "id": 212, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1896:5:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}, "src": "1891:10:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "5375636365737366756c207472616e7366657220746f2061646472657373207a65726f", "id": 214, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1903:37:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_b4fdf22acb2c07142dd99a64598bc530c121fbcb1836778ad9a38f20266117fd", "typeString": "literal_string \"Successful transfer to address zero\""}, "value": "Successful transfer to address zero"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_b4fdf22acb2c07142dd99a64598bc530c121fbcb1836778ad9a38f20266117fd", "typeString": "literal_string \"Successful transfer to address zero\""}], "id": 210, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "1877:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 215, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1877:64:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 216, "nodeType": "ExpressionStatement", "src": "1877:64:0"}]}, "functionSelector": "6eee9ce4", "id": 218, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transferToZeroAddress", "nameLocation": "1674:40:0", "nodeType": "FunctionDefinition", "parameters": {"id": 181, "nodeType": "ParameterList", "parameters": [], "src": "1714:2:0"}, "returnParameters": {"id": 182, "nodeType": "ParameterList", "parameters": [], "src": "1724:0:0"}, "scope": 1131, "src": "1665:283:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 287, "nodeType": "Block", "src": "2099:514:0", "statements": [{"assignments": [224], "declarations": [{"constant": false, "id": 224, "mutability": "mutable", "name": "balance_sender", "nameLocation": "2117:14:0", "nodeType": "VariableDeclaration", "scope": 287, "src": "2109:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 223, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2109:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 230, "initialValue": {"arguments": [{"expression": {"id": 227, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2150:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 228, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2154:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "2150:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 225, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "2134:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 226, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2140:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "2134:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 229, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2134:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "2109:52:0"}, {"assignments": [232], "declarations": [{"constant": false, "id": 232, "mutability": "mutable", "name": "allowance", "nameLocation": "2179:9:0", "nodeType": "VariableDeclaration", "scope": 287, "src": "2171:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 231, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2171:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 242, "initialValue": {"arguments": [{"expression": {"id": 235, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2207:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 236, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2211:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "2207:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 239, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "2227:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 238, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2219:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 237, "name": "address", "nodeType": "ElementaryTypeName", "src": "2219:7:0", "typeDescriptions": {}}}, "id": 240, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2219:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 233, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "2191:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 234, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2197:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "2191:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 241, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2191:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "2171:62:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 250, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 246, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 244, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 224, "src": "2251:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 245, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2268:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "2251:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 249, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 247, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 232, "src": "2273:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 248, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2285:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "2273:13:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "2251:35:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 243, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "2243:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 251, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2243:44:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 252, "nodeType": "ExpressionStatement", "src": "2243:44:0"}, {"assignments": [254], "declarations": [{"constant": false, "id": 254, "mutability": "mutable", "name": "maxValue", "nameLocation": "2305:8:0", "nodeType": "VariableDeclaration", "scope": 287, "src": "2297:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 253, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2297:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 261, "initialValue": {"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 257, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 255, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 224, "src": "2316:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": {"id": 256, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 232, "src": "2334:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "2316:27:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseExpression": {"id": 259, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 224, "src": "2382:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 260, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "2316:80:0", "trueExpression": {"id": 258, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 232, "src": "2358:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "2297:99:0"}, {"assignments": [263], "declarations": [{"constant": false, "id": 263, "mutability": "mutable", "name": "r", "nameLocation": "2412:1:0", "nodeType": "VariableDeclaration", "scope": 287, "src": "2407:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 262, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2407:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 279, "initialValue": {"arguments": [{"expression": {"id": 266, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2448:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 267, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2452:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "2448:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"hexValue": "30", "id": 270, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2480: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": 269, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2472:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 268, "name": "address", "nodeType": "ElementaryTypeName", "src": "2472:7:0", "typeDescriptions": {}}}, "id": 271, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2472:10:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 277, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 272, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 220, "src": "2496:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 275, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 273, "name": "maxValue", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 254, "src": "2505:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 274, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2516:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "2505:12:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 276, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "2504:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "2496:22:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 264, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "2416:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 265, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2422:12:0", "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1438, "src": "2416:18: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": 278, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2416:112:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "2407:121:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 283, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 281, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 263, "src": "2552:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "66616c7365", "id": 282, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2557:5:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}, "src": "2552:10:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "5375636365737366756c207472616e7366657246726f6d20746f2061646472657373207a65726f", "id": 284, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2564:41:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_c13cd6c9a8c081656d2916476c4fdf5563211a1da2623f6d9163f941dfdac645", "typeString": "literal_string \"Successful transferFrom to address zero\""}, "value": "Successful transferFrom to address zero"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_c13cd6c9a8c081656d2916476c4fdf5563211a1da2623f6d9163f941dfdac645", "typeString": "literal_string \"Successful transferFrom to address zero\""}], "id": 280, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "2538:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 285, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2538:68:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 286, "nodeType": "ExpressionStatement", "src": "2538:68:0"}]}, "functionSelector": "2edf6187", "id": 288, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transferFromToZeroAddress", "nameLocation": "2018:44:0", "nodeType": "FunctionDefinition", "parameters": {"id": 221, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 220, "mutability": "mutable", "name": "value", "nameLocation": "2080:5:0", "nodeType": "VariableDeclaration", "scope": 288, "src": "2072:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 219, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2072:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "2062:29:0"}, "returnParameters": {"id": 222, "nodeType": "ParameterList", "parameters": [], "src": "2099:0:0"}, "scope": 1131, "src": "2009:604:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 365, "nodeType": "Block", "src": "2736:646:0", "statements": [{"assignments": [294], "declarations": [{"constant": false, "id": 294, "mutability": "mutable", "name": "balance_sender", "nameLocation": "2754:14:0", "nodeType": "VariableDeclaration", "scope": 365, "src": "2746:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 293, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2746:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 300, "initialValue": {"arguments": [{"expression": {"id": 297, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2787:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 298, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2791:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "2787:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 295, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "2771:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 296, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2777:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "2771:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 299, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2771:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "2746:52:0"}, {"assignments": [302], "declarations": [{"constant": false, "id": 302, "mutability": "mutable", "name": "allowance", "nameLocation": "2816:9:0", "nodeType": "VariableDeclaration", "scope": 365, "src": "2808:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 301, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2808:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 312, "initialValue": {"arguments": [{"expression": {"id": 305, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "2844:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 306, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2848:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "2844:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 309, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "2864:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 308, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2856:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 307, "name": "address", "nodeType": "ElementaryTypeName", "src": "2856:7:0", "typeDescriptions": {}}}, "id": 310, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2856:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 303, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "2828:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 304, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2834:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "2828:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 311, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2828:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "2808:62:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 320, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 316, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 314, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 294, "src": "2888:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 315, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2905:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "2888:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 319, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 317, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 302, "src": "2910:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 318, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2922:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "2910:13:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "2888:35:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 313, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "2880:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 321, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2880:44:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 322, "nodeType": "ExpressionStatement", "src": "2880:44:0"}, {"assignments": [324], "declarations": [{"constant": false, "id": 324, "mutability": "mutable", "name": "maxValue", "nameLocation": "2942:8:0", "nodeType": "VariableDeclaration", "scope": 365, "src": "2934:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 323, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2934:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 331, "initialValue": {"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 327, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 325, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 294, "src": "2953:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": {"id": 326, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 302, "src": "2971:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "2953:27:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseExpression": {"id": 329, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 294, "src": "3019:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 330, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "2953:80:0", "trueExpression": {"id": 328, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 302, "src": "2995:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "2934:99:0"}, {"assignments": [333], "declarations": [{"constant": false, "id": 333, "mutability": "mutable", "name": "r", "nameLocation": "3049:1:0", "nodeType": "VariableDeclaration", "scope": 365, "src": "3044:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 332, "name": "bool", "nodeType": "ElementaryTypeName", "src": "3044:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 347, "initialValue": {"arguments": [{"expression": {"id": 336, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "3085:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 337, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3089:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "3085:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"expression": {"id": 338, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "3109:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 339, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3113:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "3109:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 345, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 340, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 290, "src": "3133:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 343, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 341, "name": "maxValue", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 324, "src": "3142:8:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 342, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3153:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "3142:12:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 344, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "3141:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "3133:22:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 334, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "3053:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 335, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3059:12:0", "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1438, "src": "3053:18: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": 346, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3053:112:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "3044:121:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 351, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 349, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 333, "src": "3189:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 350, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "3194:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "3189:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "4661696c65642073656c66207472616e7366657246726f6d", "id": 352, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3200:26:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_9cc7d8a733c4f125d07ea42c0801b58cf274c6c8f0f58a89b65080748f240279", "typeString": "literal_string \"Failed self transferFrom\""}, "value": "Failed self transferFrom"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_9cc7d8a733c4f125d07ea42c0801b58cf274c6c8f0f58a89b65080748f240279", "typeString": "literal_string \"Failed self transferFrom\""}], "id": 348, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "3175:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 353, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3175:52:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 354, "nodeType": "ExpressionStatement", "src": "3175:52:0"}, {"expression": {"arguments": [{"id": 356, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 294, "src": "3259:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"arguments": [{"expression": {"id": 359, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "3303:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 360, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3307:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "3303:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 357, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "3287:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 358, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3293:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "3287:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 361, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3287:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "53656c66207472616e7366657246726f6d20627265616b73206163636f756e74696e67", "id": 362, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3328:37:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_e6ef5170d9b502ee5cee11af7f2613a7aa058a19e2fd97a2e9ee35ab8e9a7d43", "typeString": "literal_string \"Self transferFrom breaks accounting\""}, "value": "Self transferFrom breaks accounting"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_e6ef5170d9b502ee5cee11af7f2613a7aa058a19e2fd97a2e9ee35ab8e9a7d43", "typeString": "literal_string \"Self transferFrom breaks accounting\""}], "id": 355, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "3237:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 363, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3237:138:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 364, "nodeType": "ExpressionStatement", "src": "3237:138:0"}]}, "functionSelector": "fd8593f9", "id": 366, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_selfTransferFrom", "nameLocation": "2678:35:0", "nodeType": "FunctionDefinition", "parameters": {"id": 291, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 290, "mutability": "mutable", "name": "value", "nameLocation": "2722:5:0", "nodeType": "VariableDeclaration", "scope": 366, "src": "2714:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 289, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2714:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "2713:15:0"}, "returnParameters": {"id": 292, "nodeType": "ParameterList", "parameters": [], "src": "2736:0:0"}, "scope": 1131, "src": "2669:713:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 422, "nodeType": "Block", "src": "3501:393:0", "statements": [{"assignments": [372], "declarations": [{"constant": false, "id": 372, "mutability": "mutable", "name": "balance_sender", "nameLocation": "3519:14:0", "nodeType": "VariableDeclaration", "scope": 422, "src": "3511:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 371, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3511:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 380, "initialValue": {"arguments": [{"arguments": [{"id": 377, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "3560:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 376, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3552:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 375, "name": "address", "nodeType": "ElementaryTypeName", "src": "3552:7:0", "typeDescriptions": {}}}, "id": 378, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3552:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 373, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "3536:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 374, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3542:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "3536:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 379, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3536:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "3511:55:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 384, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 382, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 372, "src": "3584:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 383, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3601:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "3584:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 381, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "3576:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 385, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3576:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 386, "nodeType": "ExpressionStatement", "src": "3576:27:0"}, {"assignments": [388], "declarations": [{"constant": false, "id": 388, "mutability": "mutable", "name": "r", "nameLocation": "3619:1:0", "nodeType": "VariableDeclaration", "scope": 422, "src": "3614:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 387, "name": "bool", "nodeType": "ElementaryTypeName", "src": "3614:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 402, "initialValue": {"arguments": [{"arguments": [{"id": 393, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "3646:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 392, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3638:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 391, "name": "address", "nodeType": "ElementaryTypeName", "src": "3638:7:0", "typeDescriptions": {}}}, "id": 394, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3638:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 400, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 395, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 368, "src": "3653:5:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 398, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 396, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 372, "src": "3662:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 397, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3679:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "3662:18:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 399, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "3661:20:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "3653:28:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 389, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "3623:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 390, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3629:8:0", "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 1406, "src": "3623:14:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 401, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3623:59:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "3614:68:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 406, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 404, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 388, "src": "3706:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 405, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "3711:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "3706:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "4661696c65642073656c66207472616e73666572", "id": 407, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3717:22:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_203b8d2c9206f4d321bf3603e1a047a66da67e4933f4c9da17d78418b70c0086", "typeString": "literal_string \"Failed self transfer\""}, "value": "Failed self transfer"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_203b8d2c9206f4d321bf3603e1a047a66da67e4933f4c9da17d78418b70c0086", "typeString": "literal_string \"Failed self transfer\""}], "id": 403, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "3692:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 408, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3692:48:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 409, "nodeType": "ExpressionStatement", "src": "3692:48:0"}, {"expression": {"arguments": [{"id": 411, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 372, "src": "3772:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"arguments": [{"arguments": [{"id": 416, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "3824:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 415, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3816:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 414, "name": "address", "nodeType": "ElementaryTypeName", "src": "3816:7:0", "typeDescriptions": {}}}, "id": 417, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3816:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 412, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "3800:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 413, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3806:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "3800:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 418, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3800:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "53656c66207472616e7366657220627265616b73206163636f756e74696e67", "id": 419, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3844:33:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_50f8702111eb5c314e708f2e293f4faad06619956962f7063d5c98e220d6955f", "typeString": "literal_string \"Self transfer breaks accounting\""}, "value": "Self transfer breaks accounting"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_50f8702111eb5c314e708f2e293f4faad06619956962f7063d5c98e220d6955f", "typeString": "literal_string \"Self transfer breaks accounting\""}], "id": 410, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "3750:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 420, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3750:137:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 421, "nodeType": "ExpressionStatement", "src": "3750:137:0"}]}, "functionSelector": "be61b745", "id": 423, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_selfTransfer", "nameLocation": "3447:31:0", "nodeType": "FunctionDefinition", "parameters": {"id": 369, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 368, "mutability": "mutable", "name": "value", "nameLocation": "3487:5:0", "nodeType": "VariableDeclaration", "scope": 423, "src": "3479:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 367, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3479:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "3478:15:0"}, "returnParameters": {"id": 370, "nodeType": "ParameterList", "parameters": [], "src": "3501:0:0"}, "scope": 1131, "src": "3438:456:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 503, "nodeType": "Block", "src": "4064:812:0", "statements": [{"assignments": [429], "declarations": [{"constant": false, "id": 429, "mutability": "mutable", "name": "balance_sender", "nameLocation": "4082:14:0", "nodeType": "VariableDeclaration", "scope": 503, "src": "4074:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 428, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4074:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 435, "initialValue": {"arguments": [{"expression": {"id": 432, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4115:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 433, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4119:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "4115:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 430, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "4099:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 431, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4105:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "4099:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 434, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4099:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "4074:52:0"}, {"assignments": [437], "declarations": [{"constant": false, "id": 437, "mutability": "mutable", "name": "balance_receiver", "nameLocation": "4144:16:0", "nodeType": "VariableDeclaration", "scope": 503, "src": "4136:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 436, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4136:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 442, "initialValue": {"arguments": [{"id": 440, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 425, "src": "4179:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 438, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "4163:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 439, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4169:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "4163:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 441, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4163:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "4136:50:0"}, {"assignments": [444], "declarations": [{"constant": false, "id": 444, "mutability": "mutable", "name": "allowance", "nameLocation": "4204:9:0", "nodeType": "VariableDeclaration", "scope": 503, "src": "4196:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 443, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4196:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 454, "initialValue": {"arguments": [{"expression": {"id": 447, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4232:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 448, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4236:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "4232:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 451, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "4252:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 450, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4244:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 449, "name": "address", "nodeType": "ElementaryTypeName", "src": "4244:7:0", "typeDescriptions": {}}}, "id": 452, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4244:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 445, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "4216:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 446, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4222:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "4216:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 453, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4216:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "4196:62:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 462, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 458, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 456, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 429, "src": "4276:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 457, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4293:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "4276:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 461, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 459, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 444, "src": "4298:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 460, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 429, "src": "4310:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "4298:26:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "4276:48:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 455, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "4268:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 463, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4268:57:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 464, "nodeType": "ExpressionStatement", "src": "4268:57:0"}, {"assignments": [466], "declarations": [{"constant": false, "id": 466, "mutability": "mutable", "name": "r", "nameLocation": "4341:1:0", "nodeType": "VariableDeclaration", "scope": 503, "src": "4336:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 465, "name": "bool", "nodeType": "ElementaryTypeName", "src": "4336:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 476, "initialValue": {"arguments": [{"expression": {"id": 469, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4364:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 470, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4368:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "4364:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 471, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 425, "src": "4376:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 474, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 472, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 429, "src": "4384:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 473, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4401:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "4384:18:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 467, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "4345:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 468, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4351:12:0", "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1438, "src": "4345:18: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": 475, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4345:58:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "4336:67:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 480, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 478, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 466, "src": "4440:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "66616c7365", "id": 479, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "4445:5:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}, "src": "4440:10:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "5375636365737366756c207472616e7366657246726f6d20666f72206d6f7265207468616e206163636f756e742062616c616e6365", "id": 481, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4464:55:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_12ddc4c95aa497b51895a755d4d8b0acc6b33a5329e40931b8c326417d76f074", "typeString": "literal_string \"Successful transferFrom for more than account balance\""}, "value": "Successful transferFrom for more than account balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_12ddc4c95aa497b51895a755d4d8b0acc6b33a5329e40931b8c326417d76f074", "typeString": "literal_string \"Successful transferFrom for more than account balance\""}], "id": 477, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "4413:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 482, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4413:116:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 483, "nodeType": "ExpressionStatement", "src": "4413:116:0"}, {"expression": {"arguments": [{"arguments": [{"expression": {"id": 487, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "4577:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 488, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4581:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "4577:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 485, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "4561:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 486, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4567:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "4561:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 489, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4561:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 490, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 429, "src": "4602:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5472616e7366657246726f6d20666f72206d6f7265207468616e2062616c616e6365206d6f64696669656420736f757263652062616c616e6365", "id": 491, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4630:60:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_b94fd449d2a6ec1c7602d10b60585c3328876d2803977728c362b6bf1b601e5e", "typeString": "literal_string \"TransferFrom for more than balance modified source balance\""}, "value": "TransferFrom for more than balance modified source balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_b94fd449d2a6ec1c7602d10b60585c3328876d2803977728c362b6bf1b601e5e", "typeString": "literal_string \"TransferFrom for more than balance modified source balance\""}], "id": 484, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "4539:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 492, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4539:161:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 493, "nodeType": "ExpressionStatement", "src": "4539:161:0"}, {"expression": {"arguments": [{"arguments": [{"id": 497, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 425, "src": "4748:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 495, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "4732:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 496, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4738:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "4732:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 498, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4732:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 499, "name": "balance_receiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 437, "src": "4769:16:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5472616e7366657246726f6d20666f72206d6f7265207468616e2062616c616e6365206d6f646966696564207461726765742062616c616e6365", "id": 500, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4799:60:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_705f9111e5b540a13a06511dabf64f091748dc955032b620b26c0131c05922fe", "typeString": "literal_string \"TransferFrom for more than balance modified target balance\""}, "value": "TransferFrom for more than balance modified target balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_705f9111e5b540a13a06511dabf64f091748dc955032b620b26c0131c05922fe", "typeString": "literal_string \"TransferFrom for more than balance modified target balance\""}], "id": 494, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "4710:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 501, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4710:159:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 502, "nodeType": "ExpressionStatement", "src": "4710:159:0"}]}, "functionSelector": "8c186718", "id": 504, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transferFromMoreThanBalance", "nameLocation": "3980:46:0", "nodeType": "FunctionDefinition", "parameters": {"id": 426, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 425, "mutability": "mutable", "name": "target", "nameLocation": "4044:6:0", "nodeType": "VariableDeclaration", "scope": 504, "src": "4036:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 424, "name": "address", "nodeType": "ElementaryTypeName", "src": "4036:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "4026:30:0"}, "returnParameters": {"id": 427, "nodeType": "ParameterList", "parameters": [], "src": "4064:0:0"}, "scope": 1131, "src": "3971:905:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 570, "nodeType": "Block", "src": "5028:688:0", "statements": [{"assignments": [510], "declarations": [{"constant": false, "id": 510, "mutability": "mutable", "name": "balance_sender", "nameLocation": "5046:14:0", "nodeType": "VariableDeclaration", "scope": 570, "src": "5038:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 509, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5038:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 518, "initialValue": {"arguments": [{"arguments": [{"id": 515, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "5087:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 514, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5079:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 513, "name": "address", "nodeType": "ElementaryTypeName", "src": "5079:7:0", "typeDescriptions": {}}}, "id": 516, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5079:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 511, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "5063:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 512, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5069:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "5063:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 517, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5063:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "5038:55:0"}, {"assignments": [520], "declarations": [{"constant": false, "id": 520, "mutability": "mutable", "name": "balance_receiver", "nameLocation": "5111:16:0", "nodeType": "VariableDeclaration", "scope": 570, "src": "5103:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 519, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5103:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 525, "initialValue": {"arguments": [{"id": 523, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 506, "src": "5146:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 521, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "5130:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 522, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5136:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "5130:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 524, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5130:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "5103:50:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 529, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 527, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 510, "src": "5171:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 528, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5188:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "5171:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 526, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "5163:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 530, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5163:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 531, "nodeType": "ExpressionStatement", "src": "5163:27:0"}, {"assignments": [533], "declarations": [{"constant": false, "id": 533, "mutability": "mutable", "name": "r", "nameLocation": "5206:1:0", "nodeType": "VariableDeclaration", "scope": 570, "src": "5201:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 532, "name": "bool", "nodeType": "ElementaryTypeName", "src": "5201:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 541, "initialValue": {"arguments": [{"id": 536, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 506, "src": "5225:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 539, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 537, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 510, "src": "5233:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 538, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5250:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "5233:18:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 534, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "5210:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 535, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5216:8:0", "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 1406, "src": "5210:14:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 540, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5210:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "5201:51:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 545, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 543, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 533, "src": "5289:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "66616c7365", "id": 544, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "5294:5:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}, "src": "5289:10:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "5375636365737366756c207472616e7366657220666f72206d6f7265207468616e206163636f756e742062616c616e6365", "id": 546, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5313:51:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_40d7e67dc59bdf8af7dd54480a25a09ce1fd4b4825a84158d6cc5f4660e04288", "typeString": "literal_string \"Successful transfer for more than account balance\""}, "value": "Successful transfer for more than account balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_40d7e67dc59bdf8af7dd54480a25a09ce1fd4b4825a84158d6cc5f4660e04288", "typeString": "literal_string \"Successful transfer for more than account balance\""}], "id": 542, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "5262:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 547, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5262:112:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 548, "nodeType": "ExpressionStatement", "src": "5262:112:0"}, {"expression": {"arguments": [{"arguments": [{"arguments": [{"id": 554, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "5430:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 553, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5422:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 552, "name": "address", "nodeType": "ElementaryTypeName", "src": "5422:7:0", "typeDescriptions": {}}}, "id": 555, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5422:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 550, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "5406:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 551, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5412:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "5406:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 556, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5406:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 557, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 510, "src": "5450:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5472616e7366657220666f72206d6f7265207468616e2062616c616e6365206d6f64696669656420736f757263652062616c616e6365", "id": 558, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5478:56:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_ad9fd87b9d1bf38692289811c9b20b5bc1739145770a010036fb33d7ae1196e3", "typeString": "literal_string \"Transfer for more than balance modified source balance\""}, "value": "Transfer for more than balance modified source balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_ad9fd87b9d1bf38692289811c9b20b5bc1739145770a010036fb33d7ae1196e3", "typeString": "literal_string \"Transfer for more than balance modified source balance\""}], "id": 549, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "5384:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 559, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5384:160:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 560, "nodeType": "ExpressionStatement", "src": "5384:160:0"}, {"expression": {"arguments": [{"arguments": [{"id": 564, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 506, "src": "5592:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 562, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "5576:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 563, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5582:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "5576:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 565, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5576:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 566, "name": "balance_receiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 520, "src": "5613:16:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5472616e7366657220666f72206d6f7265207468616e2062616c616e6365206d6f646966696564207461726765742062616c616e6365", "id": 567, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5643:56:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_0320f4f8cbb25868baccd458591791d386adef59f0c76f7c42aa00b959b3e313", "typeString": "literal_string \"Transfer for more than balance modified target balance\""}, "value": "Transfer for more than balance modified target balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_0320f4f8cbb25868baccd458591791d386adef59f0c76f7c42aa00b959b3e313", "typeString": "literal_string \"Transfer for more than balance modified target balance\""}], "id": 561, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "5554:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 568, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5554:155:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 569, "nodeType": "ExpressionStatement", "src": "5554:155:0"}]}, "functionSelector": "6706ede0", "id": 571, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transferMoreThanBalance", "nameLocation": "4962:42:0", "nodeType": "FunctionDefinition", "parameters": {"id": 507, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 506, "mutability": "mutable", "name": "target", "nameLocation": "5013:6:0", "nodeType": "VariableDeclaration", "scope": 571, "src": "5005:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 505, "name": "address", "nodeType": "ElementaryTypeName", "src": "5005:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "5004:16:0"}, "returnParameters": {"id": 508, "nodeType": "ParameterList", "parameters": [], "src": "5028:0:0"}, "scope": 1131, "src": "4953:763:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 635, "nodeType": "Block", "src": "5849:594:0", "statements": [{"assignments": [577], "declarations": [{"constant": false, "id": 577, "mutability": "mutable", "name": "balance_sender", "nameLocation": "5867:14:0", "nodeType": "VariableDeclaration", "scope": 635, "src": "5859:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 576, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5859:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 585, "initialValue": {"arguments": [{"arguments": [{"id": 582, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "5908:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 581, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5900:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 580, "name": "address", "nodeType": "ElementaryTypeName", "src": "5900:7:0", "typeDescriptions": {}}}, "id": 583, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5900:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 578, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "5884:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 579, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5890:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "5884:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 584, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5884:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "5859:55:0"}, {"assignments": [587], "declarations": [{"constant": false, "id": 587, "mutability": "mutable", "name": "balance_receiver", "nameLocation": "5932:16:0", "nodeType": "VariableDeclaration", "scope": 635, "src": "5924:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 586, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5924:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 592, "initialValue": {"arguments": [{"id": 590, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 573, "src": "5967:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 588, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "5951:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 589, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5957:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "5951:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 591, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5951:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "5924:50:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 596, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 594, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 577, "src": "5992:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 595, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6009:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "5992:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 593, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "5984:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 597, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5984:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 598, "nodeType": "ExpressionStatement", "src": "5984:27:0"}, {"assignments": [600], "declarations": [{"constant": false, "id": 600, "mutability": "mutable", "name": "r", "nameLocation": "6027:1:0", "nodeType": "VariableDeclaration", "scope": 635, "src": "6022:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 599, "name": "bool", "nodeType": "ElementaryTypeName", "src": "6022:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 606, "initialValue": {"arguments": [{"id": 603, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 573, "src": "6046:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"hexValue": "30", "id": 604, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6054:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}], "expression": {"id": 601, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6031:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 602, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6037:8:0", "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 1406, "src": "6031:14:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 605, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6031:25:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "6022:34:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 610, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 608, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 600, "src": "6080:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 609, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "6085:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "6080:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "5a65726f20616d6f756e74207472616e73666572206661696c6564", "id": 611, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6091:29:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_bfc7d7846be99831830f9cf0ebaa4b6f95797b4bf573d8bf4bd03ae5adde7f07", "typeString": "literal_string \"Zero amount transfer failed\""}, "value": "Zero amount transfer failed"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_bfc7d7846be99831830f9cf0ebaa4b6f95797b4bf573d8bf4bd03ae5adde7f07", "typeString": "literal_string \"Zero amount transfer failed\""}], "id": 607, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "6066:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 612, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6066:55:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 613, "nodeType": "ExpressionStatement", "src": "6066:55:0"}, {"expression": {"arguments": [{"arguments": [{"arguments": [{"id": 619, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "6177:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 618, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6169:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 617, "name": "address", "nodeType": "ElementaryTypeName", "src": "6169:7:0", "typeDescriptions": {}}}, "id": 620, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6169:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 615, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6153:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 616, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6159:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "6153:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 621, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6153:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 622, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 577, "src": "6197:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5a65726f20616d6f756e74207472616e73666572206d6f64696669656420736f757263652062616c616e6365", "id": 623, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6225:46:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_6e7825686f55fa09db57dfc64880c4b758090e929bb28222d20ba65a67ccabc0", "typeString": "literal_string \"Zero amount transfer modified source balance\""}, "value": "Zero amount transfer modified source balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_6e7825686f55fa09db57dfc64880c4b758090e929bb28222d20ba65a67ccabc0", "typeString": "literal_string \"Zero amount transfer modified source balance\""}], "id": 614, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "6131:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 624, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6131:150:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 625, "nodeType": "ExpressionStatement", "src": "6131:150:0"}, {"expression": {"arguments": [{"arguments": [{"id": 629, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 573, "src": "6329:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 627, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6313:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 628, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6319:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "6313:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 630, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6313:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 631, "name": "balance_receiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 587, "src": "6350:16:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5a65726f20616d6f756e74207472616e73666572206d6f646966696564207461726765742062616c616e6365", "id": 632, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6380:46:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_11074db38b932ee496eab945505435c22b2dd22de4d49acb0aaae1712fb04874", "typeString": "literal_string \"Zero amount transfer modified target balance\""}, "value": "Zero amount transfer modified target balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_11074db38b932ee496eab945505435c22b2dd22de4d49acb0aaae1712fb04874", "typeString": "literal_string \"Zero amount transfer modified target balance\""}], "id": 626, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "6291:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 633, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6291:145:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 634, "nodeType": "ExpressionStatement", "src": "6291:145:0"}]}, "functionSelector": "ecb9d4aa", "id": 636, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transferZeroAmount", "nameLocation": "5788:37:0", "nodeType": "FunctionDefinition", "parameters": {"id": 574, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 573, "mutability": "mutable", "name": "target", "nameLocation": "5834:6:0", "nodeType": "VariableDeclaration", "scope": 636, "src": "5826:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 572, "name": "address", "nodeType": "ElementaryTypeName", "src": "5826:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "5825:16:0"}, "returnParameters": {"id": 575, "nodeType": "ParameterList", "parameters": [], "src": "5849:0:0"}, "scope": 1131, "src": "5779:664:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 714, "nodeType": "Block", "src": "6580:705:0", "statements": [{"assignments": [642], "declarations": [{"constant": false, "id": 642, "mutability": "mutable", "name": "balance_sender", "nameLocation": "6598:14:0", "nodeType": "VariableDeclaration", "scope": 714, "src": "6590:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 641, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6590:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 648, "initialValue": {"arguments": [{"expression": {"id": 645, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6631:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 646, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6635:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "6631:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 643, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6615:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 644, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6621:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "6615:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 647, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6615:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "6590:52:0"}, {"assignments": [650], "declarations": [{"constant": false, "id": 650, "mutability": "mutable", "name": "balance_receiver", "nameLocation": "6660:16:0", "nodeType": "VariableDeclaration", "scope": 714, "src": "6652:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 649, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6652:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 655, "initialValue": {"arguments": [{"id": 653, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 638, "src": "6695:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 651, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6679:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 652, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6685:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "6679:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 654, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6679:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "6652:50:0"}, {"assignments": [657], "declarations": [{"constant": false, "id": 657, "mutability": "mutable", "name": "allowance", "nameLocation": "6720:9:0", "nodeType": "VariableDeclaration", "scope": 714, "src": "6712:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 656, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6712:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 667, "initialValue": {"arguments": [{"expression": {"id": 660, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6748:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 661, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6752:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "6748:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 664, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "6768:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 663, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6760:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 662, "name": "address", "nodeType": "ElementaryTypeName", "src": "6760:7:0", "typeDescriptions": {}}}, "id": 665, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6760:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 658, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6732:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 659, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6738:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "6732:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 666, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6732:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "6712:62:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 675, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 671, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 669, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 642, "src": "6792:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 670, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6809:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "6792:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 674, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 672, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 657, "src": "6814:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 673, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6826:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "6814:13:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "6792:35:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 668, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "6784:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 676, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6784:44:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 677, "nodeType": "ExpressionStatement", "src": "6784:44:0"}, {"assignments": [679], "declarations": [{"constant": false, "id": 679, "mutability": "mutable", "name": "r", "nameLocation": "6844:1:0", "nodeType": "VariableDeclaration", "scope": 714, "src": "6839:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 678, "name": "bool", "nodeType": "ElementaryTypeName", "src": "6839:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 687, "initialValue": {"arguments": [{"expression": {"id": 682, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "6867:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 683, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6871:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "6867:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 684, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 638, "src": "6879:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"hexValue": "30", "id": 685, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6887:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}], "expression": {"id": 680, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6848:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 681, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6854:12:0", "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1438, "src": "6848:18: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": 686, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6848:41:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "6839:50:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 691, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 689, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 679, "src": "6913:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 690, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "6918:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "6913:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "5a65726f20616d6f756e74207472616e7366657246726f6d206661696c6564", "id": 692, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6924:33:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_74ad7b2684c30a83b97c861b3065f1017e668f6d068909836cb599821683e9b1", "typeString": "literal_string \"Zero amount transferFrom failed\""}, "value": "Zero amount transferFrom failed"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_74ad7b2684c30a83b97c861b3065f1017e668f6d068909836cb599821683e9b1", "typeString": "literal_string \"Zero amount transferFrom failed\""}], "id": 688, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "6899:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 693, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6899:59:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 694, "nodeType": "ExpressionStatement", "src": "6899:59:0"}, {"expression": {"arguments": [{"arguments": [{"expression": {"id": 698, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "7006:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 699, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7010:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "7006:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 696, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "6990:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 697, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6996:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "6990:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 700, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6990:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 701, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 642, "src": "7031:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5a65726f20616d6f756e74207472616e7366657246726f6d206d6f64696669656420736f757263652062616c616e6365", "id": 702, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7059:50:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_4ffc469e8d30fa59088d89d46e012574733b2ba669c1890db4b9b17a05c46a6f", "typeString": "literal_string \"Zero amount transferFrom modified source balance\""}, "value": "Zero amount transferFrom modified source balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_4ffc469e8d30fa59088d89d46e012574733b2ba669c1890db4b9b17a05c46a6f", "typeString": "literal_string \"Zero amount transferFrom modified source balance\""}], "id": 695, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "6968:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 703, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6968:151:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 704, "nodeType": "ExpressionStatement", "src": "6968:151:0"}, {"expression": {"arguments": [{"arguments": [{"id": 708, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 638, "src": "7167:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 706, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "7151:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 707, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7157:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "7151:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 709, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7151:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 710, "name": "balance_receiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 650, "src": "7188:16:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "5a65726f20616d6f756e74207472616e7366657246726f6d206d6f646966696564207461726765742062616c616e6365", "id": 711, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7218:50:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_c56dad9c810c9881b74941429208cfe72a94e8c2b62d70bf7f694c3a1dcbdc78", "typeString": "literal_string \"Zero amount transferFrom modified target balance\""}, "value": "Zero amount transferFrom modified target balance"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_c56dad9c810c9881b74941429208cfe72a94e8c2b62d70bf7f694c3a1dcbdc78", "typeString": "literal_string \"Zero amount transferFrom modified target balance\""}], "id": 705, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "7129:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 712, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7129:149:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 713, "nodeType": "ExpressionStatement", "src": "7129:149:0"}]}, "functionSelector": "cdbebc51", "id": 715, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transferFromZeroAmount", "nameLocation": "6515:41:0", "nodeType": "FunctionDefinition", "parameters": {"id": 639, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 638, "mutability": "mutable", "name": "target", "nameLocation": "6565:6:0", "nodeType": "VariableDeclaration", "scope": 715, "src": "6557:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 637, "name": "address", "nodeType": "ElementaryTypeName", "src": "6557:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "6556:16:0"}, "returnParameters": {"id": 640, "nodeType": "ParameterList", "parameters": [], "src": "6580:0:0"}, "scope": 1131, "src": "6506:779:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 803, "nodeType": "Block", "src": "7441:717:0", "statements": [{"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 728, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 723, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 717, "src": "7459:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"arguments": [{"id": 726, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "7477:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 725, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7469:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 724, "name": "address", "nodeType": "ElementaryTypeName", "src": "7469:7:0", "typeDescriptions": {}}}, "id": 727, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7469:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "7459:23:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 722, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "7451:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 729, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7451:32:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 730, "nodeType": "ExpressionStatement", "src": "7451:32:0"}, {"assignments": [732], "declarations": [{"constant": false, "id": 732, "mutability": "mutable", "name": "balance_sender", "nameLocation": "7501:14:0", "nodeType": "VariableDeclaration", "scope": 803, "src": "7493:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 731, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7493:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 740, "initialValue": {"arguments": [{"arguments": [{"id": 737, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "7542:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 736, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7534:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 735, "name": "address", "nodeType": "ElementaryTypeName", "src": "7534:7:0", "typeDescriptions": {}}}, "id": 738, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7534:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 733, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "7518:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 734, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7524:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "7518:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 739, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7518:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "7493:55:0"}, {"assignments": [742], "declarations": [{"constant": false, "id": 742, "mutability": "mutable", "name": "balance_receiver", "nameLocation": "7566:16:0", "nodeType": "VariableDeclaration", "scope": 803, "src": "7558:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 741, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7558:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 747, "initialValue": {"arguments": [{"id": 745, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 717, "src": "7601:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 743, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "7585:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 744, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7591:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "7585:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 746, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7585:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "7558:50:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 751, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 749, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 732, "src": "7626:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "32", "id": 750, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "7643:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "src": "7626:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 748, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "7618:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 752, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7618:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 753, "nodeType": "ExpressionStatement", "src": "7618:27:0"}, {"assignments": [755], "declarations": [{"constant": false, "id": 755, "mutability": "mutable", "name": "transfer_value", "nameLocation": "7663:14:0", "nodeType": "VariableDeclaration", "scope": 803, "src": "7655:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 754, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7655:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 762, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 761, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 758, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 756, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 719, "src": "7681:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"id": 757, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 732, "src": "7690:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "7681:23:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 759, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "7680:25:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 760, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "7708:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "7680:29:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "7655:54:0"}, {"assignments": [764], "declarations": [{"constant": false, "id": 764, "mutability": "mutable", "name": "r", "nameLocation": "7725:1:0", "nodeType": "VariableDeclaration", "scope": 803, "src": "7720:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 763, "name": "bool", "nodeType": "ElementaryTypeName", "src": "7720:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 770, "initialValue": {"arguments": [{"id": 767, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 717, "src": "7744:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 768, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 755, "src": "7752:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 765, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "7729:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 766, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7735:8:0", "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": 1406, "src": "7729:14:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 769, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7729:38:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "7720:47:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 774, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 772, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 764, "src": "7791:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 773, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "7796:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "7791:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "7472616e73666572206661696c6564", "id": 775, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7802:17:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_df1797085e2da014ef9392ee25ab0802d6ce132451397172f17fd86110e2e02b", "typeString": "literal_string \"transfer failed\""}, "value": "transfer failed"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_df1797085e2da014ef9392ee25ab0802d6ce132451397172f17fd86110e2e02b", "typeString": "literal_string \"transfer failed\""}], "id": 771, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "7777:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 776, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7777:43:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 777, "nodeType": "ExpressionStatement", "src": "7777:43:0"}, {"expression": {"arguments": [{"arguments": [{"arguments": [{"id": 783, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "7876:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 782, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7868:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 781, "name": "address", "nodeType": "ElementaryTypeName", "src": "7868:7:0", "typeDescriptions": {}}}, "id": 784, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7868:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 779, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "7852:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 780, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7858:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "7852:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 785, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7852:30:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 788, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 786, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 732, "src": "7896:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 787, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 755, "src": "7913:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "7896:31:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "57726f6e6720736f757263652062616c616e6365206166746572207472616e73666572", "id": 789, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7941:37:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_7ce124ac73b9f6a6c1c219234d118bbd125d2f3578904c511230f33ef8550017", "typeString": "literal_string \"Wrong source balance after transfer\""}, "value": "Wrong source balance after transfer"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_7ce124ac73b9f6a6c1c219234d118bbd125d2f3578904c511230f33ef8550017", "typeString": "literal_string \"Wrong source balance after transfer\""}], "id": 778, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "7830:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 790, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7830:158:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 791, "nodeType": "ExpressionStatement", "src": "7830:158:0"}, {"expression": {"arguments": [{"arguments": [{"id": 795, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 717, "src": "8036:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 793, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "8020:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 794, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8026:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "8020:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 796, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8020:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 799, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 797, "name": "balance_receiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 742, "src": "8057:16:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 798, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 755, "src": "8076:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8057:33:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "57726f6e67207461726765742062616c616e6365206166746572207472616e73666572", "id": 800, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8104:37:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_df344c7b0d5e9a0d7322b07c661c4d82b5977664fd8d80b8bb34466f472706a5", "typeString": "literal_string \"Wrong target balance after transfer\""}, "value": "Wrong target balance after transfer"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_df344c7b0d5e9a0d7322b07c661c4d82b5977664fd8d80b8bb34466f472706a5", "typeString": "literal_string \"Wrong target balance after transfer\""}], "id": 792, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "7998:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 801, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7998:153:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 802, "nodeType": "ExpressionStatement", "src": "7998:153:0"}]}, "functionSelector": "a0662c50", "id": 804, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transfer", "nameLocation": "7352:27:0", "nodeType": "FunctionDefinition", "parameters": {"id": 720, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 717, "mutability": "mutable", "name": "target", "nameLocation": "7397:6:0", "nodeType": "VariableDeclaration", "scope": 804, "src": "7389:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 716, "name": "address", "nodeType": "ElementaryTypeName", "src": "7389:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 719, "mutability": "mutable", "name": "amount", "nameLocation": "7421:6:0", "nodeType": "VariableDeclaration", "scope": 804, "src": "7413:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 718, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7413:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "7379:54:0"}, "returnParameters": {"id": 721, "nodeType": "ParameterList", "parameters": [], "src": "7441:0:0"}, "scope": 1131, "src": "7343:815:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 913, "nodeType": "Block", "src": "8318:876:0", "statements": [{"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 817, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 812, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 806, "src": "8336:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"arguments": [{"id": 815, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "8354:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 814, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8346:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 813, "name": "address", "nodeType": "ElementaryTypeName", "src": "8346:7:0", "typeDescriptions": {}}}, "id": 816, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8346:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "8336:23:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 811, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "8328:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 818, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8328:32:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 819, "nodeType": "ExpressionStatement", "src": "8328:32:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 824, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 821, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 806, "src": "8378:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"expression": {"id": 822, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8388:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 823, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8392:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "8388:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "8378:20:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 820, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "8370:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 825, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8370:29:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 826, "nodeType": "ExpressionStatement", "src": "8370:29:0"}, {"assignments": [828], "declarations": [{"constant": false, "id": 828, "mutability": "mutable", "name": "balance_sender", "nameLocation": "8417:14:0", "nodeType": "VariableDeclaration", "scope": 913, "src": "8409:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 827, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8409:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 834, "initialValue": {"arguments": [{"expression": {"id": 831, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8450:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 832, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8454:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "8450:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 829, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "8434:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 830, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8440:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "8434:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 833, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8434:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "8409:52:0"}, {"assignments": [836], "declarations": [{"constant": false, "id": 836, "mutability": "mutable", "name": "balance_receiver", "nameLocation": "8479:16:0", "nodeType": "VariableDeclaration", "scope": 913, "src": "8471:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 835, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8471:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 841, "initialValue": {"arguments": [{"id": 839, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 806, "src": "8514:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 837, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "8498:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 838, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8504:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "8498:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 840, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8498:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "8471:50:0"}, {"assignments": [843], "declarations": [{"constant": false, "id": 843, "mutability": "mutable", "name": "allowance", "nameLocation": "8539:9:0", "nodeType": "VariableDeclaration", "scope": 913, "src": "8531:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 842, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8531:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 853, "initialValue": {"arguments": [{"expression": {"id": 846, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8567:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 847, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8571:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "8567:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 850, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "8587:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 849, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8579:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 848, "name": "address", "nodeType": "ElementaryTypeName", "src": "8579:7:0", "typeDescriptions": {}}}, "id": 851, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8579:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 844, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "8551:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 845, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8557:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "8551:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 852, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8551:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "8531:62:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 861, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 857, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 855, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 828, "src": "8611:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "32", "id": 856, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8628:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "src": "8611:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 860, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 858, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 843, "src": "8633:9:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 859, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 828, "src": "8645:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8633:26:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "8611:48:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 854, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "8603:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 862, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8603:57:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 863, "nodeType": "ExpressionStatement", "src": "8603:57:0"}, {"assignments": [865], "declarations": [{"constant": false, "id": 865, "mutability": "mutable", "name": "transfer_value", "nameLocation": "8678:14:0", "nodeType": "VariableDeclaration", "scope": 913, "src": "8670:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 864, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8670:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 872, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 871, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 868, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 866, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 808, "src": "8696:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"id": 867, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 828, "src": "8705:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8696:23:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 869, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "8695:25:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 870, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8723:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "8695:29:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "8670:54:0"}, {"assignments": [874], "declarations": [{"constant": false, "id": 874, "mutability": "mutable", "name": "r", "nameLocation": "8740:1:0", "nodeType": "VariableDeclaration", "scope": 913, "src": "8735:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 873, "name": "bool", "nodeType": "ElementaryTypeName", "src": "8735:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 882, "initialValue": {"arguments": [{"expression": {"id": 877, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8763:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 878, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8767:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "8763:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 879, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 806, "src": "8775:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 880, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 865, "src": "8783:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 875, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "8744:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 876, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8750:12:0", "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1438, "src": "8744:18: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": 881, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8744:54:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "8735:63:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 886, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 884, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 874, "src": "8822:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 885, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "8827:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "8822:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "7472616e73666572206661696c6564", "id": 887, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8833:17:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_df1797085e2da014ef9392ee25ab0802d6ce132451397172f17fd86110e2e02b", "typeString": "literal_string \"transfer failed\""}, "value": "transfer failed"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_df1797085e2da014ef9392ee25ab0802d6ce132451397172f17fd86110e2e02b", "typeString": "literal_string \"transfer failed\""}], "id": 883, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "8808:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 888, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8808:43:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 889, "nodeType": "ExpressionStatement", "src": "8808:43:0"}, {"expression": {"arguments": [{"arguments": [{"expression": {"id": 893, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "8899:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 894, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8903:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "8899:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 891, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "8883:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 892, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8889:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "8883:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 895, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8883:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 898, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 896, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 828, "src": "8924:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 897, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 865, "src": "8941:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8924:31:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "57726f6e6720736f757263652062616c616e6365206166746572207472616e7366657246726f6d", "id": 899, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8969:41:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_dc3e1f828fa627ce2d76378866b15349c14418e103afafdf5eabac357bf3d782", "typeString": "literal_string \"Wrong source balance after transferFrom\""}, "value": "Wrong source balance after transferFrom"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_dc3e1f828fa627ce2d76378866b15349c14418e103afafdf5eabac357bf3d782", "typeString": "literal_string \"Wrong source balance after transferFrom\""}], "id": 890, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "8861:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 900, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8861:159:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 901, "nodeType": "ExpressionStatement", "src": "8861:159:0"}, {"expression": {"arguments": [{"arguments": [{"id": 905, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 806, "src": "9068:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 903, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "9052:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 904, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9058:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "9052:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 906, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9052:23:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 909, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 907, "name": "balance_receiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 836, "src": "9089:16:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 908, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 865, "src": "9108:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "9089:33:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "57726f6e67207461726765742062616c616e6365206166746572207472616e7366657246726f6d", "id": 910, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9136:41:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_c99a92691bfd19cc286bbc345f3a135ed4ffe9a5d588f11d170c1c26267d1e61", "typeString": "literal_string \"Wrong target balance after transferFrom\""}, "value": "Wrong target balance after transferFrom"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_c99a92691bfd19cc286bbc345f3a135ed4ffe9a5d588f11d170c1c26267d1e61", "typeString": "literal_string \"Wrong target balance after transferFrom\""}], "id": 902, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "9030:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 911, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9030:157:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 912, "nodeType": "ExpressionStatement", "src": "9030:157:0"}]}, "functionSelector": "2adaa1c9", "id": 914, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_transferFrom", "nameLocation": "8225:31:0", "nodeType": "FunctionDefinition", "parameters": {"id": 809, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 806, "mutability": "mutable", "name": "target", "nameLocation": "8274:6:0", "nodeType": "VariableDeclaration", "scope": 914, "src": "8266:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 805, "name": "address", "nodeType": "ElementaryTypeName", "src": "8266:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 808, "mutability": "mutable", "name": "amount", "nameLocation": "8298:6:0", "nodeType": "VariableDeclaration", "scope": 914, "src": "8290:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 807, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8290:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "8256:54:0"}, "returnParameters": {"id": 810, "nodeType": "ParameterList", "parameters": [], "src": "8318:0:0"}, "scope": 1131, "src": "8216:978:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 949, "nodeType": "Block", "src": "9347:271:0", "statements": [{"assignments": [922], "declarations": [{"constant": false, "id": 922, "mutability": "mutable", "name": "r", "nameLocation": "9362:1:0", "nodeType": "VariableDeclaration", "scope": 949, "src": "9357:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 921, "name": "bool", "nodeType": "ElementaryTypeName", "src": "9357:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 928, "initialValue": {"arguments": [{"id": 925, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 916, "src": "9380:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 926, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 918, "src": "9388:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 923, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "9366:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 924, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9372:7:0", "memberName": "approve", "nodeType": "MemberAccess", "referencedDeclaration": 1426, "src": "9366:13:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 927, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9366:29:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "9357:38:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 932, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 930, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 922, "src": "9419:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 931, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "9424:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "9419:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "4661696c656420746f2073657420616c6c6f77616e63652076696120617070726f7665", "id": 933, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9430:37:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_7f1d3dd4afc686915bdd345e1cfbb299e9d35b1e8bead035853e4d030efb124f", "typeString": "literal_string \"Failed to set allowance via approve\""}, "value": "Failed to set allowance via approve"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_7f1d3dd4afc686915bdd345e1cfbb299e9d35b1e8bead035853e4d030efb124f", "typeString": "literal_string \"Failed to set allowance via approve\""}], "id": 929, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "9405:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 934, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9405:63:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 935, "nodeType": "ExpressionStatement", "src": "9405:63:0"}, {"expression": {"arguments": [{"arguments": [{"arguments": [{"id": 941, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "9524:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 940, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "9516:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 939, "name": "address", "nodeType": "ElementaryTypeName", "src": "9516:7:0", "typeDescriptions": {}}}, "id": 942, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9516:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 943, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 916, "src": "9531:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 937, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "9500:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 938, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9506:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "9500:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 944, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9500:38:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 945, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 918, "src": "9552:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "416c6c6f77616e6365206e6f742073657420636f72726563746c79", "id": 946, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9572:29:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_039511649023dfd211115e041905531a23fddb46b54f5481aaa27b69c23b1ed9", "typeString": "literal_string \"Allowance not set correctly\""}, "value": "Allowance not set correctly"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_039511649023dfd211115e041905531a23fddb46b54f5481aaa27b69c23b1ed9", "typeString": "literal_string \"Allowance not set correctly\""}], "id": 936, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "9478:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 947, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9478:133:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 948, "nodeType": "ExpressionStatement", "src": "9478:133:0"}]}, "functionSelector": "5d1dfde0", "id": 950, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_setAllowance", "nameLocation": "9254:31:0", "nodeType": "FunctionDefinition", "parameters": {"id": 919, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 916, "mutability": "mutable", "name": "target", "nameLocation": "9303:6:0", "nodeType": "VariableDeclaration", "scope": 950, "src": "9295:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 915, "name": "address", "nodeType": "ElementaryTypeName", "src": "9295:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 918, "mutability": "mutable", "name": "amount", "nameLocation": "9327:6:0", "nodeType": "VariableDeclaration", "scope": 950, "src": "9319:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 917, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9319:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "9285:54:0"}, "returnParameters": {"id": 920, "nodeType": "ParameterList", "parameters": [], "src": "9347:0:0"}, "scope": 1131, "src": "9245:373:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 1017, "nodeType": "Block", "src": "9776:539:0", "statements": [{"assignments": [958], "declarations": [{"constant": false, "id": 958, "mutability": "mutable", "name": "r", "nameLocation": "9791:1:0", "nodeType": "VariableDeclaration", "scope": 1017, "src": "9786:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 957, "name": "bool", "nodeType": "ElementaryTypeName", "src": "9786:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 964, "initialValue": {"arguments": [{"id": 961, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 952, "src": "9809:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 962, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 954, "src": "9817:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 959, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "9795:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 960, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9801:7:0", "memberName": "approve", "nodeType": "MemberAccess", "referencedDeclaration": 1426, "src": "9795:13:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 963, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9795:29:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "9786:38:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 968, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 966, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 958, "src": "9848:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 967, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "9853:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "9848:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "4661696c656420746f2073657420616c6c6f77616e63652076696120617070726f7665", "id": 969, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9859:37:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_7f1d3dd4afc686915bdd345e1cfbb299e9d35b1e8bead035853e4d030efb124f", "typeString": "literal_string \"Failed to set allowance via approve\""}, "value": "Failed to set allowance via approve"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_7f1d3dd4afc686915bdd345e1cfbb299e9d35b1e8bead035853e4d030efb124f", "typeString": "literal_string \"Failed to set allowance via approve\""}], "id": 965, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "9834:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 970, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9834:63:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 971, "nodeType": "ExpressionStatement", "src": "9834:63:0"}, {"expression": {"arguments": [{"arguments": [{"arguments": [{"id": 977, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "9953:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 976, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "9945:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 975, "name": "address", "nodeType": "ElementaryTypeName", "src": "9945:7:0", "typeDescriptions": {}}}, "id": 978, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9945:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 979, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 952, "src": "9960:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 973, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "9929:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 974, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9935:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "9929:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 980, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9929:38:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 981, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 954, "src": "9981:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "416c6c6f77616e6365206e6f742073657420636f72726563746c79", "id": 982, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10001:29:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_039511649023dfd211115e041905531a23fddb46b54f5481aaa27b69c23b1ed9", "typeString": "literal_string \"Allowance not set correctly\""}, "value": "Allowance not set correctly"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_039511649023dfd211115e041905531a23fddb46b54f5481aaa27b69c23b1ed9", "typeString": "literal_string \"Allowance not set correctly\""}], "id": 972, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "9907:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 983, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9907:133:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 984, "nodeType": "ExpressionStatement", "src": "9907:133:0"}, {"expression": {"id": 993, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 985, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 958, "src": "10051:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 988, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 952, "src": "10069:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 991, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 989, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 954, "src": "10077:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": {"hexValue": "32", "id": 990, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10086:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "src": "10077:10:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 986, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "10055:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 987, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10061:7:0", "memberName": "approve", "nodeType": "MemberAccess", "referencedDeclaration": 1426, "src": "10055:13:0", "typeDescriptions": {"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)"}}, "id": 992, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10055:33:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "10051:37:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 994, "nodeType": "ExpressionStatement", "src": "10051:37:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 998, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 996, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 958, "src": "10112:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 997, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "10117:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "10112:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "4661696c656420746f2073657420616c6c6f77616e63652076696120617070726f7665", "id": 999, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10123:37:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_7f1d3dd4afc686915bdd345e1cfbb299e9d35b1e8bead035853e4d030efb124f", "typeString": "literal_string \"Failed to set allowance via approve\""}, "value": "Failed to set allowance via approve"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_7f1d3dd4afc686915bdd345e1cfbb299e9d35b1e8bead035853e4d030efb124f", "typeString": "literal_string \"Failed to set allowance via approve\""}], "id": 995, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "10098:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 1000, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10098:63:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1001, "nodeType": "ExpressionStatement", "src": "10098:63:0"}, {"expression": {"arguments": [{"arguments": [{"arguments": [{"id": 1007, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "10217:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 1006, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10209:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1005, "name": "address", "nodeType": "ElementaryTypeName", "src": "10209:7:0", "typeDescriptions": {}}}, "id": 1008, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10209:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1009, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 952, "src": "10224:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 1003, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "10193:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 1004, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10199:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "10193:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 1010, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10193:38:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1013, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1011, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 954, "src": "10245:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": {"hexValue": "32", "id": 1012, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10254:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "src": "10245:10:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "416c6c6f77616e6365206e6f742073657420636f72726563746c79", "id": 1014, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10269:29:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_039511649023dfd211115e041905531a23fddb46b54f5481aaa27b69c23b1ed9", "typeString": "literal_string \"Allowance not set correctly\""}, "value": "Allowance not set correctly"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_039511649023dfd211115e041905531a23fddb46b54f5481aaa27b69c23b1ed9", "typeString": "literal_string \"Allowance not set correctly\""}], "id": 1002, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "10171:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 1015, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10171:137:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1016, "nodeType": "ExpressionStatement", "src": "10171:137:0"}]}, "functionSelector": "01b0710a", "id": 1018, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_setAllowanceTwice", "nameLocation": "9678:36:0", "nodeType": "FunctionDefinition", "parameters": {"id": 955, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 952, "mutability": "mutable", "name": "target", "nameLocation": "9732:6:0", "nodeType": "VariableDeclaration", "scope": 1018, "src": "9724:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 951, "name": "address", "nodeType": "ElementaryTypeName", "src": "9724:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 954, "mutability": "mutable", "name": "amount", "nameLocation": "9756:6:0", "nodeType": "VariableDeclaration", "scope": 1018, "src": "9748:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 953, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9748:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "9714:54:0"}, "returnParameters": {"id": 956, "nodeType": "ParameterList", "parameters": [], "src": "9776:0:0"}, "scope": 1131, "src": "9669:646:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 1129, "nodeType": "Block", "src": "10484:890:0", "statements": [{"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 1038, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1031, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1026, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1020, "src": "10502:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"arguments": [{"id": 1029, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "10520:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 1028, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10512:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1027, "name": "address", "nodeType": "ElementaryTypeName", "src": "10512:7:0", "typeDescriptions": {}}}, "id": 1030, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10512:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "10502:23:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1037, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1032, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1020, "src": "10529:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1035, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10547: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": 1034, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10539:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1033, "name": "address", "nodeType": "ElementaryTypeName", "src": "10539:7:0", "typeDescriptions": {}}}, "id": 1036, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10539:10:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "10529:20:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "10502:47:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 1025, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "10494:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 1039, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10494:56:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1040, "nodeType": "ExpressionStatement", "src": "10494:56:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1045, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1042, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1020, "src": "10568:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"expression": {"id": 1043, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "10578:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1044, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10582:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "10578:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "10568:20:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 1041, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "10560:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 1046, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10560:29:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1047, "nodeType": "ExpressionStatement", "src": "10560:29:0"}, {"assignments": [1049], "declarations": [{"constant": false, "id": 1049, "mutability": "mutable", "name": "balance_sender", "nameLocation": "10607:14:0", "nodeType": "VariableDeclaration", "scope": 1129, "src": "10599:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1048, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10599:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 1055, "initialValue": {"arguments": [{"expression": {"id": 1052, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "10640:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1053, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10644:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "10640:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 1050, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "10624:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 1051, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10630:9:0", "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1396, "src": "10624:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)"}}, "id": 1054, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10624:27:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "10599:52:0"}, {"assignments": [1057], "declarations": [{"constant": false, "id": 1057, "mutability": "mutable", "name": "current_allowance", "nameLocation": "10669:17:0", "nodeType": "VariableDeclaration", "scope": 1129, "src": "10661:25:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1056, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10661:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 1067, "initialValue": {"arguments": [{"expression": {"id": 1060, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "10705:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1061, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10709:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "10705:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 1064, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "10725:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 1063, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10717:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1062, "name": "address", "nodeType": "ElementaryTypeName", "src": "10717:7:0", "typeDescriptions": {}}}, "id": 1065, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10717:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 1058, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "10689:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 1059, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10695:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "10689:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 1066, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10689:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "10661:70:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 1075, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1071, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1069, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1049, "src": "10749:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"hexValue": "30", "id": 1070, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10766:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "10749:18:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1074, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1072, "name": "current_allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1057, "src": "10771:17:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 1073, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1049, "src": "10791:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "10771:34:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "10749:56:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 1068, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, "src": "10741:7:0", "typeDescriptions": {"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 1076, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10741:65:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1077, "nodeType": "ExpressionStatement", "src": "10741:65:0"}, {"assignments": [1079], "declarations": [{"constant": false, "id": 1079, "mutability": "mutable", "name": "transfer_value", "nameLocation": "10824:14:0", "nodeType": "VariableDeclaration", "scope": 1129, "src": "10816:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1078, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10816:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 1086, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1085, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1082, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1080, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1022, "src": "10842:6:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"id": 1081, "name": "balance_sender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1049, "src": "10851:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "10842:23:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 1083, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "10841:25:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 1084, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10869:1:0", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "10841:29:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "10816:54:0"}, {"assignments": [1088], "declarations": [{"constant": false, "id": 1088, "mutability": "mutable", "name": "r", "nameLocation": "10886:1:0", "nodeType": "VariableDeclaration", "scope": 1129, "src": "10881:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1087, "name": "bool", "nodeType": "ElementaryTypeName", "src": "10881:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "id": 1096, "initialValue": {"arguments": [{"expression": {"id": 1091, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "10909:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1092, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10913:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "10909:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1093, "name": "target", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1020, "src": "10921:6:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1094, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1079, "src": "10929:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 1089, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "10890:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 1090, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10896:12:0", "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1438, "src": "10890:18: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": 1095, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10890:54:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "VariableDeclarationStatement", "src": "10881:63:0"}, {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 1100, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1098, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1088, "src": "10968:1:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"hexValue": "74727565", "id": 1099, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "10973:4:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "10968:9:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, {"hexValue": "7472616e7366657246726f6d206661696c6564", "id": 1101, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10979:21:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_ab0f731885d207443b1e545c1c7e7ed7ac9b6ea503774981a1bcc8ac01b461c3", "typeString": "literal_string \"transferFrom failed\""}, "value": "transferFrom failed"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}, {"typeIdentifier": "t_stringliteral_ab0f731885d207443b1e545c1c7e7ed7ac9b6ea503774981a1bcc8ac01b461c3", "typeString": "literal_string \"transferFrom failed\""}], "id": 1097, "name": "assertWithMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2025, "src": "10954:13:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory)"}}, "id": 1102, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10954:47:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1103, "nodeType": "ExpressionStatement", "src": "10954:47:0"}, {"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1110, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1104, "name": "current_allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1057, "src": "11118:17:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"expression": {"arguments": [{"id": 1107, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "11144:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}, "typeName": {"id": 1106, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11144:7:0", "typeDescriptions": {}}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}], "id": 1105, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "11139:4:0", "typeDescriptions": {"typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure"}}, "id": 1108, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11139:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_magic_meta_type_t_uint256", "typeString": "type(uint256)"}}, "id": 1109, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "11153:3:0", "memberName": "max", "nodeType": "MemberAccess", "src": "11139:17:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "11118:38:0", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1128, "nodeType": "IfStatement", "src": "11114:254:0", "trueBody": {"id": 1127, "nodeType": "Block", "src": "11158:210:0", "statements": [{"expression": {"arguments": [{"arguments": [{"expression": {"id": 1114, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "11214:3:0", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1115, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "11218:6:0", "memberName": "sender", "nodeType": "MemberAccess", "src": "11214:10:0", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 1118, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "11234:4:0", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticERC20ExternalBasicProperties_$1131", "typeString": "contract CryticERC20ExternalBasicProperties"}], "id": 1117, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "11226:7:0", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1116, "name": "address", "nodeType": "ElementaryTypeName", "src": "11226:7:0", "typeDescriptions": {}}}, "id": 1119, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11226:13:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "expression": {"id": 1112, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "11198:5:0", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 1113, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "11204:9:0", "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 1416, "src": "11198:15:0", "typeDescriptions": {"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)"}}, "id": 1120, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11198:42:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1123, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1121, "name": "current_allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1057, "src": "11258:17:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 1122, "name": "transfer_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1079, "src": "11278:14:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "11258:34:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "416c6c6f77616e6365206e6f74207570646174656420636f72726563746c79", "id": 1124, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "11310:33:0", "typeDescriptions": {"typeIdentifier": "t_stringliteral_8a9d4062b5e91cae80b2f90c0a1556e7aa463cd7bea8697d5178f4b92d2ace6e", "typeString": "literal_string \"Allowance not updated correctly\""}, "value": "Allowance not updated correctly"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_8a9d4062b5e91cae80b2f90c0a1556e7aa463cd7bea8697d5178f4b92d2ace6e", "typeString": "literal_string \"Allowance not updated correctly\""}], "id": 1111, "name": "assertEq", "nodeType": "Identifier", "overloadedDeclarations": [2078, 2131], "referencedDeclaration": 2078, "src": "11172:8:0", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 1125, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11172:185:0", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1126, "nodeType": "ExpressionStatement", "src": "11172:185:0"}]}}]}, "functionSelector": "ee5f3aeb", "id": 1130, "implemented": true, "kind": "function", "modifiers": [], "name": "test_ERC20external_spendAllowanceAfterTransfer", "nameLocation": "10376:46:0", "nodeType": "FunctionDefinition", "parameters": {"id": 1023, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1020, "mutability": "mutable", "name": "target", "nameLocation": "10440:6:0", "nodeType": "VariableDeclaration", "scope": 1130, "src": "10432:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1019, "name": "address", "nodeType": "ElementaryTypeName", "src": "10432:7:0", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1022, "mutability": "mutable", "name": "amount", "nameLocation": "10464:6:0", "nodeType": "VariableDeclaration", "scope": 1130, "src": "10456:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1021, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10456:7:0", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "10422:54:0"}, "returnParameters": {"id": 1024, "nodeType": "ParameterList", "parameters": [], "src": "10484:0:0"}, "scope": 1131, "src": "10367:1007:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 1132, "src": "105:11271:0", "usedErrors": [], "usedEvents": [1967, 1973, 1977, 1981, 1985, 1989, 1993, 1997, 2001, 2005]}], "src": "0:11377:0"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/util/ERC20ExternalTestBase.sol": {"AST": {"absolutePath": "node_modules/@crytic/properties/contracts/ERC20/external/util/ERC20ExternalTestBase.sol", "exportedSymbols": {"CryticERC20ExternalTestBase": [1362], "IERC20": [1444], "ITokenMock": [1200], "PropertiesAsserts": [3325], "PropertiesConstants": [1224], "PropertiesLibString": [3527]}, "id": 1363, "nodeType": "SourceUnit", "nodes": [{"id": 1347, "literals": ["solidity", "^", "0.8", ".0"], "nodeType": "PragmaDirective", "src": "0:23:1"}, {"absolutePath": "node_modules/@crytic/properties/contracts/util/PropertiesHelper.sol", "file": "../../../util/PropertiesHelper.sol", "id": 1348, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1363, "sourceUnit": 3528, "src": "25:44:1", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "node_modules/@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol", "file": "./ITokenMock.sol", "id": 1349, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1363, "sourceUnit": 1201, "src": "70:26:1", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "node_modules/@crytic/properties/contracts/util/PropertiesConstants.sol", "file": "../../../util/PropertiesConstants.sol", "id": 1350, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1363, "sourceUnit": 1225, "src": "97:47:1", "symbolAliases": [], "unitAlias": ""}, {"abstract": true, "baseContracts": [{"baseName": {"id": 1351, "name": "PropertiesAsserts", "nameLocations": ["199:17:1"], "nodeType": "IdentifierPath", "referencedDeclaration": 3325, "src": "199:17:1"}, "id": 1352, "nodeType": "InheritanceSpecifier", "src": "199:17:1"}, {"baseName": {"id": 1353, "name": "PropertiesConstants", "nameLocations": ["222:19:1"], "nodeType": "IdentifierPath", "referencedDeclaration": 1224, "src": "222:19:1"}, "id": 1354, "nodeType": "InheritanceSpecifier", "src": "222:19:1"}], "canonicalName": "CryticERC20ExternalTestBase", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 1362, "linearizedBaseContracts": [1362, 1224, 3325], "name": "CryticERC20ExternalTestBase", "nameLocation": "164:27:1", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 1357, "mutability": "mutable", "name": "token", "nameLocation": "259:5:1", "nodeType": "VariableDeclaration", "scope": 1362, "src": "248:16:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}, "typeName": {"id": 1356, "nodeType": "UserDefinedTypeName", "pathNode": {"id": 1355, "name": "ITokenMock", "nameLocations": ["248:10:1"], "nodeType": "IdentifierPath", "referencedDeclaration": 1200, "src": "248:10:1"}, "referencedDeclaration": 1200, "src": "248:10:1", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "visibility": "internal"}, {"body": {"id": 1360, "nodeType": "Block", "src": "285:2:1", "statements": []}, "id": 1361, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": {"id": 1358, "nodeType": "ParameterList", "parameters": [], "src": "282:2:1"}, "returnParameters": {"id": 1359, "nodeType": "ParameterList", "parameters": [], "src": "285:0:1"}, "scope": 1362, "src": "271:16:1", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}], "scope": 1363, "src": "146:143:1", "usedErrors": [], "usedEvents": [1967, 1973, 1977, 1981, 1985, 1989, 1993, 1997, 2001, 2005]}], "src": "0:290:1"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol": {"AST": {"absolutePath": "node_modules/@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol", "exportedSymbols": {"IERC20": [1444], "ITokenMock": [1200]}, "id": 1201, "nodeType": "SourceUnit", "nodes": [{"id": 1133, "literals": ["solidity", "^", "0.8", ".0"], "nodeType": "PragmaDirective", "src": "0:23:2"}, {"absolutePath": "node_modules/@crytic/properties/contracts/util/IERC20.sol", "file": "../../../util/IERC20.sol", "id": 1134, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1201, "sourceUnit": 1445, "src": "25:34:2", "symbolAliases": [], "unitAlias": ""}, {"abstract": false, "baseContracts": [{"baseName": {"id": 1135, "name": "IERC20", "nameLocations": ["85:6:2"], "nodeType": "IdentifierPath", "referencedDeclaration": 1444, "src": "85:6:2"}, "id": 1136, "nodeType": "InheritanceSpecifier", "src": "85:6:2"}], "canonicalName": "ITokenMock", "contractDependencies": [], "contractKind": "interface", "fullyImplemented": false, "id": 1200, "linearizedBaseContracts": [1200, 1444], "name": "ITokenMock", "nameLocation": "71:10:2", "nodeType": "ContractDefinition", "nodes": [{"functionSelector": "ab789fa3", "id": 1141, "implemented": false, "kind": "function", "modifiers": [], "name": "isMintableOrBurnable", "nameLocation": "107:20:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1137, "nodeType": "ParameterList", "parameters": [], "src": "127:2:2"}, "returnParameters": {"id": 1140, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1139, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1141, "src": "148:4:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1138, "name": "bool", "nodeType": "ElementaryTypeName", "src": "148:4:2", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "147:6:2"}, "scope": 1200, "src": "98:56:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "378dc3dc", "id": 1146, "implemented": false, "kind": "function", "modifiers": [], "name": "initialSupply", "nameLocation": "169:13:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1142, "nodeType": "ParameterList", "parameters": [], "src": "182:2:2"}, "returnParameters": {"id": 1145, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1144, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1146, "src": "203:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1143, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "203:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "202:9:2"}, "scope": 1200, "src": "160:52:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "42966c68", "id": 1151, "implemented": false, "kind": "function", "modifiers": [], "name": "burn", "nameLocation": "227:4:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1149, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1148, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1151, "src": "232:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1147, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "232:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "231:9:2"}, "returnParameters": {"id": 1150, "nodeType": "ParameterList", "parameters": [], "src": "249:0:2"}, "scope": 1200, "src": "218:32:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "79cc6790", "id": 1158, "implemented": false, "kind": "function", "modifiers": [], "name": "burnFrom", "nameLocation": "265:8:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1156, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1153, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1158, "src": "274:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1152, "name": "address", "nodeType": "ElementaryTypeName", "src": "274:7:2", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1155, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1158, "src": "283:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1154, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "283:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "273:18:2"}, "returnParameters": {"id": 1157, "nodeType": "ParameterList", "parameters": [], "src": "300:0:2"}, "scope": 1200, "src": "256:45:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "40c10f19", "id": 1165, "implemented": false, "kind": "function", "modifiers": [], "name": "mint", "nameLocation": "316:4:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1163, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1160, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1165, "src": "321:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1159, "name": "address", "nodeType": "ElementaryTypeName", "src": "321:7:2", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1162, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1165, "src": "330:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1161, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "330:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "320:18:2"}, "returnParameters": {"id": 1164, "nodeType": "ParameterList", "parameters": [], "src": "347:0:2"}, "scope": 1200, "src": "307:41:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "8456cb59", "id": 1168, "implemented": false, "kind": "function", "modifiers": [], "name": "pause", "nameLocation": "363:5:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1166, "nodeType": "ParameterList", "parameters": [], "src": "368:2:2"}, "returnParameters": {"id": 1167, "nodeType": "ParameterList", "parameters": [], "src": "379:0:2"}, "scope": 1200, "src": "354:26:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "3f4ba83a", "id": 1171, "implemented": false, "kind": "function", "modifiers": [], "name": "unpause", "nameLocation": "395:7:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1169, "nodeType": "ParameterList", "parameters": [], "src": "402:2:2"}, "returnParameters": {"id": 1170, "nodeType": "ParameterList", "parameters": [], "src": "413:0:2"}, "scope": 1200, "src": "386:28:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "5c975abb", "id": 1176, "implemented": false, "kind": "function", "modifiers": [], "name": "paused", "nameLocation": "429:6:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1172, "nodeType": "ParameterList", "parameters": [], "src": "435:2:2"}, "returnParameters": {"id": 1175, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1174, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1176, "src": "456:4:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1173, "name": "bool", "nodeType": "ElementaryTypeName", "src": "456:4:2", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "455:6:2"}, "scope": 1200, "src": "420:42:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "8da5cb5b", "id": 1181, "implemented": false, "kind": "function", "modifiers": [], "name": "owner", "nameLocation": "477:5:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1177, "nodeType": "ParameterList", "parameters": [], "src": "482:2:2"}, "returnParameters": {"id": 1180, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1179, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1181, "src": "503:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1178, "name": "address", "nodeType": "ElementaryTypeName", "src": "503:7:2", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "502:9:2"}, "scope": 1200, "src": "468:44:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "39509351", "id": 1190, "implemented": false, "kind": "function", "modifiers": [], "name": "increaseAllowance", "nameLocation": "527:17:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1186, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1183, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1190, "src": "545:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1182, "name": "address", "nodeType": "ElementaryTypeName", "src": "545:7:2", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1185, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1190, "src": "554:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1184, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "554:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "544:18:2"}, "returnParameters": {"id": 1189, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1188, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1190, "src": "581:4:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1187, "name": "bool", "nodeType": "ElementaryTypeName", "src": "581:4:2", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "580:6:2"}, "scope": 1200, "src": "518:69:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "a457c2d7", "id": 1199, "implemented": false, "kind": "function", "modifiers": [], "name": "decreaseAllowance", "nameLocation": "602:17:2", "nodeType": "FunctionDefinition", "parameters": {"id": 1195, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1192, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1199, "src": "620:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1191, "name": "address", "nodeType": "ElementaryTypeName", "src": "620:7:2", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1194, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1199, "src": "629:7:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1193, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "629:7:2", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "619:18:2"}, "returnParameters": {"id": 1198, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1197, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1199, "src": "656:4:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1196, "name": "bool", "nodeType": "ElementaryTypeName", "src": "656:4:2", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "655:6:2"}, "scope": 1200, "src": "593:69:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}], "scope": 1201, "src": "61:603:2", "usedErrors": [], "usedEvents": [1373, 1382]}], "src": "0:665:2"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/IERC20.sol": {"AST": {"absolutePath": "node_modules/@crytic/properties/contracts/util/IERC20.sol", "exportedSymbols": {"IERC20": [1444]}, "id": 1445, "license": "MIT", "nodeType": "SourceUnit", "nodes": [{"id": 1364, "literals": ["solidity", "^", "0.8", ".0"], "nodeType": "PragmaDirective", "src": "32:23:3"}, {"abstract": false, "baseContracts": [], "canonicalName": "IERC20", "contractDependencies": [], "contractKind": "interface", "fullyImplemented": false, "id": 1444, "linearizedBaseContracts": [1444], "name": "IERC20", "nameLocation": "67:6:3", "nodeType": "ContractDefinition", "nodes": [{"anonymous": false, "documentation": {"id": 1365, "nodeType": "StructuredDocumentation", "src": "80:158:3", "text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero."}, "eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "id": 1373, "name": "Transfer", "nameLocation": "249:8:3", "nodeType": "EventDefinition", "parameters": {"id": 1372, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1367, "indexed": true, "mutability": "mutable", "name": "from", "nameLocation": "274:4:3", "nodeType": "VariableDeclaration", "scope": 1373, "src": "258:20:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1366, "name": "address", "nodeType": "ElementaryTypeName", "src": "258:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1369, "indexed": true, "mutability": "mutable", "name": "to", "nameLocation": "296:2:3", "nodeType": "VariableDeclaration", "scope": 1373, "src": "280:18:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1368, "name": "address", "nodeType": "ElementaryTypeName", "src": "280:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1371, "indexed": false, "mutability": "mutable", "name": "value", "nameLocation": "308:5:3", "nodeType": "VariableDeclaration", "scope": 1373, "src": "300:13:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1370, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "300:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "257:57:3"}, "src": "243:72:3"}, {"anonymous": false, "documentation": {"id": 1374, "nodeType": "StructuredDocumentation", "src": "321:148:3", "text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance."}, "eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", "id": 1382, "name": "Approval", "nameLocation": "480:8:3", "nodeType": "EventDefinition", "parameters": {"id": 1381, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1376, "indexed": true, "mutability": "mutable", "name": "owner", "nameLocation": "514:5:3", "nodeType": "VariableDeclaration", "scope": 1382, "src": "498:21:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1375, "name": "address", "nodeType": "ElementaryTypeName", "src": "498:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1378, "indexed": true, "mutability": "mutable", "name": "spender", "nameLocation": "545:7:3", "nodeType": "VariableDeclaration", "scope": 1382, "src": "529:23:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1377, "name": "address", "nodeType": "ElementaryTypeName", "src": "529:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1380, "indexed": false, "mutability": "mutable", "name": "value", "nameLocation": "570:5:3", "nodeType": "VariableDeclaration", "scope": 1382, "src": "562:13:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1379, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "562:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "488:93:3"}, "src": "474:108:3"}, {"documentation": {"id": 1383, "nodeType": "StructuredDocumentation", "src": "588:66:3", "text": " @dev Returns the amount of tokens in existence."}, "functionSelector": "18160ddd", "id": 1388, "implemented": false, "kind": "function", "modifiers": [], "name": "totalSupply", "nameLocation": "668:11:3", "nodeType": "FunctionDefinition", "parameters": {"id": 1384, "nodeType": "ParameterList", "parameters": [], "src": "679:2:3"}, "returnParameters": {"id": 1387, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1386, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1388, "src": "705:7:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1385, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "705:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "704:9:3"}, "scope": 1444, "src": "659:55:3", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 1389, "nodeType": "StructuredDocumentation", "src": "720:72:3", "text": " @dev Returns the amount of tokens owned by `account`."}, "functionSelector": "70a08231", "id": 1396, "implemented": false, "kind": "function", "modifiers": [], "name": "balanceOf", "nameLocation": "806:9:3", "nodeType": "FunctionDefinition", "parameters": {"id": 1392, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1391, "mutability": "mutable", "name": "account", "nameLocation": "824:7:3", "nodeType": "VariableDeclaration", "scope": 1396, "src": "816:15:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1390, "name": "address", "nodeType": "ElementaryTypeName", "src": "816:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "815:17:3"}, "returnParameters": {"id": 1395, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1394, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1396, "src": "856:7:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1393, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "856:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "855:9:3"}, "scope": 1444, "src": "797:68:3", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 1397, "nodeType": "StructuredDocumentation", "src": "871:202:3", "text": " @dev Moves `amount` tokens from the caller's account to `to`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."}, "functionSelector": "a9059cbb", "id": 1406, "implemented": false, "kind": "function", "modifiers": [], "name": "transfer", "nameLocation": "1087:8:3", "nodeType": "FunctionDefinition", "parameters": {"id": 1402, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1399, "mutability": "mutable", "name": "to", "nameLocation": "1104:2:3", "nodeType": "VariableDeclaration", "scope": 1406, "src": "1096:10:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1398, "name": "address", "nodeType": "ElementaryTypeName", "src": "1096:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1401, "mutability": "mutable", "name": "amount", "nameLocation": "1116:6:3", "nodeType": "VariableDeclaration", "scope": 1406, "src": "1108:14:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1400, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1108:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1095:28:3"}, "returnParameters": {"id": 1405, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1404, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1406, "src": "1142:4:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1403, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1142:4:3", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "1141:6:3"}, "scope": 1444, "src": "1078:70:3", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"documentation": {"id": 1407, "nodeType": "StructuredDocumentation", "src": "1154:264:3", "text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called."}, "functionSelector": "dd62ed3e", "id": 1416, "implemented": false, "kind": "function", "modifiers": [], "name": "allowance", "nameLocation": "1432:9:3", "nodeType": "FunctionDefinition", "parameters": {"id": 1412, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1409, "mutability": "mutable", "name": "owner", "nameLocation": "1459:5:3", "nodeType": "VariableDeclaration", "scope": 1416, "src": "1451:13:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1408, "name": "address", "nodeType": "ElementaryTypeName", "src": "1451:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1411, "mutability": "mutable", "name": "spender", "nameLocation": "1482:7:3", "nodeType": "VariableDeclaration", "scope": 1416, "src": "1474:15:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1410, "name": "address", "nodeType": "ElementaryTypeName", "src": "1474:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "1441:54:3"}, "returnParameters": {"id": 1415, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1414, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1416, "src": "1519:7:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1413, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1519:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1518:9:3"}, "scope": 1444, "src": "1423:105:3", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 1417, "nodeType": "StructuredDocumentation", "src": "1534:642:3", "text": " @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\n IMPORTANT: Beware that changing an allowance with this method brings the risk\n that someone may use both the old and the new allowance by unfortunate\n transaction ordering. One possible solution to mitigate this race\n condition is to first reduce the spender's allowance to 0 and set the\n desired value afterwards:\n https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n Emits an {Approval} event."}, "functionSelector": "095ea7b3", "id": 1426, "implemented": false, "kind": "function", "modifiers": [], "name": "approve", "nameLocation": "2190:7:3", "nodeType": "FunctionDefinition", "parameters": {"id": 1422, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1419, "mutability": "mutable", "name": "spender", "nameLocation": "2206:7:3", "nodeType": "VariableDeclaration", "scope": 1426, "src": "2198:15:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1418, "name": "address", "nodeType": "ElementaryTypeName", "src": "2198:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1421, "mutability": "mutable", "name": "amount", "nameLocation": "2223:6:3", "nodeType": "VariableDeclaration", "scope": 1426, "src": "2215:14:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1420, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2215:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "2197:33:3"}, "returnParameters": {"id": 1425, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1424, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1426, "src": "2249:4:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1423, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2249:4:3", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "2248:6:3"}, "scope": 1444, "src": "2181:74:3", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"documentation": {"id": 1427, "nodeType": "StructuredDocumentation", "src": "2261:287:3", "text": " @dev Moves `amount` tokens from `from` to `to` using the\n allowance mechanism. `amount` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."}, "functionSelector": "23b872dd", "id": 1438, "implemented": false, "kind": "function", "modifiers": [], "name": "transferFrom", "nameLocation": "2562:12:3", "nodeType": "FunctionDefinition", "parameters": {"id": 1434, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1429, "mutability": "mutable", "name": "from", "nameLocation": "2592:4:3", "nodeType": "VariableDeclaration", "scope": 1438, "src": "2584:12:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1428, "name": "address", "nodeType": "ElementaryTypeName", "src": "2584:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1431, "mutability": "mutable", "name": "to", "nameLocation": "2614:2:3", "nodeType": "VariableDeclaration", "scope": 1438, "src": "2606:10:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1430, "name": "address", "nodeType": "ElementaryTypeName", "src": "2606:7:3", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1433, "mutability": "mutable", "name": "amount", "nameLocation": "2634:6:3", "nodeType": "VariableDeclaration", "scope": 1438, "src": "2626:14:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1432, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2626:7:3", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "2574:72:3"}, "returnParameters": {"id": 1437, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1436, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1438, "src": "2665:4:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1435, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2665:4:3", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "2664:6:3"}, "scope": 1444, "src": "2553:118:3", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"functionSelector": "313ce567", "id": 1443, "implemented": false, "kind": "function", "modifiers": [], "name": "decimals", "nameLocation": "2686:8:3", "nodeType": "FunctionDefinition", "parameters": {"id": 1439, "nodeType": "ParameterList", "parameters": [], "src": "2694:2:3"}, "returnParameters": {"id": 1442, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1441, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1443, "src": "2715:5:3", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "typeName": {"id": 1440, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "2715:5:3", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "visibility": "internal"}], "src": "2714:7:3"}, "scope": 1444, "src": "2677:45:3", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}], "scope": 1445, "src": "57:2667:3", "usedErrors": [], "usedEvents": [1373, 1382]}], "src": "32:2693:3"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/PropertiesConstants.sol": {"AST": {"absolutePath": "node_modules/@crytic/properties/contracts/util/PropertiesConstants.sol", "exportedSymbols": {"PropertiesConstants": [1224]}, "id": 1225, "nodeType": "SourceUnit", "nodes": [{"id": 1202, "literals": ["solidity", "^", "0.8", ".0"], "nodeType": "PragmaDirective", "src": "0:23:4"}, {"abstract": true, "baseContracts": [], "canonicalName": "PropertiesConstants", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 1224, "linearizedBaseContracts": [1224], "name": "PropertiesConstants", "nameLocation": "43:19:4", "nodeType": "ContractDefinition", "nodes": [{"constant": true, "id": 1208, "mutability": "constant", "name": "USER1", "nameLocation": "120:5:4", "nodeType": "VariableDeclaration", "scope": 1224, "src": "103:41:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1203, "name": "address", "nodeType": "ElementaryTypeName", "src": "103:7:4", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "value": {"arguments": [{"hexValue": "30783130303030", "id": 1206, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "136:7:4", "typeDescriptions": {"typeIdentifier": "t_rational_65536_by_1", "typeString": "int_const 65536"}, "value": "0x10000"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_65536_by_1", "typeString": "int_const 65536"}], "id": 1205, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "128:7:4", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1204, "name": "address", "nodeType": "ElementaryTypeName", "src": "128:7:4", "typeDescriptions": {}}}, "id": 1207, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "128:16:4", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": true, "id": 1214, "mutability": "constant", "name": "USER2", "nameLocation": "167:5:4", "nodeType": "VariableDeclaration", "scope": 1224, "src": "150:41:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1209, "name": "address", "nodeType": "ElementaryTypeName", "src": "150:7:4", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "value": {"arguments": [{"hexValue": "30783230303030", "id": 1212, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "183:7:4", "typeDescriptions": {"typeIdentifier": "t_rational_131072_by_1", "typeString": "int_const 131072"}, "value": "0x20000"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_131072_by_1", "typeString": "int_const 131072"}], "id": 1211, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "175:7:4", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1210, "name": "address", "nodeType": "ElementaryTypeName", "src": "175:7:4", "typeDescriptions": {}}}, "id": 1213, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "175:16:4", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": true, "id": 1220, "mutability": "constant", "name": "USER3", "nameLocation": "214:5:4", "nodeType": "VariableDeclaration", "scope": 1224, "src": "197:41:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1215, "name": "address", "nodeType": "ElementaryTypeName", "src": "197:7:4", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "value": {"arguments": [{"hexValue": "30783330303030", "id": 1218, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "230:7:4", "typeDescriptions": {"typeIdentifier": "t_rational_196608_by_1", "typeString": "int_const 196608"}, "value": "0x30000"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_196608_by_1", "typeString": "int_const 196608"}], "id": 1217, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "222:7:4", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1216, "name": "address", "nodeType": "ElementaryTypeName", "src": "222:7:4", "typeDescriptions": {}}}, "id": 1219, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "222:16:4", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": true, "id": 1223, "mutability": "constant", "name": "INITIAL_BALANCE", "nameLocation": "261:15:4", "nodeType": "VariableDeclaration", "scope": 1224, "src": "244:42:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1221, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "244:7:4", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "value": {"hexValue": "31303030653138", "id": 1222, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "279:7:4", "typeDescriptions": {"typeIdentifier": "t_rational_1000000000000000000000_by_1", "typeString": "int_const 1000000000000000000000"}, "value": "1000e18"}, "visibility": "internal"}], "scope": 1225, "src": "25:264:4", "usedErrors": [], "usedEvents": []}], "src": "0:290:4"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/PropertiesHelper.sol": {"AST": {"absolutePath": "node_modules/@crytic/properties/contracts/util/PropertiesHelper.sol", "exportedSymbols": {"PropertiesAsserts": [3325], "PropertiesLibString": [3527]}, "id": 3528, "nodeType": "SourceUnit", "nodes": [{"id": 1961, "literals": ["solidity", "^", "0.8", ".0"], "nodeType": "PragmaDirective", "src": "0:23:5"}, {"abstract": true, "baseContracts": [], "canonicalName": "PropertiesAsserts", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 3325, "linearizedBaseContracts": [3325], "name": "PropertiesAsserts", "nameLocation": "43:17:5", "nodeType": "ContractDefinition", "nodes": [{"anonymous": false, "eventSelector": "31c369d7029afba34b21369bcf9a6ac132fb2621c34558b914859b768d05232d", "id": 1967, "name": "LogUint256", "nameLocation": "73:10:5", "nodeType": "EventDefinition", "parameters": {"id": 1966, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1963, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1967, "src": "84:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1962, "name": "string", "nodeType": "ElementaryTypeName", "src": "84:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}, {"constant": false, "id": 1965, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1967, "src": "92:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1964, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "92:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "83:17:5"}, "src": "67:34:5"}, {"anonymous": false, "eventSelector": "62ddffe5b5108385f7a590f100e1ee414ad9551a31f089e64e82998440785e1e", "id": 1973, "name": "LogAddress", "nameLocation": "112:10:5", "nodeType": "EventDefinition", "parameters": {"id": 1972, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1969, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1973, "src": "123:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1968, "name": "string", "nodeType": "ElementaryTypeName", "src": "123:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}, {"constant": false, "id": 1971, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1973, "src": "131:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1970, "name": "address", "nodeType": "ElementaryTypeName", "src": "131:7:5", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "122:17:5"}, "src": "106:34:5"}, {"anonymous": false, "eventSelector": "a95e6e2a182411e7a6f9ed114a85c3761d87f9b8f453d842c71235aa64fff99f", "id": 1977, "name": "LogString", "nameLocation": "151:9:5", "nodeType": "EventDefinition", "parameters": {"id": 1976, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1975, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1977, "src": "161:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1974, "name": "string", "nodeType": "ElementaryTypeName", "src": "161:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "160:8:5"}, "src": "145:24:5"}, {"anonymous": false, "eventSelector": "eb03ca8c87c7849bef8f54cfdd2c6b967b2734fe872f751978c34bb91e13d351", "id": 1981, "name": "AssertFail", "nameLocation": "181:10:5", "nodeType": "EventDefinition", "parameters": {"id": 1980, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1979, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1981, "src": "192:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1978, "name": "string", "nodeType": "ElementaryTypeName", "src": "192:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "191:8:5"}, "src": "175:25:5"}, {"anonymous": false, "eventSelector": "2d2d38c9a34df9887a6dcb2a54c1f79ff8bf9c4d4cafacd7d1f7277f57baab6f", "id": 1985, "name": "AssertEqFail", "nameLocation": "211:12:5", "nodeType": "EventDefinition", "parameters": {"id": 1984, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1983, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1985, "src": "224:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1982, "name": "string", "nodeType": "ElementaryTypeName", "src": "224:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "223:8:5"}, "src": "205:27:5"}, {"anonymous": false, "eventSelector": "ff4de080d2384f233e1a4fb3268e8f715d8802217ad2382235900a274dde76dd", "id": 1989, "name": "AssertNeqFail", "nameLocation": "243:13:5", "nodeType": "EventDefinition", "parameters": {"id": 1988, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1987, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1989, "src": "257:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1986, "name": "string", "nodeType": "ElementaryTypeName", "src": "257:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "256:8:5"}, "src": "237:28:5"}, {"anonymous": false, "eventSelector": "94424ed24fb39638b64817c737dd443f387aaa1486614da449b6686a642d6d6c", "id": 1993, "name": "AssertGteFail", "nameLocation": "276:13:5", "nodeType": "EventDefinition", "parameters": {"id": 1992, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1991, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1993, "src": "290:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1990, "name": "string", "nodeType": "ElementaryTypeName", "src": "290:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "289:8:5"}, "src": "270:28:5"}, {"anonymous": false, "eventSelector": "707b8c56e4c211cf1321faeb4148237062228db2fcecc9be487e83a2680e7e50", "id": 1997, "name": "AssertGtFail", "nameLocation": "309:12:5", "nodeType": "EventDefinition", "parameters": {"id": 1996, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1995, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1997, "src": "322:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1994, "name": "string", "nodeType": "ElementaryTypeName", "src": "322:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "321:8:5"}, "src": "303:27:5"}, {"anonymous": false, "eventSelector": "62bdda9a05cdbcdbf905cbad99c6ebdc098b6f0933d8f2eb3cfab7400b602514", "id": 2001, "name": "AssertLteFail", "nameLocation": "341:13:5", "nodeType": "EventDefinition", "parameters": {"id": 2000, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1999, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2001, "src": "355:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1998, "name": "string", "nodeType": "ElementaryTypeName", "src": "355:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "354:8:5"}, "src": "335:28:5"}, {"anonymous": false, "eventSelector": "46d01dfbc4861b5b859d858d541e8b0046175a8dece70e24f892a3318f70e2bb", "id": 2005, "name": "AssertLtFail", "nameLocation": "374:12:5", "nodeType": "EventDefinition", "parameters": {"id": 2004, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2003, "indexed": false, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2005, "src": "387:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2002, "name": "string", "nodeType": "ElementaryTypeName", "src": "387:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "386:8:5"}, "src": "368:27:5"}, {"body": {"id": 2024, "nodeType": "Block", "src": "463:99:5", "statements": [{"condition": {"id": 2013, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "477:2:5", "subExpression": {"id": 2012, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2007, "src": "478:1:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2023, "nodeType": "IfStatement", "src": "473:83:5", "trueBody": {"id": 2022, "nodeType": "Block", "src": "481:75:5", "statements": [{"eventCall": {"arguments": [{"id": 2015, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2009, "src": "511:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2014, "name": "AssertFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1981, "src": "500:10:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2016, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "500:18:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2017, "nodeType": "EmitStatement", "src": "495:23:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2019, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "539:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2018, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "532:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2020, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "532:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2021, "nodeType": "ExpressionStatement", "src": "532:13:5"}]}}]}, "id": 2025, "implemented": true, "kind": "function", "modifiers": [], "name": "assertWithMsg", "nameLocation": "410:13:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2010, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2007, "mutability": "mutable", "name": "b", "nameLocation": "429:1:5", "nodeType": "VariableDeclaration", "scope": 2025, "src": "424:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 2006, "name": "bool", "nodeType": "ElementaryTypeName", "src": "424:4:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}, {"constant": false, "id": 2009, "mutability": "mutable", "name": "reason", "nameLocation": "446:6:5", "nodeType": "VariableDeclaration", "scope": 2025, "src": "432:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2008, "name": "string", "nodeType": "ElementaryTypeName", "src": "432:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "423:30:5"}, "returnParameters": {"id": 2011, "nodeType": "ParameterList", "parameters": [], "src": "463:0:5"}, "scope": 3325, "src": "401:161:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2077, "nodeType": "Block", "src": "721:466:5", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2037, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2035, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2028, "src": "735:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"id": 2036, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2030, "src": "740:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "735:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2076, "nodeType": "IfStatement", "src": "731:450:5", "trueBody": {"id": 2075, "nodeType": "Block", "src": "743:438:5", "statements": [{"assignments": [2039], "declarations": [{"constant": false, "id": 2039, "mutability": "mutable", "name": "aStr", "nameLocation": "771:4:5", "nodeType": "VariableDeclaration", "scope": 2075, "src": "757:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2038, "name": "string", "nodeType": "ElementaryTypeName", "src": "757:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2044, "initialValue": {"arguments": [{"id": 2042, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2028, "src": "807:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2040, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "778:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2041, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "798:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "778:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2043, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "778:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "757:52:5"}, {"assignments": [2046], "declarations": [{"constant": false, "id": 2046, "mutability": "mutable", "name": "bStr", "nameLocation": "837:4:5", "nodeType": "VariableDeclaration", "scope": 2075, "src": "823:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2045, "name": "string", "nodeType": "ElementaryTypeName", "src": "823:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2051, "initialValue": {"arguments": [{"id": 2049, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2030, "src": "873:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2047, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "844:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2048, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "864:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "844:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2050, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "844:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "823:52:5"}, {"assignments": [2053], "declarations": [{"constant": false, "id": 2053, "mutability": "mutable", "name": "assertMsg", "nameLocation": "902:9:5", "nodeType": "VariableDeclaration", "scope": 2075, "src": "889:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2052, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "889:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2063, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2056, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "948:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2057, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2039, "src": "977:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "213d", "id": 2058, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "999:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_9ac244772c728e3ea33abaab05d51ed9065114029a53892fd1ed2fbb33ede3c8", "typeString": "literal_string \"!=\""}, "value": "!="}, {"id": 2059, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2046, "src": "1021:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "2c20726561736f6e3a20", "id": 2060, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1043:12:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, "value": ", reason: "}, {"id": 2061, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2032, "src": "1073:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_9ac244772c728e3ea33abaab05d51ed9065114029a53892fd1ed2fbb33ede3c8", "typeString": "literal_string \"!=\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2054, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "914:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2055, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "918:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "914:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2062, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "914:179:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "889:204:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2067, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2053, "src": "1132:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2066, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1125:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2065, "name": "string", "nodeType": "ElementaryTypeName", "src": "1125:6:5", "typeDescriptions": {}}}, "id": 2068, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1125:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2064, "name": "AssertEqFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1985, "src": "1112:12:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2069, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1112:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2070, "nodeType": "EmitStatement", "src": "1107:36:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2072, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1164:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2071, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "1157:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2073, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1157:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2074, "nodeType": "ExpressionStatement", "src": "1157:13:5"}]}}]}, "documentation": {"id": 2026, "nodeType": "StructuredDocumentation", "src": "568:77:5", "text": "@notice asserts that a is equal to b. Violations are logged using reason."}, "id": 2078, "implemented": true, "kind": "function", "modifiers": [], "name": "assertEq", "nameLocation": "659:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2033, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2028, "mutability": "mutable", "name": "a", "nameLocation": "676:1:5", "nodeType": "VariableDeclaration", "scope": 2078, "src": "668:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2027, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "668:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2030, "mutability": "mutable", "name": "b", "nameLocation": "687:1:5", "nodeType": "VariableDeclaration", "scope": 2078, "src": "679:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2029, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "679:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2032, "mutability": "mutable", "name": "reason", "nameLocation": "704:6:5", "nodeType": "VariableDeclaration", "scope": 2078, "src": "690:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2031, "name": "string", "nodeType": "ElementaryTypeName", "src": "690:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "667:44:5"}, "returnParameters": {"id": 2034, "nodeType": "ParameterList", "parameters": [], "src": "721:0:5"}, "scope": 3325, "src": "650:537:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2130, "nodeType": "Block", "src": "1305:466:5", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2090, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2088, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2081, "src": "1319:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"id": 2089, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2083, "src": "1324:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "1319:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2129, "nodeType": "IfStatement", "src": "1315:450:5", "trueBody": {"id": 2128, "nodeType": "Block", "src": "1327:438:5", "statements": [{"assignments": [2092], "declarations": [{"constant": false, "id": 2092, "mutability": "mutable", "name": "aStr", "nameLocation": "1355:4:5", "nodeType": "VariableDeclaration", "scope": 2128, "src": "1341:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2091, "name": "string", "nodeType": "ElementaryTypeName", "src": "1341:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2097, "initialValue": {"arguments": [{"id": 2095, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2081, "src": "1391:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2093, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "1362:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2094, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1382:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "1362:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2096, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1362:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "1341:52:5"}, {"assignments": [2099], "declarations": [{"constant": false, "id": 2099, "mutability": "mutable", "name": "bStr", "nameLocation": "1421:4:5", "nodeType": "VariableDeclaration", "scope": 2128, "src": "1407:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2098, "name": "string", "nodeType": "ElementaryTypeName", "src": "1407:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2104, "initialValue": {"arguments": [{"id": 2102, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2083, "src": "1457:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2100, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "1428:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2101, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1448:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "1428:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2103, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1428:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "1407:52:5"}, {"assignments": [2106], "declarations": [{"constant": false, "id": 2106, "mutability": "mutable", "name": "assertMsg", "nameLocation": "1486:9:5", "nodeType": "VariableDeclaration", "scope": 2128, "src": "1473:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2105, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1473:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2116, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2109, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1532:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2110, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2092, "src": "1561:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "213d", "id": 2111, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1583:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_9ac244772c728e3ea33abaab05d51ed9065114029a53892fd1ed2fbb33ede3c8", "typeString": "literal_string \"!=\""}, "value": "!="}, {"id": 2112, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2099, "src": "1605:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "2c20726561736f6e3a20", "id": 2113, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1627:12:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, "value": ", reason: "}, {"id": 2114, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2085, "src": "1657:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_9ac244772c728e3ea33abaab05d51ed9065114029a53892fd1ed2fbb33ede3c8", "typeString": "literal_string \"!=\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2107, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "1498:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2108, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "1502:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "1498:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2115, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1498:179:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "1473:204:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2120, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2106, "src": "1716:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2119, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1709:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2118, "name": "string", "nodeType": "ElementaryTypeName", "src": "1709:6:5", "typeDescriptions": {}}}, "id": 2121, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1709:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2117, "name": "AssertEqFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1985, "src": "1696:12:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2122, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1696:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2123, "nodeType": "EmitStatement", "src": "1691:36:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2125, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1748:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2124, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "1741:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2126, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1741:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2127, "nodeType": "ExpressionStatement", "src": "1741:13:5"}]}}]}, "documentation": {"id": 2079, "nodeType": "StructuredDocumentation", "src": "1193:38:5", "text": "@notice int256 version of assertEq"}, "id": 2131, "implemented": true, "kind": "function", "modifiers": [], "name": "assertEq", "nameLocation": "1245:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2086, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2081, "mutability": "mutable", "name": "a", "nameLocation": "1261:1:5", "nodeType": "VariableDeclaration", "scope": 2131, "src": "1254:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2080, "name": "int256", "nodeType": "ElementaryTypeName", "src": "1254:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2083, "mutability": "mutable", "name": "b", "nameLocation": "1271:1:5", "nodeType": "VariableDeclaration", "scope": 2131, "src": "1264:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2082, "name": "int256", "nodeType": "ElementaryTypeName", "src": "1264:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2085, "mutability": "mutable", "name": "reason", "nameLocation": "1288:6:5", "nodeType": "VariableDeclaration", "scope": 2131, "src": "1274:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2084, "name": "string", "nodeType": "ElementaryTypeName", "src": "1274:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "1253:42:5"}, "returnParameters": {"id": 2087, "nodeType": "ParameterList", "parameters": [], "src": "1305:0:5"}, "scope": 3325, "src": "1236:535:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2183, "nodeType": "Block", "src": "1935:467:5", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2143, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2141, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2134, "src": "1949:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"id": 2142, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2136, "src": "1954:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "1949:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2182, "nodeType": "IfStatement", "src": "1945:451:5", "trueBody": {"id": 2181, "nodeType": "Block", "src": "1957:439:5", "statements": [{"assignments": [2145], "declarations": [{"constant": false, "id": 2145, "mutability": "mutable", "name": "aStr", "nameLocation": "1985:4:5", "nodeType": "VariableDeclaration", "scope": 2181, "src": "1971:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2144, "name": "string", "nodeType": "ElementaryTypeName", "src": "1971:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2150, "initialValue": {"arguments": [{"id": 2148, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2134, "src": "2021:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2146, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "1992:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2147, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2012:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "1992:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2149, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1992:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "1971:52:5"}, {"assignments": [2152], "declarations": [{"constant": false, "id": 2152, "mutability": "mutable", "name": "bStr", "nameLocation": "2051:4:5", "nodeType": "VariableDeclaration", "scope": 2181, "src": "2037:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2151, "name": "string", "nodeType": "ElementaryTypeName", "src": "2037:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2157, "initialValue": {"arguments": [{"id": 2155, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2136, "src": "2087:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2153, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "2058:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2154, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2078:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "2058:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2156, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2058:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "2037:52:5"}, {"assignments": [2159], "declarations": [{"constant": false, "id": 2159, "mutability": "mutable", "name": "assertMsg", "nameLocation": "2116:9:5", "nodeType": "VariableDeclaration", "scope": 2181, "src": "2103:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2158, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2103:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2169, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2162, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2162:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2163, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2145, "src": "2191:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3d3d", "id": 2164, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2213:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_8130d264cf52b536814fc69bd2deac50f17224d36413db41792fe7f8742c2b5a", "typeString": "literal_string \"==\""}, "value": "=="}, {"id": 2165, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2152, "src": "2235:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "2c20726561736f6e3a20", "id": 2166, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2257:12:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, "value": ", reason: "}, {"id": 2167, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2138, "src": "2287:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_8130d264cf52b536814fc69bd2deac50f17224d36413db41792fe7f8742c2b5a", "typeString": "literal_string \"==\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2160, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "2128:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2161, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "2132:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "2128:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2168, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2128:179:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "2103:204:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2173, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2159, "src": "2347:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2172, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2340:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2171, "name": "string", "nodeType": "ElementaryTypeName", "src": "2340:6:5", "typeDescriptions": {}}}, "id": 2174, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2340:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2170, "name": "AssertNeqFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1989, "src": "2326:13:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2175, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2326:32:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2176, "nodeType": "EmitStatement", "src": "2321:37:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2178, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2379:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2177, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "2372:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2179, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2372:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2180, "nodeType": "ExpressionStatement", "src": "2372:13:5"}]}}]}, "documentation": {"id": 2132, "nodeType": "StructuredDocumentation", "src": "1777:81:5", "text": "@notice asserts that a is not equal to b. Violations are logged using reason."}, "id": 2184, "implemented": true, "kind": "function", "modifiers": [], "name": "assertNeq", "nameLocation": "1872:9:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2139, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2134, "mutability": "mutable", "name": "a", "nameLocation": "1890:1:5", "nodeType": "VariableDeclaration", "scope": 2184, "src": "1882:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2133, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1882:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2136, "mutability": "mutable", "name": "b", "nameLocation": "1901:1:5", "nodeType": "VariableDeclaration", "scope": 2184, "src": "1893:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2135, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1893:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2138, "mutability": "mutable", "name": "reason", "nameLocation": "1918:6:5", "nodeType": "VariableDeclaration", "scope": 2184, "src": "1904:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2137, "name": "string", "nodeType": "ElementaryTypeName", "src": "1904:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "1881:44:5"}, "returnParameters": {"id": 2140, "nodeType": "ParameterList", "parameters": [], "src": "1935:0:5"}, "scope": 3325, "src": "1863:539:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2236, "nodeType": "Block", "src": "2522:467:5", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2196, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2194, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2187, "src": "2536:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"id": 2195, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2189, "src": "2541:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "2536:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2235, "nodeType": "IfStatement", "src": "2532:451:5", "trueBody": {"id": 2234, "nodeType": "Block", "src": "2544:439:5", "statements": [{"assignments": [2198], "declarations": [{"constant": false, "id": 2198, "mutability": "mutable", "name": "aStr", "nameLocation": "2572:4:5", "nodeType": "VariableDeclaration", "scope": 2234, "src": "2558:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2197, "name": "string", "nodeType": "ElementaryTypeName", "src": "2558:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2203, "initialValue": {"arguments": [{"id": 2201, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2187, "src": "2608:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2199, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "2579:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2200, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2599:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "2579:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2202, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2579:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "2558:52:5"}, {"assignments": [2205], "declarations": [{"constant": false, "id": 2205, "mutability": "mutable", "name": "bStr", "nameLocation": "2638:4:5", "nodeType": "VariableDeclaration", "scope": 2234, "src": "2624:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2204, "name": "string", "nodeType": "ElementaryTypeName", "src": "2624:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2210, "initialValue": {"arguments": [{"id": 2208, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2189, "src": "2674:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2206, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "2645:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2207, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "2665:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "2645:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2209, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2645:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "2624:52:5"}, {"assignments": [2212], "declarations": [{"constant": false, "id": 2212, "mutability": "mutable", "name": "assertMsg", "nameLocation": "2703:9:5", "nodeType": "VariableDeclaration", "scope": 2234, "src": "2690:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2211, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2690:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2222, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2215, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2749:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2216, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2198, "src": "2778:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3d3d", "id": 2217, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2800:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_8130d264cf52b536814fc69bd2deac50f17224d36413db41792fe7f8742c2b5a", "typeString": "literal_string \"==\""}, "value": "=="}, {"id": 2218, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2205, "src": "2822:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "2c20726561736f6e3a20", "id": 2219, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2844:12:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, "value": ", reason: "}, {"id": 2220, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2191, "src": "2874:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_8130d264cf52b536814fc69bd2deac50f17224d36413db41792fe7f8742c2b5a", "typeString": "literal_string \"==\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_68aafd6ce5f4c8c01f1a6c1420710cbab2e4c385956276bf1e4d9990c2b26817", "typeString": "literal_string \", reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2213, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "2715:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2214, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "2719:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "2715:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2221, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2715:179:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "2690:204:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2226, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2212, "src": "2934:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2225, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2927:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2224, "name": "string", "nodeType": "ElementaryTypeName", "src": "2927:6:5", "typeDescriptions": {}}}, "id": 2227, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2927:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2223, "name": "AssertNeqFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1989, "src": "2913:13:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2228, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2913:32:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2229, "nodeType": "EmitStatement", "src": "2908:37:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2231, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2966:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2230, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "2959:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2232, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2959:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2233, "nodeType": "ExpressionStatement", "src": "2959:13:5"}]}}]}, "documentation": {"id": 2185, "nodeType": "StructuredDocumentation", "src": "2408:39:5", "text": "@notice int256 version of assertNeq"}, "id": 2237, "implemented": true, "kind": "function", "modifiers": [], "name": "assertNeq", "nameLocation": "2461:9:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2192, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2187, "mutability": "mutable", "name": "a", "nameLocation": "2478:1:5", "nodeType": "VariableDeclaration", "scope": 2237, "src": "2471:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2186, "name": "int256", "nodeType": "ElementaryTypeName", "src": "2471:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2189, "mutability": "mutable", "name": "b", "nameLocation": "2488:1:5", "nodeType": "VariableDeclaration", "scope": 2237, "src": "2481:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2188, "name": "int256", "nodeType": "ElementaryTypeName", "src": "2481:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2191, "mutability": "mutable", "name": "reason", "nameLocation": "2505:6:5", "nodeType": "VariableDeclaration", "scope": 2237, "src": "2491:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2190, "name": "string", "nodeType": "ElementaryTypeName", "src": "2491:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "2470:42:5"}, "returnParameters": {"id": 2193, "nodeType": "ParameterList", "parameters": [], "src": "2522:0:5"}, "scope": 3325, "src": "2452:537:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2291, "nodeType": "Block", "src": "3165:476:5", "statements": [{"condition": {"id": 2251, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "3179:9:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2249, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2247, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2240, "src": "3181:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": {"id": 2248, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2242, "src": "3186:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "3181:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2250, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "3180:8:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2290, "nodeType": "IfStatement", "src": "3175:460:5", "trueBody": {"id": 2289, "nodeType": "Block", "src": "3190:445:5", "statements": [{"assignments": [2253], "declarations": [{"constant": false, "id": 2253, "mutability": "mutable", "name": "aStr", "nameLocation": "3218:4:5", "nodeType": "VariableDeclaration", "scope": 2289, "src": "3204:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2252, "name": "string", "nodeType": "ElementaryTypeName", "src": "3204:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2258, "initialValue": {"arguments": [{"id": 2256, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2240, "src": "3254:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2254, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "3225:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2255, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3245:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "3225:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2257, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3225:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "3204:52:5"}, {"assignments": [2260], "declarations": [{"constant": false, "id": 2260, "mutability": "mutable", "name": "bStr", "nameLocation": "3284:4:5", "nodeType": "VariableDeclaration", "scope": 2289, "src": "3270:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2259, "name": "string", "nodeType": "ElementaryTypeName", "src": "3270:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2265, "initialValue": {"arguments": [{"id": 2263, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2242, "src": "3320:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2261, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "3291:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2262, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3311:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "3291:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2264, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3291:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "3270:52:5"}, {"assignments": [2267], "declarations": [{"constant": false, "id": 2267, "mutability": "mutable", "name": "assertMsg", "nameLocation": "3349:9:5", "nodeType": "VariableDeclaration", "scope": 2289, "src": "3336:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2266, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3336:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2277, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2270, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3395:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2271, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2253, "src": "3424:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3c", "id": 2272, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3446:3:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_8cb938a03d27235fdf22924e770f8c8a7fc7441e706e979b359839d1efe72520", "typeString": "literal_string \"<\""}, "value": "<"}, {"id": 2273, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2260, "src": "3467:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2274, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3489:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2275, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2244, "src": "3526:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_8cb938a03d27235fdf22924e770f8c8a7fc7441e706e979b359839d1efe72520", "typeString": "literal_string \"<\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2268, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "3361:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2269, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "3365:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "3361:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2276, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3361:185:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "3336:210:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2281, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2267, "src": "3586:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2280, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3579:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2279, "name": "string", "nodeType": "ElementaryTypeName", "src": "3579:6:5", "typeDescriptions": {}}}, "id": 2282, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3579:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2278, "name": "AssertGteFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1993, "src": "3565:13:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2283, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3565:32:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2284, "nodeType": "EmitStatement", "src": "3560:37:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2286, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "3618:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2285, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "3611:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2287, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3611:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2288, "nodeType": "ExpressionStatement", "src": "3611:13:5"}]}}]}, "documentation": {"id": 2238, "nodeType": "StructuredDocumentation", "src": "2995:93:5", "text": "@notice asserts that a is greater than or equal to b. Violations are logged using reason."}, "id": 2292, "implemented": true, "kind": "function", "modifiers": [], "name": "assertGte", "nameLocation": "3102:9:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2245, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2240, "mutability": "mutable", "name": "a", "nameLocation": "3120:1:5", "nodeType": "VariableDeclaration", "scope": 2292, "src": "3112:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2239, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3112:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2242, "mutability": "mutable", "name": "b", "nameLocation": "3131:1:5", "nodeType": "VariableDeclaration", "scope": 2292, "src": "3123:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2241, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3123:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2244, "mutability": "mutable", "name": "reason", "nameLocation": "3148:6:5", "nodeType": "VariableDeclaration", "scope": 2292, "src": "3134:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2243, "name": "string", "nodeType": "ElementaryTypeName", "src": "3134:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "3111:44:5"}, "returnParameters": {"id": 2246, "nodeType": "ParameterList", "parameters": [], "src": "3165:0:5"}, "scope": 3325, "src": "3093:548:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2346, "nodeType": "Block", "src": "3761:476:5", "statements": [{"condition": {"id": 2306, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "3775:9:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2304, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2302, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2295, "src": "3777:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": {"id": 2303, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2297, "src": "3782:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "3777:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2305, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "3776:8:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2345, "nodeType": "IfStatement", "src": "3771:460:5", "trueBody": {"id": 2344, "nodeType": "Block", "src": "3786:445:5", "statements": [{"assignments": [2308], "declarations": [{"constant": false, "id": 2308, "mutability": "mutable", "name": "aStr", "nameLocation": "3814:4:5", "nodeType": "VariableDeclaration", "scope": 2344, "src": "3800:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2307, "name": "string", "nodeType": "ElementaryTypeName", "src": "3800:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2313, "initialValue": {"arguments": [{"id": 2311, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2295, "src": "3850:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2309, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "3821:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2310, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3841:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "3821:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2312, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3821:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "3800:52:5"}, {"assignments": [2315], "declarations": [{"constant": false, "id": 2315, "mutability": "mutable", "name": "bStr", "nameLocation": "3880:4:5", "nodeType": "VariableDeclaration", "scope": 2344, "src": "3866:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2314, "name": "string", "nodeType": "ElementaryTypeName", "src": "3866:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2320, "initialValue": {"arguments": [{"id": 2318, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2297, "src": "3916:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2316, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "3887:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2317, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3907:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "3887:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2319, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3887:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "3866:52:5"}, {"assignments": [2322], "declarations": [{"constant": false, "id": 2322, "mutability": "mutable", "name": "assertMsg", "nameLocation": "3945:9:5", "nodeType": "VariableDeclaration", "scope": 2344, "src": "3932:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2321, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3932:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2332, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2325, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3991:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2326, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2308, "src": "4020:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3c", "id": 2327, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4042:3:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_8cb938a03d27235fdf22924e770f8c8a7fc7441e706e979b359839d1efe72520", "typeString": "literal_string \"<\""}, "value": "<"}, {"id": 2328, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2315, "src": "4063:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2329, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4085:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2330, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2299, "src": "4122:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_8cb938a03d27235fdf22924e770f8c8a7fc7441e706e979b359839d1efe72520", "typeString": "literal_string \"<\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2323, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "3957:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2324, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "3961:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "3957:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2331, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3957:185:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "3932:210:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2336, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2322, "src": "4182:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2335, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4175:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2334, "name": "string", "nodeType": "ElementaryTypeName", "src": "4175:6:5", "typeDescriptions": {}}}, "id": 2337, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4175:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2333, "name": "AssertGteFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1993, "src": "4161:13:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2338, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4161:32:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2339, "nodeType": "EmitStatement", "src": "4156:37:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2341, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "4214:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2340, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "4207:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2342, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4207:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2343, "nodeType": "ExpressionStatement", "src": "4207:13:5"}]}}]}, "documentation": {"id": 2293, "nodeType": "StructuredDocumentation", "src": "3647:39:5", "text": "@notice int256 version of assertGte"}, "id": 2347, "implemented": true, "kind": "function", "modifiers": [], "name": "assertGte", "nameLocation": "3700:9:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2300, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2295, "mutability": "mutable", "name": "a", "nameLocation": "3717:1:5", "nodeType": "VariableDeclaration", "scope": 2347, "src": "3710:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2294, "name": "int256", "nodeType": "ElementaryTypeName", "src": "3710:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2297, "mutability": "mutable", "name": "b", "nameLocation": "3727:1:5", "nodeType": "VariableDeclaration", "scope": 2347, "src": "3720:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2296, "name": "int256", "nodeType": "ElementaryTypeName", "src": "3720:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2299, "mutability": "mutable", "name": "reason", "nameLocation": "3744:6:5", "nodeType": "VariableDeclaration", "scope": 2347, "src": "3730:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2298, "name": "string", "nodeType": "ElementaryTypeName", "src": "3730:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "3709:42:5"}, "returnParameters": {"id": 2301, "nodeType": "ParameterList", "parameters": [], "src": "3761:0:5"}, "scope": 3325, "src": "3691:546:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2401, "nodeType": "Block", "src": "4400:475:5", "statements": [{"condition": {"id": 2361, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "4414:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2359, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2357, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2350, "src": "4416:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 2358, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2352, "src": "4420:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "4416:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2360, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "4415:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2400, "nodeType": "IfStatement", "src": "4410:459:5", "trueBody": {"id": 2399, "nodeType": "Block", "src": "4424:445:5", "statements": [{"assignments": [2363], "declarations": [{"constant": false, "id": 2363, "mutability": "mutable", "name": "aStr", "nameLocation": "4452:4:5", "nodeType": "VariableDeclaration", "scope": 2399, "src": "4438:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2362, "name": "string", "nodeType": "ElementaryTypeName", "src": "4438:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2368, "initialValue": {"arguments": [{"id": 2366, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2350, "src": "4488:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2364, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "4459:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2365, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4479:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "4459:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2367, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4459:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "4438:52:5"}, {"assignments": [2370], "declarations": [{"constant": false, "id": 2370, "mutability": "mutable", "name": "bStr", "nameLocation": "4518:4:5", "nodeType": "VariableDeclaration", "scope": 2399, "src": "4504:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2369, "name": "string", "nodeType": "ElementaryTypeName", "src": "4504:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2375, "initialValue": {"arguments": [{"id": 2373, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2352, "src": "4554:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2371, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "4525:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2372, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "4545:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "4525:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2374, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4525:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "4504:52:5"}, {"assignments": [2377], "declarations": [{"constant": false, "id": 2377, "mutability": "mutable", "name": "assertMsg", "nameLocation": "4583:9:5", "nodeType": "VariableDeclaration", "scope": 2399, "src": "4570:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2376, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "4570:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2387, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2380, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4629:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2381, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2363, "src": "4658:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3c3d", "id": 2382, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4680:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_e5a87a2aa5cf9e4c4a6b6ca07e0c091c8a0118e9066affa9adc7f6ae150a71a2", "typeString": "literal_string \"<=\""}, "value": "<="}, {"id": 2383, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2370, "src": "4702:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2384, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4724:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2385, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2354, "src": "4761:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_e5a87a2aa5cf9e4c4a6b6ca07e0c091c8a0118e9066affa9adc7f6ae150a71a2", "typeString": "literal_string \"<=\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2378, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "4595:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2379, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "4599:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "4595:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2386, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4595:186:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "4570:211:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2391, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2377, "src": "4820:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2390, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4813:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2389, "name": "string", "nodeType": "ElementaryTypeName", "src": "4813:6:5", "typeDescriptions": {}}}, "id": 2392, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4813:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2388, "name": "AssertGtFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1997, "src": "4800:12:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2393, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4800:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2394, "nodeType": "EmitStatement", "src": "4795:36:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2396, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "4852:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2395, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "4845:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2397, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4845:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2398, "nodeType": "ExpressionStatement", "src": "4845:13:5"}]}}]}, "documentation": {"id": 2348, "nodeType": "StructuredDocumentation", "src": "4243:81:5", "text": "@notice asserts that a is greater than b. Violations are logged using reason."}, "id": 2402, "implemented": true, "kind": "function", "modifiers": [], "name": "assertGt", "nameLocation": "4338:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2355, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2350, "mutability": "mutable", "name": "a", "nameLocation": "4355:1:5", "nodeType": "VariableDeclaration", "scope": 2402, "src": "4347:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2349, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4347:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2352, "mutability": "mutable", "name": "b", "nameLocation": "4366:1:5", "nodeType": "VariableDeclaration", "scope": 2402, "src": "4358:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2351, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4358:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2354, "mutability": "mutable", "name": "reason", "nameLocation": "4383:6:5", "nodeType": "VariableDeclaration", "scope": 2402, "src": "4369:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2353, "name": "string", "nodeType": "ElementaryTypeName", "src": "4369:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "4346:44:5"}, "returnParameters": {"id": 2356, "nodeType": "ParameterList", "parameters": [], "src": "4400:0:5"}, "scope": 3325, "src": "4329:546:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2456, "nodeType": "Block", "src": "4993:475:5", "statements": [{"condition": {"id": 2416, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "5007:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2414, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2412, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2405, "src": "5009:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 2413, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2407, "src": "5013:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "5009:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2415, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "5008:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2455, "nodeType": "IfStatement", "src": "5003:459:5", "trueBody": {"id": 2454, "nodeType": "Block", "src": "5017:445:5", "statements": [{"assignments": [2418], "declarations": [{"constant": false, "id": 2418, "mutability": "mutable", "name": "aStr", "nameLocation": "5045:4:5", "nodeType": "VariableDeclaration", "scope": 2454, "src": "5031:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2417, "name": "string", "nodeType": "ElementaryTypeName", "src": "5031:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2423, "initialValue": {"arguments": [{"id": 2421, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2405, "src": "5081:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2419, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "5052:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2420, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5072:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "5052:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2422, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5052:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "5031:52:5"}, {"assignments": [2425], "declarations": [{"constant": false, "id": 2425, "mutability": "mutable", "name": "bStr", "nameLocation": "5111:4:5", "nodeType": "VariableDeclaration", "scope": 2454, "src": "5097:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2424, "name": "string", "nodeType": "ElementaryTypeName", "src": "5097:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2430, "initialValue": {"arguments": [{"id": 2428, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2407, "src": "5147:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2426, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "5118:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2427, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5138:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "5118:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2429, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5118:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "5097:52:5"}, {"assignments": [2432], "declarations": [{"constant": false, "id": 2432, "mutability": "mutable", "name": "assertMsg", "nameLocation": "5176:9:5", "nodeType": "VariableDeclaration", "scope": 2454, "src": "5163:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2431, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "5163:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2442, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2435, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5222:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2436, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2418, "src": "5251:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3c3d", "id": 2437, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5273:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_e5a87a2aa5cf9e4c4a6b6ca07e0c091c8a0118e9066affa9adc7f6ae150a71a2", "typeString": "literal_string \"<=\""}, "value": "<="}, {"id": 2438, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2425, "src": "5295:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2439, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5317:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2440, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2409, "src": "5354:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_e5a87a2aa5cf9e4c4a6b6ca07e0c091c8a0118e9066affa9adc7f6ae150a71a2", "typeString": "literal_string \"<=\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2433, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "5188:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2434, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "5192:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "5188:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2441, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5188:186:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "5163:211:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2446, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2432, "src": "5413:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2445, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5406:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2444, "name": "string", "nodeType": "ElementaryTypeName", "src": "5406:6:5", "typeDescriptions": {}}}, "id": 2447, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5406:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2443, "name": "AssertGtFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1997, "src": "5393:12:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2448, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5393:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2449, "nodeType": "EmitStatement", "src": "5388:36:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2451, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "5445:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2450, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "5438:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2452, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5438:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2453, "nodeType": "ExpressionStatement", "src": "5438:13:5"}]}}]}, "documentation": {"id": 2403, "nodeType": "StructuredDocumentation", "src": "4881:38:5", "text": "@notice int256 version of assertGt"}, "id": 2457, "implemented": true, "kind": "function", "modifiers": [], "name": "assertGt", "nameLocation": "4933:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2410, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2405, "mutability": "mutable", "name": "a", "nameLocation": "4949:1:5", "nodeType": "VariableDeclaration", "scope": 2457, "src": "4942:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2404, "name": "int256", "nodeType": "ElementaryTypeName", "src": "4942:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2407, "mutability": "mutable", "name": "b", "nameLocation": "4959:1:5", "nodeType": "VariableDeclaration", "scope": 2457, "src": "4952:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2406, "name": "int256", "nodeType": "ElementaryTypeName", "src": "4952:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2409, "mutability": "mutable", "name": "reason", "nameLocation": "4976:6:5", "nodeType": "VariableDeclaration", "scope": 2457, "src": "4962:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2408, "name": "string", "nodeType": "ElementaryTypeName", "src": "4962:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "4941:42:5"}, "returnParameters": {"id": 2411, "nodeType": "ParameterList", "parameters": [], "src": "4993:0:5"}, "scope": 3325, "src": "4924:544:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2511, "nodeType": "Block", "src": "5641:476:5", "statements": [{"condition": {"id": 2471, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "5655:9:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2469, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2467, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2460, "src": "5657:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": {"id": 2468, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2462, "src": "5662:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "5657:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2470, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "5656:8:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2510, "nodeType": "IfStatement", "src": "5651:460:5", "trueBody": {"id": 2509, "nodeType": "Block", "src": "5666:445:5", "statements": [{"assignments": [2473], "declarations": [{"constant": false, "id": 2473, "mutability": "mutable", "name": "aStr", "nameLocation": "5694:4:5", "nodeType": "VariableDeclaration", "scope": 2509, "src": "5680:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2472, "name": "string", "nodeType": "ElementaryTypeName", "src": "5680:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2478, "initialValue": {"arguments": [{"id": 2476, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2460, "src": "5730:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2474, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "5701:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2475, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5721:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "5701:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2477, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5701:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "5680:52:5"}, {"assignments": [2480], "declarations": [{"constant": false, "id": 2480, "mutability": "mutable", "name": "bStr", "nameLocation": "5760:4:5", "nodeType": "VariableDeclaration", "scope": 2509, "src": "5746:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2479, "name": "string", "nodeType": "ElementaryTypeName", "src": "5746:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2485, "initialValue": {"arguments": [{"id": 2483, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2462, "src": "5796:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2481, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "5767:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2482, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "5787:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "5767:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2484, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5767:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "5746:52:5"}, {"assignments": [2487], "declarations": [{"constant": false, "id": 2487, "mutability": "mutable", "name": "assertMsg", "nameLocation": "5825:9:5", "nodeType": "VariableDeclaration", "scope": 2509, "src": "5812:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2486, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "5812:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2497, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2490, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5871:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2491, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2473, "src": "5900:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3e", "id": 2492, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5922:3:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_eff31f7855752a3582db9a0d965d5063f23d94003e66f8c5a8f8e8fe2ab24753", "typeString": "literal_string \">\""}, "value": ">"}, {"id": 2493, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2480, "src": "5943:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2494, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5965:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2495, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2464, "src": "6002:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_eff31f7855752a3582db9a0d965d5063f23d94003e66f8c5a8f8e8fe2ab24753", "typeString": "literal_string \">\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2488, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "5837:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2489, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "5841:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "5837:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2496, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5837:185:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "5812:210:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2501, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2487, "src": "6062:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2500, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6055:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2499, "name": "string", "nodeType": "ElementaryTypeName", "src": "6055:6:5", "typeDescriptions": {}}}, "id": 2502, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6055:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2498, "name": "AssertLteFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2001, "src": "6041:13:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2503, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6041:32:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2504, "nodeType": "EmitStatement", "src": "6036:37:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2506, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "6094:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2505, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "6087:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2507, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6087:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2508, "nodeType": "ExpressionStatement", "src": "6087:13:5"}]}}]}, "documentation": {"id": 2458, "nodeType": "StructuredDocumentation", "src": "5474:90:5", "text": "@notice asserts that a is less than or equal to b. Violations are logged using reason."}, "id": 2512, "implemented": true, "kind": "function", "modifiers": [], "name": "assertLte", "nameLocation": "5578:9:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2465, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2460, "mutability": "mutable", "name": "a", "nameLocation": "5596:1:5", "nodeType": "VariableDeclaration", "scope": 2512, "src": "5588:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2459, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5588:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2462, "mutability": "mutable", "name": "b", "nameLocation": "5607:1:5", "nodeType": "VariableDeclaration", "scope": 2512, "src": "5599:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2461, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5599:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2464, "mutability": "mutable", "name": "reason", "nameLocation": "5624:6:5", "nodeType": "VariableDeclaration", "scope": 2512, "src": "5610:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2463, "name": "string", "nodeType": "ElementaryTypeName", "src": "5610:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "5587:44:5"}, "returnParameters": {"id": 2466, "nodeType": "ParameterList", "parameters": [], "src": "5641:0:5"}, "scope": 3325, "src": "5569:548:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2566, "nodeType": "Block", "src": "6237:476:5", "statements": [{"condition": {"id": 2526, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "6251:9:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2524, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2522, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2515, "src": "6253:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": {"id": 2523, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2517, "src": "6258:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "6253:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2525, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "6252:8:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2565, "nodeType": "IfStatement", "src": "6247:460:5", "trueBody": {"id": 2564, "nodeType": "Block", "src": "6262:445:5", "statements": [{"assignments": [2528], "declarations": [{"constant": false, "id": 2528, "mutability": "mutable", "name": "aStr", "nameLocation": "6290:4:5", "nodeType": "VariableDeclaration", "scope": 2564, "src": "6276:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2527, "name": "string", "nodeType": "ElementaryTypeName", "src": "6276:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2533, "initialValue": {"arguments": [{"id": 2531, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2515, "src": "6326:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2529, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "6297:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2530, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6317:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "6297:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2532, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6297:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "6276:52:5"}, {"assignments": [2535], "declarations": [{"constant": false, "id": 2535, "mutability": "mutable", "name": "bStr", "nameLocation": "6356:4:5", "nodeType": "VariableDeclaration", "scope": 2564, "src": "6342:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2534, "name": "string", "nodeType": "ElementaryTypeName", "src": "6342:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2540, "initialValue": {"arguments": [{"id": 2538, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2517, "src": "6392:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2536, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "6363:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2537, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6383:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "6363:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2539, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6363:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "6342:52:5"}, {"assignments": [2542], "declarations": [{"constant": false, "id": 2542, "mutability": "mutable", "name": "assertMsg", "nameLocation": "6421:9:5", "nodeType": "VariableDeclaration", "scope": 2564, "src": "6408:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2541, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "6408:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2552, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2545, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6467:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2546, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2528, "src": "6496:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3e", "id": 2547, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6518:3:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_eff31f7855752a3582db9a0d965d5063f23d94003e66f8c5a8f8e8fe2ab24753", "typeString": "literal_string \">\""}, "value": ">"}, {"id": 2548, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2535, "src": "6539:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2549, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "6561:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2550, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2519, "src": "6598:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_eff31f7855752a3582db9a0d965d5063f23d94003e66f8c5a8f8e8fe2ab24753", "typeString": "literal_string \">\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2543, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "6433:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2544, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "6437:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "6433:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2551, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6433:185:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "6408:210:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2556, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2542, "src": "6658:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2555, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6651:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2554, "name": "string", "nodeType": "ElementaryTypeName", "src": "6651:6:5", "typeDescriptions": {}}}, "id": 2557, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6651:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2553, "name": "AssertLteFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2001, "src": "6637:13:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2558, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6637:32:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2559, "nodeType": "EmitStatement", "src": "6632:37:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2561, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "6690:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2560, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "6683:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2562, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6683:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2563, "nodeType": "ExpressionStatement", "src": "6683:13:5"}]}}]}, "documentation": {"id": 2513, "nodeType": "StructuredDocumentation", "src": "6123:39:5", "text": "@notice int256 version of assertLte"}, "id": 2567, "implemented": true, "kind": "function", "modifiers": [], "name": "assertLte", "nameLocation": "6176:9:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2520, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2515, "mutability": "mutable", "name": "a", "nameLocation": "6193:1:5", "nodeType": "VariableDeclaration", "scope": 2567, "src": "6186:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2514, "name": "int256", "nodeType": "ElementaryTypeName", "src": "6186:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2517, "mutability": "mutable", "name": "b", "nameLocation": "6203:1:5", "nodeType": "VariableDeclaration", "scope": 2567, "src": "6196:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2516, "name": "int256", "nodeType": "ElementaryTypeName", "src": "6196:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2519, "mutability": "mutable", "name": "reason", "nameLocation": "6220:6:5", "nodeType": "VariableDeclaration", "scope": 2567, "src": "6206:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2518, "name": "string", "nodeType": "ElementaryTypeName", "src": "6206:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "6185:42:5"}, "returnParameters": {"id": 2521, "nodeType": "ParameterList", "parameters": [], "src": "6237:0:5"}, "scope": 3325, "src": "6167:546:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2621, "nodeType": "Block", "src": "6873:475:5", "statements": [{"condition": {"id": 2581, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "6887:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2579, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2577, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2570, "src": "6889:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 2578, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2572, "src": "6893:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "6889:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2580, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "6888:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2620, "nodeType": "IfStatement", "src": "6883:459:5", "trueBody": {"id": 2619, "nodeType": "Block", "src": "6897:445:5", "statements": [{"assignments": [2583], "declarations": [{"constant": false, "id": 2583, "mutability": "mutable", "name": "aStr", "nameLocation": "6925:4:5", "nodeType": "VariableDeclaration", "scope": 2619, "src": "6911:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2582, "name": "string", "nodeType": "ElementaryTypeName", "src": "6911:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2588, "initialValue": {"arguments": [{"id": 2586, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2570, "src": "6961:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2584, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "6932:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2585, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "6952:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "6932:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2587, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6932:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "6911:52:5"}, {"assignments": [2590], "declarations": [{"constant": false, "id": 2590, "mutability": "mutable", "name": "bStr", "nameLocation": "6991:4:5", "nodeType": "VariableDeclaration", "scope": 2619, "src": "6977:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2589, "name": "string", "nodeType": "ElementaryTypeName", "src": "6977:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2595, "initialValue": {"arguments": [{"id": 2593, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2572, "src": "7027:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2591, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "6998:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2592, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7018:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "6998:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2594, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6998:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "6977:52:5"}, {"assignments": [2597], "declarations": [{"constant": false, "id": 2597, "mutability": "mutable", "name": "assertMsg", "nameLocation": "7056:9:5", "nodeType": "VariableDeclaration", "scope": 2619, "src": "7043:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2596, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "7043:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2607, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2600, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7102:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2601, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2583, "src": "7131:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3e3d", "id": 2602, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7153:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_07cb807c6a0dff35ec91f1d7c9113298207e728f628c0def2060de1af723685a", "typeString": "literal_string \">=\""}, "value": ">="}, {"id": 2603, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2590, "src": "7175:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2604, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7197:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2605, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2574, "src": "7234:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_07cb807c6a0dff35ec91f1d7c9113298207e728f628c0def2060de1af723685a", "typeString": "literal_string \">=\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2598, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "7068:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2599, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "7072:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "7068:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2606, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7068:186:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "7043:211:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2611, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2597, "src": "7293:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2610, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7286:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2609, "name": "string", "nodeType": "ElementaryTypeName", "src": "7286:6:5", "typeDescriptions": {}}}, "id": 2612, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7286:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2608, "name": "AssertLtFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2005, "src": "7273:12:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2613, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7273:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2614, "nodeType": "EmitStatement", "src": "7268:36:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2616, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "7325:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2615, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "7318:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2617, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7318:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2618, "nodeType": "ExpressionStatement", "src": "7318:13:5"}]}}]}, "documentation": {"id": 2568, "nodeType": "StructuredDocumentation", "src": "6719:78:5", "text": "@notice asserts that a is less than b. Violations are logged using reason."}, "id": 2622, "implemented": true, "kind": "function", "modifiers": [], "name": "assertLt", "nameLocation": "6811:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2575, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2570, "mutability": "mutable", "name": "a", "nameLocation": "6828:1:5", "nodeType": "VariableDeclaration", "scope": 2622, "src": "6820:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2569, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6820:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2572, "mutability": "mutable", "name": "b", "nameLocation": "6839:1:5", "nodeType": "VariableDeclaration", "scope": 2622, "src": "6831:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2571, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6831:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2574, "mutability": "mutable", "name": "reason", "nameLocation": "6856:6:5", "nodeType": "VariableDeclaration", "scope": 2622, "src": "6842:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2573, "name": "string", "nodeType": "ElementaryTypeName", "src": "6842:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "6819:44:5"}, "returnParameters": {"id": 2576, "nodeType": "ParameterList", "parameters": [], "src": "6873:0:5"}, "scope": 3325, "src": "6802:546:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2676, "nodeType": "Block", "src": "7466:475:5", "statements": [{"condition": {"id": 2636, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "7480:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2634, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2632, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2625, "src": "7482:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 2633, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2627, "src": "7486:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "7482:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2635, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "7481:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2675, "nodeType": "IfStatement", "src": "7476:459:5", "trueBody": {"id": 2674, "nodeType": "Block", "src": "7490:445:5", "statements": [{"assignments": [2638], "declarations": [{"constant": false, "id": 2638, "mutability": "mutable", "name": "aStr", "nameLocation": "7518:4:5", "nodeType": "VariableDeclaration", "scope": 2674, "src": "7504:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2637, "name": "string", "nodeType": "ElementaryTypeName", "src": "7504:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2643, "initialValue": {"arguments": [{"id": 2641, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2625, "src": "7554:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2639, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "7525:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2640, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7545:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "7525:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2642, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7525:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "7504:52:5"}, {"assignments": [2645], "declarations": [{"constant": false, "id": 2645, "mutability": "mutable", "name": "bStr", "nameLocation": "7584:4:5", "nodeType": "VariableDeclaration", "scope": 2674, "src": "7570:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2644, "name": "string", "nodeType": "ElementaryTypeName", "src": "7570:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2650, "initialValue": {"arguments": [{"id": 2648, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2627, "src": "7620:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2646, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "7591:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2647, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "7611:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "7591:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2649, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7591:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "7570:52:5"}, {"assignments": [2652], "declarations": [{"constant": false, "id": 2652, "mutability": "mutable", "name": "assertMsg", "nameLocation": "7649:9:5", "nodeType": "VariableDeclaration", "scope": 2674, "src": "7636:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2651, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "7636:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2662, "initialValue": {"arguments": [{"hexValue": "496e76616c69643a20", "id": 2655, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7695:11:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, "value": "Invalid: "}, {"id": 2656, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2638, "src": "7724:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "3e3d", "id": 2657, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7746:4:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_07cb807c6a0dff35ec91f1d7c9113298207e728f628c0def2060de1af723685a", "typeString": "literal_string \">=\""}, "value": ">="}, {"id": 2658, "name": "bStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2645, "src": "7768:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "206661696c65642c20726561736f6e3a20", "id": 2659, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "7790:19:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, "value": " failed, reason: "}, {"id": 2660, "name": "reason", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2629, "src": "7827:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_cb7c02095b59e44b62caccfc408b07f84e51ee2862ad44796b4a1ab7d53b48e3", "typeString": "literal_string \"Invalid: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_07cb807c6a0dff35ec91f1d7c9113298207e728f628c0def2060de1af723685a", "typeString": "literal_string \">=\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_d501b2abb29eb8b4d6691bdcf6d7f5ab217a76ec7cf3d2437b0cf25b9ae52cc1", "typeString": "literal_string \" failed, reason: \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2653, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "7661:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2654, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "7665:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "7661:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2661, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7661:186:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "7636:211:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2666, "name": "assertMsg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2652, "src": "7886:9:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2665, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7879:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2664, "name": "string", "nodeType": "ElementaryTypeName", "src": "7879:6:5", "typeDescriptions": {}}}, "id": 2667, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7879:17:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2663, "name": "AssertLtFail", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2005, "src": "7866:12:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2668, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7866:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2669, "nodeType": "EmitStatement", "src": "7861:36:5"}, {"expression": {"arguments": [{"hexValue": "66616c7365", "id": 2671, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "7918:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 2670, "name": "assert", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -3, "src": "7911:6:5", "typeDescriptions": {"typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure"}}, "id": 2672, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7911:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2673, "nodeType": "ExpressionStatement", "src": "7911:13:5"}]}}]}, "documentation": {"id": 2623, "nodeType": "StructuredDocumentation", "src": "7354:38:5", "text": "@notice int256 version of assertLt"}, "id": 2677, "implemented": true, "kind": "function", "modifiers": [], "name": "assertLt", "nameLocation": "7406:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2630, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2625, "mutability": "mutable", "name": "a", "nameLocation": "7422:1:5", "nodeType": "VariableDeclaration", "scope": 2677, "src": "7415:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2624, "name": "int256", "nodeType": "ElementaryTypeName", "src": "7415:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2627, "mutability": "mutable", "name": "b", "nameLocation": "7432:1:5", "nodeType": "VariableDeclaration", "scope": 2677, "src": "7425:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2626, "name": "int256", "nodeType": "ElementaryTypeName", "src": "7425:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2629, "mutability": "mutable", "name": "reason", "nameLocation": "7449:6:5", "nodeType": "VariableDeclaration", "scope": 2677, "src": "7435:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2628, "name": "string", "nodeType": "ElementaryTypeName", "src": "7435:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "7414:42:5"}, "returnParameters": {"id": 2631, "nodeType": "ParameterList", "parameters": [], "src": "7466:0:5"}, "scope": 3325, "src": "7397:544:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2747, "nodeType": "Block", "src": "8140:528:5", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 2695, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2691, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2689, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2680, "src": "8154:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 2690, "name": "low", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2682, "src": "8162:3:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8154:11:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2694, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2692, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2680, "src": "8169:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 2693, "name": "high", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2684, "src": "8177:4:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8169:12:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "8154:27:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2744, "nodeType": "IfStatement", "src": "8150:490:5", "trueBody": {"id": 2743, "nodeType": "Block", "src": "8183:457:5", "statements": [{"assignments": [2697], "declarations": [{"constant": false, "id": 2697, "mutability": "mutable", "name": "ans", "nameLocation": "8202:3:5", "nodeType": "VariableDeclaration", "scope": 2743, "src": "8197:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2696, "name": "uint", "nodeType": "ElementaryTypeName", "src": "8197:4:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 2709, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2708, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2698, "name": "low", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2682, "src": "8208:3:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2706, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2699, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2680, "src": "8215:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2704, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2702, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2700, "name": "high", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2684, "src": "8224:4:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 2701, "name": "low", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2682, "src": "8231:3:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8224:10:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 2703, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8237:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "8224:14:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 2705, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "8223:16:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8215:24:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 2707, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "8214:26:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "8208:32:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "8197:43:5"}, {"assignments": [2711], "declarations": [{"constant": false, "id": 2711, "mutability": "mutable", "name": "valueStr", "nameLocation": "8268:8:5", "nodeType": "VariableDeclaration", "scope": 2743, "src": "8254:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2710, "name": "string", "nodeType": "ElementaryTypeName", "src": "8254:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2716, "initialValue": {"arguments": [{"id": 2714, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2680, "src": "8308:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2712, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "8279:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2713, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8299:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "8279:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2715, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8279:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "8254:60:5"}, {"assignments": [2718], "declarations": [{"constant": false, "id": 2718, "mutability": "mutable", "name": "ansStr", "nameLocation": "8342:6:5", "nodeType": "VariableDeclaration", "scope": 2743, "src": "8328:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2717, "name": "string", "nodeType": "ElementaryTypeName", "src": "8328:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2723, "initialValue": {"arguments": [{"id": 2721, "name": "ans", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2697, "src": "8380:3:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2719, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "8351:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2720, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "8371:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "8351:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2722, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8351:33:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "8328:56:5"}, {"assignments": [2725], "declarations": [{"constant": false, "id": 2725, "mutability": "mutable", "name": "message", "nameLocation": "8411:7:5", "nodeType": "VariableDeclaration", "scope": 2743, "src": "8398:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2724, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "8398:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2733, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 2728, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8455:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 2729, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2711, "src": "8490:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 2730, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "8516:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 2731, "name": "ansStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2718, "src": "8540:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2726, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "8421:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2727, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "8425:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "8421:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2732, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8421:139:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "8398:162:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2737, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2725, "src": "8596:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2736, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8589:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2735, "name": "string", "nodeType": "ElementaryTypeName", "src": "8589:6:5", "typeDescriptions": {}}}, "id": 2738, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8589:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2734, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "8579:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2739, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8579:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2740, "nodeType": "EmitStatement", "src": "8574:31:5"}, {"expression": {"id": 2741, "name": "ans", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2697, "src": "8626:3:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 2688, "id": 2742, "nodeType": "Return", "src": "8619:10:5"}]}}, {"expression": {"id": 2745, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2680, "src": "8656:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 2688, "id": 2746, "nodeType": "Return", "src": "8649:12:5"}]}, "documentation": {"id": 2678, "nodeType": "StructuredDocumentation", "src": "7947:67:5", "text": "@notice Clamps value to be between low and high, both inclusive"}, "id": 2748, "implemented": true, "kind": "function", "modifiers": [], "name": "clampBetween", "nameLocation": "8028:12:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2685, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2680, "mutability": "mutable", "name": "value", "nameLocation": "8058:5:5", "nodeType": "VariableDeclaration", "scope": 2748, "src": "8050:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2679, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8050:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2682, "mutability": "mutable", "name": "low", "nameLocation": "8081:3:5", "nodeType": "VariableDeclaration", "scope": 2748, "src": "8073:11:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2681, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8073:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2684, "mutability": "mutable", "name": "high", "nameLocation": "8102:4:5", "nodeType": "VariableDeclaration", "scope": 2748, "src": "8094:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2683, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8094:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "8040:72:5"}, "returnParameters": {"id": 2688, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2687, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2748, "src": "8131:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2686, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8131:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "8130:9:5"}, "scope": 3325, "src": "8019:649:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2836, "nodeType": "Block", "src": "8838:646:5", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_bool", "typeString": "bool"}, "id": 2766, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2762, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2760, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2751, "src": "8852:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 2761, "name": "low", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2753, "src": "8860:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "8852:11:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2765, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2763, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2751, "src": "8867:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 2764, "name": "high", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2755, "src": "8875:4:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "8867:12:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "src": "8852:27:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2833, "nodeType": "IfStatement", "src": "8848:608:5", "trueBody": {"id": 2832, "nodeType": "Block", "src": "8881:575:5", "statements": [{"assignments": [2768], "declarations": [{"constant": false, "id": 2768, "mutability": "mutable", "name": "range", "nameLocation": "8899:5:5", "nodeType": "VariableDeclaration", "scope": 2832, "src": "8895:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2767, "name": "int", "nodeType": "ElementaryTypeName", "src": "8895:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "id": 2774, "initialValue": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2773, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2771, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2769, "name": "high", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2755, "src": "8907:4:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 2770, "name": "low", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2753, "src": "8914:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "8907:10:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 2772, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8920:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "8907:14:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "VariableDeclarationStatement", "src": "8895:26:5"}, {"assignments": [2776], "declarations": [{"constant": false, "id": 2776, "mutability": "mutable", "name": "clamped", "nameLocation": "8939:7:5", "nodeType": "VariableDeclaration", "scope": 2832, "src": "8935:11:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2775, "name": "int", "nodeType": "ElementaryTypeName", "src": "8935:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "id": 2784, "initialValue": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2783, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2779, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2777, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2751, "src": "8950:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 2778, "name": "low", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2753, "src": "8958:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "8950:11:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "id": 2780, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "8949:13:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"components": [{"id": 2781, "name": "range", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2768, "src": "8966:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "id": 2782, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "8965:7:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "8949:23:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "VariableDeclarationStatement", "src": "8935:37:5"}, {"condition": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2787, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2785, "name": "clamped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2776, "src": "8990:7:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"hexValue": "30", "id": 2786, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9000:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "8990:11:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2792, "nodeType": "IfStatement", "src": "8986:33:5", "trueBody": {"expression": {"id": 2790, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 2788, "name": "clamped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2776, "src": "9003:7:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "Assignment", "operator": "+=", "rightHandSide": {"id": 2789, "name": "range", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2768, "src": "9014:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "9003:16:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "id": 2791, "nodeType": "ExpressionStatement", "src": "9003:16:5"}}, {"assignments": [2794], "declarations": [{"constant": false, "id": 2794, "mutability": "mutable", "name": "ans", "nameLocation": "9037:3:5", "nodeType": "VariableDeclaration", "scope": 2832, "src": "9033:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2793, "name": "int", "nodeType": "ElementaryTypeName", "src": "9033:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "id": 2798, "initialValue": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2797, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2795, "name": "low", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2753, "src": "9043:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 2796, "name": "clamped", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2776, "src": "9049:7:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "9043:13:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "VariableDeclarationStatement", "src": "9033:23:5"}, {"assignments": [2800], "declarations": [{"constant": false, "id": 2800, "mutability": "mutable", "name": "valueStr", "nameLocation": "9084:8:5", "nodeType": "VariableDeclaration", "scope": 2832, "src": "9070:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2799, "name": "string", "nodeType": "ElementaryTypeName", "src": "9070:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2805, "initialValue": {"arguments": [{"id": 2803, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2751, "src": "9124:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2801, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "9095:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2802, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9115:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "9095:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2804, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9095:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "9070:60:5"}, {"assignments": [2807], "declarations": [{"constant": false, "id": 2807, "mutability": "mutable", "name": "ansStr", "nameLocation": "9158:6:5", "nodeType": "VariableDeclaration", "scope": 2832, "src": "9144:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2806, "name": "string", "nodeType": "ElementaryTypeName", "src": "9144:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2812, "initialValue": {"arguments": [{"id": 2810, "name": "ans", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2794, "src": "9196:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2808, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "9167:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2809, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9187:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "9167:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2811, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9167:33:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "9144:56:5"}, {"assignments": [2814], "declarations": [{"constant": false, "id": 2814, "mutability": "mutable", "name": "message", "nameLocation": "9227:7:5", "nodeType": "VariableDeclaration", "scope": 2832, "src": "9214:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2813, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "9214:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2822, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 2817, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9271:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 2818, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2800, "src": "9306:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 2819, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9332:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 2820, "name": "ansStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2807, "src": "9356:6:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2815, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "9237:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2816, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "9241:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "9237:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2821, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9237:139:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "9214:162:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2826, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2814, "src": "9412:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2825, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "9405:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2824, "name": "string", "nodeType": "ElementaryTypeName", "src": "9405:6:5", "typeDescriptions": {}}}, "id": 2827, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9405:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2823, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "9395:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2828, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9395:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2829, "nodeType": "EmitStatement", "src": "9390:31:5"}, {"expression": {"id": 2830, "name": "ans", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2794, "src": "9442:3:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 2759, "id": 2831, "nodeType": "Return", "src": "9435:10:5"}]}}, {"expression": {"id": 2834, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2751, "src": "9472:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 2759, "id": 2835, "nodeType": "Return", "src": "9465:12:5"}]}, "documentation": {"id": 2749, "nodeType": "StructuredDocumentation", "src": "8674:42:5", "text": "@notice int256 version of clampBetween"}, "id": 2837, "implemented": true, "kind": "function", "modifiers": [], "name": "clampBetween", "nameLocation": "8730:12:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2756, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2751, "mutability": "mutable", "name": "value", "nameLocation": "8759:5:5", "nodeType": "VariableDeclaration", "scope": 2837, "src": "8752:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2750, "name": "int256", "nodeType": "ElementaryTypeName", "src": "8752:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2753, "mutability": "mutable", "name": "low", "nameLocation": "8781:3:5", "nodeType": "VariableDeclaration", "scope": 2837, "src": "8774:10:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2752, "name": "int256", "nodeType": "ElementaryTypeName", "src": "8774:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2755, "mutability": "mutable", "name": "high", "nameLocation": "8801:4:5", "nodeType": "VariableDeclaration", "scope": 2837, "src": "8794:11:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2754, "name": "int256", "nodeType": "ElementaryTypeName", "src": "8794:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "8742:69:5"}, "returnParameters": {"id": 2759, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2758, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2837, "src": "8830:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2757, "name": "int256", "nodeType": "ElementaryTypeName", "src": "8830:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "8829:8:5"}, "scope": 3325, "src": "8721:763:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2901, "nodeType": "Block", "src": "9599:655:5", "statements": [{"condition": {"id": 2851, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "9613:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2849, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2847, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2840, "src": "9615:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 2848, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2842, "src": "9619:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "9615:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2850, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "9614:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2898, "nodeType": "IfStatement", "src": "9609:621:5", "trueBody": {"id": 2897, "nodeType": "Block", "src": "9623:607:5", "statements": [{"expression": {"arguments": [{"id": 2853, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2842, "src": "9664:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "30", "id": 2854, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "9683:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, {"hexValue": "636c616d704c742063616e6e6f7420636c616d702076616c7565206120746f206265206c657373207468616e207a65726f2e20436865636b20796f757220696e707574732f617373756d7074696f6e732e", "id": 2855, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "9702:83:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_88cbc7223df7150b831fdd0d25a212430685c04b2ca3353c6b35e896f5266755", "typeString": "literal_string \"clampLt cannot clamp value a to be less than zero. Check your inputs/assumptions.\""}, "value": "clampLt cannot clamp value a to be less than zero. Check your inputs/assumptions."}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, {"typeIdentifier": "t_stringliteral_88cbc7223df7150b831fdd0d25a212430685c04b2ca3353c6b35e896f5266755", "typeString": "literal_string \"clampLt cannot clamp value a to be less than zero. Check your inputs/assumptions.\""}], "id": 2852, "name": "assertNeq", "nodeType": "Identifier", "overloadedDeclarations": [2184, 2237], "referencedDeclaration": 2184, "src": "9637:9:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 2856, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9637:162:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2857, "nodeType": "ExpressionStatement", "src": "9637:162:5"}, {"assignments": [2859], "declarations": [{"constant": false, "id": 2859, "mutability": "mutable", "name": "value", "nameLocation": "9821:5:5", "nodeType": "VariableDeclaration", "scope": 2897, "src": "9813:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2858, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9813:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 2863, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2862, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2860, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2840, "src": "9829:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"id": 2861, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2842, "src": "9833:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "9829:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "9813:21:5"}, {"assignments": [2865], "declarations": [{"constant": false, "id": 2865, "mutability": "mutable", "name": "aStr", "nameLocation": "9862:4:5", "nodeType": "VariableDeclaration", "scope": 2897, "src": "9848:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2864, "name": "string", "nodeType": "ElementaryTypeName", "src": "9848:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2870, "initialValue": {"arguments": [{"id": 2868, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2840, "src": "9898:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2866, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "9869:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2867, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9889:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "9869:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2869, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9869:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "9848:52:5"}, {"assignments": [2872], "declarations": [{"constant": false, "id": 2872, "mutability": "mutable", "name": "valueStr", "nameLocation": "9928:8:5", "nodeType": "VariableDeclaration", "scope": 2897, "src": "9914:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2871, "name": "string", "nodeType": "ElementaryTypeName", "src": "9914:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2877, "initialValue": {"arguments": [{"id": 2875, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2859, "src": "9968:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2873, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "9939:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2874, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "9959:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "9939:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2876, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9939:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "9914:60:5"}, {"assignments": [2879], "declarations": [{"constant": false, "id": 2879, "mutability": "mutable", "name": "message", "nameLocation": "10001:7:5", "nodeType": "VariableDeclaration", "scope": 2897, "src": "9988:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2878, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "9988:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2887, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 2882, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10045:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 2883, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2865, "src": "10080:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 2884, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10102:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 2885, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2872, "src": "10126:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2880, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "10011:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2881, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "10015:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "10011:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2886, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10011:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "9988:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2891, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2879, "src": "10184:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2890, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10177:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2889, "name": "string", "nodeType": "ElementaryTypeName", "src": "10177:6:5", "typeDescriptions": {}}}, "id": 2892, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10177:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2888, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "10167:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2893, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10167:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2894, "nodeType": "EmitStatement", "src": "10162:31:5"}, {"expression": {"id": 2895, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2859, "src": "10214:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 2846, "id": 2896, "nodeType": "Return", "src": "10207:12:5"}]}}, {"expression": {"id": 2899, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2840, "src": "10246:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 2846, "id": 2900, "nodeType": "Return", "src": "10239:8:5"}]}, "documentation": {"id": 2838, "nodeType": "StructuredDocumentation", "src": "9490:38:5", "text": "@notice clamps a to be less than b"}, "id": 2902, "implemented": true, "kind": "function", "modifiers": [], "name": "clampLt", "nameLocation": "9542:7:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2843, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2840, "mutability": "mutable", "name": "a", "nameLocation": "9558:1:5", "nodeType": "VariableDeclaration", "scope": 2902, "src": "9550:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2839, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9550:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2842, "mutability": "mutable", "name": "b", "nameLocation": "9569:1:5", "nodeType": "VariableDeclaration", "scope": 2902, "src": "9561:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2841, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9561:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "9549:22:5"}, "returnParameters": {"id": 2846, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2845, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2902, "src": "9590:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2844, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9590:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "9589:9:5"}, "scope": 3325, "src": "9533:721:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 2960, "nodeType": "Block", "src": "10365:478:5", "statements": [{"condition": {"id": 2916, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "10379:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2914, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2912, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2905, "src": "10381:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 2913, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2907, "src": "10385:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "10381:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2915, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "10380:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 2957, "nodeType": "IfStatement", "src": "10375:444:5", "trueBody": {"id": 2956, "nodeType": "Block", "src": "10389:430:5", "statements": [{"assignments": [2918], "declarations": [{"constant": false, "id": 2918, "mutability": "mutable", "name": "value", "nameLocation": "10410:5:5", "nodeType": "VariableDeclaration", "scope": 2956, "src": "10403:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2917, "name": "int256", "nodeType": "ElementaryTypeName", "src": "10403:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "id": 2922, "initialValue": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 2921, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2919, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2907, "src": "10418:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"hexValue": "31", "id": 2920, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10422:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "10418:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "VariableDeclarationStatement", "src": "10403:20:5"}, {"assignments": [2924], "declarations": [{"constant": false, "id": 2924, "mutability": "mutable", "name": "aStr", "nameLocation": "10451:4:5", "nodeType": "VariableDeclaration", "scope": 2956, "src": "10437:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2923, "name": "string", "nodeType": "ElementaryTypeName", "src": "10437:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2929, "initialValue": {"arguments": [{"id": 2927, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2905, "src": "10487:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2925, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "10458:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2926, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10478:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "10458:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2928, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10458:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "10437:52:5"}, {"assignments": [2931], "declarations": [{"constant": false, "id": 2931, "mutability": "mutable", "name": "valueStr", "nameLocation": "10517:8:5", "nodeType": "VariableDeclaration", "scope": 2956, "src": "10503:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2930, "name": "string", "nodeType": "ElementaryTypeName", "src": "10503:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2936, "initialValue": {"arguments": [{"id": 2934, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2918, "src": "10557:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 2932, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "10528:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2933, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "10548:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "10528:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 2935, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10528:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "10503:60:5"}, {"assignments": [2938], "declarations": [{"constant": false, "id": 2938, "mutability": "mutable", "name": "message", "nameLocation": "10590:7:5", "nodeType": "VariableDeclaration", "scope": 2956, "src": "10577:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2937, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "10577:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 2946, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 2941, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10634:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 2942, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2924, "src": "10669:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 2943, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "10691:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 2944, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2931, "src": "10715:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 2939, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "10600:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 2940, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "10604:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "10600:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 2945, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10600:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "10577:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 2950, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2938, "src": "10773:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 2949, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10766:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 2948, "name": "string", "nodeType": "ElementaryTypeName", "src": "10766:6:5", "typeDescriptions": {}}}, "id": 2951, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10766:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 2947, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "10756:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 2952, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10756:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 2953, "nodeType": "EmitStatement", "src": "10751:31:5"}, {"expression": {"id": 2954, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2918, "src": "10803:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 2911, "id": 2955, "nodeType": "Return", "src": "10796:12:5"}]}}, {"expression": {"id": 2958, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2905, "src": "10835:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 2911, "id": 2959, "nodeType": "Return", "src": "10828:8:5"}]}, "documentation": {"id": 2903, "nodeType": "StructuredDocumentation", "src": "10260:37:5", "text": "@notice int256 version of clampLt"}, "id": 2961, "implemented": true, "kind": "function", "modifiers": [], "name": "clampLt", "nameLocation": "10311:7:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2908, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2905, "mutability": "mutable", "name": "a", "nameLocation": "10326:1:5", "nodeType": "VariableDeclaration", "scope": 2961, "src": "10319:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2904, "name": "int256", "nodeType": "ElementaryTypeName", "src": "10319:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 2907, "mutability": "mutable", "name": "b", "nameLocation": "10336:1:5", "nodeType": "VariableDeclaration", "scope": 2961, "src": "10329:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2906, "name": "int256", "nodeType": "ElementaryTypeName", "src": "10329:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "10318:20:5"}, "returnParameters": {"id": 2911, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2910, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2961, "src": "10357:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 2909, "name": "int256", "nodeType": "ElementaryTypeName", "src": "10357:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "10356:8:5"}, "scope": 3325, "src": "10302:541:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 3022, "nodeType": "Block", "src": "10971:486:5", "statements": [{"condition": {"id": 2975, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "10985:9:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2973, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2971, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2964, "src": "10987:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": {"id": 2972, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2966, "src": "10992:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "10987:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 2974, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "10986:8:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 3019, "nodeType": "IfStatement", "src": "10981:452:5", "trueBody": {"id": 3018, "nodeType": "Block", "src": "10996:437:5", "statements": [{"assignments": [2977], "declarations": [{"constant": false, "id": 2977, "mutability": "mutable", "name": "value", "nameLocation": "11018:5:5", "nodeType": "VariableDeclaration", "scope": 3018, "src": "11010:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2976, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "11010:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 2984, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2983, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2978, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2964, "src": "11026:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "%", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 2981, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 2979, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2966, "src": "11031:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 2980, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "11035:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "11031:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 2982, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "11030:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "11026:11:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "11010:27:5"}, {"assignments": [2986], "declarations": [{"constant": false, "id": 2986, "mutability": "mutable", "name": "aStr", "nameLocation": "11065:4:5", "nodeType": "VariableDeclaration", "scope": 3018, "src": "11051:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2985, "name": "string", "nodeType": "ElementaryTypeName", "src": "11051:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2991, "initialValue": {"arguments": [{"id": 2989, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2964, "src": "11101:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2987, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "11072:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2988, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "11092:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "11072:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2990, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11072:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "11051:52:5"}, {"assignments": [2993], "declarations": [{"constant": false, "id": 2993, "mutability": "mutable", "name": "valueStr", "nameLocation": "11131:8:5", "nodeType": "VariableDeclaration", "scope": 3018, "src": "11117:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 2992, "name": "string", "nodeType": "ElementaryTypeName", "src": "11117:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 2998, "initialValue": {"arguments": [{"id": 2996, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2977, "src": "11171:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 2994, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "11142:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 2995, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "11162:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "11142:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 2997, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11142:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "11117:60:5"}, {"assignments": [3000], "declarations": [{"constant": false, "id": 3000, "mutability": "mutable", "name": "message", "nameLocation": "11204:7:5", "nodeType": "VariableDeclaration", "scope": 3018, "src": "11191:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 2999, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "11191:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 3008, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 3003, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "11248:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 3004, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2986, "src": "11283:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 3005, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "11305:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 3006, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2993, "src": "11329:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 3001, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "11214:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 3002, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "11218:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "11214:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 3007, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11214:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "11191:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 3012, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3000, "src": "11387:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3011, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "11380:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3010, "name": "string", "nodeType": "ElementaryTypeName", "src": "11380:6:5", "typeDescriptions": {}}}, "id": 3013, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11380:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 3009, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "11370:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 3014, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11370:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 3015, "nodeType": "EmitStatement", "src": "11365:31:5"}, {"expression": {"id": 3016, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2977, "src": "11417:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 2970, "id": 3017, "nodeType": "Return", "src": "11410:12:5"}]}}, {"expression": {"id": 3020, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2964, "src": "11449:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 2970, "id": 3021, "nodeType": "Return", "src": "11442:8:5"}]}, "documentation": {"id": 2962, "nodeType": "StructuredDocumentation", "src": "10849:50:5", "text": "@notice clamps a to be less than or equal to b"}, "id": 3023, "implemented": true, "kind": "function", "modifiers": [], "name": "clampLte", "nameLocation": "10913:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 2967, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2964, "mutability": "mutable", "name": "a", "nameLocation": "10930:1:5", "nodeType": "VariableDeclaration", "scope": 3023, "src": "10922:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2963, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10922:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 2966, "mutability": "mutable", "name": "b", "nameLocation": "10941:1:5", "nodeType": "VariableDeclaration", "scope": 3023, "src": "10933:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2965, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10933:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "10921:22:5"}, "returnParameters": {"id": 2970, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 2969, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3023, "src": "10962:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 2968, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10962:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "10961:9:5"}, "scope": 3325, "src": "10904:553:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 3079, "nodeType": "Block", "src": "11570:475:5", "statements": [{"condition": {"id": 3037, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "11584:9:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 3035, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3033, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3026, "src": "11586:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": {"id": 3034, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3028, "src": "11591:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "11586:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 3036, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "11585:8:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 3076, "nodeType": "IfStatement", "src": "11580:441:5", "trueBody": {"id": 3075, "nodeType": "Block", "src": "11595:426:5", "statements": [{"assignments": [3039], "declarations": [{"constant": false, "id": 3039, "mutability": "mutable", "name": "value", "nameLocation": "11616:5:5", "nodeType": "VariableDeclaration", "scope": 3075, "src": "11609:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3038, "name": "int256", "nodeType": "ElementaryTypeName", "src": "11609:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "id": 3041, "initialValue": {"id": 3040, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3028, "src": "11624:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "VariableDeclarationStatement", "src": "11609:16:5"}, {"assignments": [3043], "declarations": [{"constant": false, "id": 3043, "mutability": "mutable", "name": "aStr", "nameLocation": "11653:4:5", "nodeType": "VariableDeclaration", "scope": 3075, "src": "11639:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3042, "name": "string", "nodeType": "ElementaryTypeName", "src": "11639:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3048, "initialValue": {"arguments": [{"id": 3046, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3026, "src": "11689:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 3044, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "11660:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3045, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "11680:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "11660:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 3047, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11660:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "11639:52:5"}, {"assignments": [3050], "declarations": [{"constant": false, "id": 3050, "mutability": "mutable", "name": "valueStr", "nameLocation": "11719:8:5", "nodeType": "VariableDeclaration", "scope": 3075, "src": "11705:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3049, "name": "string", "nodeType": "ElementaryTypeName", "src": "11705:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3055, "initialValue": {"arguments": [{"id": 3053, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3039, "src": "11759:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 3051, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "11730:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3052, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "11750:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "11730:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 3054, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11730:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "11705:60:5"}, {"assignments": [3057], "declarations": [{"constant": false, "id": 3057, "mutability": "mutable", "name": "message", "nameLocation": "11792:7:5", "nodeType": "VariableDeclaration", "scope": 3075, "src": "11779:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 3056, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "11779:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 3065, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 3060, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "11836:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 3061, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3043, "src": "11871:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 3062, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "11893:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 3063, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3050, "src": "11917:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 3058, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "11802:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 3059, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "11806:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "11802:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 3064, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11802:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "11779:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 3069, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3057, "src": "11975:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3068, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "11968:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3067, "name": "string", "nodeType": "ElementaryTypeName", "src": "11968:6:5", "typeDescriptions": {}}}, "id": 3070, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11968:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 3066, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "11958:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 3071, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11958:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 3072, "nodeType": "EmitStatement", "src": "11953:31:5"}, {"expression": {"id": 3073, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3039, "src": "12005:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 3032, "id": 3074, "nodeType": "Return", "src": "11998:12:5"}]}}, {"expression": {"id": 3077, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3026, "src": "12037:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 3032, "id": 3078, "nodeType": "Return", "src": "12030:8:5"}]}, "documentation": {"id": 3024, "nodeType": "StructuredDocumentation", "src": "11463:38:5", "text": "@notice int256 version of clampLte"}, "id": 3080, "implemented": true, "kind": "function", "modifiers": [], "name": "clampLte", "nameLocation": "11515:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3029, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3026, "mutability": "mutable", "name": "a", "nameLocation": "11531:1:5", "nodeType": "VariableDeclaration", "scope": 3080, "src": "11524:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3025, "name": "int256", "nodeType": "ElementaryTypeName", "src": "11524:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 3028, "mutability": "mutable", "name": "b", "nameLocation": "11541:1:5", "nodeType": "VariableDeclaration", "scope": 3080, "src": "11534:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3027, "name": "int256", "nodeType": "ElementaryTypeName", "src": "11534:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "11523:20:5"}, "returnParameters": {"id": 3032, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3031, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3080, "src": "11562:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3030, "name": "int256", "nodeType": "ElementaryTypeName", "src": "11562:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "11561:8:5"}, "scope": 3325, "src": "11506:539:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 3149, "nodeType": "Block", "src": "12163:701:5", "statements": [{"condition": {"id": 3094, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "12177:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3092, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3090, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3083, "src": "12179:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 3091, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3085, "src": "12183:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "12179:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 3093, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "12178:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseBody": {"id": 3147, "nodeType": "Block", "src": "12825:33:5", "statements": [{"expression": {"id": 3145, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3083, "src": "12846:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 3089, "id": 3146, "nodeType": "Return", "src": "12839:8:5"}]}, "id": 3148, "nodeType": "IfStatement", "src": "12173:685:5", "trueBody": {"id": 3144, "nodeType": "Block", "src": "12187:632:5", "statements": [{"expression": {"arguments": [{"id": 3096, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3085, "src": "12228:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"expression": {"arguments": [{"id": 3099, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "12252:7:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}, "typeName": {"id": 3098, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "12252:7:5", "typeDescriptions": {}}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}], "id": 3097, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "12247:4:5", "typeDescriptions": {"typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure"}}, "id": 3100, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12247:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_magic_meta_type_t_uint256", "typeString": "type(uint256)"}}, "id": 3101, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "12261:3:5", "memberName": "max", "nodeType": "MemberAccess", "src": "12247:17:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "636c616d7047742063616e6e6f7420636c616d702076616c7565206120746f206265206c6172676572207468616e2075696e743235362e6d61782e20436865636b20796f757220696e707574732f617373756d7074696f6e732e", "id": 3102, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "12282:92:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_922f1b91690a2e735abd3aee2b398fdff5957cdd0f3040e92601649842022cec", "typeString": "literal_string \"clampGt cannot clamp value a to be larger than uint256.max. Check your inputs/assumptions.\""}, "value": "clampGt cannot clamp value a to be larger than uint256.max. Check your inputs/assumptions."}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_stringliteral_922f1b91690a2e735abd3aee2b398fdff5957cdd0f3040e92601649842022cec", "typeString": "literal_string \"clampGt cannot clamp value a to be larger than uint256.max. Check your inputs/assumptions.\""}], "id": 3095, "name": "assertNeq", "nodeType": "Identifier", "overloadedDeclarations": [2184, 2237], "referencedDeclaration": 2184, "src": "12201:9:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$__$", "typeString": "function (uint256,uint256,string memory)"}}, "id": 3103, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12201:187:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 3104, "nodeType": "ExpressionStatement", "src": "12201:187:5"}, {"assignments": [3106], "declarations": [{"constant": false, "id": 3106, "mutability": "mutable", "name": "value", "nameLocation": "12410:5:5", "nodeType": "VariableDeclaration", "scope": 3144, "src": "12402:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3105, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "12402:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 3110, "initialValue": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3109, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3107, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3085, "src": "12418:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 3108, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "12422:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "12418:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "12402:21:5"}, {"assignments": [3112], "declarations": [{"constant": false, "id": 3112, "mutability": "mutable", "name": "aStr", "nameLocation": "12451:4:5", "nodeType": "VariableDeclaration", "scope": 3144, "src": "12437:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3111, "name": "string", "nodeType": "ElementaryTypeName", "src": "12437:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3117, "initialValue": {"arguments": [{"id": 3115, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3083, "src": "12487:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 3113, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "12458:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3114, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "12478:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "12458:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 3116, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12458:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "12437:52:5"}, {"assignments": [3119], "declarations": [{"constant": false, "id": 3119, "mutability": "mutable", "name": "valueStr", "nameLocation": "12517:8:5", "nodeType": "VariableDeclaration", "scope": 3144, "src": "12503:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3118, "name": "string", "nodeType": "ElementaryTypeName", "src": "12503:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3124, "initialValue": {"arguments": [{"id": 3122, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3106, "src": "12557:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 3120, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "12528:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3121, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "12548:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "12528:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 3123, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12528:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "12503:60:5"}, {"assignments": [3126], "declarations": [{"constant": false, "id": 3126, "mutability": "mutable", "name": "message", "nameLocation": "12590:7:5", "nodeType": "VariableDeclaration", "scope": 3144, "src": "12577:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 3125, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "12577:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 3134, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 3129, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "12634:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 3130, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3112, "src": "12669:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 3131, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "12691:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 3132, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3119, "src": "12715:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 3127, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "12600:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 3128, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "12604:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "12600:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 3133, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12600:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "12577:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 3138, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3126, "src": "12773:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3137, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "12766:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3136, "name": "string", "nodeType": "ElementaryTypeName", "src": "12766:6:5", "typeDescriptions": {}}}, "id": 3139, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12766:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 3135, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "12756:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 3140, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "12756:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 3141, "nodeType": "EmitStatement", "src": "12751:31:5"}, {"expression": {"id": 3142, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3106, "src": "12803:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 3089, "id": 3143, "nodeType": "Return", "src": "12796:12:5"}]}}]}, "documentation": {"id": 3081, "nodeType": "StructuredDocumentation", "src": "12051:41:5", "text": "@notice clamps a to be greater than b"}, "id": 3150, "implemented": true, "kind": "function", "modifiers": [], "name": "clampGt", "nameLocation": "12106:7:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3086, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3083, "mutability": "mutable", "name": "a", "nameLocation": "12122:1:5", "nodeType": "VariableDeclaration", "scope": 3150, "src": "12114:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3082, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "12114:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3085, "mutability": "mutable", "name": "b", "nameLocation": "12133:1:5", "nodeType": "VariableDeclaration", "scope": 3150, "src": "12125:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3084, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "12125:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "12113:22:5"}, "returnParameters": {"id": 3089, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3088, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3150, "src": "12154:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3087, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "12154:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "12153:9:5"}, "scope": 3325, "src": "12097:767:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 3209, "nodeType": "Block", "src": "12975:499:5", "statements": [{"condition": {"id": 3164, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "12989:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 3162, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3160, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3153, "src": "12991:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 3161, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3155, "src": "12995:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "12991:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 3163, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "12990:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseBody": {"id": 3207, "nodeType": "Block", "src": "13435:33:5", "statements": [{"expression": {"id": 3205, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3153, "src": "13456:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 3159, "id": 3206, "nodeType": "Return", "src": "13449:8:5"}]}, "id": 3208, "nodeType": "IfStatement", "src": "12985:483:5", "trueBody": {"id": 3204, "nodeType": "Block", "src": "12999:430:5", "statements": [{"assignments": [3166], "declarations": [{"constant": false, "id": 3166, "mutability": "mutable", "name": "value", "nameLocation": "13020:5:5", "nodeType": "VariableDeclaration", "scope": 3204, "src": "13013:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3165, "name": "int256", "nodeType": "ElementaryTypeName", "src": "13013:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "id": 3170, "initialValue": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 3169, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3167, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3155, "src": "13028:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 3168, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "13032:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "13028:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "VariableDeclarationStatement", "src": "13013:20:5"}, {"assignments": [3172], "declarations": [{"constant": false, "id": 3172, "mutability": "mutable", "name": "aStr", "nameLocation": "13061:4:5", "nodeType": "VariableDeclaration", "scope": 3204, "src": "13047:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3171, "name": "string", "nodeType": "ElementaryTypeName", "src": "13047:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3177, "initialValue": {"arguments": [{"id": 3175, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3153, "src": "13097:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 3173, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "13068:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3174, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "13088:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "13068:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 3176, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13068:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "13047:52:5"}, {"assignments": [3179], "declarations": [{"constant": false, "id": 3179, "mutability": "mutable", "name": "valueStr", "nameLocation": "13127:8:5", "nodeType": "VariableDeclaration", "scope": 3204, "src": "13113:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3178, "name": "string", "nodeType": "ElementaryTypeName", "src": "13113:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3184, "initialValue": {"arguments": [{"id": 3182, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3166, "src": "13167:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 3180, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "13138:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3181, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "13158:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "13138:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 3183, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13138:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "13113:60:5"}, {"assignments": [3186], "declarations": [{"constant": false, "id": 3186, "mutability": "mutable", "name": "message", "nameLocation": "13200:7:5", "nodeType": "VariableDeclaration", "scope": 3204, "src": "13187:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 3185, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "13187:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 3194, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 3189, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "13244:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 3190, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3172, "src": "13279:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 3191, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "13301:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 3192, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3179, "src": "13325:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 3187, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "13210:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 3188, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "13214:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "13210:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 3193, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13210:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "13187:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 3198, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3186, "src": "13383:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3197, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "13376:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3196, "name": "string", "nodeType": "ElementaryTypeName", "src": "13376:6:5", "typeDescriptions": {}}}, "id": 3199, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13376:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 3195, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "13366:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 3200, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13366:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 3201, "nodeType": "EmitStatement", "src": "13361:31:5"}, {"expression": {"id": 3202, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3166, "src": "13413:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 3159, "id": 3203, "nodeType": "Return", "src": "13406:12:5"}]}}]}, "documentation": {"id": 3151, "nodeType": "StructuredDocumentation", "src": "12870:37:5", "text": "@notice int256 version of clampGt"}, "id": 3210, "implemented": true, "kind": "function", "modifiers": [], "name": "clampGt", "nameLocation": "12921:7:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3156, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3153, "mutability": "mutable", "name": "a", "nameLocation": "12936:1:5", "nodeType": "VariableDeclaration", "scope": 3210, "src": "12929:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3152, "name": "int256", "nodeType": "ElementaryTypeName", "src": "12929:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 3155, "mutability": "mutable", "name": "b", "nameLocation": "12946:1:5", "nodeType": "VariableDeclaration", "scope": 3210, "src": "12939:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3154, "name": "int256", "nodeType": "ElementaryTypeName", "src": "12939:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "12928:20:5"}, "returnParameters": {"id": 3159, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3158, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3210, "src": "12967:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3157, "name": "int256", "nodeType": "ElementaryTypeName", "src": "12967:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "12966:8:5"}, "scope": 3325, "src": "12912:562:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 3266, "nodeType": "Block", "src": "13605:475:5", "statements": [{"condition": {"id": 3224, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "13619:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3222, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3220, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3213, "src": "13621:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 3221, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3215, "src": "13625:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "13621:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 3223, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "13620:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 3263, "nodeType": "IfStatement", "src": "13615:441:5", "trueBody": {"id": 3262, "nodeType": "Block", "src": "13629:427:5", "statements": [{"assignments": [3226], "declarations": [{"constant": false, "id": 3226, "mutability": "mutable", "name": "value", "nameLocation": "13651:5:5", "nodeType": "VariableDeclaration", "scope": 3262, "src": "13643:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3225, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "13643:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 3228, "initialValue": {"id": 3227, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3215, "src": "13659:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "13643:17:5"}, {"assignments": [3230], "declarations": [{"constant": false, "id": 3230, "mutability": "mutable", "name": "aStr", "nameLocation": "13688:4:5", "nodeType": "VariableDeclaration", "scope": 3262, "src": "13674:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3229, "name": "string", "nodeType": "ElementaryTypeName", "src": "13674:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3235, "initialValue": {"arguments": [{"id": 3233, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3213, "src": "13724:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 3231, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "13695:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3232, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "13715:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "13695:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 3234, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13695:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "13674:52:5"}, {"assignments": [3237], "declarations": [{"constant": false, "id": 3237, "mutability": "mutable", "name": "valueStr", "nameLocation": "13754:8:5", "nodeType": "VariableDeclaration", "scope": 3262, "src": "13740:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3236, "name": "string", "nodeType": "ElementaryTypeName", "src": "13740:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3242, "initialValue": {"arguments": [{"id": 3240, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3226, "src": "13794:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "expression": {"id": 3238, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "13765:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3239, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "13785:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3381, "src": "13765:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 3241, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13765:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "13740:60:5"}, {"assignments": [3244], "declarations": [{"constant": false, "id": 3244, "mutability": "mutable", "name": "message", "nameLocation": "13827:7:5", "nodeType": "VariableDeclaration", "scope": 3262, "src": "13814:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 3243, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "13814:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 3252, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 3247, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "13871:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 3248, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3230, "src": "13906:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 3249, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "13928:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 3250, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3237, "src": "13952:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 3245, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "13837:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 3246, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "13841:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "13837:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 3251, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13837:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "13814:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 3256, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3244, "src": "14010:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3255, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "14003:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3254, "name": "string", "nodeType": "ElementaryTypeName", "src": "14003:6:5", "typeDescriptions": {}}}, "id": 3257, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "14003:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 3253, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "13993:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 3258, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "13993:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 3259, "nodeType": "EmitStatement", "src": "13988:31:5"}, {"expression": {"id": 3260, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3226, "src": "14040:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 3219, "id": 3261, "nodeType": "Return", "src": "14033:12:5"}]}}, {"expression": {"id": 3264, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3213, "src": "14072:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 3219, "id": 3265, "nodeType": "Return", "src": "14065:8:5"}]}, "documentation": {"id": 3211, "nodeType": "StructuredDocumentation", "src": "13480:53:5", "text": "@notice clamps a to be greater than or equal to b"}, "id": 3267, "implemented": true, "kind": "function", "modifiers": [], "name": "clampGte", "nameLocation": "13547:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3216, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3213, "mutability": "mutable", "name": "a", "nameLocation": "13564:1:5", "nodeType": "VariableDeclaration", "scope": 3267, "src": "13556:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3212, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "13556:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3215, "mutability": "mutable", "name": "b", "nameLocation": "13575:1:5", "nodeType": "VariableDeclaration", "scope": 3267, "src": "13567:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3214, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "13567:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "13555:22:5"}, "returnParameters": {"id": 3219, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3218, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3267, "src": "13596:7:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3217, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "13596:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "13595:9:5"}, "scope": 3325, "src": "13538:542:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 3323, "nodeType": "Block", "src": "14193:474:5", "statements": [{"condition": {"id": 3281, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "14207:8:5", "subExpression": {"components": [{"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 3279, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3277, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3270, "src": "14209:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 3278, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3272, "src": "14213:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "src": "14209:5:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}], "id": 3280, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "14208:7:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 3320, "nodeType": "IfStatement", "src": "14203:440:5", "trueBody": {"id": 3319, "nodeType": "Block", "src": "14217:426:5", "statements": [{"assignments": [3283], "declarations": [{"constant": false, "id": 3283, "mutability": "mutable", "name": "value", "nameLocation": "14238:5:5", "nodeType": "VariableDeclaration", "scope": 3319, "src": "14231:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3282, "name": "int256", "nodeType": "ElementaryTypeName", "src": "14231:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "id": 3285, "initialValue": {"id": 3284, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3272, "src": "14246:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "VariableDeclarationStatement", "src": "14231:16:5"}, {"assignments": [3287], "declarations": [{"constant": false, "id": 3287, "mutability": "mutable", "name": "aStr", "nameLocation": "14275:4:5", "nodeType": "VariableDeclaration", "scope": 3319, "src": "14261:18:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3286, "name": "string", "nodeType": "ElementaryTypeName", "src": "14261:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3292, "initialValue": {"arguments": [{"id": 3290, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3270, "src": "14311:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 3288, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "14282:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3289, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "14302:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "14282:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 3291, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "14282:31:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "14261:52:5"}, {"assignments": [3294], "declarations": [{"constant": false, "id": 3294, "mutability": "mutable", "name": "valueStr", "nameLocation": "14341:8:5", "nodeType": "VariableDeclaration", "scope": 3319, "src": "14327:22:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3293, "name": "string", "nodeType": "ElementaryTypeName", "src": "14327:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "id": 3299, "initialValue": {"arguments": [{"id": 3297, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3283, "src": "14381:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "expression": {"id": 3295, "name": "PropertiesLibString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "14352:19:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_PropertiesLibString_$3527_$", "typeString": "type(library PropertiesLibString)"}}, "id": 3296, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "14372:8:5", "memberName": "toString", "nodeType": "MemberAccess", "referencedDeclaration": 3372, "src": "14352:28:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_string_memory_ptr_$", "typeString": "function (int256) pure returns (string memory)"}}, "id": 3298, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "14352:35:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "VariableDeclarationStatement", "src": "14327:60:5"}, {"assignments": [3301], "declarations": [{"constant": false, "id": 3301, "mutability": "mutable", "name": "message", "nameLocation": "14414:7:5", "nodeType": "VariableDeclaration", "scope": 3319, "src": "14401:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 3300, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "14401:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 3309, "initialValue": {"arguments": [{"hexValue": "436c616d70696e672076616c756520", "id": 3304, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "14458:17:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, "value": "Clamping value "}, {"id": 3305, "name": "aStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3287, "src": "14493:4:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, {"hexValue": "20746f20", "id": 3306, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "14515:6:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, "value": " to "}, {"id": 3307, "name": "valueStr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3294, "src": "14539:8:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_2fd4745b5b18065d34c1635ccc8a35f5a35dae9199fcba4e96ba08293a43038c", "typeString": "literal_string \"Clamping value \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}, {"typeIdentifier": "t_stringliteral_91c1924faff98c0a82a1f4ffd45a2fbb571549dcfd813e52087fb435e601dc43", "typeString": "literal_string \" to \""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 3302, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "14424:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 3303, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "14428:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "14424:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 3308, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "14424:137:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "14401:160:5"}, {"eventCall": {"arguments": [{"arguments": [{"id": 3313, "name": "message", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3301, "src": "14597:7:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3312, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "14590:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3311, "name": "string", "nodeType": "ElementaryTypeName", "src": "14590:6:5", "typeDescriptions": {}}}, "id": 3314, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "14590:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "id": 3310, "name": "LogString", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1977, "src": "14580:9:5", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory)"}}, "id": 3315, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "14580:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 3316, "nodeType": "EmitStatement", "src": "14575:31:5"}, {"expression": {"id": 3317, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3283, "src": "14627:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 3276, "id": 3318, "nodeType": "Return", "src": "14620:12:5"}]}}, {"expression": {"id": 3321, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3270, "src": "14659:1:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "functionReturnParameters": 3276, "id": 3322, "nodeType": "Return", "src": "14652:8:5"}]}, "documentation": {"id": 3268, "nodeType": "StructuredDocumentation", "src": "14086:38:5", "text": "@notice int256 version of clampGte"}, "id": 3324, "implemented": true, "kind": "function", "modifiers": [], "name": "clampGte", "nameLocation": "14138:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3273, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3270, "mutability": "mutable", "name": "a", "nameLocation": "14154:1:5", "nodeType": "VariableDeclaration", "scope": 3324, "src": "14147:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3269, "name": "int256", "nodeType": "ElementaryTypeName", "src": "14147:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}, {"constant": false, "id": 3272, "mutability": "mutable", "name": "b", "nameLocation": "14164:1:5", "nodeType": "VariableDeclaration", "scope": 3324, "src": "14157:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3271, "name": "int256", "nodeType": "ElementaryTypeName", "src": "14157:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "14146:20:5"}, "returnParameters": {"id": 3276, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3275, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3324, "src": "14185:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3274, "name": "int256", "nodeType": "ElementaryTypeName", "src": "14185:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "14184:8:5"}, "scope": 3325, "src": "14129:538:5", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}], "scope": 3528, "src": "25:14644:5", "usedErrors": [], "usedEvents": [1967, 1973, 1977, 1981, 1985, 1989, 1993, 1997, 2001, 2005]}, {"abstract": false, "baseContracts": [], "canonicalName": "PropertiesLibString", "contractDependencies": [], "contractKind": "library", "documentation": {"id": 3326, "nodeType": "StructuredDocumentation", "src": "14671:390:5", "text": "@notice Efficient library for creating string representations of integers.\n @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/LibString.sol)\n @author Modified from Solady (https://github.com/Vectorized/solady/blob/main/src/utils/LibString.sol)\n @dev Name of the library is modified to prevent collisions with contract-under-test uses of LibString"}, "fullyImplemented": true, "id": 3527, "linearizedBaseContracts": [3527], "name": "PropertiesLibString", "nameLocation": "15069:19:5", "nodeType": "ContractDefinition", "nodes": [{"body": {"id": 3371, "nodeType": "Block", "src": "15169:205:5", "statements": [{"assignments": [3334], "declarations": [{"constant": false, "id": 3334, "mutability": "mutable", "name": "absValue", "nameLocation": "15187:8:5", "nodeType": "VariableDeclaration", "scope": 3371, "src": "15179:16:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3333, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "15179:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 3348, "initialValue": {"condition": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 3337, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3335, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3328, "src": "15198:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": {"hexValue": "30", "id": 3336, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "15207:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "15198:10:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseExpression": {"arguments": [{"id": 3345, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "-", "prefix": true, "src": "15236:6:5", "subExpression": {"id": 3344, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3328, "src": "15237:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "id": 3343, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "15228:7:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}, "typeName": {"id": 3342, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "15228:7:5", "typeDescriptions": {}}}, "id": 3346, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "15228:15:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 3347, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "15198:45:5", "trueExpression": {"arguments": [{"id": 3340, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3328, "src": "15219:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_int256", "typeString": "int256"}], "id": 3339, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "15211:7:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}, "typeName": {"id": 3338, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "15211:7:5", "typeDescriptions": {}}}, "id": 3341, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "15211:14:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "15179:64:5"}, {"expression": {"id": 3353, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 3349, "name": "str", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3331, "src": "15253:3:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 3351, "name": "absValue", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3334, "src": "15268:8:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 3350, "name": "toString", "nodeType": "Identifier", "overloadedDeclarations": [3372, 3381, 3491], "referencedDeclaration": 3381, "src": "15259:8:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)"}}, "id": 3352, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "15259:18:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "src": "15253:24:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "id": 3354, "nodeType": "ExpressionStatement", "src": "15253:24:5"}, {"condition": {"commonType": {"typeIdentifier": "t_int256", "typeString": "int256"}, "id": 3357, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3355, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3328, "src": "15292:5:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"hexValue": "30", "id": 3356, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "15300:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "src": "15292:9:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 3370, "nodeType": "IfStatement", "src": "15288:80:5", "trueBody": {"id": 3369, "nodeType": "Block", "src": "15303:65:5", "statements": [{"expression": {"id": 3367, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 3358, "name": "str", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3331, "src": "15317:3:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"arguments": [{"hexValue": "2d", "id": 3363, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "15347:3:5", "typeDescriptions": {"typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561", "typeString": "literal_string \"-\""}, "value": "-"}, {"id": 3364, "name": "str", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3331, "src": "15352:3:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561", "typeString": "literal_string \"-\""}, {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}], "expression": {"id": 3361, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, "src": "15330:3:5", "typeDescriptions": {"typeIdentifier": "t_magic_abi", "typeString": "abi"}}, "id": 3362, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "15334:12:5", "memberName": "encodePacked", "nodeType": "MemberAccess", "src": "15330:16:5", "typeDescriptions": {"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)"}}, "id": 3365, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "15330:26:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3360, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "15323:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3359, "name": "string", "nodeType": "ElementaryTypeName", "src": "15323:6:5", "typeDescriptions": {}}}, "id": 3366, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "15323:34:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "src": "15317:40:5", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "id": 3368, "nodeType": "ExpressionStatement", "src": "15317:40:5"}]}}]}, "id": 3372, "implemented": true, "kind": "function", "modifiers": [], "name": "toString", "nameLocation": "15104:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3329, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3328, "mutability": "mutable", "name": "value", "nameLocation": "15120:5:5", "nodeType": "VariableDeclaration", "scope": 3372, "src": "15113:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}, "typeName": {"id": 3327, "name": "int256", "nodeType": "ElementaryTypeName", "src": "15113:6:5", "typeDescriptions": {"typeIdentifier": "t_int256", "typeString": "int256"}}, "visibility": "internal"}], "src": "15112:14:5"}, "returnParameters": {"id": 3332, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3331, "mutability": "mutable", "name": "str", "nameLocation": "15164:3:5", "nodeType": "VariableDeclaration", "scope": 3372, "src": "15150:17:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3330, "name": "string", "nodeType": "ElementaryTypeName", "src": "15150:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "15149:19:5"}, "scope": 3527, "src": "15095:279:5", "stateMutability": "pure", "virtual": false, "visibility": "internal"}, {"body": {"id": 3380, "nodeType": "Block", "src": "15455:1965:5", "statements": [{"AST": {"nativeSrc": "15517:1897:5", "nodeType": "YulBlock", "src": "15517:1897:5", "statements": [{"nativeSrc": "15863:49:5", "nodeType": "YulVariableDeclaration", "src": "15863:49:5", "value": {"arguments": [{"arguments": [{"kind": "number", "nativeSrc": "15901:4:5", "nodeType": "YulLiteral", "src": "15901:4:5", "type": "", "value": "0x40"}], "functionName": {"name": "mload", "nativeSrc": "15895:5:5", "nodeType": "YulIdentifier", "src": "15895:5:5"}, "nativeSrc": "15895:11:5", "nodeType": "YulFunctionCall", "src": "15895:11:5"}, {"kind": "number", "nativeSrc": "15908:3:5", "nodeType": "YulLiteral", "src": "15908:3:5", "type": "", "value": "160"}], "functionName": {"name": "add", "nativeSrc": "15891:3:5", "nodeType": "YulIdentifier", "src": "15891:3:5"}, "nativeSrc": "15891:21:5", "nodeType": "YulFunctionCall", "src": "15891:21:5"}, "variables": [{"name": "newFreeMemoryPointer", "nativeSrc": "15867:20:5", "nodeType": "YulTypedName", "src": "15867:20:5", "type": ""}]}, {"expression": {"arguments": [{"kind": "number", "nativeSrc": "16011:4:5", "nodeType": "YulLiteral", "src": "16011:4:5", "type": "", "value": "0x40"}, {"name": "newFreeMemoryPointer", "nativeSrc": "16017:20:5", "nodeType": "YulIdentifier", "src": "16017:20:5"}], "functionName": {"name": "mstore", "nativeSrc": "16004:6:5", "nodeType": "YulIdentifier", "src": "16004:6:5"}, "nativeSrc": "16004:34:5", "nodeType": "YulFunctionCall", "src": "16004:34:5"}, "nativeSrc": "16004:34:5", "nodeType": "YulExpressionStatement", "src": "16004:34:5"}, {"nativeSrc": "16128:36:5", "nodeType": "YulAssignment", "src": "16128:36:5", "value": {"arguments": [{"name": "newFreeMemoryPointer", "nativeSrc": "16139:20:5", "nodeType": "YulIdentifier", "src": "16139:20:5"}, {"kind": "number", "nativeSrc": "16161:2:5", "nodeType": "YulLiteral", "src": "16161:2:5", "type": "", "value": "32"}], "functionName": {"name": "sub", "nativeSrc": "16135:3:5", "nodeType": "YulIdentifier", "src": "16135:3:5"}, "nativeSrc": "16135:29:5", "nodeType": "YulFunctionCall", "src": "16135:29:5"}, "variableNames": [{"name": "str", "nativeSrc": "16128:3:5", "nodeType": "YulIdentifier", "src": "16128:3:5"}]}, {"expression": {"arguments": [{"name": "str", "nativeSrc": "16257:3:5", "nodeType": "YulIdentifier", "src": "16257:3:5"}, {"kind": "number", "nativeSrc": "16262:1:5", "nodeType": "YulLiteral", "src": "16262:1:5", "type": "", "value": "0"}], "functionName": {"name": "mstore", "nativeSrc": "16250:6:5", "nodeType": "YulIdentifier", "src": "16250:6:5"}, "nativeSrc": "16250:14:5", "nodeType": "YulFunctionCall", "src": "16250:14:5"}, "nativeSrc": "16250:14:5", "nodeType": "YulExpressionStatement", "src": "16250:14:5"}, {"nativeSrc": "16352:14:5", "nodeType": "YulVariableDeclaration", "src": "16352:14:5", "value": {"name": "str", "nativeSrc": "16363:3:5", "nodeType": "YulIdentifier", "src": "16363:3:5"}, "variables": [{"name": "end", "nativeSrc": "16356:3:5", "nodeType": "YulTypedName", "src": "16356:3:5", "type": ""}]}, {"body": {"nativeSrc": "16610:446:5", "nodeType": "YulBlock", "src": "16610:446:5", "statements": [{"nativeSrc": "16684:18:5", "nodeType": "YulAssignment", "src": "16684:18:5", "value": {"arguments": [{"name": "str", "nativeSrc": "16695:3:5", "nodeType": "YulIdentifier", "src": "16695:3:5"}, {"kind": "number", "nativeSrc": "16700:1:5", "nodeType": "YulLiteral", "src": "16700:1:5", "type": "", "value": "1"}], "functionName": {"name": "sub", "nativeSrc": "16691:3:5", "nodeType": "YulIdentifier", "src": "16691:3:5"}, "nativeSrc": "16691:11:5", "nodeType": "YulFunctionCall", "src": "16691:11:5"}, "variableNames": [{"name": "str", "nativeSrc": "16684:3:5", "nodeType": "YulIdentifier", "src": "16684:3:5"}]}, {"expression": {"arguments": [{"name": "str", "nativeSrc": "16846:3:5", "nodeType": "YulIdentifier", "src": "16846:3:5"}, {"arguments": [{"kind": "number", "nativeSrc": "16855:2:5", "nodeType": "YulLiteral", "src": "16855:2:5", "type": "", "value": "48"}, {"arguments": [{"name": "temp", "nativeSrc": "16863:4:5", "nodeType": "YulIdentifier", "src": "16863:4:5"}, {"kind": "number", "nativeSrc": "16869:2:5", "nodeType": "YulLiteral", "src": "16869:2:5", "type": "", "value": "10"}], "functionName": {"name": "mod", "nativeSrc": "16859:3:5", "nodeType": "YulIdentifier", "src": "16859:3:5"}, "nativeSrc": "16859:13:5", "nodeType": "YulFunctionCall", "src": "16859:13:5"}], "functionName": {"name": "add", "nativeSrc": "16851:3:5", "nodeType": "YulIdentifier", "src": "16851:3:5"}, "nativeSrc": "16851:22:5", "nodeType": "YulFunctionCall", "src": "16851:22:5"}], "functionName": {"name": "mstore8", "nativeSrc": "16838:7:5", "nodeType": "YulIdentifier", "src": "16838:7:5"}, "nativeSrc": "16838:36:5", "nodeType": "YulFunctionCall", "src": "16838:36:5"}, "nativeSrc": "16838:36:5", "nodeType": "YulExpressionStatement", "src": "16838:36:5"}, {"nativeSrc": "16942:21:5", "nodeType": "YulAssignment", "src": "16942:21:5", "value": {"arguments": [{"name": "temp", "nativeSrc": "16954:4:5", "nodeType": "YulIdentifier", "src": "16954:4:5"}, {"kind": "number", "nativeSrc": "16960:2:5", "nodeType": "YulLiteral", "src": "16960:2:5", "type": "", "value": "10"}], "functionName": {"name": "div", "nativeSrc": "16950:3:5", "nodeType": "YulIdentifier", "src": "16950:3:5"}, "nativeSrc": "16950:13:5", "nodeType": "YulFunctionCall", "src": "16950:13:5"}, "variableNames": [{"name": "temp", "nativeSrc": "16942:4:5", "nodeType": "YulIdentifier", "src": "16942:4:5"}]}, {"body": {"nativeSrc": "17033:9:5", "nodeType": "YulBlock", "src": "17033:9:5", "statements": [{"nativeSrc": "17035:5:5", "nodeType": "YulBreak", "src": "17035:5:5"}]}, "condition": {"arguments": [{"name": "temp", "nativeSrc": "17027:4:5", "nodeType": "YulIdentifier", "src": "17027:4:5"}], "functionName": {"name": "iszero", "nativeSrc": "17020:6:5", "nodeType": "YulIdentifier", "src": "17020:6:5"}, "nativeSrc": "17020:12:5", "nodeType": "YulFunctionCall", "src": "17020:12:5"}, "nativeSrc": "17017:25:5", "nodeType": "YulIf", "src": "17017:25:5"}]}, "condition": {"kind": "number", "nativeSrc": "16605:1:5", "nodeType": "YulLiteral", "src": "16605:1:5", "type": "", "value": "1"}, "nativeSrc": "16579:477:5", "nodeType": "YulForLoop", "post": {"nativeSrc": "16607:2:5", "nodeType": "YulBlock", "src": "16607:2:5", "statements": []}, "pre": {"nativeSrc": "16583:21:5", "nodeType": "YulBlock", "src": "16583:21:5", "statements": [{"nativeSrc": "16585:17:5", "nodeType": "YulVariableDeclaration", "src": "16585:17:5", "value": {"name": "value", "nativeSrc": "16597:5:5", "nodeType": "YulIdentifier", "src": "16597:5:5"}, "variables": [{"name": "temp", "nativeSrc": "16589:4:5", "nodeType": "YulTypedName", "src": "16589:4:5", "type": ""}]}]}, "src": "16579:477:5"}, {"nativeSrc": "17141:27:5", "nodeType": "YulVariableDeclaration", "src": "17141:27:5", "value": {"arguments": [{"name": "end", "nativeSrc": "17159:3:5", "nodeType": "YulIdentifier", "src": "17159:3:5"}, {"name": "str", "nativeSrc": "17164:3:5", "nodeType": "YulIdentifier", "src": "17164:3:5"}], "functionName": {"name": "sub", "nativeSrc": "17155:3:5", "nodeType": "YulIdentifier", "src": "17155:3:5"}, "nativeSrc": "17155:13:5", "nodeType": "YulFunctionCall", "src": "17155:13:5"}, "variables": [{"name": "length", "nativeSrc": "17145:6:5", "nodeType": "YulTypedName", "src": "17145:6:5", "type": ""}]}, {"nativeSrc": "17262:19:5", "nodeType": "YulAssignment", "src": "17262:19:5", "value": {"arguments": [{"name": "str", "nativeSrc": "17273:3:5", "nodeType": "YulIdentifier", "src": "17273:3:5"}, {"kind": "number", "nativeSrc": "17278:2:5", "nodeType": "YulLiteral", "src": "17278:2:5", "type": "", "value": "32"}], "functionName": {"name": "sub", "nativeSrc": "17269:3:5", "nodeType": "YulIdentifier", "src": "17269:3:5"}, "nativeSrc": "17269:12:5", "nodeType": "YulFunctionCall", "src": "17269:12:5"}, "variableNames": [{"name": "str", "nativeSrc": "17262:3:5", "nodeType": "YulIdentifier", "src": "17262:3:5"}]}, {"expression": {"arguments": [{"name": "str", "nativeSrc": "17392:3:5", "nodeType": "YulIdentifier", "src": "17392:3:5"}, {"name": "length", "nativeSrc": "17397:6:5", "nodeType": "YulIdentifier", "src": "17397:6:5"}], "functionName": {"name": "mstore", "nativeSrc": "17385:6:5", "nodeType": "YulIdentifier", "src": "17385:6:5"}, "nativeSrc": "17385:19:5", "nodeType": "YulFunctionCall", "src": "17385:19:5"}, "nativeSrc": "17385:19:5", "nodeType": "YulExpressionStatement", "src": "17385:19:5"}]}, "documentation": "@solidity memory-safe-assembly", "evmVersion": "shanghai", "externalReferences": [{"declaration": 3377, "isOffset": false, "isSlot": false, "src": "16128:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "16257:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "16363:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "16684:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "16695:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "16846:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "17164:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "17262:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "17273:3:5", "valueSize": 1}, {"declaration": 3377, "isOffset": false, "isSlot": false, "src": "17392:3:5", "valueSize": 1}, {"declaration": 3374, "isOffset": false, "isSlot": false, "src": "16597:5:5", "valueSize": 1}], "id": 3379, "nodeType": "InlineAssembly", "src": "15508:1906:5"}]}, "id": 3381, "implemented": true, "kind": "function", "modifiers": [], "name": "toString", "nameLocation": "15389:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3375, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3374, "mutability": "mutable", "name": "value", "nameLocation": "15406:5:5", "nodeType": "VariableDeclaration", "scope": 3381, "src": "15398:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3373, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "15398:7:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "15397:15:5"}, "returnParameters": {"id": 3378, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3377, "mutability": "mutable", "name": "str", "nameLocation": "15450:3:5", "nodeType": "VariableDeclaration", "scope": 3381, "src": "15436:17:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3376, "name": "string", "nodeType": "ElementaryTypeName", "src": "15436:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "15435:19:5"}, "scope": 3527, "src": "15380:2040:5", "stateMutability": "pure", "virtual": false, "visibility": "internal"}, {"body": {"id": 3490, "nodeType": "Block", "src": "17501:413:5", "statements": [{"assignments": [3389], "declarations": [{"constant": false, "id": 3389, "mutability": "mutable", "name": "s", "nameLocation": "17524:1:5", "nodeType": "VariableDeclaration", "scope": 3490, "src": "17511:14:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes"}, "typeName": {"id": 3388, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "17511:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "id": 3394, "initialValue": {"arguments": [{"hexValue": "3430", "id": 3392, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17538:2:5", "typeDescriptions": {"typeIdentifier": "t_rational_40_by_1", "typeString": "int_const 40"}, "value": "40"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_rational_40_by_1", "typeString": "int_const 40"}], "id": 3391, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "NewExpression", "src": "17528:9:5", "typeDescriptions": {"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", "typeString": "function (uint256) pure returns (bytes memory)"}, "typeName": {"id": 3390, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "17532:5:5", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}}, "id": 3393, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17528:13:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "nodeType": "VariableDeclarationStatement", "src": "17511:30:5"}, {"body": {"id": 3483, "nodeType": "Block", "src": "17581:301:5", "statements": [{"assignments": [3406], "declarations": [{"constant": false, "id": 3406, "mutability": "mutable", "name": "b", "nameLocation": "17602:1:5", "nodeType": "VariableDeclaration", "scope": 3483, "src": "17595:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}, "typeName": {"id": 3405, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17595:6:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "visibility": "internal"}], "id": 3431, "initialValue": {"arguments": [{"arguments": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3428, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"arguments": [{"id": 3415, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3383, "src": "17649:5:5", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 3414, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17641:7:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint160_$", "typeString": "type(uint160)"}, "typeName": {"id": 3413, "name": "uint160", "nodeType": "ElementaryTypeName", "src": "17641:7:5", "typeDescriptions": {}}}, "id": 3416, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17641:14:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint160", "typeString": "uint160"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint160", "typeString": "uint160"}], "id": 3412, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17636:4:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}, "typeName": {"id": 3411, "name": "uint", "nodeType": "ElementaryTypeName", "src": "17636:4:5", "typeDescriptions": {}}}, "id": 3417, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17636:20:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3426, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"hexValue": "32", "id": 3418, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17660:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "nodeType": "BinaryOperation", "operator": "**", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3424, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"hexValue": "38", "id": 3419, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17666:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_8_by_1", "typeString": "int_const 8"}, "value": "8"}, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": {"components": [{"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3422, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"hexValue": "3139", "id": 3420, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17671:2:5", "typeDescriptions": {"typeIdentifier": "t_rational_19_by_1", "typeString": "int_const 19"}, "value": "19"}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 3421, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3396, "src": "17676:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "17671:6:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 3423, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "17670:8:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "17666:12:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 3425, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "17665:14:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "17660:19:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "id": 3427, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "17659:21:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "17636:44:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 3410, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17630:5:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)"}, "typeName": {"id": 3409, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "17630:5:5", "typeDescriptions": {}}}, "id": 3429, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17630:51:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint8", "typeString": "uint8"}], "id": 3408, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17606:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_bytes1_$", "typeString": "type(bytes1)"}, "typeName": {"id": 3407, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17606:6:5", "typeDescriptions": {}}}, "id": 3430, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17606:89:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "nodeType": "VariableDeclarationStatement", "src": "17595:100:5"}, {"assignments": [3433], "declarations": [{"constant": false, "id": 3433, "mutability": "mutable", "name": "hi", "nameLocation": "17716:2:5", "nodeType": "VariableDeclaration", "scope": 3483, "src": "17709:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}, "typeName": {"id": 3432, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17709:6:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "visibility": "internal"}], "id": 3443, "initialValue": {"arguments": [{"commonType": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "id": 3441, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"id": 3438, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3406, "src": "17734:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3437, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17728:5:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)"}, "typeName": {"id": 3436, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "17728:5:5", "typeDescriptions": {}}}, "id": 3439, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17728:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": {"hexValue": "3136", "id": 3440, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17739:2:5", "typeDescriptions": {"typeIdentifier": "t_rational_16_by_1", "typeString": "int_const 16"}, "value": "16"}, "src": "17728:13:5", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint8", "typeString": "uint8"}], "id": 3435, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17721:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_bytes1_$", "typeString": "type(bytes1)"}, "typeName": {"id": 3434, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17721:6:5", "typeDescriptions": {}}}, "id": 3442, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17721:21:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "nodeType": "VariableDeclarationStatement", "src": "17709:33:5"}, {"assignments": [3445], "declarations": [{"constant": false, "id": 3445, "mutability": "mutable", "name": "lo", "nameLocation": "17763:2:5", "nodeType": "VariableDeclaration", "scope": 3483, "src": "17756:9:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}, "typeName": {"id": 3444, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17756:6:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "visibility": "internal"}], "id": 3460, "initialValue": {"arguments": [{"commonType": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "id": 3458, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"id": 3450, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3406, "src": "17781:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3449, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17775:5:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)"}, "typeName": {"id": 3448, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "17775:5:5", "typeDescriptions": {}}}, "id": 3451, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17775:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"commonType": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "id": 3457, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"hexValue": "3136", "id": 3452, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17786:2:5", "typeDescriptions": {"typeIdentifier": "t_rational_16_by_1", "typeString": "int_const 16"}, "value": "16"}, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": {"arguments": [{"id": 3455, "name": "hi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3433, "src": "17797:2:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3454, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17791:5:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)"}, "typeName": {"id": 3453, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "17791:5:5", "typeDescriptions": {}}}, "id": 3456, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17791:9:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "src": "17786:14:5", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "src": "17775:25:5", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint8", "typeString": "uint8"}], "id": 3447, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17768:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_bytes1_$", "typeString": "type(bytes1)"}, "typeName": {"id": 3446, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17768:6:5", "typeDescriptions": {}}}, "id": 3459, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17768:33:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "nodeType": "VariableDeclarationStatement", "src": "17756:45:5"}, {"expression": {"id": 3469, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"baseExpression": {"id": 3461, "name": "s", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3389, "src": "17815:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "id": 3465, "indexExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3464, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"hexValue": "32", "id": 3462, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17817:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": {"id": 3463, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3396, "src": "17821:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "17817:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "17815:8:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 3467, "name": "hi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3433, "src": "17831:2:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3466, "name": "char", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3526, "src": "17826:4:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_bytes1_$returns$_t_bytes1_$", "typeString": "function (bytes1) pure returns (bytes1)"}}, "id": 3468, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17826:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "src": "17815:19:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "id": 3470, "nodeType": "ExpressionStatement", "src": "17815:19:5"}, {"expression": {"id": 3481, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"baseExpression": {"id": 3471, "name": "s", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3389, "src": "17848:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}, "id": 3477, "indexExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3476, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3474, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"hexValue": "32", "id": 3472, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17850:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2"}, "value": "2"}, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": {"id": 3473, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3396, "src": "17854:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "17850:5:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "31", "id": 3475, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17858:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1"}, "value": "1"}, "src": "17850:9:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "17848:12:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"id": 3479, "name": "lo", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3445, "src": "17868:2:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3478, "name": "char", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3526, "src": "17863:4:5", "typeDescriptions": {"typeIdentifier": "t_function_internal_pure$_t_bytes1_$returns$_t_bytes1_$", "typeString": "function (bytes1) pure returns (bytes1)"}}, "id": 3480, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17863:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "src": "17848:23:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "id": 3482, "nodeType": "ExpressionStatement", "src": "17848:23:5"}]}, "condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 3401, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 3399, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3396, "src": "17568:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"hexValue": "3230", "id": 3400, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17572:2:5", "typeDescriptions": {"typeIdentifier": "t_rational_20_by_1", "typeString": "int_const 20"}, "value": "20"}, "src": "17568:6:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 3484, "initializationExpression": {"assignments": [3396], "declarations": [{"constant": false, "id": 3396, "mutability": "mutable", "name": "i", "nameLocation": "17561:1:5", "nodeType": "VariableDeclaration", "scope": 3484, "src": "17556:6:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3395, "name": "uint", "nodeType": "ElementaryTypeName", "src": "17556:4:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 3398, "initialValue": {"hexValue": "30", "id": 3397, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "17565:1:5", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "nodeType": "VariableDeclarationStatement", "src": "17556:10:5"}, "isSimpleCounterLoop": true, "loopExpression": {"expression": {"id": 3403, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "17576:3:5", "subExpression": {"id": 3402, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3396, "src": "17576:1:5", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 3404, "nodeType": "ExpressionStatement", "src": "17576:3:5"}, "nodeType": "ForStatement", "src": "17551:331:5"}, {"expression": {"arguments": [{"id": 3487, "name": "s", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3389, "src": "17905:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory"}], "id": 3486, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17898:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_string_storage_ptr_$", "typeString": "type(string storage pointer)"}, "typeName": {"id": 3485, "name": "string", "nodeType": "ElementaryTypeName", "src": "17898:6:5", "typeDescriptions": {}}}, "id": 3488, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17898:9:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "functionReturnParameters": 3387, "id": 3489, "nodeType": "Return", "src": "17891:16:5"}]}, "id": 3491, "implemented": true, "kind": "function", "modifiers": [], "name": "toString", "nameLocation": "17435:8:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3384, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3383, "mutability": "mutable", "name": "value", "nameLocation": "17452:5:5", "nodeType": "VariableDeclaration", "scope": 3491, "src": "17444:13:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3382, "name": "address", "nodeType": "ElementaryTypeName", "src": "17444:7:5", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "17443:15:5"}, "returnParameters": {"id": 3387, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3386, "mutability": "mutable", "name": "str", "nameLocation": "17496:3:5", "nodeType": "VariableDeclaration", "scope": 3491, "src": "17482:17:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3385, "name": "string", "nodeType": "ElementaryTypeName", "src": "17482:6:5", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "17481:19:5"}, "scope": 3527, "src": "17426:488:5", "stateMutability": "pure", "virtual": false, "visibility": "internal"}, {"body": {"id": 3525, "nodeType": "Block", "src": "17977:111:5", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "id": 3503, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"id": 3500, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3493, "src": "17997:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3499, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "17991:5:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)"}, "typeName": {"id": 3498, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "17991:5:5", "typeDescriptions": {}}}, "id": 3501, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "17991:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"hexValue": "3130", "id": 3502, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "18002:2:5", "typeDescriptions": {"typeIdentifier": "t_rational_10_by_1", "typeString": "int_const 10"}, "value": "10"}, "src": "17991:13:5", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseBody": {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "id": 3521, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"id": 3518, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3493, "src": "18071:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3517, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "18065:5:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)"}, "typeName": {"id": 3516, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "18065:5:5", "typeDescriptions": {}}}, "id": 3519, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "18065:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "30783537", "id": 3520, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "18076:4:5", "typeDescriptions": {"typeIdentifier": "t_rational_87_by_1", "typeString": "int_const 87"}, "value": "0x57"}, "src": "18065:15:5", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint8", "typeString": "uint8"}], "id": 3515, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "18058:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_bytes1_$", "typeString": "type(bytes1)"}, "typeName": {"id": 3514, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "18058:6:5", "typeDescriptions": {}}}, "id": 3522, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "18058:23:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "functionReturnParameters": 3497, "id": 3523, "nodeType": "Return", "src": "18051:30:5"}, "id": 3524, "nodeType": "IfStatement", "src": "17987:94:5", "trueBody": {"expression": {"arguments": [{"commonType": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "id": 3511, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"id": 3508, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3493, "src": "18026:1:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_bytes1", "typeString": "bytes1"}], "id": 3507, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "18020:5:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint8_$", "typeString": "type(uint8)"}, "typeName": {"id": 3506, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "18020:5:5", "typeDescriptions": {}}}, "id": 3509, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "18020:8:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"hexValue": "30783330", "id": 3510, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "18031:4:5", "typeDescriptions": {"typeIdentifier": "t_rational_48_by_1", "typeString": "int_const 48"}, "value": "0x30"}, "src": "18020:15:5", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_uint8", "typeString": "uint8"}], "id": 3505, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "18013:6:5", "typeDescriptions": {"typeIdentifier": "t_type$_t_bytes1_$", "typeString": "type(bytes1)"}, "typeName": {"id": 3504, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "18013:6:5", "typeDescriptions": {}}}, "id": 3512, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "18013:23:5", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "functionReturnParameters": 3497, "id": 3513, "nodeType": "Return", "src": "18006:30:5"}}]}, "id": 3526, "implemented": true, "kind": "function", "modifiers": [], "name": "char", "nameLocation": "17929:4:5", "nodeType": "FunctionDefinition", "parameters": {"id": 3494, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3493, "mutability": "mutable", "name": "b", "nameLocation": "17941:1:5", "nodeType": "VariableDeclaration", "scope": 3526, "src": "17934:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}, "typeName": {"id": 3492, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17934:6:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "visibility": "internal"}], "src": "17933:10:5"}, "returnParameters": {"id": 3497, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3496, "mutability": "mutable", "name": "c", "nameLocation": "17974:1:5", "nodeType": "VariableDeclaration", "scope": 3526, "src": "17967:8:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}, "typeName": {"id": 3495, "name": "bytes1", "nodeType": "ElementaryTypeName", "src": "17967:6:5", "typeDescriptions": {"typeIdentifier": "t_bytes1", "typeString": "bytes1"}}, "visibility": "internal"}], "src": "17966:10:5"}, "scope": 3527, "src": "17920:168:5", "stateMutability": "pure", "virtual": false, "visibility": "internal"}], "scope": 3528, "src": "15061:3029:5", "usedErrors": [], "usedEvents": []}], "src": "0:18091:5"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol": {"AST": {"absolutePath": "node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol", "exportedSymbols": {"IERC1155Errors": [3664], "IERC20Errors": [3569], "IERC721Errors": [3617]}, "id": 3665, "license": "MIT", "nodeType": "SourceUnit", "nodes": [{"id": 3529, "literals": ["solidity", "^", "0.8", ".20"], "nodeType": "PragmaDirective", "src": "112:24:6"}, {"abstract": false, "baseContracts": [], "canonicalName": "IERC20Errors", "contractDependencies": [], "contractKind": "interface", "documentation": {"id": 3530, "nodeType": "StructuredDocumentation", "src": "138:139:6", "text": " @dev Standard ERC20 Errors\n Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens."}, "fullyImplemented": true, "id": 3569, "linearizedBaseContracts": [3569], "name": "IERC20Errors", "nameLocation": "288:12:6", "nodeType": "ContractDefinition", "nodes": [{"documentation": {"id": 3531, "nodeType": "StructuredDocumentation", "src": "307:309:6", "text": " @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n @param sender Address whose tokens are being transferred.\n @param balance Current balance for the interacting account.\n @param needed Minimum amount required to perform a transfer."}, "errorSelector": "e450d38c", "id": 3539, "name": "ERC20InsufficientBalance", "nameLocation": "627:24:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3538, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3533, "mutability": "mutable", "name": "sender", "nameLocation": "660:6:6", "nodeType": "VariableDeclaration", "scope": 3539, "src": "652:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3532, "name": "address", "nodeType": "ElementaryTypeName", "src": "652:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3535, "mutability": "mutable", "name": "balance", "nameLocation": "676:7:6", "nodeType": "VariableDeclaration", "scope": 3539, "src": "668:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3534, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "668:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3537, "mutability": "mutable", "name": "needed", "nameLocation": "693:6:6", "nodeType": "VariableDeclaration", "scope": 3539, "src": "685:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3536, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "685:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "651:49:6"}, "src": "621:80:6"}, {"documentation": {"id": 3540, "nodeType": "StructuredDocumentation", "src": "707:152:6", "text": " @dev Indicates a failure with the token `sender`. Used in transfers.\n @param sender Address whose tokens are being transferred."}, "errorSelector": "96c6fd1e", "id": 3544, "name": "ERC20InvalidSender", "nameLocation": "870:18:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3543, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3542, "mutability": "mutable", "name": "sender", "nameLocation": "897:6:6", "nodeType": "VariableDeclaration", "scope": 3544, "src": "889:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3541, "name": "address", "nodeType": "ElementaryTypeName", "src": "889:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "888:16:6"}, "src": "864:41:6"}, {"documentation": {"id": 3545, "nodeType": "StructuredDocumentation", "src": "911:159:6", "text": " @dev Indicates a failure with the token `receiver`. Used in transfers.\n @param receiver Address to which tokens are being transferred."}, "errorSelector": "ec442f05", "id": 3549, "name": "ERC20InvalidReceiver", "nameLocation": "1081:20:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3548, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3547, "mutability": "mutable", "name": "receiver", "nameLocation": "1110:8:6", "nodeType": "VariableDeclaration", "scope": 3549, "src": "1102:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3546, "name": "address", "nodeType": "ElementaryTypeName", "src": "1102:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "1101:18:6"}, "src": "1075:45:6"}, {"documentation": {"id": 3550, "nodeType": "StructuredDocumentation", "src": "1126:345:6", "text": " @dev Indicates a failure with the `spender`\u2019s `allowance`. Used in transfers.\n @param spender Address that may be allowed to operate on tokens without being their owner.\n @param allowance Amount of tokens a `spender` is allowed to operate with.\n @param needed Minimum amount required to perform a transfer."}, "errorSelector": "fb8f41b2", "id": 3558, "name": "ERC20InsufficientAllowance", "nameLocation": "1482:26:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3557, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3552, "mutability": "mutable", "name": "spender", "nameLocation": "1517:7:6", "nodeType": "VariableDeclaration", "scope": 3558, "src": "1509:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3551, "name": "address", "nodeType": "ElementaryTypeName", "src": "1509:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3554, "mutability": "mutable", "name": "allowance", "nameLocation": "1534:9:6", "nodeType": "VariableDeclaration", "scope": 3558, "src": "1526:17:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3553, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1526:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3556, "mutability": "mutable", "name": "needed", "nameLocation": "1553:6:6", "nodeType": "VariableDeclaration", "scope": 3558, "src": "1545:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3555, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1545:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1508:52:6"}, "src": "1476:85:6"}, {"documentation": {"id": 3559, "nodeType": "StructuredDocumentation", "src": "1567:174:6", "text": " @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n @param approver Address initiating an approval operation."}, "errorSelector": "e602df05", "id": 3563, "name": "ERC20InvalidApprover", "nameLocation": "1752:20:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3562, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3561, "mutability": "mutable", "name": "approver", "nameLocation": "1781:8:6", "nodeType": "VariableDeclaration", "scope": 3563, "src": "1773:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3560, "name": "address", "nodeType": "ElementaryTypeName", "src": "1773:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "1772:18:6"}, "src": "1746:45:6"}, {"documentation": {"id": 3564, "nodeType": "StructuredDocumentation", "src": "1797:195:6", "text": " @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n @param spender Address that may be allowed to operate on tokens without being their owner."}, "errorSelector": "94280d62", "id": 3568, "name": "ERC20InvalidSpender", "nameLocation": "2003:19:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3567, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3566, "mutability": "mutable", "name": "spender", "nameLocation": "2031:7:6", "nodeType": "VariableDeclaration", "scope": 3568, "src": "2023:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3565, "name": "address", "nodeType": "ElementaryTypeName", "src": "2023:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "2022:17:6"}, "src": "1997:43:6"}], "scope": 3665, "src": "278:1764:6", "usedErrors": [3539, 3544, 3549, 3558, 3563, 3568], "usedEvents": []}, {"abstract": false, "baseContracts": [], "canonicalName": "IERC721Errors", "contractDependencies": [], "contractKind": "interface", "documentation": {"id": 3570, "nodeType": "StructuredDocumentation", "src": "2044:141:6", "text": " @dev Standard ERC721 Errors\n Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens."}, "fullyImplemented": true, "id": 3617, "linearizedBaseContracts": [3617], "name": "IERC721Errors", "nameLocation": "2196:13:6", "nodeType": "ContractDefinition", "nodes": [{"documentation": {"id": 3571, "nodeType": "StructuredDocumentation", "src": "2216:219:6", "text": " @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n Used in balance queries.\n @param owner Address of the current owner of a token."}, "errorSelector": "89c62b64", "id": 3575, "name": "ERC721InvalidOwner", "nameLocation": "2446:18:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3574, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3573, "mutability": "mutable", "name": "owner", "nameLocation": "2473:5:6", "nodeType": "VariableDeclaration", "scope": 3575, "src": "2465:13:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3572, "name": "address", "nodeType": "ElementaryTypeName", "src": "2465:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "2464:15:6"}, "src": "2440:40:6"}, {"documentation": {"id": 3576, "nodeType": "StructuredDocumentation", "src": "2486:132:6", "text": " @dev Indicates a `tokenId` whose `owner` is the zero address.\n @param tokenId Identifier number of a token."}, "errorSelector": "7e273289", "id": 3580, "name": "ERC721NonexistentToken", "nameLocation": "2629:22:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3579, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3578, "mutability": "mutable", "name": "tokenId", "nameLocation": "2660:7:6", "nodeType": "VariableDeclaration", "scope": 3580, "src": "2652:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3577, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2652:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "2651:17:6"}, "src": "2623:46:6"}, {"documentation": {"id": 3581, "nodeType": "StructuredDocumentation", "src": "2675:289:6", "text": " @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n @param sender Address whose tokens are being transferred.\n @param tokenId Identifier number of a token.\n @param owner Address of the current owner of a token."}, "errorSelector": "64283d7b", "id": 3589, "name": "ERC721IncorrectOwner", "nameLocation": "2975:20:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3588, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3583, "mutability": "mutable", "name": "sender", "nameLocation": "3004:6:6", "nodeType": "VariableDeclaration", "scope": 3589, "src": "2996:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3582, "name": "address", "nodeType": "ElementaryTypeName", "src": "2996:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3585, "mutability": "mutable", "name": "tokenId", "nameLocation": "3020:7:6", "nodeType": "VariableDeclaration", "scope": 3589, "src": "3012:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3584, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3012:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3587, "mutability": "mutable", "name": "owner", "nameLocation": "3037:5:6", "nodeType": "VariableDeclaration", "scope": 3589, "src": "3029:13:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3586, "name": "address", "nodeType": "ElementaryTypeName", "src": "3029:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "2995:48:6"}, "src": "2969:75:6"}, {"documentation": {"id": 3590, "nodeType": "StructuredDocumentation", "src": "3050:152:6", "text": " @dev Indicates a failure with the token `sender`. Used in transfers.\n @param sender Address whose tokens are being transferred."}, "errorSelector": "73c6ac6e", "id": 3594, "name": "ERC721InvalidSender", "nameLocation": "3213:19:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3593, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3592, "mutability": "mutable", "name": "sender", "nameLocation": "3241:6:6", "nodeType": "VariableDeclaration", "scope": 3594, "src": "3233:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3591, "name": "address", "nodeType": "ElementaryTypeName", "src": "3233:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "3232:16:6"}, "src": "3207:42:6"}, {"documentation": {"id": 3595, "nodeType": "StructuredDocumentation", "src": "3255:159:6", "text": " @dev Indicates a failure with the token `receiver`. Used in transfers.\n @param receiver Address to which tokens are being transferred."}, "errorSelector": "64a0ae92", "id": 3599, "name": "ERC721InvalidReceiver", "nameLocation": "3425:21:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3598, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3597, "mutability": "mutable", "name": "receiver", "nameLocation": "3455:8:6", "nodeType": "VariableDeclaration", "scope": 3599, "src": "3447:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3596, "name": "address", "nodeType": "ElementaryTypeName", "src": "3447:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "3446:18:6"}, "src": "3419:46:6"}, {"documentation": {"id": 3600, "nodeType": "StructuredDocumentation", "src": "3471:247:6", "text": " @dev Indicates a failure with the `operator`\u2019s approval. Used in transfers.\n @param operator Address that may be allowed to operate on tokens without being their owner.\n @param tokenId Identifier number of a token."}, "errorSelector": "177e802f", "id": 3606, "name": "ERC721InsufficientApproval", "nameLocation": "3729:26:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3605, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3602, "mutability": "mutable", "name": "operator", "nameLocation": "3764:8:6", "nodeType": "VariableDeclaration", "scope": 3606, "src": "3756:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3601, "name": "address", "nodeType": "ElementaryTypeName", "src": "3756:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3604, "mutability": "mutable", "name": "tokenId", "nameLocation": "3782:7:6", "nodeType": "VariableDeclaration", "scope": 3606, "src": "3774:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3603, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3774:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "3755:35:6"}, "src": "3723:68:6"}, {"documentation": {"id": 3607, "nodeType": "StructuredDocumentation", "src": "3797:174:6", "text": " @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n @param approver Address initiating an approval operation."}, "errorSelector": "a9fbf51f", "id": 3611, "name": "ERC721InvalidApprover", "nameLocation": "3982:21:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3610, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3609, "mutability": "mutable", "name": "approver", "nameLocation": "4012:8:6", "nodeType": "VariableDeclaration", "scope": 3611, "src": "4004:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3608, "name": "address", "nodeType": "ElementaryTypeName", "src": "4004:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "4003:18:6"}, "src": "3976:46:6"}, {"documentation": {"id": 3612, "nodeType": "StructuredDocumentation", "src": "4028:197:6", "text": " @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n @param operator Address that may be allowed to operate on tokens without being their owner."}, "errorSelector": "5b08ba18", "id": 3616, "name": "ERC721InvalidOperator", "nameLocation": "4236:21:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3615, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3614, "mutability": "mutable", "name": "operator", "nameLocation": "4266:8:6", "nodeType": "VariableDeclaration", "scope": 3616, "src": "4258:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3613, "name": "address", "nodeType": "ElementaryTypeName", "src": "4258:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "4257:18:6"}, "src": "4230:46:6"}], "scope": 3665, "src": "2186:2092:6", "usedErrors": [3575, 3580, 3589, 3594, 3599, 3606, 3611, 3616], "usedEvents": []}, {"abstract": false, "baseContracts": [], "canonicalName": "IERC1155Errors", "contractDependencies": [], "contractKind": "interface", "documentation": {"id": 3618, "nodeType": "StructuredDocumentation", "src": "4280:143:6", "text": " @dev Standard ERC1155 Errors\n Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens."}, "fullyImplemented": true, "id": 3664, "linearizedBaseContracts": [3664], "name": "IERC1155Errors", "nameLocation": "4434:14:6", "nodeType": "ContractDefinition", "nodes": [{"documentation": {"id": 3619, "nodeType": "StructuredDocumentation", "src": "4455:361:6", "text": " @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n @param sender Address whose tokens are being transferred.\n @param balance Current balance for the interacting account.\n @param needed Minimum amount required to perform a transfer.\n @param tokenId Identifier number of a token."}, "errorSelector": "03dee4c5", "id": 3629, "name": "ERC1155InsufficientBalance", "nameLocation": "4827:26:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3628, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3621, "mutability": "mutable", "name": "sender", "nameLocation": "4862:6:6", "nodeType": "VariableDeclaration", "scope": 3629, "src": "4854:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3620, "name": "address", "nodeType": "ElementaryTypeName", "src": "4854:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3623, "mutability": "mutable", "name": "balance", "nameLocation": "4878:7:6", "nodeType": "VariableDeclaration", "scope": 3629, "src": "4870:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3622, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4870:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3625, "mutability": "mutable", "name": "needed", "nameLocation": "4895:6:6", "nodeType": "VariableDeclaration", "scope": 3629, "src": "4887:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3624, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4887:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3627, "mutability": "mutable", "name": "tokenId", "nameLocation": "4911:7:6", "nodeType": "VariableDeclaration", "scope": 3629, "src": "4903:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3626, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4903:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "4853:66:6"}, "src": "4821:99:6"}, {"documentation": {"id": 3630, "nodeType": "StructuredDocumentation", "src": "4926:152:6", "text": " @dev Indicates a failure with the token `sender`. Used in transfers.\n @param sender Address whose tokens are being transferred."}, "errorSelector": "01a83514", "id": 3634, "name": "ERC1155InvalidSender", "nameLocation": "5089:20:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3633, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3632, "mutability": "mutable", "name": "sender", "nameLocation": "5118:6:6", "nodeType": "VariableDeclaration", "scope": 3634, "src": "5110:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3631, "name": "address", "nodeType": "ElementaryTypeName", "src": "5110:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "5109:16:6"}, "src": "5083:43:6"}, {"documentation": {"id": 3635, "nodeType": "StructuredDocumentation", "src": "5132:159:6", "text": " @dev Indicates a failure with the token `receiver`. Used in transfers.\n @param receiver Address to which tokens are being transferred."}, "errorSelector": "57f447ce", "id": 3639, "name": "ERC1155InvalidReceiver", "nameLocation": "5302:22:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3638, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3637, "mutability": "mutable", "name": "receiver", "nameLocation": "5333:8:6", "nodeType": "VariableDeclaration", "scope": 3639, "src": "5325:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3636, "name": "address", "nodeType": "ElementaryTypeName", "src": "5325:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "5324:18:6"}, "src": "5296:47:6"}, {"documentation": {"id": 3640, "nodeType": "StructuredDocumentation", "src": "5349:256:6", "text": " @dev Indicates a failure with the `operator`\u2019s approval. Used in transfers.\n @param operator Address that may be allowed to operate on tokens without being their owner.\n @param owner Address of the current owner of a token."}, "errorSelector": "e237d922", "id": 3646, "name": "ERC1155MissingApprovalForAll", "nameLocation": "5616:28:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3645, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3642, "mutability": "mutable", "name": "operator", "nameLocation": "5653:8:6", "nodeType": "VariableDeclaration", "scope": 3646, "src": "5645:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3641, "name": "address", "nodeType": "ElementaryTypeName", "src": "5645:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3644, "mutability": "mutable", "name": "owner", "nameLocation": "5671:5:6", "nodeType": "VariableDeclaration", "scope": 3646, "src": "5663:13:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3643, "name": "address", "nodeType": "ElementaryTypeName", "src": "5663:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "5644:33:6"}, "src": "5610:68:6"}, {"documentation": {"id": 3647, "nodeType": "StructuredDocumentation", "src": "5684:174:6", "text": " @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n @param approver Address initiating an approval operation."}, "errorSelector": "3e31884e", "id": 3651, "name": "ERC1155InvalidApprover", "nameLocation": "5869:22:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3650, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3649, "mutability": "mutable", "name": "approver", "nameLocation": "5900:8:6", "nodeType": "VariableDeclaration", "scope": 3651, "src": "5892:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3648, "name": "address", "nodeType": "ElementaryTypeName", "src": "5892:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "5891:18:6"}, "src": "5863:47:6"}, {"documentation": {"id": 3652, "nodeType": "StructuredDocumentation", "src": "5916:197:6", "text": " @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n @param operator Address that may be allowed to operate on tokens without being their owner."}, "errorSelector": "ced3e100", "id": 3656, "name": "ERC1155InvalidOperator", "nameLocation": "6124:22:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3655, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3654, "mutability": "mutable", "name": "operator", "nameLocation": "6155:8:6", "nodeType": "VariableDeclaration", "scope": 3656, "src": "6147:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3653, "name": "address", "nodeType": "ElementaryTypeName", "src": "6147:7:6", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "6146:18:6"}, "src": "6118:47:6"}, {"documentation": {"id": 3657, "nodeType": "StructuredDocumentation", "src": "6171:280:6", "text": " @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n Used in batch transfers.\n @param idsLength Length of the array of token identifiers\n @param valuesLength Length of the array of token amounts"}, "errorSelector": "5b059991", "id": 3663, "name": "ERC1155InvalidArrayLength", "nameLocation": "6462:25:6", "nodeType": "ErrorDefinition", "parameters": {"id": 3662, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3659, "mutability": "mutable", "name": "idsLength", "nameLocation": "6496:9:6", "nodeType": "VariableDeclaration", "scope": 3663, "src": "6488:17:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3658, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6488:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 3661, "mutability": "mutable", "name": "valuesLength", "nameLocation": "6515:12:6", "nodeType": "VariableDeclaration", "scope": 3663, "src": "6507:20:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3660, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6507:7:6", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "6487:41:6"}, "src": "6456:73:6"}], "scope": 3665, "src": "4424:2107:6", "usedErrors": [3629, 3634, 3639, 3646, 3651, 3656, 3663], "usedEvents": []}], "src": "112:6420:6"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol": {"AST": {"absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol", "exportedSymbols": {"Context": [3798], "ERC20": [1959], "IERC20": [3742], "IERC20Errors": [3569], "IERC20Metadata": [3768]}, "id": 1960, "license": "MIT", "nodeType": "SourceUnit", "nodes": [{"id": 1446, "literals": ["solidity", "^", "0.8", ".20"], "nodeType": "PragmaDirective", "src": "105:24:7"}, {"absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol", "file": "./IERC20.sol", "id": 1448, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1960, "sourceUnit": 3743, "src": "131:36:7", "symbolAliases": [{"foreign": {"id": 1447, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3742, "src": "139:6:7", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol", "file": "./extensions/IERC20Metadata.sol", "id": 1450, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1960, "sourceUnit": 3769, "src": "168:63:7", "symbolAliases": [{"foreign": {"id": 1449, "name": "IERC20Metadata", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3768, "src": "176:14:7", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"absolutePath": "node_modules/@openzeppelin/contracts/utils/Context.sol", "file": "../../utils/Context.sol", "id": 1452, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1960, "sourceUnit": 3799, "src": "232:48:7", "symbolAliases": [{"foreign": {"id": 1451, "name": "Context", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3798, "src": "240:7:7", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"absolutePath": "node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol", "file": "../../interfaces/draft-IERC6093.sol", "id": 1454, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1960, "sourceUnit": 3665, "src": "281:65:7", "symbolAliases": [{"foreign": {"id": 1453, "name": "IERC20Errors", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3569, "src": "289:12:7", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"abstract": true, "baseContracts": [{"baseName": {"id": 1456, "name": "Context", "nameLocations": ["1428:7:7"], "nodeType": "IdentifierPath", "referencedDeclaration": 3798, "src": "1428:7:7"}, "id": 1457, "nodeType": "InheritanceSpecifier", "src": "1428:7:7"}, {"baseName": {"id": 1458, "name": "IERC20", "nameLocations": ["1437:6:7"], "nodeType": "IdentifierPath", "referencedDeclaration": 3742, "src": "1437:6:7"}, "id": 1459, "nodeType": "InheritanceSpecifier", "src": "1437:6:7"}, {"baseName": {"id": 1460, "name": "IERC20Metadata", "nameLocations": ["1445:14:7"], "nodeType": "IdentifierPath", "referencedDeclaration": 3768, "src": "1445:14:7"}, "id": 1461, "nodeType": "InheritanceSpecifier", "src": "1445:14:7"}, {"baseName": {"id": 1462, "name": "IERC20Errors", "nameLocations": ["1461:12:7"], "nodeType": "IdentifierPath", "referencedDeclaration": 3569, "src": "1461:12:7"}, "id": 1463, "nodeType": "InheritanceSpecifier", "src": "1461:12:7"}], "canonicalName": "ERC20", "contractDependencies": [], "contractKind": "contract", "documentation": {"id": 1455, "nodeType": "StructuredDocumentation", "src": "348:1052:7", "text": " @dev Implementation of the {IERC20} interface.\n This implementation is agnostic to the way tokens are created. This means\n that a supply mechanism has to be added in a derived contract using {_mint}.\n TIP: For a detailed writeup see our guide\n https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n to implement supply mechanisms].\n The default value of {decimals} is 18. To change this, you should override\n this function so it returns a different value.\n We have followed general OpenZeppelin Contracts guidelines: functions revert\n instead returning `false` on failure. This behavior is nonetheless\n conventional and does not conflict with the expectations of ERC20\n applications.\n Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n This allows applications to reconstruct the allowance for all accounts just\n by listening to said events. Other implementations of the EIP may not emit\n these events, as it isn't required by the specification."}, "fullyImplemented": true, "id": 1959, "linearizedBaseContracts": [1959, 3569, 3768, 3742, 3798], "name": "ERC20", "nameLocation": "1419:5:7", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "id": 1467, "mutability": "mutable", "name": "_balances", "nameLocation": "1524:9:7", "nodeType": "VariableDeclaration", "scope": 1959, "src": "1480:53:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}, "typeName": {"id": 1466, "keyName": "account", "keyNameLocation": "1496:7:7", "keyType": {"id": 1464, "name": "address", "nodeType": "ElementaryTypeName", "src": "1488:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "Mapping", "src": "1480:35:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}, "valueName": "", "valueNameLocation": "-1:-1:-1", "valueType": {"id": 1465, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1507:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}}, "visibility": "private"}, {"constant": false, "id": 1473, "mutability": "mutable", "name": "_allowances", "nameLocation": "1612:11:7", "nodeType": "VariableDeclaration", "scope": 1959, "src": "1540:83:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))"}, "typeName": {"id": 1472, "keyName": "account", "keyNameLocation": "1556:7:7", "keyType": {"id": 1468, "name": "address", "nodeType": "ElementaryTypeName", "src": "1548:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "Mapping", "src": "1540:63:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))"}, "valueName": "", "valueNameLocation": "-1:-1:-1", "valueType": {"id": 1471, "keyName": "spender", "keyNameLocation": "1583:7:7", "keyType": {"id": 1469, "name": "address", "nodeType": "ElementaryTypeName", "src": "1575:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "Mapping", "src": "1567:35:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}, "valueName": "", "valueNameLocation": "-1:-1:-1", "valueType": {"id": 1470, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1594:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}}}, "visibility": "private"}, {"constant": false, "id": 1475, "mutability": "mutable", "name": "_totalSupply", "nameLocation": "1646:12:7", "nodeType": "VariableDeclaration", "scope": 1959, "src": "1630:28:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1474, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1630:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "private"}, {"constant": false, "id": 1477, "mutability": "mutable", "name": "_name", "nameLocation": "1680:5:7", "nodeType": "VariableDeclaration", "scope": 1959, "src": "1665:20:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string"}, "typeName": {"id": 1476, "name": "string", "nodeType": "ElementaryTypeName", "src": "1665:6:7", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "private"}, {"constant": false, "id": 1479, "mutability": "mutable", "name": "_symbol", "nameLocation": "1706:7:7", "nodeType": "VariableDeclaration", "scope": 1959, "src": "1691:22:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string"}, "typeName": {"id": 1478, "name": "string", "nodeType": "ElementaryTypeName", "src": "1691:6:7", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "private"}, {"body": {"id": 1495, "nodeType": "Block", "src": "1952:57:7", "statements": [{"expression": {"id": 1489, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 1487, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1477, "src": "1962:5:7", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string storage ref"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 1488, "name": "name_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1482, "src": "1970:5:7", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "src": "1962:13:7", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string storage ref"}}, "id": 1490, "nodeType": "ExpressionStatement", "src": "1962:13:7"}, {"expression": {"id": 1493, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 1491, "name": "_symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1479, "src": "1985:7:7", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string storage ref"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 1492, "name": "symbol_", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1484, "src": "1995:7:7", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string memory"}}, "src": "1985:17:7", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string storage ref"}}, "id": 1494, "nodeType": "ExpressionStatement", "src": "1985:17:7"}]}, "documentation": {"id": 1480, "nodeType": "StructuredDocumentation", "src": "1720:171:7", "text": " @dev Sets the values for {name} and {symbol}.\n All two of these values are immutable: they can only be set once during\n construction."}, "id": 1496, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": {"id": 1485, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1482, "mutability": "mutable", "name": "name_", "nameLocation": "1922:5:7", "nodeType": "VariableDeclaration", "scope": 1496, "src": "1908:19:7", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1481, "name": "string", "nodeType": "ElementaryTypeName", "src": "1908:6:7", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}, {"constant": false, "id": 1484, "mutability": "mutable", "name": "symbol_", "nameLocation": "1943:7:7", "nodeType": "VariableDeclaration", "scope": 1496, "src": "1929:21:7", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1483, "name": "string", "nodeType": "ElementaryTypeName", "src": "1929:6:7", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "1907:44:7"}, "returnParameters": {"id": 1486, "nodeType": "ParameterList", "parameters": [], "src": "1952:0:7"}, "scope": 1959, "src": "1896:113:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"baseFunctions": [3755], "body": {"id": 1504, "nodeType": "Block", "src": "2134:29:7", "statements": [{"expression": {"id": 1502, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1477, "src": "2151:5:7", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string storage ref"}}, "functionReturnParameters": 1501, "id": 1503, "nodeType": "Return", "src": "2144:12:7"}]}, "documentation": {"id": 1497, "nodeType": "StructuredDocumentation", "src": "2015:54:7", "text": " @dev Returns the name of the token."}, "functionSelector": "06fdde03", "id": 1505, "implemented": true, "kind": "function", "modifiers": [], "name": "name", "nameLocation": "2083:4:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1498, "nodeType": "ParameterList", "parameters": [], "src": "2087:2:7"}, "returnParameters": {"id": 1501, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1500, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1505, "src": "2119:13:7", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1499, "name": "string", "nodeType": "ElementaryTypeName", "src": "2119:6:7", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "2118:15:7"}, "scope": 1959, "src": "2074:89:7", "stateMutability": "view", "virtual": true, "visibility": "public"}, {"baseFunctions": [3761], "body": {"id": 1513, "nodeType": "Block", "src": "2338:31:7", "statements": [{"expression": {"id": 1511, "name": "_symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1479, "src": "2355:7:7", "typeDescriptions": {"typeIdentifier": "t_string_storage", "typeString": "string storage ref"}}, "functionReturnParameters": 1510, "id": 1512, "nodeType": "Return", "src": "2348:14:7"}]}, "documentation": {"id": 1506, "nodeType": "StructuredDocumentation", "src": "2169:102:7", "text": " @dev Returns the symbol of the token, usually a shorter version of the\n name."}, "functionSelector": "95d89b41", "id": 1514, "implemented": true, "kind": "function", "modifiers": [], "name": "symbol", "nameLocation": "2285:6:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1507, "nodeType": "ParameterList", "parameters": [], "src": "2291:2:7"}, "returnParameters": {"id": 1510, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1509, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1514, "src": "2323:13:7", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 1508, "name": "string", "nodeType": "ElementaryTypeName", "src": "2323:6:7", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "2322:15:7"}, "scope": 1959, "src": "2276:93:7", "stateMutability": "view", "virtual": true, "visibility": "public"}, {"baseFunctions": [3767], "body": {"id": 1522, "nodeType": "Block", "src": "3058:26:7", "statements": [{"expression": {"hexValue": "3138", "id": 1520, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3075:2:7", "typeDescriptions": {"typeIdentifier": "t_rational_18_by_1", "typeString": "int_const 18"}, "value": "18"}, "functionReturnParameters": 1519, "id": 1521, "nodeType": "Return", "src": "3068:9:7"}]}, "documentation": {"id": 1515, "nodeType": "StructuredDocumentation", "src": "2375:622:7", "text": " @dev Returns the number of decimals used to get its user representation.\n For example, if `decimals` equals `2`, a balance of `505` tokens should\n be displayed to a user as `5.05` (`505 / 10 ** 2`).\n Tokens usually opt for a value of 18, imitating the relationship between\n Ether and Wei. This is the default value returned by this function, unless\n it's overridden.\n NOTE: This information is only used for _display_ purposes: it in\n no way affects any of the arithmetic of the contract, including\n {IERC20-balanceOf} and {IERC20-transfer}."}, "functionSelector": "313ce567", "id": 1523, "implemented": true, "kind": "function", "modifiers": [], "name": "decimals", "nameLocation": "3011:8:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1516, "nodeType": "ParameterList", "parameters": [], "src": "3019:2:7"}, "returnParameters": {"id": 1519, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1518, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1523, "src": "3051:5:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "typeName": {"id": 1517, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "3051:5:7", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "visibility": "internal"}], "src": "3050:7:7"}, "scope": 1959, "src": "3002:82:7", "stateMutability": "view", "virtual": true, "visibility": "public"}, {"baseFunctions": [3691], "body": {"id": 1531, "nodeType": "Block", "src": "3205:36:7", "statements": [{"expression": {"id": 1529, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1475, "src": "3222:12:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 1528, "id": 1530, "nodeType": "Return", "src": "3215:19:7"}]}, "documentation": {"id": 1524, "nodeType": "StructuredDocumentation", "src": "3090:49:7", "text": " @dev See {IERC20-totalSupply}."}, "functionSelector": "18160ddd", "id": 1532, "implemented": true, "kind": "function", "modifiers": [], "name": "totalSupply", "nameLocation": "3153:11:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1525, "nodeType": "ParameterList", "parameters": [], "src": "3164:2:7"}, "returnParameters": {"id": 1528, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1527, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1532, "src": "3196:7:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1526, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3196:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "3195:9:7"}, "scope": 1959, "src": "3144:97:7", "stateMutability": "view", "virtual": true, "visibility": "public"}, {"baseFunctions": [3699], "body": {"id": 1544, "nodeType": "Block", "src": "3373:42:7", "statements": [{"expression": {"baseExpression": {"id": 1540, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1467, "src": "3390:9:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}}, "id": 1542, "indexExpression": {"id": 1541, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1535, "src": "3400:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3390:18:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 1539, "id": 1543, "nodeType": "Return", "src": "3383:25:7"}]}, "documentation": {"id": 1533, "nodeType": "StructuredDocumentation", "src": "3247:47:7", "text": " @dev See {IERC20-balanceOf}."}, "functionSelector": "70a08231", "id": 1545, "implemented": true, "kind": "function", "modifiers": [], "name": "balanceOf", "nameLocation": "3308:9:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1536, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1535, "mutability": "mutable", "name": "account", "nameLocation": "3326:7:7", "nodeType": "VariableDeclaration", "scope": 1545, "src": "3318:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1534, "name": "address", "nodeType": "ElementaryTypeName", "src": "3318:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "3317:17:7"}, "returnParameters": {"id": 1539, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1538, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1545, "src": "3364:7:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1537, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3364:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "3363:9:7"}, "scope": 1959, "src": "3299:116:7", "stateMutability": "view", "virtual": true, "visibility": "public"}, {"baseFunctions": [3709], "body": {"id": 1568, "nodeType": "Block", "src": "3685:103:7", "statements": [{"assignments": [1556], "declarations": [{"constant": false, "id": 1556, "mutability": "mutable", "name": "owner", "nameLocation": "3703:5:7", "nodeType": "VariableDeclaration", "scope": 1568, "src": "3695:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1555, "name": "address", "nodeType": "ElementaryTypeName", "src": "3695:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "id": 1559, "initialValue": {"arguments": [], "expression": {"argumentTypes": [], "id": 1557, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3780, "src": "3711:10:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)"}}, "id": 1558, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3711:12:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "VariableDeclarationStatement", "src": "3695:28:7"}, {"expression": {"arguments": [{"id": 1561, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1556, "src": "3743:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1562, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1548, "src": "3750:2:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1563, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1550, "src": "3754:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1560, "name": "_transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1689, "src": "3733:9:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1564, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3733:27:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1565, "nodeType": "ExpressionStatement", "src": "3733:27:7"}, {"expression": {"hexValue": "74727565", "id": 1566, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "3777:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "functionReturnParameters": 1554, "id": 1567, "nodeType": "Return", "src": "3770:11:7"}]}, "documentation": {"id": 1546, "nodeType": "StructuredDocumentation", "src": "3421:184:7", "text": " @dev See {IERC20-transfer}.\n Requirements:\n - `to` cannot be the zero address.\n - the caller must have a balance of at least `value`."}, "functionSelector": "a9059cbb", "id": 1569, "implemented": true, "kind": "function", "modifiers": [], "name": "transfer", "nameLocation": "3619:8:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1551, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1548, "mutability": "mutable", "name": "to", "nameLocation": "3636:2:7", "nodeType": "VariableDeclaration", "scope": 1569, "src": "3628:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1547, "name": "address", "nodeType": "ElementaryTypeName", "src": "3628:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1550, "mutability": "mutable", "name": "value", "nameLocation": "3648:5:7", "nodeType": "VariableDeclaration", "scope": 1569, "src": "3640:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1549, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3640:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "3627:27:7"}, "returnParameters": {"id": 1554, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1553, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1569, "src": "3679:4:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1552, "name": "bool", "nodeType": "ElementaryTypeName", "src": "3679:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "3678:6:7"}, "scope": 1959, "src": "3610:178:7", "stateMutability": "nonpayable", "virtual": true, "visibility": "public"}, {"baseFunctions": [3719], "body": {"id": 1585, "nodeType": "Block", "src": "3935:51:7", "statements": [{"expression": {"baseExpression": {"baseExpression": {"id": 1579, "name": "_allowances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1473, "src": "3952:11:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))"}}, "id": 1581, "indexExpression": {"id": 1580, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1572, "src": "3964:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3952:18:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}}, "id": 1583, "indexExpression": {"id": 1582, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1574, "src": "3971:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3952:27:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "functionReturnParameters": 1578, "id": 1584, "nodeType": "Return", "src": "3945:34:7"}]}, "documentation": {"id": 1570, "nodeType": "StructuredDocumentation", "src": "3794:47:7", "text": " @dev See {IERC20-allowance}."}, "functionSelector": "dd62ed3e", "id": 1586, "implemented": true, "kind": "function", "modifiers": [], "name": "allowance", "nameLocation": "3855:9:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1575, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1572, "mutability": "mutable", "name": "owner", "nameLocation": "3873:5:7", "nodeType": "VariableDeclaration", "scope": 1586, "src": "3865:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1571, "name": "address", "nodeType": "ElementaryTypeName", "src": "3865:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1574, "mutability": "mutable", "name": "spender", "nameLocation": "3888:7:7", "nodeType": "VariableDeclaration", "scope": 1586, "src": "3880:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1573, "name": "address", "nodeType": "ElementaryTypeName", "src": "3880:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "3864:32:7"}, "returnParameters": {"id": 1578, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1577, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1586, "src": "3926:7:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1576, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3926:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "3925:9:7"}, "scope": 1959, "src": "3846:140:7", "stateMutability": "view", "virtual": true, "visibility": "public"}, {"baseFunctions": [3729], "body": {"id": 1609, "nodeType": "Block", "src": "4372:107:7", "statements": [{"assignments": [1597], "declarations": [{"constant": false, "id": 1597, "mutability": "mutable", "name": "owner", "nameLocation": "4390:5:7", "nodeType": "VariableDeclaration", "scope": 1609, "src": "4382:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1596, "name": "address", "nodeType": "ElementaryTypeName", "src": "4382:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "id": 1600, "initialValue": {"arguments": [], "expression": {"argumentTypes": [], "id": 1598, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3780, "src": "4398:10:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)"}}, "id": 1599, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4398:12:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "VariableDeclarationStatement", "src": "4382:28:7"}, {"expression": {"arguments": [{"id": 1602, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1597, "src": "4429:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1603, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1589, "src": "4436:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1604, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1591, "src": "4445:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1601, "name": "_approve", "nodeType": "Identifier", "overloadedDeclarations": [1850, 1910], "referencedDeclaration": 1850, "src": "4420:8:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1605, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4420:31:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1606, "nodeType": "ExpressionStatement", "src": "4420:31:7"}, {"expression": {"hexValue": "74727565", "id": 1607, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "4468:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "functionReturnParameters": 1595, "id": 1608, "nodeType": "Return", "src": "4461:11:7"}]}, "documentation": {"id": 1587, "nodeType": "StructuredDocumentation", "src": "3992:296:7", "text": " @dev See {IERC20-approve}.\n NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n `transferFrom`. This is semantically equivalent to an infinite approval.\n Requirements:\n - `spender` cannot be the zero address."}, "functionSelector": "095ea7b3", "id": 1610, "implemented": true, "kind": "function", "modifiers": [], "name": "approve", "nameLocation": "4302:7:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1592, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1589, "mutability": "mutable", "name": "spender", "nameLocation": "4318:7:7", "nodeType": "VariableDeclaration", "scope": 1610, "src": "4310:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1588, "name": "address", "nodeType": "ElementaryTypeName", "src": "4310:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1591, "mutability": "mutable", "name": "value", "nameLocation": "4335:5:7", "nodeType": "VariableDeclaration", "scope": 1610, "src": "4327:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1590, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4327:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "4309:32:7"}, "returnParameters": {"id": 1595, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1594, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1610, "src": "4366:4:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1593, "name": "bool", "nodeType": "ElementaryTypeName", "src": "4366:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "4365:6:7"}, "scope": 1959, "src": "4293:186:7", "stateMutability": "nonpayable", "virtual": true, "visibility": "public"}, {"baseFunctions": [3741], "body": {"id": 1641, "nodeType": "Block", "src": "5132:151:7", "statements": [{"assignments": [1623], "declarations": [{"constant": false, "id": 1623, "mutability": "mutable", "name": "spender", "nameLocation": "5150:7:7", "nodeType": "VariableDeclaration", "scope": 1641, "src": "5142:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1622, "name": "address", "nodeType": "ElementaryTypeName", "src": "5142:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "id": 1626, "initialValue": {"arguments": [], "expression": {"argumentTypes": [], "id": 1624, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3780, "src": "5160:10:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)"}}, "id": 1625, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5160:12:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "VariableDeclarationStatement", "src": "5142:30:7"}, {"expression": {"arguments": [{"id": 1628, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1613, "src": "5198:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1629, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1623, "src": "5204:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1630, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1617, "src": "5213:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1627, "name": "_spendAllowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1958, "src": "5182:15:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1631, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5182:37:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1632, "nodeType": "ExpressionStatement", "src": "5182:37:7"}, {"expression": {"arguments": [{"id": 1634, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1613, "src": "5239:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1635, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1615, "src": "5245:2:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1636, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1617, "src": "5249:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1633, "name": "_transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1689, "src": "5229:9:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1637, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5229:26:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1638, "nodeType": "ExpressionStatement", "src": "5229:26:7"}, {"expression": {"hexValue": "74727565", "id": 1639, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "5272:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "functionReturnParameters": 1621, "id": 1640, "nodeType": "Return", "src": "5265:11:7"}]}, "documentation": {"id": 1611, "nodeType": "StructuredDocumentation", "src": "4485:549:7", "text": " @dev See {IERC20-transferFrom}.\n Emits an {Approval} event indicating the updated allowance. This is not\n required by the EIP. See the note at the beginning of {ERC20}.\n NOTE: Does not update the allowance if the current allowance\n is the maximum `uint256`.\n Requirements:\n - `from` and `to` cannot be the zero address.\n - `from` must have a balance of at least `value`.\n - the caller must have allowance for ``from``'s tokens of at least\n `value`."}, "functionSelector": "23b872dd", "id": 1642, "implemented": true, "kind": "function", "modifiers": [], "name": "transferFrom", "nameLocation": "5048:12:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1618, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1613, "mutability": "mutable", "name": "from", "nameLocation": "5069:4:7", "nodeType": "VariableDeclaration", "scope": 1642, "src": "5061:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1612, "name": "address", "nodeType": "ElementaryTypeName", "src": "5061:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1615, "mutability": "mutable", "name": "to", "nameLocation": "5083:2:7", "nodeType": "VariableDeclaration", "scope": 1642, "src": "5075:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1614, "name": "address", "nodeType": "ElementaryTypeName", "src": "5075:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1617, "mutability": "mutable", "name": "value", "nameLocation": "5095:5:7", "nodeType": "VariableDeclaration", "scope": 1642, "src": "5087:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1616, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5087:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "5060:41:7"}, "returnParameters": {"id": 1621, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1620, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1642, "src": "5126:4:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1619, "name": "bool", "nodeType": "ElementaryTypeName", "src": "5126:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "5125:6:7"}, "scope": 1959, "src": "5039:244:7", "stateMutability": "nonpayable", "virtual": true, "visibility": "public"}, {"body": {"id": 1688, "nodeType": "Block", "src": "5725:231:7", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1657, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1652, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1645, "src": "5739:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1655, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5755:1:7", "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": 1654, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5747:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1653, "name": "address", "nodeType": "ElementaryTypeName", "src": "5747:7:7", "typeDescriptions": {}}}, "id": 1656, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5747:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "5739:18:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1666, "nodeType": "IfStatement", "src": "5735:86:7", "trueBody": {"id": 1665, "nodeType": "Block", "src": "5759:62:7", "statements": [{"errorCall": {"arguments": [{"arguments": [{"hexValue": "30", "id": 1661, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5807:1:7", "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": 1660, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5799:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1659, "name": "address", "nodeType": "ElementaryTypeName", "src": "5799:7:7", "typeDescriptions": {}}}, "id": 1662, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5799:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 1658, "name": "ERC20InvalidSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3544, "src": "5780:18:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", "typeString": "function (address) pure"}}, "id": 1663, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5780:30:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1664, "nodeType": "RevertStatement", "src": "5773:37:7"}]}}, {"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1672, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1667, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1647, "src": "5834:2:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1670, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5848:1:7", "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": 1669, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5840:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1668, "name": "address", "nodeType": "ElementaryTypeName", "src": "5840:7:7", "typeDescriptions": {}}}, "id": 1671, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5840:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "5834:16:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1681, "nodeType": "IfStatement", "src": "5830:86:7", "trueBody": {"id": 1680, "nodeType": "Block", "src": "5852:64:7", "statements": [{"errorCall": {"arguments": [{"arguments": [{"hexValue": "30", "id": 1676, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5902:1:7", "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": 1675, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5894:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1674, "name": "address", "nodeType": "ElementaryTypeName", "src": "5894:7:7", "typeDescriptions": {}}}, "id": 1677, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5894:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 1673, "name": "ERC20InvalidReceiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3549, "src": "5873:20:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", "typeString": "function (address) pure"}}, "id": 1678, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5873:32:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1679, "nodeType": "RevertStatement", "src": "5866:39:7"}]}}, {"expression": {"arguments": [{"id": 1683, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1645, "src": "5933:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1684, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1647, "src": "5939:2:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1685, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1649, "src": "5943:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1682, "name": "_update", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1766, "src": "5925:7:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1686, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5925:24:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1687, "nodeType": "ExpressionStatement", "src": "5925:24:7"}]}, "documentation": {"id": 1643, "nodeType": "StructuredDocumentation", "src": "5289:362:7", "text": " @dev Moves a `value` amount of tokens from `from` to `to`.\n This internal function is equivalent to {transfer}, and can be used to\n e.g. implement automatic token fees, slashing mechanisms, etc.\n Emits a {Transfer} event.\n NOTE: This function is not virtual, {_update} should be overridden instead."}, "id": 1689, "implemented": true, "kind": "function", "modifiers": [], "name": "_transfer", "nameLocation": "5665:9:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1650, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1645, "mutability": "mutable", "name": "from", "nameLocation": "5683:4:7", "nodeType": "VariableDeclaration", "scope": 1689, "src": "5675:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1644, "name": "address", "nodeType": "ElementaryTypeName", "src": "5675:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1647, "mutability": "mutable", "name": "to", "nameLocation": "5697:2:7", "nodeType": "VariableDeclaration", "scope": 1689, "src": "5689:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1646, "name": "address", "nodeType": "ElementaryTypeName", "src": "5689:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1649, "mutability": "mutable", "name": "value", "nameLocation": "5709:5:7", "nodeType": "VariableDeclaration", "scope": 1689, "src": "5701:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1648, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5701:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "5674:41:7"}, "returnParameters": {"id": 1651, "nodeType": "ParameterList", "parameters": [], "src": "5725:0:7"}, "scope": 1959, "src": "5656:300:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 1765, "nodeType": "Block", "src": "6346:1032:7", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1704, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1699, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1692, "src": "6360:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1702, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6376:1:7", "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": 1701, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6368:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1700, "name": "address", "nodeType": "ElementaryTypeName", "src": "6368:7:7", "typeDescriptions": {}}}, "id": 1703, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6368:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "6360:18:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseBody": {"id": 1736, "nodeType": "Block", "src": "6534:362:7", "statements": [{"assignments": [1711], "declarations": [{"constant": false, "id": 1711, "mutability": "mutable", "name": "fromBalance", "nameLocation": "6556:11:7", "nodeType": "VariableDeclaration", "scope": 1736, "src": "6548:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1710, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6548:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 1715, "initialValue": {"baseExpression": {"id": 1712, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1467, "src": "6570:9:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}}, "id": 1714, "indexExpression": {"id": 1713, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1692, "src": "6580:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "6570:15:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "6548:37:7"}, {"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1718, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1716, "name": "fromBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1711, "src": "6603:11:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 1717, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "6617:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "6603:19:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1726, "nodeType": "IfStatement", "src": "6599:115:7", "trueBody": {"id": 1725, "nodeType": "Block", "src": "6624:90:7", "statements": [{"errorCall": {"arguments": [{"id": 1720, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1692, "src": "6674:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1721, "name": "fromBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1711, "src": "6680:11:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 1722, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "6693:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1719, "name": "ERC20InsufficientBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3539, "src": "6649:24:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,uint256,uint256) pure"}}, "id": 1723, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6649:50:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1724, "nodeType": "RevertStatement", "src": "6642:57:7"}]}}, {"id": 1735, "nodeType": "UncheckedBlock", "src": "6727:159:7", "statements": [{"expression": {"id": 1733, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"baseExpression": {"id": 1727, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1467, "src": "6834:9:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}}, "id": 1729, "indexExpression": {"id": 1728, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1692, "src": "6844:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "6834:15:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1732, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1730, "name": "fromBalance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1711, "src": "6852:11:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 1731, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "6866:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "6852:19:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "6834:37:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 1734, "nodeType": "ExpressionStatement", "src": "6834:37:7"}]}]}, "id": 1737, "nodeType": "IfStatement", "src": "6356:540:7", "trueBody": {"id": 1709, "nodeType": "Block", "src": "6380:148:7", "statements": [{"expression": {"id": 1707, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 1705, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1475, "src": "6496:12:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "+=", "rightHandSide": {"id": 1706, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "6512:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "6496:21:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 1708, "nodeType": "ExpressionStatement", "src": "6496:21:7"}]}}, {"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1743, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1738, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1694, "src": "6910:2:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1741, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "6924:1:7", "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": 1740, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "6916:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1739, "name": "address", "nodeType": "ElementaryTypeName", "src": "6916:7:7", "typeDescriptions": {}}}, "id": 1742, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "6916:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "6910:16:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseBody": {"id": 1757, "nodeType": "Block", "src": "7125:206:7", "statements": [{"id": 1756, "nodeType": "UncheckedBlock", "src": "7139:182:7", "statements": [{"expression": {"id": 1754, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"baseExpression": {"id": 1750, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1467, "src": "7284:9:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}}, "id": 1752, "indexExpression": {"id": 1751, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1694, "src": "7294:2:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "7284:13:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "+=", "rightHandSide": {"id": 1753, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "7301:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "7284:22:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 1755, "nodeType": "ExpressionStatement", "src": "7284:22:7"}]}]}, "id": 1758, "nodeType": "IfStatement", "src": "6906:425:7", "trueBody": {"id": 1749, "nodeType": "Block", "src": "6928:191:7", "statements": [{"id": 1748, "nodeType": "UncheckedBlock", "src": "6942:167:7", "statements": [{"expression": {"id": 1746, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 1744, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1475, "src": "7073:12:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "-=", "rightHandSide": {"id": 1745, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "7089:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "7073:21:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 1747, "nodeType": "ExpressionStatement", "src": "7073:21:7"}]}]}}, {"eventCall": {"arguments": [{"id": 1760, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1692, "src": "7355:4:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1761, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1694, "src": "7361:2:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1762, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1696, "src": "7365:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1759, "name": "Transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3676, "src": "7346:8:7", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1763, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7346:25:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1764, "nodeType": "EmitStatement", "src": "7341:30:7"}]}, "documentation": {"id": 1690, "nodeType": "StructuredDocumentation", "src": "5962:304:7", "text": " @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n this function.\n Emits a {Transfer} event."}, "id": 1766, "implemented": true, "kind": "function", "modifiers": [], "name": "_update", "nameLocation": "6280:7:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1697, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1692, "mutability": "mutable", "name": "from", "nameLocation": "6296:4:7", "nodeType": "VariableDeclaration", "scope": 1766, "src": "6288:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1691, "name": "address", "nodeType": "ElementaryTypeName", "src": "6288:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1694, "mutability": "mutable", "name": "to", "nameLocation": "6310:2:7", "nodeType": "VariableDeclaration", "scope": 1766, "src": "6302:10:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1693, "name": "address", "nodeType": "ElementaryTypeName", "src": "6302:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1696, "mutability": "mutable", "name": "value", "nameLocation": "6322:5:7", "nodeType": "VariableDeclaration", "scope": 1766, "src": "6314:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1695, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6314:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "6287:41:7"}, "returnParameters": {"id": 1698, "nodeType": "ParameterList", "parameters": [], "src": "6346:0:7"}, "scope": 1959, "src": "6271:1107:7", "stateMutability": "nonpayable", "virtual": true, "visibility": "internal"}, {"body": {"id": 1798, "nodeType": "Block", "src": "7777:152:7", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1779, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1774, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1769, "src": "7791:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1777, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "7810:1:7", "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": 1776, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7802:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1775, "name": "address", "nodeType": "ElementaryTypeName", "src": "7802:7:7", "typeDescriptions": {}}}, "id": 1778, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7802:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "7791:21:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1788, "nodeType": "IfStatement", "src": "7787:91:7", "trueBody": {"id": 1787, "nodeType": "Block", "src": "7814:64:7", "statements": [{"errorCall": {"arguments": [{"arguments": [{"hexValue": "30", "id": 1783, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "7864:1:7", "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": 1782, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7856:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1781, "name": "address", "nodeType": "ElementaryTypeName", "src": "7856:7:7", "typeDescriptions": {}}}, "id": 1784, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7856:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 1780, "name": "ERC20InvalidReceiver", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3549, "src": "7835:20:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", "typeString": "function (address) pure"}}, "id": 1785, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7835:32:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1786, "nodeType": "RevertStatement", "src": "7828:39:7"}]}}, {"expression": {"arguments": [{"arguments": [{"hexValue": "30", "id": 1792, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "7903:1:7", "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": 1791, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "7895:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1790, "name": "address", "nodeType": "ElementaryTypeName", "src": "7895:7:7", "typeDescriptions": {}}}, "id": 1793, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7895:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1794, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1769, "src": "7907:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1795, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1771, "src": "7916:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1789, "name": "_update", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1766, "src": "7887:7:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1796, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "7887:35:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1797, "nodeType": "ExpressionStatement", "src": "7887:35:7"}]}, "documentation": {"id": 1767, "nodeType": "StructuredDocumentation", "src": "7384:332:7", "text": " @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n Relies on the `_update` mechanism\n Emits a {Transfer} event with `from` set to the zero address.\n NOTE: This function is not virtual, {_update} should be overridden instead."}, "id": 1799, "implemented": true, "kind": "function", "modifiers": [], "name": "_mint", "nameLocation": "7730:5:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1772, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1769, "mutability": "mutable", "name": "account", "nameLocation": "7744:7:7", "nodeType": "VariableDeclaration", "scope": 1799, "src": "7736:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1768, "name": "address", "nodeType": "ElementaryTypeName", "src": "7736:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1771, "mutability": "mutable", "name": "value", "nameLocation": "7761:5:7", "nodeType": "VariableDeclaration", "scope": 1799, "src": "7753:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1770, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "7753:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "7735:32:7"}, "returnParameters": {"id": 1773, "nodeType": "ParameterList", "parameters": [], "src": "7777:0:7"}, "scope": 1959, "src": "7721:208:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 1831, "nodeType": "Block", "src": "8303:150:7", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1812, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1807, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1802, "src": "8317:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1810, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8336:1:7", "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": 1809, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8328:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1808, "name": "address", "nodeType": "ElementaryTypeName", "src": "8328:7:7", "typeDescriptions": {}}}, "id": 1811, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8328:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "8317:21:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1821, "nodeType": "IfStatement", "src": "8313:89:7", "trueBody": {"id": 1820, "nodeType": "Block", "src": "8340:62:7", "statements": [{"errorCall": {"arguments": [{"arguments": [{"hexValue": "30", "id": 1816, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8388:1:7", "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": 1815, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8380:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1814, "name": "address", "nodeType": "ElementaryTypeName", "src": "8380:7:7", "typeDescriptions": {}}}, "id": 1817, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8380:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 1813, "name": "ERC20InvalidSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3544, "src": "8361:18:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", "typeString": "function (address) pure"}}, "id": 1818, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8361:30:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1819, "nodeType": "RevertStatement", "src": "8354:37:7"}]}}, {"expression": {"arguments": [{"id": 1823, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1802, "src": "8419:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"hexValue": "30", "id": 1826, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "8436:1:7", "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": 1825, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "8428:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1824, "name": "address", "nodeType": "ElementaryTypeName", "src": "8428:7:7", "typeDescriptions": {}}}, "id": 1827, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8428:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1828, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1804, "src": "8440:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1822, "name": "_update", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1766, "src": "8411:7:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1829, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "8411:35:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1830, "nodeType": "ExpressionStatement", "src": "8411:35:7"}]}, "documentation": {"id": 1800, "nodeType": "StructuredDocumentation", "src": "7935:307:7", "text": " @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n Relies on the `_update` mechanism.\n Emits a {Transfer} event with `to` set to the zero address.\n NOTE: This function is not virtual, {_update} should be overridden instead"}, "id": 1832, "implemented": true, "kind": "function", "modifiers": [], "name": "_burn", "nameLocation": "8256:5:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1805, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1802, "mutability": "mutable", "name": "account", "nameLocation": "8270:7:7", "nodeType": "VariableDeclaration", "scope": 1832, "src": "8262:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1801, "name": "address", "nodeType": "ElementaryTypeName", "src": "8262:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1804, "mutability": "mutable", "name": "value", "nameLocation": "8287:5:7", "nodeType": "VariableDeclaration", "scope": 1832, "src": "8279:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1803, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "8279:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "8261:32:7"}, "returnParameters": {"id": 1806, "nodeType": "ParameterList", "parameters": [], "src": "8303:0:7"}, "scope": 1959, "src": "8247:206:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 1849, "nodeType": "Block", "src": "9063:54:7", "statements": [{"expression": {"arguments": [{"id": 1843, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1835, "src": "9082:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1844, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1837, "src": "9089:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1845, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1839, "src": "9098:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "74727565", "id": 1846, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "9105:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 1842, "name": "_approve", "nodeType": "Identifier", "overloadedDeclarations": [1850, 1910], "referencedDeclaration": 1910, "src": "9073:8:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bool_$returns$__$", "typeString": "function (address,address,uint256,bool)"}}, "id": 1847, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "9073:37:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1848, "nodeType": "ExpressionStatement", "src": "9073:37:7"}]}, "documentation": {"id": 1833, "nodeType": "StructuredDocumentation", "src": "8459:525:7", "text": " @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\n This internal function is equivalent to `approve`, and can be used to\n e.g. set automatic allowances for certain subsystems, etc.\n Emits an {Approval} event.\n Requirements:\n - `owner` cannot be the zero address.\n - `spender` cannot be the zero address.\n Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument."}, "id": 1850, "implemented": true, "kind": "function", "modifiers": [], "name": "_approve", "nameLocation": "8998:8:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1840, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1835, "mutability": "mutable", "name": "owner", "nameLocation": "9015:5:7", "nodeType": "VariableDeclaration", "scope": 1850, "src": "9007:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1834, "name": "address", "nodeType": "ElementaryTypeName", "src": "9007:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1837, "mutability": "mutable", "name": "spender", "nameLocation": "9030:7:7", "nodeType": "VariableDeclaration", "scope": 1850, "src": "9022:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1836, "name": "address", "nodeType": "ElementaryTypeName", "src": "9022:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1839, "mutability": "mutable", "name": "value", "nameLocation": "9047:5:7", "nodeType": "VariableDeclaration", "scope": 1850, "src": "9039:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1838, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9039:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "9006:47:7"}, "returnParameters": {"id": 1841, "nodeType": "ParameterList", "parameters": [], "src": "9063:0:7"}, "scope": 1959, "src": "8989:128:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal"}, {"body": {"id": 1909, "nodeType": "Block", "src": "10047:334:7", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1867, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1862, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1853, "src": "10061:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1865, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10078:1:7", "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": 1864, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10070:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1863, "name": "address", "nodeType": "ElementaryTypeName", "src": "10070:7:7", "typeDescriptions": {}}}, "id": 1866, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10070:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "10061:19:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1876, "nodeType": "IfStatement", "src": "10057:89:7", "trueBody": {"id": 1875, "nodeType": "Block", "src": "10082:64:7", "statements": [{"errorCall": {"arguments": [{"arguments": [{"hexValue": "30", "id": 1871, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10132:1:7", "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": 1870, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10124:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1869, "name": "address", "nodeType": "ElementaryTypeName", "src": "10124:7:7", "typeDescriptions": {}}}, "id": 1872, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10124:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 1868, "name": "ERC20InvalidApprover", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3563, "src": "10103:20:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", "typeString": "function (address) pure"}}, "id": 1873, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10103:32:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1874, "nodeType": "RevertStatement", "src": "10096:39:7"}]}}, {"condition": {"commonType": {"typeIdentifier": "t_address", "typeString": "address"}, "id": 1882, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1877, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1855, "src": "10159:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": {"arguments": [{"hexValue": "30", "id": 1880, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10178:1:7", "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": 1879, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10170:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1878, "name": "address", "nodeType": "ElementaryTypeName", "src": "10170:7:7", "typeDescriptions": {}}}, "id": 1881, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10170:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "src": "10159:21:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1891, "nodeType": "IfStatement", "src": "10155:90:7", "trueBody": {"id": 1890, "nodeType": "Block", "src": "10182:63:7", "statements": [{"errorCall": {"arguments": [{"arguments": [{"hexValue": "30", "id": 1886, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "10231:1:7", "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": 1885, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10223:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1884, "name": "address", "nodeType": "ElementaryTypeName", "src": "10223:7:7", "typeDescriptions": {}}}, "id": 1887, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10223:10:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 1883, "name": "ERC20InvalidSpender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3568, "src": "10203:19:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", "typeString": "function (address) pure"}}, "id": 1888, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10203:31:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1889, "nodeType": "RevertStatement", "src": "10196:38:7"}]}}, {"expression": {"id": 1898, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"baseExpression": {"baseExpression": {"id": 1892, "name": "_allowances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1473, "src": "10254:11:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))"}}, "id": 1895, "indexExpression": {"id": 1893, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1853, "src": "10266:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "10254:18:7", "typeDescriptions": {"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)"}}, "id": 1896, "indexExpression": {"id": 1894, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1855, "src": "10273:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "10254:27:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"id": 1897, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1857, "src": "10284:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "10254:35:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 1899, "nodeType": "ExpressionStatement", "src": "10254:35:7"}, {"condition": {"id": 1900, "name": "emitEvent", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1859, "src": "10303:9:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1908, "nodeType": "IfStatement", "src": "10299:76:7", "trueBody": {"id": 1907, "nodeType": "Block", "src": "10314:61:7", "statements": [{"eventCall": {"arguments": [{"id": 1902, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1853, "src": "10342:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1903, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1855, "src": "10349:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1904, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1857, "src": "10358:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1901, "name": "Approval", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3685, "src": "10333:8:7", "typeDescriptions": {"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1905, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10333:31:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1906, "nodeType": "EmitStatement", "src": "10328:36:7"}]}}]}, "documentation": {"id": 1851, "nodeType": "StructuredDocumentation", "src": "9123:821:7", "text": " @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n `Approval` event during `transferFrom` operations.\n Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n true using the following override:\n ```\n function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n super._approve(owner, spender, value, true);\n }\n ```\n Requirements are the same as {_approve}."}, "id": 1910, "implemented": true, "kind": "function", "modifiers": [], "name": "_approve", "nameLocation": "9958:8:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1860, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1853, "mutability": "mutable", "name": "owner", "nameLocation": "9975:5:7", "nodeType": "VariableDeclaration", "scope": 1910, "src": "9967:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1852, "name": "address", "nodeType": "ElementaryTypeName", "src": "9967:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1855, "mutability": "mutable", "name": "spender", "nameLocation": "9990:7:7", "nodeType": "VariableDeclaration", "scope": 1910, "src": "9982:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1854, "name": "address", "nodeType": "ElementaryTypeName", "src": "9982:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1857, "mutability": "mutable", "name": "value", "nameLocation": "10007:5:7", "nodeType": "VariableDeclaration", "scope": 1910, "src": "9999:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1856, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "9999:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}, {"constant": false, "id": 1859, "mutability": "mutable", "name": "emitEvent", "nameLocation": "10019:9:7", "nodeType": "VariableDeclaration", "scope": 1910, "src": "10014:14:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1858, "name": "bool", "nodeType": "ElementaryTypeName", "src": "10014:4:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "9966:63:7"}, "returnParameters": {"id": 1861, "nodeType": "ParameterList", "parameters": [], "src": "10047:0:7"}, "scope": 1959, "src": "9949:432:7", "stateMutability": "nonpayable", "virtual": true, "visibility": "internal"}, {"body": {"id": 1957, "nodeType": "Block", "src": "10752:388:7", "statements": [{"assignments": [1921], "declarations": [{"constant": false, "id": 1921, "mutability": "mutable", "name": "currentAllowance", "nameLocation": "10770:16:7", "nodeType": "VariableDeclaration", "scope": 1957, "src": "10762:24:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1920, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10762:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 1926, "initialValue": {"arguments": [{"id": 1923, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1913, "src": "10799:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1924, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1915, "src": "10806:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "id": 1922, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1586, "src": "10789:9:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view returns (uint256)"}}, "id": 1925, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10789:25:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "10762:52:7"}, {"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1933, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1927, "name": "currentAllowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1921, "src": "10828:16:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": {"expression": {"arguments": [{"id": 1930, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "10853:7:7", "typeDescriptions": {"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}, "typeName": {"id": 1929, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10853:7:7", "typeDescriptions": {}}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)"}], "id": 1928, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "10848:4:7", "typeDescriptions": {"typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure"}}, "id": 1931, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10848:13:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_magic_meta_type_t_uint256", "typeString": "type(uint256)"}}, "id": 1932, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "10862:3:7", "memberName": "max", "nodeType": "MemberAccess", "src": "10848:17:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "10828:37:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1956, "nodeType": "IfStatement", "src": "10824:310:7", "trueBody": {"id": 1955, "nodeType": "Block", "src": "10867:267:7", "statements": [{"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1936, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1934, "name": "currentAllowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1921, "src": "10885:16:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": {"id": 1935, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1917, "src": "10904:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "10885:24:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 1944, "nodeType": "IfStatement", "src": "10881:130:7", "trueBody": {"id": 1943, "nodeType": "Block", "src": "10911:100:7", "statements": [{"errorCall": {"arguments": [{"id": 1938, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1915, "src": "10963:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1939, "name": "currentAllowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1921, "src": "10972:16:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"id": 1940, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1917, "src": "10990:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1937, "name": "ERC20InsufficientAllowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3558, "src": "10936:26:7", "typeDescriptions": {"typeIdentifier": "t_function_error_pure$_t_address_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,uint256,uint256) pure"}}, "id": 1941, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "10936:60:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1942, "nodeType": "RevertStatement", "src": "10929:67:7"}]}}, {"id": 1954, "nodeType": "UncheckedBlock", "src": "11024:100:7", "statements": [{"expression": {"arguments": [{"id": 1946, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1913, "src": "11061:5:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1947, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1915, "src": "11068:7:7", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1950, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1948, "name": "currentAllowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1921, "src": "11077:16:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 1949, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1917, "src": "11096:5:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "11077:24:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, {"hexValue": "66616c7365", "id": 1951, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "11103:5:7", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "false"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}, {"typeIdentifier": "t_bool", "typeString": "bool"}], "id": 1945, "name": "_approve", "nodeType": "Identifier", "overloadedDeclarations": [1850, 1910], "referencedDeclaration": 1910, "src": "11052:8:7", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bool_$returns$__$", "typeString": "function (address,address,uint256,bool)"}}, "id": 1952, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "11052:57:7", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1953, "nodeType": "ExpressionStatement", "src": "11052:57:7"}]}]}}]}, "documentation": {"id": 1911, "nodeType": "StructuredDocumentation", "src": "10387:271:7", "text": " @dev Updates `owner` s allowance for `spender` based on spent `value`.\n Does not update the allowance value in case of infinite allowance.\n Revert if not enough allowance is available.\n Does not emit an {Approval} event."}, "id": 1958, "implemented": true, "kind": "function", "modifiers": [], "name": "_spendAllowance", "nameLocation": "10672:15:7", "nodeType": "FunctionDefinition", "parameters": {"id": 1918, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1913, "mutability": "mutable", "name": "owner", "nameLocation": "10696:5:7", "nodeType": "VariableDeclaration", "scope": 1958, "src": "10688:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1912, "name": "address", "nodeType": "ElementaryTypeName", "src": "10688:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1915, "mutability": "mutable", "name": "spender", "nameLocation": "10711:7:7", "nodeType": "VariableDeclaration", "scope": 1958, "src": "10703:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1914, "name": "address", "nodeType": "ElementaryTypeName", "src": "10703:7:7", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1917, "mutability": "mutable", "name": "value", "nameLocation": "10728:5:7", "nodeType": "VariableDeclaration", "scope": 1958, "src": "10720:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1916, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "10720:7:7", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "10687:47:7"}, "returnParameters": {"id": 1919, "nodeType": "ParameterList", "parameters": [], "src": "10752:0:7"}, "scope": 1959, "src": "10663:477:7", "stateMutability": "nonpayable", "virtual": true, "visibility": "internal"}], "scope": 1960, "src": "1401:9741:7", "usedErrors": [3539, 3544, 3549, 3558, 3563, 3568], "usedEvents": [3676, 3685]}], "src": "105:11038:7"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol": {"AST": {"absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol", "exportedSymbols": {"IERC20": [3742]}, "id": 3743, "license": "MIT", "nodeType": "SourceUnit", "nodes": [{"id": 3666, "literals": ["solidity", "^", "0.8", ".20"], "nodeType": "PragmaDirective", "src": "106:24:8"}, {"abstract": false, "baseContracts": [], "canonicalName": "IERC20", "contractDependencies": [], "contractKind": "interface", "documentation": {"id": 3667, "nodeType": "StructuredDocumentation", "src": "132:70:8", "text": " @dev Interface of the ERC20 standard as defined in the EIP."}, "fullyImplemented": false, "id": 3742, "linearizedBaseContracts": [3742], "name": "IERC20", "nameLocation": "213:6:8", "nodeType": "ContractDefinition", "nodes": [{"anonymous": false, "documentation": {"id": 3668, "nodeType": "StructuredDocumentation", "src": "226:158:8", "text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero."}, "eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "id": 3676, "name": "Transfer", "nameLocation": "395:8:8", "nodeType": "EventDefinition", "parameters": {"id": 3675, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3670, "indexed": true, "mutability": "mutable", "name": "from", "nameLocation": "420:4:8", "nodeType": "VariableDeclaration", "scope": 3676, "src": "404:20:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3669, "name": "address", "nodeType": "ElementaryTypeName", "src": "404:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3672, "indexed": true, "mutability": "mutable", "name": "to", "nameLocation": "442:2:8", "nodeType": "VariableDeclaration", "scope": 3676, "src": "426:18:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3671, "name": "address", "nodeType": "ElementaryTypeName", "src": "426:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3674, "indexed": false, "mutability": "mutable", "name": "value", "nameLocation": "454:5:8", "nodeType": "VariableDeclaration", "scope": 3676, "src": "446:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3673, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "446:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "403:57:8"}, "src": "389:72:8"}, {"anonymous": false, "documentation": {"id": 3677, "nodeType": "StructuredDocumentation", "src": "467:148:8", "text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance."}, "eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", "id": 3685, "name": "Approval", "nameLocation": "626:8:8", "nodeType": "EventDefinition", "parameters": {"id": 3684, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3679, "indexed": true, "mutability": "mutable", "name": "owner", "nameLocation": "651:5:8", "nodeType": "VariableDeclaration", "scope": 3685, "src": "635:21:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3678, "name": "address", "nodeType": "ElementaryTypeName", "src": "635:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3681, "indexed": true, "mutability": "mutable", "name": "spender", "nameLocation": "674:7:8", "nodeType": "VariableDeclaration", "scope": 3685, "src": "658:23:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3680, "name": "address", "nodeType": "ElementaryTypeName", "src": "658:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3683, "indexed": false, "mutability": "mutable", "name": "value", "nameLocation": "691:5:8", "nodeType": "VariableDeclaration", "scope": 3685, "src": "683:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3682, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "683:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "634:63:8"}, "src": "620:78:8"}, {"documentation": {"id": 3686, "nodeType": "StructuredDocumentation", "src": "704:65:8", "text": " @dev Returns the value of tokens in existence."}, "functionSelector": "18160ddd", "id": 3691, "implemented": false, "kind": "function", "modifiers": [], "name": "totalSupply", "nameLocation": "783:11:8", "nodeType": "FunctionDefinition", "parameters": {"id": 3687, "nodeType": "ParameterList", "parameters": [], "src": "794:2:8"}, "returnParameters": {"id": 3690, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3689, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3691, "src": "820:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3688, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "820:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "819:9:8"}, "scope": 3742, "src": "774:55:8", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 3692, "nodeType": "StructuredDocumentation", "src": "835:71:8", "text": " @dev Returns the value of tokens owned by `account`."}, "functionSelector": "70a08231", "id": 3699, "implemented": false, "kind": "function", "modifiers": [], "name": "balanceOf", "nameLocation": "920:9:8", "nodeType": "FunctionDefinition", "parameters": {"id": 3695, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3694, "mutability": "mutable", "name": "account", "nameLocation": "938:7:8", "nodeType": "VariableDeclaration", "scope": 3699, "src": "930:15:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3693, "name": "address", "nodeType": "ElementaryTypeName", "src": "930:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "929:17:8"}, "returnParameters": {"id": 3698, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3697, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3699, "src": "970:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3696, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "970:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "969:9:8"}, "scope": 3742, "src": "911:68:8", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 3700, "nodeType": "StructuredDocumentation", "src": "985:213:8", "text": " @dev Moves a `value` amount of tokens from the caller's account to `to`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."}, "functionSelector": "a9059cbb", "id": 3709, "implemented": false, "kind": "function", "modifiers": [], "name": "transfer", "nameLocation": "1212:8:8", "nodeType": "FunctionDefinition", "parameters": {"id": 3705, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3702, "mutability": "mutable", "name": "to", "nameLocation": "1229:2:8", "nodeType": "VariableDeclaration", "scope": 3709, "src": "1221:10:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3701, "name": "address", "nodeType": "ElementaryTypeName", "src": "1221:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3704, "mutability": "mutable", "name": "value", "nameLocation": "1241:5:8", "nodeType": "VariableDeclaration", "scope": 3709, "src": "1233:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3703, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1233:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1220:27:8"}, "returnParameters": {"id": 3708, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3707, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3709, "src": "1266:4:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 3706, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1266:4:8", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "1265:6:8"}, "scope": 3742, "src": "1203:69:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"documentation": {"id": 3710, "nodeType": "StructuredDocumentation", "src": "1278:264:8", "text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called."}, "functionSelector": "dd62ed3e", "id": 3719, "implemented": false, "kind": "function", "modifiers": [], "name": "allowance", "nameLocation": "1556:9:8", "nodeType": "FunctionDefinition", "parameters": {"id": 3715, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3712, "mutability": "mutable", "name": "owner", "nameLocation": "1574:5:8", "nodeType": "VariableDeclaration", "scope": 3719, "src": "1566:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3711, "name": "address", "nodeType": "ElementaryTypeName", "src": "1566:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3714, "mutability": "mutable", "name": "spender", "nameLocation": "1589:7:8", "nodeType": "VariableDeclaration", "scope": 3719, "src": "1581:15:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3713, "name": "address", "nodeType": "ElementaryTypeName", "src": "1581:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "1565:32:8"}, "returnParameters": {"id": 3718, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3717, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3719, "src": "1621:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3716, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1621:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1620:9:8"}, "scope": 3742, "src": "1547:83:8", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 3720, "nodeType": "StructuredDocumentation", "src": "1636:667:8", "text": " @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\n IMPORTANT: Beware that changing an allowance with this method brings the risk\n that someone may use both the old and the new allowance by unfortunate\n transaction ordering. One possible solution to mitigate this race\n condition is to first reduce the spender's allowance to 0 and set the\n desired value afterwards:\n https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n Emits an {Approval} event."}, "functionSelector": "095ea7b3", "id": 3729, "implemented": false, "kind": "function", "modifiers": [], "name": "approve", "nameLocation": "2317:7:8", "nodeType": "FunctionDefinition", "parameters": {"id": 3725, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3722, "mutability": "mutable", "name": "spender", "nameLocation": "2333:7:8", "nodeType": "VariableDeclaration", "scope": 3729, "src": "2325:15:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3721, "name": "address", "nodeType": "ElementaryTypeName", "src": "2325:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3724, "mutability": "mutable", "name": "value", "nameLocation": "2350:5:8", "nodeType": "VariableDeclaration", "scope": 3729, "src": "2342:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3723, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2342:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "2324:32:8"}, "returnParameters": {"id": 3728, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3727, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3729, "src": "2375:4:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 3726, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2375:4:8", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "2374:6:8"}, "scope": 3742, "src": "2308:73:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"documentation": {"id": 3730, "nodeType": "StructuredDocumentation", "src": "2387:297:8", "text": " @dev Moves a `value` amount of tokens from `from` to `to` using the\n allowance mechanism. `value` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."}, "functionSelector": "23b872dd", "id": 3741, "implemented": false, "kind": "function", "modifiers": [], "name": "transferFrom", "nameLocation": "2698:12:8", "nodeType": "FunctionDefinition", "parameters": {"id": 3737, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3732, "mutability": "mutable", "name": "from", "nameLocation": "2719:4:8", "nodeType": "VariableDeclaration", "scope": 3741, "src": "2711:12:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3731, "name": "address", "nodeType": "ElementaryTypeName", "src": "2711:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3734, "mutability": "mutable", "name": "to", "nameLocation": "2733:2:8", "nodeType": "VariableDeclaration", "scope": 3741, "src": "2725:10:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3733, "name": "address", "nodeType": "ElementaryTypeName", "src": "2725:7:8", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 3736, "mutability": "mutable", "name": "value", "nameLocation": "2745:5:8", "nodeType": "VariableDeclaration", "scope": 3741, "src": "2737:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3735, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2737:7:8", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "2710:41:8"}, "returnParameters": {"id": 3740, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3739, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3741, "src": "2770:4:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 3738, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2770:4:8", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "2769:6:8"}, "scope": 3742, "src": "2689:87:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}], "scope": 3743, "src": "203:2575:8", "usedErrors": [], "usedEvents": [3676, 3685]}], "src": "106:2673:8"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": {"AST": {"absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol", "exportedSymbols": {"IERC20": [3742], "IERC20Metadata": [3768]}, "id": 3769, "license": "MIT", "nodeType": "SourceUnit", "nodes": [{"id": 3744, "literals": ["solidity", "^", "0.8", ".20"], "nodeType": "PragmaDirective", "src": "125:24:9"}, {"absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol", "file": "../IERC20.sol", "id": 3746, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 3769, "sourceUnit": 3743, "src": "151:37:9", "symbolAliases": [{"foreign": {"id": 3745, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3742, "src": "159:6:9", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"abstract": false, "baseContracts": [{"baseName": {"id": 3748, "name": "IERC20", "nameLocations": ["305:6:9"], "nodeType": "IdentifierPath", "referencedDeclaration": 3742, "src": "305:6:9"}, "id": 3749, "nodeType": "InheritanceSpecifier", "src": "305:6:9"}], "canonicalName": "IERC20Metadata", "contractDependencies": [], "contractKind": "interface", "documentation": {"id": 3747, "nodeType": "StructuredDocumentation", "src": "190:86:9", "text": " @dev Interface for the optional metadata functions from the ERC20 standard."}, "fullyImplemented": false, "id": 3768, "linearizedBaseContracts": [3768, 3742], "name": "IERC20Metadata", "nameLocation": "287:14:9", "nodeType": "ContractDefinition", "nodes": [{"documentation": {"id": 3750, "nodeType": "StructuredDocumentation", "src": "318:54:9", "text": " @dev Returns the name of the token."}, "functionSelector": "06fdde03", "id": 3755, "implemented": false, "kind": "function", "modifiers": [], "name": "name", "nameLocation": "386:4:9", "nodeType": "FunctionDefinition", "parameters": {"id": 3751, "nodeType": "ParameterList", "parameters": [], "src": "390:2:9"}, "returnParameters": {"id": 3754, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3753, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3755, "src": "416:13:9", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3752, "name": "string", "nodeType": "ElementaryTypeName", "src": "416:6:9", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "415:15:9"}, "scope": 3768, "src": "377:54:9", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 3756, "nodeType": "StructuredDocumentation", "src": "437:56:9", "text": " @dev Returns the symbol of the token."}, "functionSelector": "95d89b41", "id": 3761, "implemented": false, "kind": "function", "modifiers": [], "name": "symbol", "nameLocation": "507:6:9", "nodeType": "FunctionDefinition", "parameters": {"id": 3757, "nodeType": "ParameterList", "parameters": [], "src": "513:2:9"}, "returnParameters": {"id": 3760, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3759, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3761, "src": "539:13:9", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": {"typeIdentifier": "t_string_memory_ptr", "typeString": "string"}, "typeName": {"id": 3758, "name": "string", "nodeType": "ElementaryTypeName", "src": "539:6:9", "typeDescriptions": {"typeIdentifier": "t_string_storage_ptr", "typeString": "string"}}, "visibility": "internal"}], "src": "538:15:9"}, "scope": 3768, "src": "498:56:9", "stateMutability": "view", "virtual": false, "visibility": "external"}, {"documentation": {"id": 3762, "nodeType": "StructuredDocumentation", "src": "560:65:9", "text": " @dev Returns the decimals places of the token."}, "functionSelector": "313ce567", "id": 3767, "implemented": false, "kind": "function", "modifiers": [], "name": "decimals", "nameLocation": "639:8:9", "nodeType": "FunctionDefinition", "parameters": {"id": 3763, "nodeType": "ParameterList", "parameters": [], "src": "647:2:9"}, "returnParameters": {"id": 3766, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3765, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3767, "src": "673:5:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}, "typeName": {"id": 3764, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "673:5:9", "typeDescriptions": {"typeIdentifier": "t_uint8", "typeString": "uint8"}}, "visibility": "internal"}], "src": "672:7:9"}, "scope": 3768, "src": "630:50:9", "stateMutability": "view", "virtual": false, "visibility": "external"}], "scope": 3769, "src": "277:405:9", "usedErrors": [], "usedEvents": [3676, 3685]}], "src": "125:558:9"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/utils/Context.sol": {"AST": {"absolutePath": "node_modules/@openzeppelin/contracts/utils/Context.sol", "exportedSymbols": {"Context": [3798]}, "id": 3799, "license": "MIT", "nodeType": "SourceUnit", "nodes": [{"id": 3770, "literals": ["solidity", "^", "0.8", ".20"], "nodeType": "PragmaDirective", "src": "101:24:10"}, {"abstract": true, "baseContracts": [], "canonicalName": "Context", "contractDependencies": [], "contractKind": "contract", "documentation": {"id": 3771, "nodeType": "StructuredDocumentation", "src": "127:496:10", "text": " @dev Provides information about the current execution context, including the\n sender of the transaction and its data. While these are generally available\n via msg.sender and msg.data, they should not be accessed in such a direct\n manner, since when dealing with meta-transactions the account sending and\n paying for execution may not be the actual sender (as far as an application\n is concerned).\n This contract is only required for intermediate, library-like contracts."}, "fullyImplemented": true, "id": 3798, "linearizedBaseContracts": [3798], "name": "Context", "nameLocation": "642:7:10", "nodeType": "ContractDefinition", "nodes": [{"body": {"id": 3779, "nodeType": "Block", "src": "718:34:10", "statements": [{"expression": {"expression": {"id": 3776, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "735:3:10", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 3777, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "739:6:10", "memberName": "sender", "nodeType": "MemberAccess", "src": "735:10:10", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "functionReturnParameters": 3775, "id": 3778, "nodeType": "Return", "src": "728:17:10"}]}, "id": 3780, "implemented": true, "kind": "function", "modifiers": [], "name": "_msgSender", "nameLocation": "665:10:10", "nodeType": "FunctionDefinition", "parameters": {"id": 3772, "nodeType": "ParameterList", "parameters": [], "src": "675:2:10"}, "returnParameters": {"id": 3775, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3774, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3780, "src": "709:7:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 3773, "name": "address", "nodeType": "ElementaryTypeName", "src": "709:7:10", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}], "src": "708:9:10"}, "scope": 3798, "src": "656:96:10", "stateMutability": "view", "virtual": true, "visibility": "internal"}, {"body": {"id": 3788, "nodeType": "Block", "src": "825:32:10", "statements": [{"expression": {"expression": {"id": 3785, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "842:3:10", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 3786, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "846:4:10", "memberName": "data", "nodeType": "MemberAccess", "src": "842:8:10", "typeDescriptions": {"typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes calldata"}}, "functionReturnParameters": 3784, "id": 3787, "nodeType": "Return", "src": "835:15:10"}]}, "id": 3789, "implemented": true, "kind": "function", "modifiers": [], "name": "_msgData", "nameLocation": "767:8:10", "nodeType": "FunctionDefinition", "parameters": {"id": 3781, "nodeType": "ParameterList", "parameters": [], "src": "775:2:10"}, "returnParameters": {"id": 3784, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3783, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3789, "src": "809:14:10", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": {"typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes"}, "typeName": {"id": 3782, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "809:5:10", "typeDescriptions": {"typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes"}}, "visibility": "internal"}], "src": "808:16:10"}, "scope": 3798, "src": "758:99:10", "stateMutability": "view", "virtual": true, "visibility": "internal"}, {"body": {"id": 3796, "nodeType": "Block", "src": "935:25:10", "statements": [{"expression": {"hexValue": "30", "id": 3794, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "952:1:10", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}, "functionReturnParameters": 3793, "id": 3795, "nodeType": "Return", "src": "945:8:10"}]}, "id": 3797, "implemented": true, "kind": "function", "modifiers": [], "name": "_contextSuffixLength", "nameLocation": "872:20:10", "nodeType": "FunctionDefinition", "parameters": {"id": 3790, "nodeType": "ParameterList", "parameters": [], "src": "892:2:10"}, "returnParameters": {"id": 3793, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 3792, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 3797, "src": "926:7:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 3791, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "926:7:10", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "925:9:10"}, "scope": 3798, "src": "863:97:10", "stateMutability": "view", "virtual": true, "visibility": "internal"}], "scope": 3799, "src": "624:338:10", "usedErrors": [], "usedEvents": []}], "src": "101:862:10"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/src/contracts/BToken.sol": {"AST": {"absolutePath": "src/contracts/BToken.sol", "exportedSymbols": {"BToken": [1345], "ERC20": [1959]}, "id": 1346, "license": "GPL-3.0-or-later", "nodeType": "SourceUnit", "nodes": [{"id": 1226, "literals": ["solidity", "0.8", ".23"], "nodeType": "PragmaDirective", "src": "45:23:11"}, {"absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol", "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", "id": 1228, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 1346, "sourceUnit": 1960, "src": "70:68:11", "symbolAliases": [{"foreign": {"id": 1227, "name": "ERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1959, "src": "78:5:11", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"abstract": false, "baseContracts": [{"baseName": {"id": 1230, "name": "ERC20", "nameLocations": ["261:5:11"], "nodeType": "IdentifierPath", "referencedDeclaration": 1959, "src": "261:5:11"}, "id": 1231, "nodeType": "InheritanceSpecifier", "src": "261:5:11"}], "canonicalName": "BToken", "contractDependencies": [], "contractKind": "contract", "documentation": {"id": 1229, "nodeType": "StructuredDocumentation", "src": "140:101:11", "text": " @title BToken\n @notice Balancer Pool Token base contract, providing ERC20 functionality."}, "fullyImplemented": true, "id": 1345, "linearizedBaseContracts": [1345, 1959, 3569, 3768, 3742, 3798], "name": "BToken", "nameLocation": "251:6:11", "nodeType": "ContractDefinition", "nodes": [{"body": {"id": 1238, "nodeType": "Block", "src": "321:2:11", "statements": []}, "id": 1239, "implemented": true, "kind": "constructor", "modifiers": [{"arguments": [{"hexValue": "42616c616e63657220506f6f6c20546f6b656e", "id": 1234, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "291:21:11", "typeDescriptions": {"typeIdentifier": "t_stringliteral_86726d210cafef5a97cd8551cc3cd59ead4ad6b4a08f1b0e2ca14d5024839298", "typeString": "literal_string \"Balancer Pool Token\""}, "value": "Balancer Pool Token"}, {"hexValue": "425054", "id": 1235, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "314:5:11", "typeDescriptions": {"typeIdentifier": "t_stringliteral_2c4469c3871c2223d094ce996c22463935f1f3c0f4a0177add993c1ee46e9606", "typeString": "literal_string \"BPT\""}, "value": "BPT"}], "id": 1236, "kind": "baseConstructorSpecifier", "modifierName": {"id": 1233, "name": "ERC20", "nameLocations": ["285:5:11"], "nodeType": "IdentifierPath", "referencedDeclaration": 1959, "src": "285:5:11"}, "nodeType": "ModifierInvocation", "src": "285:35:11"}], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": {"id": 1232, "nodeType": "ParameterList", "parameters": [], "src": "282:2:11"}, "returnParameters": {"id": 1237, "nodeType": "ParameterList", "parameters": [], "src": "321:0:11"}, "scope": 1345, "src": "271:52:11", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 1264, "nodeType": "Block", "src": "670:98:11", "statements": [{"expression": {"arguments": [{"expression": {"id": 1250, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "685:3:11", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1251, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "689:6:11", "memberName": "sender", "nodeType": "MemberAccess", "src": "685:10:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1252, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1242, "src": "697:7:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1259, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"arguments": [{"expression": {"id": 1254, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "716:3:11", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1255, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "720:6:11", "memberName": "sender", "nodeType": "MemberAccess", "src": "716:10:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1256, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1242, "src": "728:7:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "id": 1253, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1586, "src": "706:9:11", "typeDescriptions": {"typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view returns (uint256)"}}, "id": 1257, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "706:30:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": {"id": 1258, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1244, "src": "739:6:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "706:39:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1249, "name": "_approve", "nodeType": "Identifier", "overloadedDeclarations": [1850, 1910], "referencedDeclaration": 1850, "src": "676:8:11", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1260, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "676:70:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1261, "nodeType": "ExpressionStatement", "src": "676:70:11"}, {"expression": {"hexValue": "74727565", "id": 1262, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "759:4:11", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "functionReturnParameters": 1248, "id": 1263, "nodeType": "Return", "src": "752:11:11"}]}, "documentation": {"id": 1240, "nodeType": "StructuredDocumentation", "src": "327:249:11", "text": " @notice Increase the allowance of the spender.\n @param spender The address which will spend the funds.\n @param amount The amount of tokens to increase the allowance by.\n @return success True if the operation is successful."}, "functionSelector": "d73dd623", "id": 1265, "implemented": true, "kind": "function", "modifiers": [], "name": "increaseApproval", "nameLocation": "588:16:11", "nodeType": "FunctionDefinition", "parameters": {"id": 1245, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1242, "mutability": "mutable", "name": "spender", "nameLocation": "613:7:11", "nodeType": "VariableDeclaration", "scope": 1265, "src": "605:15:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1241, "name": "address", "nodeType": "ElementaryTypeName", "src": "605:7:11", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1244, "mutability": "mutable", "name": "amount", "nameLocation": "630:6:11", "nodeType": "VariableDeclaration", "scope": 1265, "src": "622:14:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1243, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "622:7:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "604:33:11"}, "returnParameters": {"id": 1248, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1247, "mutability": "mutable", "name": "success", "nameLocation": "661:7:11", "nodeType": "VariableDeclaration", "scope": 1265, "src": "656:12:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1246, "name": "bool", "nodeType": "ElementaryTypeName", "src": "656:4:11", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "655:14:11"}, "scope": 1345, "src": "579:189:11", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"body": {"id": 1307, "nodeType": "Block", "src": "1115:221:11", "statements": [{"assignments": [1276], "declarations": [{"constant": false, "id": 1276, "mutability": "mutable", "name": "oldValue", "nameLocation": "1129:8:11", "nodeType": "VariableDeclaration", "scope": 1307, "src": "1121:16:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1275, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1121:7:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "id": 1282, "initialValue": {"arguments": [{"expression": {"id": 1278, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1150:3:11", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1279, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1154:6:11", "memberName": "sender", "nodeType": "MemberAccess", "src": "1150:10:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1280, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1268, "src": "1162:7:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}], "id": 1277, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1586, "src": "1140:9:11", "typeDescriptions": {"typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view returns (uint256)"}}, "id": 1281, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1140:30:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "VariableDeclarationStatement", "src": "1121:49:11"}, {"condition": {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1285, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1283, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1270, "src": "1180:6:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": {"id": 1284, "name": "oldValue", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1276, "src": "1189:8:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "1180:17:11", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "falseBody": {"id": 1303, "nodeType": "Block", "src": "1252:63:11", "statements": [{"expression": {"arguments": [{"expression": {"id": 1295, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1269:3:11", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1296, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1273:6:11", "memberName": "sender", "nodeType": "MemberAccess", "src": "1269:10:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1297, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1268, "src": "1281:7:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"commonType": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "id": 1300, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": {"id": 1298, "name": "oldValue", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1276, "src": "1290:8:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": {"id": 1299, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1270, "src": "1301:6:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "1290:17:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1294, "name": "_approve", "nodeType": "Identifier", "overloadedDeclarations": [1850, 1910], "referencedDeclaration": 1850, "src": "1260:8:11", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1301, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1260:48:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1302, "nodeType": "ExpressionStatement", "src": "1260:48:11"}]}, "id": 1304, "nodeType": "IfStatement", "src": "1176:139:11", "trueBody": {"id": 1293, "nodeType": "Block", "src": "1199:47:11", "statements": [{"expression": {"arguments": [{"expression": {"id": 1287, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1216:3:11", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 1288, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1220:6:11", "memberName": "sender", "nodeType": "MemberAccess", "src": "1216:10:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1289, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1268, "src": "1228:7:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"hexValue": "30", "id": 1290, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1237:1:11", "typeDescriptions": {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}, "value": "0"}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0"}], "id": 1286, "name": "_approve", "nodeType": "Identifier", "overloadedDeclarations": [1850, 1910], "referencedDeclaration": 1850, "src": "1207:8:11", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1291, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1207:32:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1292, "nodeType": "ExpressionStatement", "src": "1207:32:11"}]}}, {"expression": {"hexValue": "74727565", "id": 1305, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1327:4:11", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "functionReturnParameters": 1274, "id": 1306, "nodeType": "Return", "src": "1320:11:11"}]}, "documentation": {"id": 1266, "nodeType": "StructuredDocumentation", "src": "772:249:11", "text": " @notice Decrease the allowance of the spender.\n @param spender The address which will spend the funds.\n @param amount The amount of tokens to decrease the allowance by.\n @return success True if the operation is successful."}, "functionSelector": "66188463", "id": 1308, "implemented": true, "kind": "function", "modifiers": [], "name": "decreaseApproval", "nameLocation": "1033:16:11", "nodeType": "FunctionDefinition", "parameters": {"id": 1271, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1268, "mutability": "mutable", "name": "spender", "nameLocation": "1058:7:11", "nodeType": "VariableDeclaration", "scope": 1308, "src": "1050:15:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1267, "name": "address", "nodeType": "ElementaryTypeName", "src": "1050:7:11", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1270, "mutability": "mutable", "name": "amount", "nameLocation": "1075:6:11", "nodeType": "VariableDeclaration", "scope": 1308, "src": "1067:14:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1269, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1067:7:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1049:33:11"}, "returnParameters": {"id": 1274, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1273, "mutability": "mutable", "name": "success", "nameLocation": "1106:7:11", "nodeType": "VariableDeclaration", "scope": 1308, "src": "1101:12:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 1272, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1101:4:11", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "internal"}], "src": "1100:14:11"}, "scope": 1345, "src": "1024:312:11", "stateMutability": "nonpayable", "virtual": false, "visibility": "external"}, {"body": {"id": 1325, "nodeType": "Block", "src": "1593:47:11", "statements": [{"expression": {"arguments": [{"arguments": [{"id": 1319, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "1617:4:11", "typeDescriptions": {"typeIdentifier": "t_contract$_BToken_$1345", "typeString": "contract BToken"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_BToken_$1345", "typeString": "contract BToken"}], "id": 1318, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1609:7:11", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1317, "name": "address", "nodeType": "ElementaryTypeName", "src": "1609:7:11", "typeDescriptions": {}}}, "id": 1320, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1609:13:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1321, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1311, "src": "1624:2:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1322, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1313, "src": "1628:6:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1316, "name": "_transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1689, "src": "1599:9:11", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1323, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1599:36:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1324, "nodeType": "ExpressionStatement", "src": "1599:36:11"}]}, "documentation": {"id": 1309, "nodeType": "StructuredDocumentation", "src": "1340:190:11", "text": " @notice Transfer tokens from one this contract to another.\n @param to The address which you want to transfer to.\n @param amount The amount of tokens to be transferred."}, "id": 1326, "implemented": true, "kind": "function", "modifiers": [], "name": "_push", "nameLocation": "1542:5:11", "nodeType": "FunctionDefinition", "parameters": {"id": 1314, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1311, "mutability": "mutable", "name": "to", "nameLocation": "1556:2:11", "nodeType": "VariableDeclaration", "scope": 1326, "src": "1548:10:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1310, "name": "address", "nodeType": "ElementaryTypeName", "src": "1548:7:11", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1313, "mutability": "mutable", "name": "amount", "nameLocation": "1568:6:11", "nodeType": "VariableDeclaration", "scope": 1326, "src": "1560:14:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1312, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1560:7:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1547:28:11"}, "returnParameters": {"id": 1315, "nodeType": "ParameterList", "parameters": [], "src": "1593:0:11"}, "scope": 1345, "src": "1533:107:11", "stateMutability": "nonpayable", "virtual": true, "visibility": "internal"}, {"body": {"id": 1343, "nodeType": "Block", "src": "1903:49:11", "statements": [{"expression": {"arguments": [{"id": 1335, "name": "from", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1329, "src": "1919:4:11", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"arguments": [{"id": 1338, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, "src": "1933:4:11", "typeDescriptions": {"typeIdentifier": "t_contract$_BToken_$1345", "typeString": "contract BToken"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_BToken_$1345", "typeString": "contract BToken"}], "id": 1337, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1925:7:11", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 1336, "name": "address", "nodeType": "ElementaryTypeName", "src": "1925:7:11", "typeDescriptions": {}}}, "id": 1339, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1925:13:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 1340, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1331, "src": "1940:6:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 1334, "name": "_transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1689, "src": "1909:9:11", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)"}}, "id": 1341, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1909:38:11", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 1342, "nodeType": "ExpressionStatement", "src": "1909:38:11"}]}, "documentation": {"id": 1327, "nodeType": "StructuredDocumentation", "src": "1644:194:11", "text": " @notice Pull tokens from another address to this contract.\n @param from The address which you want to transfer from.\n @param amount The amount of tokens to be transferred."}, "id": 1344, "implemented": true, "kind": "function", "modifiers": [], "name": "_pull", "nameLocation": "1850:5:11", "nodeType": "FunctionDefinition", "parameters": {"id": 1332, "nodeType": "ParameterList", "parameters": [{"constant": false, "id": 1329, "mutability": "mutable", "name": "from", "nameLocation": "1864:4:11", "nodeType": "VariableDeclaration", "scope": 1344, "src": "1856:12:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}, "typeName": {"id": 1328, "name": "address", "nodeType": "ElementaryTypeName", "src": "1856:7:11", "stateMutability": "nonpayable", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, "visibility": "internal"}, {"constant": false, "id": 1331, "mutability": "mutable", "name": "amount", "nameLocation": "1878:6:11", "nodeType": "VariableDeclaration", "scope": 1344, "src": "1870:14:11", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 1330, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1870:7:11", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "internal"}], "src": "1855:30:11"}, "returnParameters": {"id": 1333, "nodeType": "ParameterList", "parameters": [], "src": "1903:0:11"}, "scope": 1345, "src": "1841:111:11", "stateMutability": "nonpayable", "virtual": true, "visibility": "internal"}], "scope": 1346, "src": "242:1712:11", "usedErrors": [3539, 3544, 3549, 3558, 3563, 3568], "usedEvents": [3676, 3685]}], "src": "45:1910:11"}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/test/invariants/fuzz/external/BToken.sol": {"AST": {"absolutePath": "test/invariants/fuzz/external/BToken.sol", "exportedSymbols": {"BToken": [1345], "CryticERC20ExternalBasicProperties": [1131], "CryticERC20ExternalHarness": [37], "CryticTokenMock": [80], "ERC20": [1959], "ITokenMock": [1200], "PropertiesConstants": [1224]}, "id": 81, "nodeType": "SourceUnit", "nodes": [{"id": 1, "literals": ["solidity", "0.8", ".23"], "nodeType": "PragmaDirective", "src": "0:23:12"}, {"absolutePath": "src/contracts/BToken.sol", "file": "contracts/BToken.sol", "id": 2, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 81, "sourceUnit": 1346, "src": "24:30:12", "symbolAliases": [], "unitAlias": ""}, {"absolutePath": "node_modules/@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol", "file": "@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol", "id": 4, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 81, "sourceUnit": 1201, "src": "55:91:12", "symbolAliases": [{"foreign": {"id": 3, "name": "ITokenMock", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1200, "src": "63:10:12", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"absolutePath": "node_modules/@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol", "file": "@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol", "id": 6, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 81, "sourceUnit": 1132, "src": "147:139:12", "symbolAliases": [{"foreign": {"id": 5, "name": "CryticERC20ExternalBasicProperties", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1131, "src": "155:34:12", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"absolutePath": "node_modules/@crytic/properties/contracts/util/PropertiesConstants.sol", "file": "@crytic/properties/contracts/util/PropertiesConstants.sol", "id": 8, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 81, "sourceUnit": 1225, "src": "287:94:12", "symbolAliases": [{"foreign": {"id": 7, "name": "PropertiesConstants", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1224, "src": "295:19:12", "typeDescriptions": {}}, "nameLocation": "-1:-1:-1"}], "unitAlias": ""}, {"abstract": false, "baseContracts": [{"baseName": {"id": 9, "name": "CryticERC20ExternalBasicProperties", "nameLocations": ["423:34:12"], "nodeType": "IdentifierPath", "referencedDeclaration": 1131, "src": "423:34:12"}, "id": 10, "nodeType": "InheritanceSpecifier", "src": "423:34:12"}], "canonicalName": "CryticERC20ExternalHarness", "contractDependencies": [80], "contractKind": "contract", "fullyImplemented": true, "id": 37, "linearizedBaseContracts": [37, 1131, 1362, 1224, 3325], "name": "CryticERC20ExternalHarness", "nameLocation": "393:26:12", "nodeType": "ContractDefinition", "nodes": [{"body": {"id": 25, "nodeType": "Block", "src": "478:91:12", "statements": [{"expression": {"id": 23, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 13, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1357, "src": "512:5:12", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [{"arguments": [{"arguments": [], "expression": {"argumentTypes": [], "id": 19, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "NewExpression", "src": "539:19:12", "typeDescriptions": {"typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_CryticTokenMock_$80_$", "typeString": "function () returns (contract CryticTokenMock)"}, "typeName": {"id": 18, "nodeType": "UserDefinedTypeName", "pathNode": {"id": 17, "name": "CryticTokenMock", "nameLocations": ["543:15:12"], "nodeType": "IdentifierPath", "referencedDeclaration": 80, "src": "543:15:12"}, "referencedDeclaration": 80, "src": "543:15:12", "typeDescriptions": {"typeIdentifier": "t_contract$_CryticTokenMock_$80", "typeString": "contract CryticTokenMock"}}}, "id": 20, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "539:21:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_CryticTokenMock_$80", "typeString": "contract CryticTokenMock"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_contract$_CryticTokenMock_$80", "typeString": "contract CryticTokenMock"}], "id": 16, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "531:7:12", "typeDescriptions": {"typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)"}, "typeName": {"id": 15, "name": "address", "nodeType": "ElementaryTypeName", "src": "531:7:12", "typeDescriptions": {}}}, "id": 21, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "531:30:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}], "id": 14, "name": "ITokenMock", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1200, "src": "520:10:12", "typeDescriptions": {"typeIdentifier": "t_type$_t_contract$_ITokenMock_$1200_$", "typeString": "type(contract ITokenMock)"}}, "id": 22, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "520:42:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "src": "512:50:12", "typeDescriptions": {"typeIdentifier": "t_contract$_ITokenMock_$1200", "typeString": "contract ITokenMock"}}, "id": 24, "nodeType": "ExpressionStatement", "src": "512:50:12"}]}, "id": 26, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": {"id": 11, "nodeType": "ParameterList", "parameters": [], "src": "475:2:12"}, "returnParameters": {"id": 12, "nodeType": "ParameterList", "parameters": [], "src": "478:0:12"}, "scope": 37, "src": "464:105:12", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 30, "nodeType": "Block", "src": "747:30:12", "statements": []}, "documentation": {"id": 27, "nodeType": "StructuredDocumentation", "src": "573:131:12", "text": "@custom:property-id 8\n @custom:property BToken increaseApproval should increase the approval of the address by the amount"}, "functionSelector": "f16dcaa6", "id": 31, "implemented": true, "kind": "function", "modifiers": [], "name": "fuzz_increaseApproval", "nameLocation": "716:21:12", "nodeType": "FunctionDefinition", "parameters": {"id": 28, "nodeType": "ParameterList", "parameters": [], "src": "737:2:12"}, "returnParameters": {"id": 29, "nodeType": "ParameterList", "parameters": [], "src": "747:0:12"}, "scope": 37, "src": "707:70:12", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}, {"body": {"id": 35, "nodeType": "Block", "src": "946:2:12", "statements": []}, "documentation": {"id": 32, "nodeType": "StructuredDocumentation", "src": "780:123:12", "text": "@custom:property-id 9\n @custom:property BToken decreaseApproval should decrease the approval to max(old-amount, 0)"}, "functionSelector": "aa2c209e", "id": 36, "implemented": true, "kind": "function", "modifiers": [], "name": "fuzz_decreaseApproval", "nameLocation": "915:21:12", "nodeType": "FunctionDefinition", "parameters": {"id": 33, "nodeType": "ParameterList", "parameters": [], "src": "936:2:12"}, "returnParameters": {"id": 34, "nodeType": "ParameterList", "parameters": [], "src": "946:0:12"}, "scope": 37, "src": "906:42:12", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 81, "src": "384:566:12", "usedErrors": [], "usedEvents": [1967, 1973, 1977, 1981, 1985, 1989, 1993, 1997, 2001, 2005]}, {"abstract": false, "baseContracts": [{"baseName": {"id": 38, "name": "BToken", "nameLocations": ["980:6:12"], "nodeType": "IdentifierPath", "referencedDeclaration": 1345, "src": "980:6:12"}, "id": 39, "nodeType": "InheritanceSpecifier", "src": "980:6:12"}, {"baseName": {"id": 40, "name": "PropertiesConstants", "nameLocations": ["988:19:12"], "nodeType": "IdentifierPath", "referencedDeclaration": 1224, "src": "988:19:12"}, "id": 41, "nodeType": "InheritanceSpecifier", "src": "988:19:12"}], "canonicalName": "CryticTokenMock", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 80, "linearizedBaseContracts": [80, 1224, 1345, 1959, 3569, 3768, 3742, 3798], "name": "CryticTokenMock", "nameLocation": "961:15:12", "nodeType": "ContractDefinition", "nodes": [{"constant": false, "functionSelector": "ab789fa3", "id": 43, "mutability": "mutable", "name": "isMintableOrBurnable", "nameLocation": "1027:20:12", "nodeType": "VariableDeclaration", "scope": 80, "src": "1015:32:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "typeName": {"id": 42, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1015:4:12", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "visibility": "public"}, {"constant": false, "functionSelector": "378dc3dc", "id": 45, "mutability": "mutable", "name": "initialSupply", "nameLocation": "1068:13:12", "nodeType": "VariableDeclaration", "scope": 80, "src": "1053:28:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}, "typeName": {"id": 44, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1053:7:12", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "visibility": "public"}, {"body": {"id": 78, "nodeType": "Block", "src": "1102:245:12", "statements": [{"expression": {"arguments": [{"id": 49, "name": "USER1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1208, "src": "1118:5:12", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 50, "name": "INITIAL_BALANCE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1223, "src": "1125:15:12", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 48, "name": "_mint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1799, "src": "1112:5:12", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)"}}, "id": 51, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1112:29:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 52, "nodeType": "ExpressionStatement", "src": "1112:29:12"}, {"expression": {"arguments": [{"id": 54, "name": "USER2", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1214, "src": "1157:5:12", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 55, "name": "INITIAL_BALANCE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1223, "src": "1164:15:12", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 53, "name": "_mint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1799, "src": "1151:5:12", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)"}}, "id": 56, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1151:29:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 57, "nodeType": "ExpressionStatement", "src": "1151:29:12"}, {"expression": {"arguments": [{"id": 59, "name": "USER3", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1220, "src": "1196:5:12", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 60, "name": "INITIAL_BALANCE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1223, "src": "1203:15:12", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 58, "name": "_mint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1799, "src": "1190:5:12", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)"}}, "id": 61, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1190:29:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 62, "nodeType": "ExpressionStatement", "src": "1190:29:12"}, {"expression": {"arguments": [{"expression": {"id": 64, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "1235:3:12", "typeDescriptions": {"typeIdentifier": "t_magic_message", "typeString": "msg"}}, "id": 65, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1239:6:12", "memberName": "sender", "nodeType": "MemberAccess", "src": "1235:10:12", "typeDescriptions": {"typeIdentifier": "t_address", "typeString": "address"}}, {"id": 66, "name": "INITIAL_BALANCE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1223, "src": "1247:15:12", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}], "expression": {"argumentTypes": [{"typeIdentifier": "t_address", "typeString": "address"}, {"typeIdentifier": "t_uint256", "typeString": "uint256"}], "id": 63, "name": "_mint", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1799, "src": "1229:5:12", "typeDescriptions": {"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)"}}, "id": 67, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1229:34:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_tuple$__$", "typeString": "tuple()"}}, "id": 68, "nodeType": "ExpressionStatement", "src": "1229:34:12"}, {"expression": {"id": 72, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 69, "name": "initialSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 45, "src": "1274:13:12", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"arguments": [], "expression": {"argumentTypes": [], "id": 70, "name": "totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1532, "src": "1290:11:12", "typeDescriptions": {"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)"}}, "id": 71, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1290:13:12", "tryCall": false, "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "src": "1274:29:12", "typeDescriptions": {"typeIdentifier": "t_uint256", "typeString": "uint256"}}, "id": 73, "nodeType": "ExpressionStatement", "src": "1274:29:12"}, {"expression": {"id": 76, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": {"id": 74, "name": "isMintableOrBurnable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 43, "src": "1313:20:12", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "nodeType": "Assignment", "operator": "=", "rightHandSide": {"hexValue": "74727565", "id": 75, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1336:4:12", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}, "value": "true"}, "src": "1313:27:12", "typeDescriptions": {"typeIdentifier": "t_bool", "typeString": "bool"}}, "id": 77, "nodeType": "ExpressionStatement", "src": "1313:27:12"}]}, "id": 79, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": {"id": 46, "nodeType": "ParameterList", "parameters": [], "src": "1099:2:12"}, "returnParameters": {"id": 47, "nodeType": "ParameterList", "parameters": [], "src": "1102:0:12"}, "scope": 80, "src": "1087:260:12", "stateMutability": "nonpayable", "virtual": false, "visibility": "public"}], "scope": 81, "src": "952:397:12", "usedErrors": [3539, 3544, 3549, 3558, 3563, 3568], "usedEvents": [3676, 3685]}], "src": "0:1349:12"}}}, "sourceList": ["/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/util/ERC20ExternalTestBase.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/IERC20.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/PropertiesConstants.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/PropertiesHelper.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/utils/Context.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/src/contracts/BToken.sol", "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/test/invariants/fuzz/external/BToken.sol"], "contracts": {"/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol:CryticERC20ExternalBasicProperties": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertEqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertNeqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"LogAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"LogString\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"LogUint256\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"test_ERC20external_constantSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_selfTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_selfTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_setAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_setAllowanceTwice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_spendAllowanceAfterTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferFromMoreThanBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_transferFromToZeroAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferFromZeroAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferMoreThanBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_transferToZeroAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferZeroAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_userBalanceNotHigherThanSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_userBalancesLessThanTotalSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_zeroAddressBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/util/ERC20ExternalTestBase.sol:CryticERC20ExternalTestBase": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertEqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertNeqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"LogAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"LogString\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"LogUint256\",\"type\":\"event\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol:ITokenMock": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMintableOrBurnable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {"allowance(address,address)": {"author": null, "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.", "params": {}, "return": null}, "approve(address,uint256)": {"author": null, "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.", "params": {}, "return": null}, "balanceOf(address)": {"author": null, "details": "Returns the amount of tokens owned by `account`.", "params": {}, "return": null}, "totalSupply()": {"author": null, "details": "Returns the amount of tokens in existence.", "params": {}, "return": null}, "transfer(address,uint256)": {"author": null, "details": "Moves `amount` tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}, "transferFrom(address,address,uint256)": {"author": null, "details": "Moves `amount` tokens from `from` to `to` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}}, "author": null, "details": null, "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/IERC20.sol:IERC20": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {"allowance(address,address)": {"author": null, "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.", "params": {}, "return": null}, "approve(address,uint256)": {"author": null, "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.", "params": {}, "return": null}, "balanceOf(address)": {"author": null, "details": "Returns the amount of tokens owned by `account`.", "params": {}, "return": null}, "totalSupply()": {"author": null, "details": "Returns the amount of tokens in existence.", "params": {}, "return": null}, "transfer(address,uint256)": {"author": null, "details": "Moves `amount` tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}, "transferFrom(address,address,uint256)": {"author": null, "details": "Moves `amount` tokens from `from` to `to` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}}, "author": null, "details": null, "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/PropertiesConstants.sol:PropertiesConstants": {"srcmap": "", "srcmap-runtime": "", "abi": "[]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/PropertiesHelper.sol:PropertiesAsserts": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertEqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertNeqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"LogAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"LogString\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"LogUint256\",\"type\":\"event\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": null, "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@crytic/properties/contracts/util/PropertiesHelper.sol:PropertiesLibString": {"srcmap": "15061:3029:5:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;15061:3029:5;;;;;;;;;;;;;;;;;", "srcmap-runtime": "15061:3029:5:-:0;;;;;;;;", "abi": "[]", "bin": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220f342b325b30554127841eeaf0da5b966b5f90632b2e4e9ae0a3ca3918b96441e64736f6c63430008170033", "bin-runtime": "730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220f342b325b30554127841eeaf0da5b966b5f90632b2e4e9ae0a3ca3918b96441e64736f6c63430008170033", "userdoc": {"methods": {}, "notice": "Efficient library for creating string representations of integers."}, "devdoc": {"methods": {}, "author": "Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/LibString.sol)Modified from Solady (https://github.com/Vectorized/solady/blob/main/src/utils/LibString.sol)", "details": "Name of the library is modified to prevent collisions with contract-under-test uses of LibString", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol:IERC1155Errors": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC1155InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"idsLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valuesLength\",\"type\":\"uint256\"}],\"name\":\"ERC1155InvalidArrayLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC1155MissingApprovalForAll\",\"type\":\"error\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": "Standard ERC1155 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol:IERC20Errors": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": "Standard ERC20 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol:IERC721Errors": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721IncorrectOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721InsufficientApproval\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC721InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721NonexistentToken\",\"type\":\"error\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": "Standard ERC721 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {"allowance(address,address)": {"author": null, "details": "See {IERC20-allowance}.", "params": {}, "return": null}, "approve(address,uint256)": {"author": null, "details": "See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.", "params": {}, "return": null}, "balanceOf(address)": {"author": null, "details": "See {IERC20-balanceOf}.", "params": {}, "return": null}, "constructor": {"author": null, "details": "Sets the values for {name} and {symbol}. All two of these values are immutable: they can only be set once during construction.", "params": {}, "return": null}, "decimals()": {"author": null, "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.", "params": {}, "return": null}, "name()": {"author": null, "details": "Returns the name of the token.", "params": {}, "return": null}, "symbol()": {"author": null, "details": "Returns the symbol of the token, usually a shorter version of the name.", "params": {}, "return": null}, "totalSupply()": {"author": null, "details": "See {IERC20-totalSupply}.", "params": {}, "return": null}, "transfer(address,uint256)": {"author": null, "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.", "params": {}, "return": null}, "transferFrom(address,address,uint256)": {"author": null, "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.", "params": {}, "return": null}}, "author": null, "details": "Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. TIP: For a detailed writeup see our guide https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. The default value of {decimals} is 18. To change this, you should override this function so it returns a different value. We have followed general OpenZeppelin Contracts guidelines: functions revert instead returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification.", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol:IERC20": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {"allowance(address,address)": {"author": null, "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.", "params": {}, "return": null}, "approve(address,uint256)": {"author": null, "details": "Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.", "params": {}, "return": null}, "balanceOf(address)": {"author": null, "details": "Returns the value of tokens owned by `account`.", "params": {}, "return": null}, "totalSupply()": {"author": null, "details": "Returns the value of tokens in existence.", "params": {}, "return": null}, "transfer(address,uint256)": {"author": null, "details": "Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}, "transferFrom(address,address,uint256)": {"author": null, "details": "Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}}, "author": null, "details": "Interface of the ERC20 standard as defined in the EIP.", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol:IERC20Metadata": {"srcmap": "", "srcmap-runtime": "", "abi": "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {"allowance(address,address)": {"author": null, "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.", "params": {}, "return": null}, "approve(address,uint256)": {"author": null, "details": "Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.", "params": {}, "return": null}, "balanceOf(address)": {"author": null, "details": "Returns the value of tokens owned by `account`.", "params": {}, "return": null}, "decimals()": {"author": null, "details": "Returns the decimals places of the token.", "params": {}, "return": null}, "name()": {"author": null, "details": "Returns the name of the token.", "params": {}, "return": null}, "symbol()": {"author": null, "details": "Returns the symbol of the token.", "params": {}, "return": null}, "totalSupply()": {"author": null, "details": "Returns the value of tokens in existence.", "params": {}, "return": null}, "transfer(address,uint256)": {"author": null, "details": "Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}, "transferFrom(address,address,uint256)": {"author": null, "details": "Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.", "params": {}, "return": null}}, "author": null, "details": "Interface for the optional metadata functions from the ERC20 standard.", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/node_modules/@openzeppelin/contracts/utils/Context.sol:Context": {"srcmap": "", "srcmap-runtime": "", "abi": "[]", "bin": "", "bin-runtime": "", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {}, "author": null, "details": "Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.", "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/src/contracts/BToken.sol:BToken": {"srcmap": "242:1712:11:-:0;;;271:52;;;;;;;;;;1896:113:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1896:113:7;;;1970:5;1962;:13;;;;;;:::i;:::-;-1:-1:-1;1985:7:7;:17;1995:7;1985;:17;:::i;:::-;;1896:113;;242:1712:11;;14:127:13;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:380;225:1;221:12;;;;268;;;289:61;;343:4;335:6;331:17;321:27;;289:61;396:2;388:6;385:14;365:18;362:38;359:161;;442:10;437:3;433:20;430:1;423:31;477:4;474:1;467:15;505:4;502:1;495:15;359:161;;146:380;;;:::o;657:518::-;759:2;754:3;751:11;748:421;;;795:5;792:1;785:16;839:4;836:1;826:18;909:2;897:10;893:19;890:1;886:27;880:4;876:38;945:4;933:10;930:20;927:47;;;-1:-1:-1;968:4:13;927:47;1023:2;1018:3;1014:12;1011:1;1007:20;1001:4;997:31;987:41;;1078:81;1096:2;1089:5;1086:13;1078:81;;;1155:1;1141:16;;1122:1;1111:13;1078:81;;;1082:3;;748:421;657:518;;;:::o;1351:1345::-;1471:10;;-1:-1:-1;;;;;1493:30:13;;1490:56;;;1526:18;;:::i;:::-;1555:97;1645:6;1605:38;1637:4;1631:11;1605:38;:::i;:::-;1599:4;1555:97;:::i;:::-;1707:4;;1764:2;1753:14;;1781:1;1776:663;;;;2483:1;2500:6;2497:89;;;-1:-1:-1;2552:19:13;;;2546:26;2497:89;-1:-1:-1;;1308:1:13;1304:11;;;1300:24;1296:29;1286:40;1332:1;1328:11;;;1283:57;2599:81;;1746:944;;1776:663;604:1;597:14;;;641:4;628:18;;-1:-1:-1;;1812:20:13;;;1930:236;1944:7;1941:1;1938:14;1930:236;;;2033:19;;;2027:26;2012:42;;2125:27;;;;2093:1;2081:14;;;;1960:19;;1930:236;;;1934:3;2194:6;2185:7;2182:19;2179:201;;;2255:19;;;2249:26;-1:-1:-1;;2338:1:13;2334:14;;;2350:3;2330:24;2326:37;2322:42;2307:58;2292:74;;2179:201;;;2426:1;2417:6;2414:1;2410:14;2406:22;2400:4;2393:36;1746:944;;;;;1351:1345;;:::o;:::-;242:1712:11;;;;;;", "srcmap-runtime": "242:1712:11:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89:7;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4293:186;;;;;;:::i;:::-;;:::i;:::-;;;1192:14:13;;1185:22;1167:41;;1155:2;1140:18;4293:186:7;1027:187:13;3144:97:7;3222:12;;3144:97;;;1365:25:13;;;1353:2;1338:18;3144:97:7;1219:177:13;5039:244:7;;;;;;:::i;:::-;;:::i;3002:82::-;;;3075:2;1876:36:13;;1864:2;1849:18;3002:82:7;1734:184:13;1024:312:11;;;;;;:::i;:::-;;:::i;3299:116:7:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3390:18:7;3364:7;3390:18;;;;;;;;;;;;3299:116;2276:93;;;:::i;3610:178::-;;;;;;:::i;:::-;;:::i;579:189:11:-;;;;;;:::i;:::-;;:::i;3846:140:7:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3952:18:7;;;3926:7;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3846:140;2074:89;2119:13;2151:5;2144:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89;:::o;4293:186::-;4366:4;735:10:10;4420:31:7;735:10:10;4436:7:7;4445:5;4420:8;:31::i;:::-;4468:4;4461:11;;;4293:186;;;;;:::o;5039:244::-;5126:4;735:10:10;5182:37:7;5198:4;735:10:10;5213:5:7;5182:15;:37::i;:::-;5229:26;5239:4;5245:2;5249:5;5229:9;:26::i;:::-;-1:-1:-1;5272:4:7;;5039:244;-1:-1:-1;;;;5039:244:7:o;1024:312:11:-;1150:10;1101:12;3952:18:7;;;:11;:18;;;;;;;;-1:-1:-1;;;;;3952:27:7;;;;;;;;;;1189:8:11;1180:6;:17;1176:139;;;1207:32;1216:10;1228:7;1237:1;1207:8;:32::i;:::-;1176:139;;;1260:48;1269:10;1281:7;1290:17;1301:6;1290:8;:17;:::i;:::-;1260:8;:48::i;2276:93:7:-;2323:13;2355:7;2348:14;;;;;:::i;3610:178::-;3679:4;735:10:10;3733:27:7;735:10:10;3750:2:7;3754:5;3733:9;:27::i;579:189:11:-;685:10;656:12;3952:18:7;;;:11;:18;;;;;;;;-1:-1:-1;;;;;3952:27:7;;;;;;;;;;656:12:11;;676:70;;3952:27:7;;706:39:11;;739:6;;706:39;:::i;676:70::-;-1:-1:-1;759:4:11;579:189;;;;:::o;8989:128:7:-;9073:37;9082:5;9089:7;9098:5;9105:4;9073:8;:37::i;:::-;8989:128;;;:::o;10663:477::-;-1:-1:-1;;;;;3952:18:7;;;10762:24;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;-1:-1:-1;;10828:37:7;;10824:310;;10904:5;10885:16;:24;10881:130;;;10936:60;;-1:-1:-1;;;10936:60:7;;-1:-1:-1;;;;;3379:55:13;;10936:60:7;;;3361:74:13;3451:18;;;3444:34;;;3494:18;;;3487:34;;;3334:18;;10936:60:7;;;;;;;;10881:130;11052:57;11061:5;11068:7;11096:5;11077:16;:24;11103:5;11052:8;:57::i;:::-;10752:388;10663:477;;;:::o;5656:300::-;-1:-1:-1;;;;;5739:18:7;;5735:86;;5780:30;;-1:-1:-1;;;5780:30:7;;5807:1;5780:30;;;3678:74:13;3651:18;;5780:30:7;3532:226:13;5735:86:7;-1:-1:-1;;;;;5834:16:7;;5830:86;;5873:32;;-1:-1:-1;;;5873:32:7;;5902:1;5873:32;;;3678:74:13;3651:18;;5873:32:7;3532:226:13;5830:86:7;5925:24;5933:4;5939:2;5943:5;5925:7;:24::i;9949:432::-;-1:-1:-1;;;;;10061:19:7;;10057:89;;10103:32;;-1:-1:-1;;;10103:32:7;;10132:1;10103:32;;;3678:74:13;3651:18;;10103:32:7;3532:226:13;10057:89:7;-1:-1:-1;;;;;10159:21:7;;10155:90;;10203:31;;-1:-1:-1;;;10203:31:7;;10231:1;10203:31;;;3678:74:13;3651:18;;10203:31:7;3532:226:13;10155:90:7;-1:-1:-1;;;;;10254:18:7;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;:35;;;10299:76;;;;10349:7;-1:-1:-1;;;;;10333:31:7;10342:5;-1:-1:-1;;;;;10333:31:7;;10358:5;10333:31;;;;1365:25:13;;1353:2;1338:18;;1219:177;10333:31:7;;;;;;;;9949:432;;;;:::o;6271:1107::-;-1:-1:-1;;;;;6360:18:7;;6356:540;;6512:5;6496:12;;:21;;;;;;;:::i;:::-;;;;-1:-1:-1;6356:540:7;;-1:-1:-1;6356:540:7;;-1:-1:-1;;;;;6570:15:7;;6548:19;6570:15;;;;;;;;;;;6603:19;;;6599:115;;;6649:50;;-1:-1:-1;;;6649:50:7;;-1:-1:-1;;;;;3379:55:13;;6649:50:7;;;3361:74:13;3451:18;;;3444:34;;;3494:18;;;3487:34;;;3334:18;;6649:50:7;3159:368:13;6599:115:7;-1:-1:-1;;;;;6834:15:7;;:9;:15;;;;;;;;;;6852:19;;;;6834:37;;6356:540;-1:-1:-1;;;;;6910:16:7;;6906:425;;7073:12;:21;;;;;;;6906:425;;;-1:-1:-1;;;;;7284:13:7;;:9;:13;;;;;;;;;;:22;;;;;;6906:425;7361:2;-1:-1:-1;;;;;7346:25:7;7355:4;-1:-1:-1;;;;;7346:25:7;;7365:5;7346:25;;;;1365::13;;1353:2;1338:18;;1219:177;7346:25:7;;;;;;;;6271:1107;;;:::o;14:548:13:-;126:4;155:2;184;173:9;166:21;216:6;210:13;259:6;254:2;243:9;239:18;232:34;284:1;294:140;308:6;305:1;302:13;294:140;;;403:14;;;399:23;;393:30;369:17;;;388:2;365:26;358:66;323:10;;294:140;;;298:3;483:1;478:2;469:6;458:9;454:22;450:31;443:42;553:2;546;542:7;537:2;529:6;525:15;521:29;510:9;506:45;502:54;494:62;;;;14:548;;;;:::o;567:196::-;635:20;;-1:-1:-1;;;;;684:54:13;;674:65;;664:93;;753:1;750;743:12;664:93;567:196;;;:::o;768:254::-;836:6;844;897:2;885:9;876:7;872:23;868:32;865:52;;;913:1;910;903:12;865:52;936:29;955:9;936:29;:::i;:::-;926:39;1012:2;997:18;;;;984:32;;-1:-1:-1;;;768:254:13:o;1401:328::-;1478:6;1486;1494;1547:2;1535:9;1526:7;1522:23;1518:32;1515:52;;;1563:1;1560;1553:12;1515:52;1586:29;1605:9;1586:29;:::i;:::-;1576:39;;1634:38;1668:2;1657:9;1653:18;1634:38;:::i;:::-;1624:48;;1719:2;1708:9;1704:18;1691:32;1681:42;;1401:328;;;;;:::o;1923:186::-;1982:6;2035:2;2023:9;2014:7;2010:23;2006:32;2003:52;;;2051:1;2048;2041:12;2003:52;2074:29;2093:9;2074:29;:::i;:::-;2064:39;1923:186;-1:-1:-1;;;1923:186:13:o;2114:260::-;2182:6;2190;2243:2;2231:9;2222:7;2218:23;2214:32;2211:52;;;2259:1;2256;2249:12;2211:52;2282:29;2301:9;2282:29;:::i;:::-;2272:39;;2330:38;2364:2;2353:9;2349:18;2330:38;:::i;:::-;2320:48;;2114:260;;;;;:::o;2379:380::-;2458:1;2454:12;;;;2501;;;2522:61;;2576:4;2568:6;2564:17;2554:27;;2522:61;2629:2;2621:6;2618:14;2598:18;2595:38;2592:161;;2675:10;2670:3;2666:20;2663:1;2656:31;2710:4;2707:1;2700:15;2738:4;2735:1;2728:15;2592:161;;2379:380;;;:::o;2764:127::-;2825:10;2820:3;2816:20;2813:1;2806:31;2856:4;2853:1;2846:15;2880:4;2877:1;2870:15;2896:128;2963:9;;;2984:11;;;2981:37;;;2998:18;;:::i;3029:125::-;3094:9;;;3115:10;;;3112:36;;;3128:18;;:::i", "abi": "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "608060405234801561000f575f80fd5b506040518060400160405280601381526020017f42616c616e63657220506f6f6c20546f6b656e000000000000000000000000008152506040518060400160405280600381526020016210941560ea1b8152508160039081610071919061011e565b50600461007e828261011e565b5050506101dd565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806100ae57607f821691505b6020821081036100cc57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561011957805f5260205f20601f840160051c810160208510156100f75750805b601f840160051c820191505b81811015610116575f8155600101610103565b50505b505050565b81516001600160401b0381111561013757610137610086565b61014b81610145845461009a565b846100d2565b602080601f83116001811461017e575f84156101675750858301515b5f19600386901b1c1916600185901b1785556101d5565b5f85815260208120601f198616915b828110156101ac5788860151825594840194600190910190840161018d565b50858210156101c957878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b6107ed806101ea5f395ff3fe608060405234801561000f575f80fd5b50600436106100b5575f3560e01c8063661884631161007d578063a9059cbb11610058578063a9059cbb14610171578063d73dd62314610184578063dd62ed3e14610197575f80fd5b8063661884631461012e57806370a082311461014157806395d89b4114610169575f80fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f575b5f80fd5b6100c16101cf565b6040516100ce919061062c565b60405180910390f35b6100ea6100e5366004610693565b61025f565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a3660046106bb565b610278565b604051601281526020016100ce565b6100ea61013c366004610693565b61029b565b6100fe61014f3660046106f4565b6001600160a01b03165f9081526020819052604090205490565b6100c16102ea565b6100ea61017f366004610693565b6102f9565b6100ea610192366004610693565b610306565b6100fe6101a5366004610714565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6060600380546101de90610745565b80601f016020809104026020016040519081016040528092919081815260200182805461020a90610745565b80156102555780601f1061022c57610100808354040283529160200191610255565b820191905f5260205f20905b81548152906001019060200180831161023857829003601f168201915b5050505050905090565b5f3361026c818585610345565b60019150505b92915050565b5f33610285858285610357565b6102908585856103d7565b506001949350505050565b335f9081526001602090815260408083206001600160a01b0386168452909152812054808311156102d6576102d133855f610345565b61026c565b61026c33856102e58685610791565b610345565b6060600480546101de90610745565b5f3361026c8185856103d7565b335f8181526001602090815260408083206001600160a01b0387168452909152812054909161033c9185906102e59086906107a4565b50600192915050565b6103528383836001610434565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f1981146103d157818110156103c357604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b6103d184848484035f610434565b50505050565b6001600160a01b03831661040057604051634b637e8f60e11b81525f60048201526024016103ba565b6001600160a01b0382166104295760405163ec442f0560e01b81525f60048201526024016103ba565b610352838383610506565b6001600160a01b03841661045d5760405163e602df0560e01b81525f60048201526024016103ba565b6001600160a01b03831661048657604051634a1406b160e11b81525f60048201526024016103ba565b6001600160a01b038085165f90815260016020908152604080832093871683529290522082905580156103d157826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104f891815260200190565b60405180910390a350505050565b6001600160a01b038316610530578060025f82825461052591906107a4565b909155506105a09050565b6001600160a01b0383165f90815260208190526040902054818110156105825760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016103ba565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166105bc576002805482900390556105da565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161061f91815260200190565b60405180910390a3505050565b5f602080835283518060208501525f5b818110156106585785810183015185820160400152820161063c565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461068e575f80fd5b919050565b5f80604083850312156106a4575f80fd5b6106ad83610678565b946020939093013593505050565b5f805f606084860312156106cd575f80fd5b6106d684610678565b92506106e460208501610678565b9150604084013590509250925092565b5f60208284031215610704575f80fd5b61070d82610678565b9392505050565b5f8060408385031215610725575f80fd5b61072e83610678565b915061073c60208401610678565b90509250929050565b600181811c9082168061075957607f821691505b60208210810361077757634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156102725761027261077d565b808201808211156102725761027261077d56fea2646970667358221220bc65a09f132480ba2ba11e9418b73c6befa11e01480f49cfc6a84d9532af748d64736f6c63430008170033", "bin-runtime": "608060405234801561000f575f80fd5b50600436106100b5575f3560e01c8063661884631161007d578063a9059cbb11610058578063a9059cbb14610171578063d73dd62314610184578063dd62ed3e14610197575f80fd5b8063661884631461012e57806370a082311461014157806395d89b4114610169575f80fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f575b5f80fd5b6100c16101cf565b6040516100ce919061062c565b60405180910390f35b6100ea6100e5366004610693565b61025f565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a3660046106bb565b610278565b604051601281526020016100ce565b6100ea61013c366004610693565b61029b565b6100fe61014f3660046106f4565b6001600160a01b03165f9081526020819052604090205490565b6100c16102ea565b6100ea61017f366004610693565b6102f9565b6100ea610192366004610693565b610306565b6100fe6101a5366004610714565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6060600380546101de90610745565b80601f016020809104026020016040519081016040528092919081815260200182805461020a90610745565b80156102555780601f1061022c57610100808354040283529160200191610255565b820191905f5260205f20905b81548152906001019060200180831161023857829003601f168201915b5050505050905090565b5f3361026c818585610345565b60019150505b92915050565b5f33610285858285610357565b6102908585856103d7565b506001949350505050565b335f9081526001602090815260408083206001600160a01b0386168452909152812054808311156102d6576102d133855f610345565b61026c565b61026c33856102e58685610791565b610345565b6060600480546101de90610745565b5f3361026c8185856103d7565b335f8181526001602090815260408083206001600160a01b0387168452909152812054909161033c9185906102e59086906107a4565b50600192915050565b6103528383836001610434565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f1981146103d157818110156103c357604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b6103d184848484035f610434565b50505050565b6001600160a01b03831661040057604051634b637e8f60e11b81525f60048201526024016103ba565b6001600160a01b0382166104295760405163ec442f0560e01b81525f60048201526024016103ba565b610352838383610506565b6001600160a01b03841661045d5760405163e602df0560e01b81525f60048201526024016103ba565b6001600160a01b03831661048657604051634a1406b160e11b81525f60048201526024016103ba565b6001600160a01b038085165f90815260016020908152604080832093871683529290522082905580156103d157826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104f891815260200190565b60405180910390a350505050565b6001600160a01b038316610530578060025f82825461052591906107a4565b909155506105a09050565b6001600160a01b0383165f90815260208190526040902054818110156105825760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016103ba565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166105bc576002805482900390556105da565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161061f91815260200190565b60405180910390a3505050565b5f602080835283518060208501525f5b818110156106585785810183015185820160400152820161063c565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461068e575f80fd5b919050565b5f80604083850312156106a4575f80fd5b6106ad83610678565b946020939093013593505050565b5f805f606084860312156106cd575f80fd5b6106d684610678565b92506106e460208501610678565b9150604084013590509250925092565b5f60208284031215610704575f80fd5b61070d82610678565b9392505050565b5f8060408385031215610725575f80fd5b61072e83610678565b915061073c60208401610678565b90509250929050565b600181811c9082168061075957607f821691505b60208210810361077757634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156102725761027261077d565b808201808211156102725761027261077d56fea2646970667358221220bc65a09f132480ba2ba11e9418b73c6befa11e01480f49cfc6a84d9532af748d64736f6c63430008170033", "userdoc": {"methods": {"decreaseApproval(address,uint256)": {"notice": "Decrease the allowance of the spender."}, "increaseApproval(address,uint256)": {"notice": "Increase the allowance of the spender."}}, "notice": "Balancer Pool Token base contract, providing ERC20 functionality."}, "devdoc": {"methods": {"allowance(address,address)": {"author": null, "details": "See {IERC20-allowance}.", "params": {}, "return": null}, "approve(address,uint256)": {"author": null, "details": "See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.", "params": {}, "return": null}, "balanceOf(address)": {"author": null, "details": "See {IERC20-balanceOf}.", "params": {}, "return": null}, "decimals()": {"author": null, "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.", "params": {}, "return": null}, "decreaseApproval(address,uint256)": {"author": null, "details": null, "params": {"amount": "The amount of tokens to decrease the allowance by.", "spender": "The address which will spend the funds."}, "return": null}, "increaseApproval(address,uint256)": {"author": null, "details": null, "params": {"amount": "The amount of tokens to increase the allowance by.", "spender": "The address which will spend the funds."}, "return": null}, "name()": {"author": null, "details": "Returns the name of the token.", "params": {}, "return": null}, "symbol()": {"author": null, "details": "Returns the symbol of the token, usually a shorter version of the name.", "params": {}, "return": null}, "totalSupply()": {"author": null, "details": "See {IERC20-totalSupply}.", "params": {}, "return": null}, "transfer(address,uint256)": {"author": null, "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.", "params": {}, "return": null}, "transferFrom(address,address,uint256)": {"author": null, "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.", "params": {}, "return": null}}, "author": null, "details": null, "title": "BToken"}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/test/invariants/fuzz/external/BToken.sol:CryticERC20ExternalHarness": {"srcmap": "384:566:12:-:0;;;464:105;;;;;;;;;;539:21;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;512:5:12;:50;;-1:-1:-1;;;;;;512:50:12;-1:-1:-1;;;;;512:50:12;;;;;;;;;;384:566;;;;;;;;;;:::o;:::-;;;;;;;", "srcmap-runtime": "384:566:12:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;656:231:0;;;:::i;:::-;;9669:646;;;;;;:::i;:::-;;:::i;8216:978::-;;;;;;:::i;:::-;;:::i;2009:604::-;;;;;;:::i;:::-;;:::i;349:252::-;;;:::i;9245:373::-;;;;;;:::i;:::-;;:::i;4953:763::-;;;;;;:::i;:::-;;:::i;1665:283::-;;;:::i;3971:905::-;;;;;;:::i;:::-;;:::i;1403:201::-;;;:::i;7343:815::-;;;;;;:::i;:::-;;:::i;3438:456::-;;;;;;:::i;:::-;;:::i;950:402::-;;;:::i;6506:779::-;;;;;;:::i;:::-;;:::i;5779:664::-;;;;;;:::i;:::-;;:::i;10367:1007::-;;;;;;:::i;:::-;;:::i;2669:713::-;;;;;;:::i;:::-;;:::i;656:231::-;757:5;;:27;;-1:-1:-1;;;757:27:0;;773:10;757:27;;;996:74:13;734:146:0;;-1:-1:-1;;;;;757:5:0;;:15;;969:18:13;;757:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;798:5;;;;;;;;-1:-1:-1;;;;;798:5:0;-1:-1:-1;;;;;798:17:0;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;734:146;;;;;;;;;;;;;;;;;:9;:146::i;:::-;656:231::o;9669:646::-;9786:6;9795:5;;:29;;-1:-1:-1;;;9795:29:0;;-1:-1:-1;;;;;1462:55:13;;;9795:29:0;;;1444:74:13;1534:18;;;1527:34;;;9795:5:0;;;;:13;;1417:18:13;;9795:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9786:38;;9834:63;9848:1;:9;;9853:4;9848:9;;;9834:63;;;;;;;;;;;;;;;;;:13;:63::i;:::-;9929:5;;:38;;-1:-1:-1;;;9929:38:0;;9953:4;9929:38;;;2089:34:13;-1:-1:-1;;;;;2159:15:13;;;2139:18;;;2132:43;9907:133:0;;9929:5;;:15;;2001:18:13;;9929:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9981:6;9907:133;;;;;;;;;;;;;;;;;:8;:133::i;:::-;10055:5;;-1:-1:-1;;;;;10055:5:0;:13;10069:6;10077:10;10086:1;10077:6;:10;:::i;:::-;10055:33;;-1:-1:-1;;;;;;10055:33:0;;;;;;;-1:-1:-1;;;;;1462:55:13;;;10055:33:0;;;1444:74:13;1534:18;;;1527:34;1417:18;;10055:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10051:37;;10098:63;10112:1;:9;;10117:4;10112:9;;;10098:63;;;;;;;;;;;;;;;;;:13;:63::i;:::-;10193:5;;:38;;-1:-1:-1;;;10193:38:0;;10217:4;10193:38;;;2089:34:13;-1:-1:-1;;;;;2159:15:13;;;2139:18;;;2132:43;10171:137:0;;10193:5;;:15;;2001:18:13;;10193:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10245:10;10254:1;10245:6;:10;:::i;:::-;10171:137;;;;;;;;;;;;;;;;;:8;:137::i;:::-;9776:539;9669:646;;:::o;8216:978::-;8354:4;-1:-1:-1;;;;;8336:23:0;;;8328:32;;;;;;8388:10;-1:-1:-1;;;;;8378:20:0;;;8370:29;;;;;;8409:22;8434:5;;:27;;-1:-1:-1;;;8434:27:0;;8450:10;8434:27;;;996:74:13;-1:-1:-1;;;;;8434:5:0;;;;:15;;969:18:13;;8434:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8471:24;8498:5;;:23;;-1:-1:-1;;;8498:23:0;;-1:-1:-1;;;;;1014:55:13;;;8498:23:0;;;996:74:13;8409:52:0;;-1:-1:-1;8471:24:0;;8498:5;;:15;;969:18:13;;8498:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8531:17;8551:5;;:42;;-1:-1:-1;;;8551:42:0;;8567:10;8551:42;;;2089:34:13;8587:4:0;2139:18:13;;;2132:43;8471:50:0;;-1:-1:-1;8531:17:0;;-1:-1:-1;;;;;8551:5:0;;;;:15;;2001:18:13;;8551:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8531:62;;8628:1;8611:14;:18;:48;;;;;8645:14;8633:9;:26;8611:48;8603:57;;;;;;8670:22;8696:23;8705:14;8696:6;:23;:::i;:::-;8695:29;;8723:1;8695:29;:::i;:::-;8735:6;8744:5;;:54;;-1:-1:-1;;;8744:54:0;;8763:10;8744:54;;;3085:34:13;-1:-1:-1;;;;;3155:15:13;;;3135:18;;;3128:43;3187:18;;;3180:34;;;8670:54:0;;-1:-1:-1;8735:6:0;;8744:5;;:18;;2997::13;;8744:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8735:63;;8808:43;8822:1;:9;;8827:4;8822:9;;;8808:43;;;;;;;;;;;;;-1:-1:-1;;;8808:43:0;;;:13;:43::i;:::-;8883:5;;:27;;-1:-1:-1;;;8883:27:0;;8899:10;8883:27;;;996:74:13;8861:159:0;;-1:-1:-1;;;;;8883:5:0;;:15;;969:18:13;;8883:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8924:31;8941:14;8924;:31;:::i;:::-;8861:159;;;;;;;;;;;;;;;;;:8;:159::i;:::-;9052:5;;:23;;-1:-1:-1;;;9052:23:0;;-1:-1:-1;;;;;1014:55:13;;;9052:23:0;;;996:74:13;9030:157:0;;9052:5;;:15;;969:18:13;;9052:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9089:33;9108:14;9089:16;:33;:::i;:::-;9030:157;;;;;;;;;;;;;;;;;:8;:157::i;:::-;8318:876;;;;;8216:978;;:::o;2009:604::-;2109:22;2134:5;;:27;;-1:-1:-1;;;2134:27:0;;2150:10;2134:27;;;996:74:13;-1:-1:-1;;;;;2134:5:0;;;;:15;;969:18:13;;2134:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2171:17;2191:5;;:42;;-1:-1:-1;;;2191:42:0;;2207:10;2191:42;;;2089:34:13;2227:4:0;2139:18:13;;;2132:43;2109:52:0;;-1:-1:-1;2171:17:0;;-1:-1:-1;;;;;2191:5:0;;;;:15;;2001:18:13;;2191:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2171:62;;2268:1;2251:14;:18;:35;;;;;2285:1;2273:9;:13;2251:35;2243:44;;;;;;2297:16;2334:9;2316:14;:27;;:80;;2382:14;2316:80;;;2358:9;2316:80;2407:6;2416:5;;2297:99;;-1:-1:-1;2407:6:0;-1:-1:-1;;;;;2416:5:0;:18;2448:10;2407:6;2505:12;2297:99;2416:5;2505:12;:::i;:::-;2496:22;;:5;:22;:::i;:::-;2416:112;;-1:-1:-1;;;;;;2416:112:0;;;;;;;-1:-1:-1;;;;;3103:15:13;;;2416:112:0;;;3085:34:13;3155:15;;;;3135:18;;;3128:43;3187:18;;;3180:34;2997:18;;2416:112:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2407:121;;2538:68;2552:1;:10;;2557:5;2552:10;;;2538:68;;;;;;;;;;;;;;;;;:13;:68::i;:::-;2099:514;;;;2009:604;:::o;349:252::-;428:5;;;;;;;;-1:-1:-1;;;;;428:5:0;-1:-1:-1;;;;;428:26:0;;:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;427:29;419:38;;;;;;467:127;489:5;;;;;;;;-1:-1:-1;;;;;489:5:0;-1:-1:-1;;;;;489:19:0;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;524:5;;;;;;;;-1:-1:-1;;;;;524:5:0;-1:-1:-1;;;;;524:17:0;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;467:127;;;;;;;;;;;;;;;;;:8;:127::i;9245:373::-;9357:6;9366:5;;:29;;-1:-1:-1;;;9366:29:0;;-1:-1:-1;;;;;1462:55:13;;;9366:29:0;;;1444:74:13;1534:18;;;1527:34;;;9366:5:0;;;;:13;;1417:18:13;;9366:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9357:38;;9405:63;9419:1;:9;;9424:4;9419:9;;;9405:63;;;;;;;;;;;;;;;;;:13;:63::i;:::-;9500:5;;:38;;-1:-1:-1;;;9500:38:0;;9524:4;9500:38;;;2089:34:13;-1:-1:-1;;;;;2159:15:13;;;2139:18;;;2132:43;9478:133:0;;9500:5;;:15;;2001:18:13;;9500:38:0;1854:327:13;4953:763:0;5038:22;5063:5;;:30;;-1:-1:-1;;;5063:30:0;;5087:4;5063:30;;;996:74:13;-1:-1:-1;;;;;5063:5:0;;;;:15;;969:18:13;;5063:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5103:24;5130:5;;:23;;-1:-1:-1;;;5130:23:0;;-1:-1:-1;;;;;1014:55:13;;;5130:23:0;;;996:74:13;5038:55:0;;-1:-1:-1;5103:24:0;;5130:5;;:15;;969:18:13;;5130:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5103:50;;5188:1;5171:14;:18;5163:27;;;;;;5201:6;5210:5;;-1:-1:-1;;;;;5210:5:0;:14;5225:6;5233:18;:14;5210:5;5233:18;:::i;:::-;5210:42;;-1:-1:-1;;;;;;5210:42:0;;;;;;;-1:-1:-1;;;;;1462:55:13;;;5210:42:0;;;1444:74:13;1534:18;;;1527:34;1417:18;;5210:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5201:51;;5262:112;5289:1;:10;;5294:5;5289:10;;;5262:112;;;;;;;;;;;;;;;;;:13;:112::i;:::-;5406:5;;:30;;-1:-1:-1;;;5406:30:0;;5430:4;5406:30;;;996:74:13;5384:160:0;;-1:-1:-1;;;;;5406:5:0;;:15;;969:18:13;;5406:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5450:14;5384:160;;;;;;;;;;;;;;;;;:8;:160::i;:::-;5576:5;;:23;;-1:-1:-1;;;5576:23:0;;-1:-1:-1;;;;;1014:55:13;;;5576:23:0;;;996:74:13;5554:155:0;;5576:5;;:15;;969:18:13;;5576:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5613:16;5554:155;;;;;;;;;;;;;;;;;:8;:155::i;:::-;5028:688;;;4953:763;:::o;1665:283::-;1734:15;1752:5;;:30;;-1:-1:-1;;;1752:30:0;;1776:4;1752:30;;;996:74:13;-1:-1:-1;;;;;1752:5:0;;;;:15;;969:18:13;;1752:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1734:48;;1810:1;1800:7;:11;1792:20;;;;;;1823:6;1832:5;;:35;;-1:-1:-1;;;1832:35:0;;;;;1444:74:13;;;1534:18;;;1527:34;;;-1:-1:-1;;;;;1832:5:0;;;;:14;;1417:18:13;;1832:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1823:44;;1877:64;1891:1;:10;;1896:5;1891:10;;;1877:64;;;;;;;;;;;;;;;;;:13;:64::i;:::-;1724:224;;1665:283::o;3971:905::-;4074:22;4099:5;;:27;;-1:-1:-1;;;4099:27:0;;4115:10;4099:27;;;996:74:13;-1:-1:-1;;;;;4099:5:0;;;;:15;;969:18:13;;4099:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4136:24;4163:5;;:23;;-1:-1:-1;;;4163:23:0;;-1:-1:-1;;;;;1014:55:13;;;4163:23:0;;;996:74:13;4074:52:0;;-1:-1:-1;4136:24:0;;4163:5;;:15;;969:18:13;;4163:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4196:17;4216:5;;:42;;-1:-1:-1;;;4216:42:0;;4232:10;4216:42;;;2089:34:13;4252:4:0;2139:18:13;;;2132:43;4136:50:0;;-1:-1:-1;4196:17:0;;-1:-1:-1;;;;;4216:5:0;;;;:15;;2001:18:13;;4216:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4196:62;;4293:1;4276:14;:18;:48;;;;;4310:14;4298:9;:26;4276:48;4268:57;;;;;;4336:6;4345:5;;-1:-1:-1;;;;;4345:5:0;:18;4364:10;4376:6;4384:18;:14;4345:5;4384:18;:::i;:::-;4345:58;;-1:-1:-1;;;;;;4345:58:0;;;;;;;-1:-1:-1;;;;;3103:15:13;;;4345:58:0;;;3085:34:13;3155:15;;;;3135:18;;;3128:43;3187:18;;;3180:34;2997:18;;4345:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4336:67;;4413:116;4440:1;:10;;4445:5;4440:10;;;4413:116;;;;;;;;;;;;;;;;;:13;:116::i;:::-;4561:5;;:27;;-1:-1:-1;;;4561:27:0;;4577:10;4561:27;;;996:74:13;4539:161:0;;-1:-1:-1;;;;;4561:5:0;;:15;;969:18:13;;4561:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4602:14;4539:161;;;;;;;;;;;;;;;;;:8;:161::i;:::-;4732:5;;:23;;-1:-1:-1;;;4732:23:0;;-1:-1:-1;;;;;1014:55:13;;;4732:23:0;;;996:74:13;4710:159:0;;4732:5;;:15;;969:18:13;;4732:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4769:16;4710:159;;;;;;;;;;;;;;;;;:8;:159::i;1403:201::-;1491:5;;;:27;;-1:-1:-1;;;1491:27:0;;;;;996:74:13;;;;1469:128:0;;-1:-1:-1;;;;;1491:5:0;;;;:15;;969:18:13;;1491:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1532:1;1469:128;;;;;;;;;;;;;;;;;:8;:128::i;7343:815::-;7477:4;-1:-1:-1;;;;;7459:23:0;;;7451:32;;;;;;7493:22;7518:5;;:30;;-1:-1:-1;;;7518:30:0;;7542:4;7518:30;;;996:74:13;-1:-1:-1;;;;;7518:5:0;;;;:15;;969:18:13;;7518:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7558:24;7585:5;;:23;;-1:-1:-1;;;7585:23:0;;-1:-1:-1;;;;;1014:55:13;;;7585:23:0;;;996:74:13;7493:55:0;;-1:-1:-1;7558:24:0;;7585:5;;:15;;969:18:13;;7585:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7558:50;;7643:1;7626:14;:18;7618:27;;;;;;7655:22;7681:23;7690:14;7681:6;:23;:::i;:::-;7680:29;;7708:1;7680:29;:::i;:::-;7720:6;7729:5;;:38;;-1:-1:-1;;;7729:38:0;;-1:-1:-1;;;;;1462:55:13;;;7729:38:0;;;1444:74:13;1534:18;;;1527:34;;;7655:54:0;;-1:-1:-1;7720:6:0;;7729:5;;:14;;1417:18:13;;7729:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7720:47;;7777:43;7791:1;:9;;7796:4;7791:9;;;7777:43;;;;;;;;;;;;;-1:-1:-1;;;7777:43:0;;;:13;:43::i;:::-;7852:5;;:30;;-1:-1:-1;;;7852:30:0;;7876:4;7852:30;;;996:74:13;7830:158:0;;-1:-1:-1;;;;;7852:5:0;;:15;;969:18:13;;7852:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7896:31;7913:14;7896;:31;:::i;:::-;7830:158;;;;;;;;;;;;;;;;;:8;:158::i;:::-;8020:5;;:23;;-1:-1:-1;;;8020:23:0;;-1:-1:-1;;;;;1014:55:13;;;8020:23:0;;;996:74:13;7998:153:0;;8020:5;;:15;;969:18:13;;8020:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8057:33;8076:14;8057:16;:33;:::i;:::-;7998:153;;;;;;;;;;;;;;;;;:8;:153::i;:::-;7441:717;;;;7343:815;;:::o;3438:456::-;3511:22;3536:5;;:30;;-1:-1:-1;;;3536:30:0;;3560:4;3536:30;;;996:74:13;-1:-1:-1;;;;;3536:5:0;;;;:15;;969:18:13;;3536:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3511:55;;3601:1;3584:14;:18;3576:27;;;;;;3614:6;3623:5;;-1:-1:-1;;;;;3623:5:0;:14;3646:4;3662:18;:14;3623:5;3662:18;:::i;:::-;3653:28;;:5;:28;:::i;:::-;3623:59;;-1:-1:-1;;;;;;3623:59:0;;;;;;;-1:-1:-1;;;;;1462:55:13;;;3623:59:0;;;1444:74:13;1534:18;;;1527:34;1417:18;;3623:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3614:68;;3692:48;3706:1;:9;;3711:4;3706:9;;;3692:48;;;;;;;;;;;;;;;;;:13;:48::i;:::-;3800:5;;:30;;-1:-1:-1;;;3800:30:0;;3824:4;3800:30;;;996:74:13;3750:137:0;;3772:14;;-1:-1:-1;;;;;3800:5:0;;;;:15;;969:18:13;;3800:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3750:137;;;;;;;;;;;;;;;;;:8;:137::i;950:402::-;1029:19;1170:5;;:22;;-1:-1:-1;;;1170:22:0;;230:7:4;1170:22:0;;;996:74:13;-1:-1:-1;;;;;1170:5:0;;;;:15;;969:18:13;;1170:22:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1133:5;;:22;;-1:-1:-1;;;1133:22:0;;183:7:4;1133:22:0;;;996:74:13;-1:-1:-1;;;;;1133:5:0;;;;:15;;969:18:13;;1133:22:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1096:5;;:22;;-1:-1:-1;;;1096:22:0;;136:7:4;1096:22:0;;;996:74:13;-1:-1:-1;;;;;1096:5:0;;;;:15;;969:18:13;;1096:22:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1051:5;;:30;;-1:-1:-1;;;1051:30:0;;1075:4;1051:30;;;996:74:13;-1:-1:-1;;;;;1051:5:0;;;;:15;;969:18:13;;1051:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:67;;;;:::i;:::-;:104;;;;:::i;:::-;:141;;;;:::i;:::-;1029:163;;1202:143;1225:11;1250:5;;;;;;;;-1:-1:-1;;;;;1250:5:0;-1:-1:-1;;;;;1250:17:0;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1202:143;;;;;;;;;;;;;;;;;:9;:143::i;:::-;1019:333;950:402::o;6506:779::-;6590:22;6615:5;;:27;;-1:-1:-1;;;6615:27:0;;6631:10;6615:27;;;996:74:13;-1:-1:-1;;;;;6615:5:0;;;;:15;;969:18:13;;6615:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6652:24;6679:5;;:23;;-1:-1:-1;;;6679:23:0;;-1:-1:-1;;;;;1014:55:13;;;6679:23:0;;;996:74:13;6590:52:0;;-1:-1:-1;6652:24:0;;6679:5;;:15;;969:18:13;;6679:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6712:17;6732:5;;:42;;-1:-1:-1;;;6732:42:0;;6748:10;6732:42;;;2089:34:13;6768:4:0;2139:18:13;;;2132:43;6652:50:0;;-1:-1:-1;6712:17:0;;-1:-1:-1;;;;;6732:5:0;;;;:15;;2001:18:13;;6732:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6712:62;;6809:1;6792:14;:18;:35;;;;;6826:1;6814:9;:13;6792:35;6784:44;;;;;;6839:6;6848:5;;:41;;-1:-1:-1;;;6848:41:0;;6867:10;6848:41;;;3085:34:13;-1:-1:-1;;;;;3155:15:13;;;3135:18;;;3128:43;3187:18;;;3180:34;;;6848:5:0;;;;:18;;2997::13;;6848:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6839:50;;6899:59;6913:1;:9;;6918:4;6913:9;;;6899:59;;;;;;;;;;;;;;;;;:13;:59::i;:::-;6990:5;;:27;;-1:-1:-1;;;6990:27:0;;7006:10;6990:27;;;996:74:13;6968:151:0;;-1:-1:-1;;;;;6990:5:0;;:15;;969:18:13;;6990:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7031:14;6968:151;;;;;;;;;;;;;;;;;:8;:151::i;:::-;7151:5;;:23;;-1:-1:-1;;;7151:23:0;;-1:-1:-1;;;;;1014:55:13;;;7151:23:0;;;996:74:13;7129:149:0;;7151:5;;:15;;969:18:13;;7151:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7188:16;7129:149;;;;;;;;;;;;;;;;;:8;:149::i;5779:664::-;5859:22;5884:5;;:30;;-1:-1:-1;;;5884:30:0;;5908:4;5884:30;;;996:74:13;-1:-1:-1;;;;;5884:5:0;;;;:15;;969:18:13;;5884:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5924:24;5951:5;;:23;;-1:-1:-1;;;5951:23:0;;-1:-1:-1;;;;;1014:55:13;;;5951:23:0;;;996:74:13;5859:55:0;;-1:-1:-1;5924:24:0;;5951:5;;:15;;969:18:13;;5951:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5924:50;;6009:1;5992:14;:18;5984:27;;;;;;6022:6;6031:5;;:25;;-1:-1:-1;;;6031:25:0;;-1:-1:-1;;;;;1462:55:13;;;6031:25:0;;;1444:74:13;1534:18;;;1527:34;;;6031:5:0;;;;:14;;1417:18:13;;6031:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6022:34;;6066:55;6080:1;:9;;6085:4;6080:9;;;6066:55;;;;;;;;;;;;;;;;;:13;:55::i;:::-;6153:5;;:30;;-1:-1:-1;;;6153:30:0;;6177:4;6153:30;;;996:74:13;6131:150:0;;-1:-1:-1;;;;;6153:5:0;;:15;;969:18:13;;6153:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6197:14;6131:150;;;;;;;;;;;;;;;;;:8;:150::i;:::-;6313:5;;:23;;-1:-1:-1;;;6313:23:0;;-1:-1:-1;;;;;1014:55:13;;;6313:23:0;;;996:74:13;6291:145:0;;6313:5;;:15;;969:18:13;;6313:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6350:16;6291:145;;;;;;;;;;;;;;;;;:8;:145::i;10367:1007::-;-1:-1:-1;;;;;10502:23:0;;10520:4;10502:23;;;;:47;;-1:-1:-1;;;;;;10529:20:0;;;;10502:47;10494:56;;;;;;10578:10;-1:-1:-1;;;;;10568:20:0;;;10560:29;;;;;;10599:22;10624:5;;:27;;-1:-1:-1;;;10624:27:0;;10640:10;10624:27;;;996:74:13;-1:-1:-1;;;;;10624:5:0;;;;:15;;969:18:13;;10624:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10661:25;10689:5;;:42;;-1:-1:-1;;;10689:42:0;;10705:10;10689:42;;;2089:34:13;10725:4:0;2139:18:13;;;2132:43;10599:52:0;;-1:-1:-1;10661:25:0;;-1:-1:-1;;;;;10689:5:0;;;;:15;;2001:18:13;;10689:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10661:70;;10766:1;10749:14;:18;:56;;;;;10791:14;10771:17;:34;10749:56;10741:65;;;;;;10816:22;10842:23;10851:14;10842:6;:23;:::i;:::-;10841:29;;10869:1;10841:29;:::i;:::-;10881:6;10890:5;;:54;;-1:-1:-1;;;10890:54:0;;10909:10;10890:54;;;3085:34:13;-1:-1:-1;;;;;3155:15:13;;;3135:18;;;3128:43;3187:18;;;3180:34;;;10816:54:0;;-1:-1:-1;10881:6:0;;10890:5;;:18;;2997::13;;10890:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10881:63;;10954:47;10968:1;:9;;10973:4;10968:9;;;10954:47;;;;;;;;;;;;;;;;;:13;:47::i;:::-;-1:-1:-1;;11118:17:0;:38;11114:254;;11198:5;;:42;;-1:-1:-1;;;11198:42:0;;11214:10;11198:42;;;2089:34:13;11234:4:0;2139:18:13;;;2132:43;11172:185:0;;-1:-1:-1;;;;;11198:5:0;;:15;;2001:18:13;;11198:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;11258:34;11278:14;11258:17;:34;:::i;:::-;11172:185;;;;;;;;;;;;;;;;;:8;:185::i;2669:713::-;2746:22;2771:5;;:27;;-1:-1:-1;;;2771:27:0;;2787:10;2771:27;;;996:74:13;-1:-1:-1;;;;;2771:5:0;;;;:15;;969:18:13;;2771:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2808:17;2828:5;;:42;;-1:-1:-1;;;2828:42:0;;2844:10;2828:42;;;2089:34:13;2864:4:0;2139:18:13;;;2132:43;2746:52:0;;-1:-1:-1;2808:17:0;;-1:-1:-1;;;;;2828:5:0;;;;:15;;2001:18:13;;2828:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2808:62;;2905:1;2888:14;:18;:35;;;;;2922:1;2910:9;:13;2888:35;2880:44;;;;;;2934:16;2971:9;2953:14;:27;;:80;;3019:14;2953:80;;;2995:9;2953:80;3044:6;3053:5;;2934:99;;-1:-1:-1;3044:6:0;-1:-1:-1;;;;;3053:5:0;:18;3085:10;;3142:12;2934:99;3053:5;3142:12;:::i;:::-;3133:22;;:5;:22;:::i;:::-;3053:112;;-1:-1:-1;;;;;;3053:112:0;;;;;;;-1:-1:-1;;;;;3103:15:13;;;3053:112:0;;;3085:34:13;3155:15;;;;3135:18;;;3128:43;3187:18;;;3180:34;2997:18;;3053:112:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3044:121;;3175:52;3189:1;:9;;3194:4;3189:9;;;3175:52;;;;;;;;;;;;;;;;;:13;:52::i;:::-;3287:5;;:27;;-1:-1:-1;;;3287:27:0;;3303:10;3287:27;;;996:74:13;3237:138:0;;3259:14;;-1:-1:-1;;;;;3287:5:0;;;;:15;;969:18:13;;3287:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3237:138;;;;;;;;;;;;;;;;;:8;:138::i;5569:548:5:-;5662:1;5657;:6;;5651:460;;5680:18;5701:31;5730:1;5701:28;:31::i;:::-;5680:52;;5746:18;5767:31;5796:1;5767:28;:31::i;:::-;5746:52;;5812:22;5900:4;5943;6002:6;5837:185;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;5812:210;;6041:32;6062:9;6041:32;;;;;;:::i;:::-;;;;;;;;6087:13;;:::i;401:161::-;478:1;473:83;;500:18;511:6;500:18;;;;;;:::i;:::-;;;;;;;;532:13;;:::i;650:537::-;740:1;735;:6;731:450;;757:18;778:31;807:1;778:28;:31::i;:::-;757:52;;823:18;844:31;873:1;844:28;:31::i;:::-;823:52;;889:22;977:4;1021;1073:6;914:179;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;889:204;;1112:31;1132:9;1112:31;;;;;;:::i;15380:2040::-;15436:17;15908:3;15901:4;15895:11;15891:21;16017:20;16011:4;16004:34;16161:2;16139:20;16135:29;16128:36;;;16262:1;16257:3;16250:14;16363:3;16597:5;16579:477;16700:1;16695:3;16691:11;16684:18;;16869:2;16863:4;16859:13;16855:2;16851:22;16846:3;16838:36;16960:2;16950:13;;17017:25;16579:477;17017:25;-1:-1:-1;17155:13:5;;;-1:-1:-1;;17269:12:5;;;17385:19;;;17269:12;15380:2040;-1:-1:-1;15380:2040:5:o;14:196:13:-;82:20;;-1:-1:-1;;;;;131:54:13;;121:65;;111:93;;200:1;197;190:12;111:93;14:196;;;:::o;215:254::-;283:6;291;344:2;332:9;323:7;319:23;315:32;312:52;;;360:1;357;350:12;312:52;383:29;402:9;383:29;:::i;:::-;373:39;459:2;444:18;;;;431:32;;-1:-1:-1;;;215:254:13:o;474:180::-;533:6;586:2;574:9;565:7;561:23;557:32;554:52;;;602:1;599;592:12;554:52;-1:-1:-1;625:23:13;;474:180;-1:-1:-1;474:180:13:o;659:186::-;718:6;771:2;759:9;750:7;746:23;742:32;739:52;;;787:1;784;777:12;739:52;810:29;829:9;810:29;:::i;:::-;800:39;659:186;-1:-1:-1;;;659:186:13:o;1081:184::-;1151:6;1204:2;1192:9;1183:7;1179:23;1175:32;1172:52;;;1220:1;1217;1210:12;1172:52;-1:-1:-1;1243:16:13;;1081:184;-1:-1:-1;1081:184:13:o;1572:277::-;1639:6;1692:2;1680:9;1671:7;1667:23;1663:32;1660:52;;;1708:1;1705;1698:12;1660:52;1740:9;1734:16;1793:5;1786:13;1779:21;1772:5;1769:32;1759:60;;1815:1;1812;1805:12;2186:127;2247:10;2242:3;2238:20;2235:1;2228:31;2278:4;2275:1;2268:15;2302:4;2299:1;2292:15;2318:127;2379:10;2374:3;2370:20;2367:1;2360:31;2410:4;2407:1;2400:15;2434:4;2431:1;2424:15;2450:120;2490:1;2516;2506:35;;2521:18;;:::i;:::-;-1:-1:-1;2555:9:13;;2450:120::o;2575:112::-;2607:1;2633;2623:35;;2638:18;;:::i;:::-;-1:-1:-1;2672:9:13;;2575:112::o;2692:125::-;2757:9;;;2778:10;;;2775:36;;;2791:18;;:::i;:::-;2692:125;;;;:::o;3225:128::-;3292:9;;;3313:11;;;3310:37;;;3327:18;;:::i;4079:250::-;4164:1;4174:113;4188:6;4185:1;4182:13;4174:113;;;4264:11;;;4258:18;4245:11;;;4238:39;4210:2;4203:10;4174:113;;;-1:-1:-1;;4321:1:13;4303:16;;4296:27;4079:250::o;4334:1137::-;-1:-1:-1;;;4889:3:13;4882:24;4864:3;4935:6;4929:13;4951:74;5018:6;5014:1;5009:3;5005:11;4998:4;4990:6;4986:17;4951:74;:::i;:::-;-1:-1:-1;;;5084:1:13;5044:16;;;5076:10;;;5069:23;5117:13;;5139:76;5117:13;5201:2;5193:11;;5186:4;5174:17;;5139:76;:::i;:::-;5280:19;5275:2;5234:17;;;;5267:11;;;5260:40;5325:13;;5347:76;5325:13;5409:2;5401:11;;5394:4;5382:17;;5347:76;:::i;:::-;5443:17;5462:2;5439:26;;4334:1137;-1:-1:-1;;;;;4334:1137:13:o;5476:396::-;5625:2;5614:9;5607:21;5588:4;5657:6;5651:13;5700:6;5695:2;5684:9;5680:18;5673:34;5716:79;5788:6;5783:2;5772:9;5768:18;5763:2;5755:6;5751:15;5716:79;:::i;:::-;5856:2;5835:15;-1:-1:-1;;5831:29:13;5816:45;;;;5863:2;5812:54;;5476:396;-1:-1:-1;;5476:396:13:o;5877:127::-;5938:10;5933:3;5929:20;5926:1;5919:31;5969:4;5966:1;5959:15;5993:4;5990:1;5983:15;6009:1131;-1:-1:-1;;;6564:3:13;6557:24;6539:3;6610:6;6604:13;6626:74;6693:6;6689:1;6684:3;6680:11;6673:4;6665:6;6661:17;6626:74;:::i;:::-;-1:-1:-1;;;6759:1:13;6719:16;;;6751:10;;;6744:24;6793:13;;6815:76;6793:13;6877:2;6869:11;;6862:4;6850:17;;6815:76;:::i;:::-;-1:-1:-1;;;6951:2:13;6910:17;;;;6943:11;;;6936:33;6994:13;;7016:76;6994:13;7078:2;7070:11;;7063:4;7051:17;;7016:76;:::i;:::-;7112:17;7131:2;7108:26;;6009:1131;-1:-1:-1;;;;;6009:1131:13:o", "abi": "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertEqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertGteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLtFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertLteFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"AssertNeqFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"LogAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"LogString\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"LogUint256\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"fuzz_decreaseApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fuzz_increaseApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_constantSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_selfTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_selfTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_setAllowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_setAllowanceTwice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_spendAllowanceAfterTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferFromMoreThanBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"test_ERC20external_transferFromToZeroAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferFromZeroAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferMoreThanBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_transferToZeroAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"test_ERC20external_transferZeroAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_userBalanceNotHigherThanSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_userBalancesLessThanTotalSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"test_ERC20external_zeroAddressBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "608060405234801562000010575f80fd5b506040516200001f906200005f565b604051809103905ff08015801562000039573d5f803e3d5ffd5b505f80546001600160a01b0319166001600160a01b03929092169190911790556200006d565b610c37806200306183390190565b612fe6806200007b5f395ff3fe608060405234801561000f575f80fd5b506004361061011b575f3560e01c80639ece0e86116100a9578063cdbebc511161006e578063cdbebc51146101e1578063ecb9d4aa146101f4578063ee5f3aeb14610207578063f16dcaa614610127578063fd8593f91461021a575f80fd5b80639ece0e86146101ab578063a0662c50146101b3578063aa2c209e14610127578063be61b745146101c6578063c2698205146101d9575f80fd5b806331261479116100ef57806331261479146101625780635d1dfde01461016a5780636706ede01461017d5780636eee9ce4146101905780638c18671814610198575f80fd5b806269650b1461011f57806301b0710a146101295780632adaa1c91461013c5780632edf61871461014f575b5f80fd5b61012761022d565b005b61012761013736600461298e565b61032a565b61012761014a36600461298e565b6105ea565b61012761015d3660046129b6565b610977565b610127610b51565b61012761017836600461298e565b610cf0565b61012761018b3660046129cd565b610dc8565b61012761107d565b6101276101a63660046129cd565b611195565b6101276114ce565b6101276101c136600461298e565b61155d565b6101276101d43660046129b6565b61184f565b610127611a4b565b6101276101ef3660046129cd565b611cb0565b6101276102023660046129cd565b611fee565b61012761021536600461298e565b6122a6565b6101276102283660046129b6565b612573565b5f546040516370a0823160e01b8152336004820152610328916001600160a01b0316906370a0823190602401602060405180830381865afa158015610274573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061029891906129ed565b5f8054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102e6573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061030a91906129ed565b604051806060016040528060258152602001612f8c602591396127f1565b565b5f805460405163095ea7b360e01b81526001600160a01b038581166004830152602482018590529091169063095ea7b3906044016020604051808303815f875af115801561037a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061039e9190612a04565b90506103c98115156001151514604051806060016040528060238152602001612deb60239139612877565b5f54604051636eb1769f60e11b81523060048201526001600160a01b03858116602483015261047992169063dd62ed3e906044015b602060405180830381865afa158015610419573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043d91906129ed565b836040518060400160405280601b81526020017f416c6c6f77616e6365206e6f742073657420636f72726563746c7900000000008152506128bb565b5f546001600160a01b031663095ea7b384610495600286612a4b565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af11580156104dd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105019190612a04565b905061052c8115156001151514604051806060016040528060238152602001612deb60239139612877565b5f54604051636eb1769f60e11b81523060048201526001600160a01b0385811660248301526105e592169063dd62ed3e90604401602060405180830381865afa15801561057b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061059f91906129ed565b6105aa600285612a4b565b6040518060400160405280601b81526020017f416c6c6f77616e6365206e6f742073657420636f72726563746c7900000000008152506128bb565b505050565b306001600160a01b038316036105fe575f80fd5b336001600160a01b03831603610612575f80fd5b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610658573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061067c91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038781166004830152939450919216906370a0823190602401602060405180830381865afa1580156106c7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106eb91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa15801561073c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061076091906129ed565b905060028311801561077157508281115b610779575f80fd5b5f6107848486612a5e565b61078f906001612a71565b5f80546040516323b872dd60e01b81523360048201526001600160a01b038a8116602483015260448201859052939450919216906323b872dd906064016020604051808303815f875af11580156107e8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061080c9190612a04565b905061084681151560011515146040518060400160405280600f81526020016e1d1c985b9cd9995c8819985a5b1959608a1b815250612877565b5f546040516370a0823160e01b81523360048201526108d9916001600160a01b0316906370a0823190602401602060405180830381865afa15801561088d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b191906129ed565b6108bb8488612a8a565b604051806060016040528060278152602001612f1f602791396128bb565b5f546040516370a0823160e01b81526001600160a01b03898116600483015261096e9216906370a0823190602401602060405180830381865afa158015610922573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061094691906129ed565b6109508487612a71565b604051806060016040528060278152602001612ef8602791396128bb565b50505050505050565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156109bd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109e191906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa158015610a32573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a5691906129ed565b90505f82118015610a6657505f81115b610a6e575f80fd5b5f81831015610a7d5782610a7f565b815b5f8054919250906001600160a01b03166323b872dd3383610aa1866001612a71565b610aab908a612a5e565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af1158015610afc573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b209190612a04565b9050610b4a8115155f151514604051806060016040528060278152602001612ea160279139612877565b5050505050565b5f8054906101000a90046001600160a01b03166001600160a01b031663ab789fa36040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610ba0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bc49190612a04565b15610bcd575f80fd5b6103285f8054906101000a90046001600160a01b03166001600160a01b031663378dc3dc6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610c1f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c4391906129ed565b5f8054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c91573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cb591906129ed565b6040518060400160405280601981526020017f546f6b656e20737570706c7920776173206d6f646966696564000000000000008152506128bb565b5f805460405163095ea7b360e01b81526001600160a01b038581166004830152602482018590529091169063095ea7b3906044016020604051808303815f875af1158015610d40573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d649190612a04565b9050610d8f8115156001151514604051806060016040528060238152602001612deb60239139612877565b5f54604051636eb1769f60e11b81523060048201526001600160a01b0385811660248301526105e592169063dd62ed3e906044016103fe565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610e0e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e3291906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa158015610e7d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ea191906129ed565b90505f8211610eae575f80fd5b5f80546001600160a01b031663a9059cbb85610ecb866001612a71565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015610f13573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f379190612a04565b9050610f618115155f151514604051806060016040528060318152602001612d0160319139612877565b5f546040516370a0823160e01b8152306004820152610feb916001600160a01b0316906370a0823190602401602060405180830381865afa158015610fa8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fcc91906129ed565b84604051806060016040528060368152602001612e0e603691396128bb565b5f546040516370a0823160e01b81526001600160a01b0386811660048301526110779216906370a0823190602401602060405180830381865afa158015611034573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061105891906129ed565b83604051806060016040528060368152602001612c12603691396128bb565b50505050565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156110c3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110e791906129ed565b90505f81116110f4575f80fd5b5f805460405163a9059cbb60e01b815260048101839052602481018490526001600160a01b039091169063a9059cbb906044016020604051808303815f875af1158015611143573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111679190612a04565b90506111918115155f151514604051806060016040528060238152602001612e4460239139612877565b5050565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156111db573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111ff91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa15801561124a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061126e91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa1580156112bf573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112e391906129ed565b90505f831180156112f357508281115b6112fb575f80fd5b5f80546001600160a01b03166323b872dd3387611319886001612a71565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af115801561136a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061138e9190612a04565b90506113b88115155f151514604051806060016040528060358152602001612c7460359139612877565b5f546040516370a0823160e01b8152336004820152611442916001600160a01b0316906370a0823190602401602060405180830381865afa1580156113ff573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061142391906129ed565b856040518060600160405280603a8152602001612e67603a91396128bb565b5f546040516370a0823160e01b81526001600160a01b038781166004830152610b4a9216906370a0823190602401602060405180830381865afa15801561148b573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114af91906129ed565b846040518060600160405280603a8152602001612d8e603a91396128bb565b5f80546040516370a0823160e01b81526004810192909252610328916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561151a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061153e91906129ed565b5f604051806060016040528060268152602001612cdb602691396128bb565b306001600160a01b03831603611571575f80fd5b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156115b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115db91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038781166004830152939450919216906370a0823190602401602060405180830381865afa158015611626573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061164a91906129ed565b905060028211611658575f80fd5b5f6116638385612a5e565b61166e906001612a71565b5f805460405163a9059cbb60e01b81526001600160a01b038981166004830152602482018590529394509192169063a9059cbb906044016020604051808303815f875af11580156116c1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116e59190612a04565b905061171f81151560011515146040518060400160405280600f81526020016e1d1c985b9cd9995c8819985a5b1959608a1b815250612877565b5f546040516370a0823160e01b81523060048201526117b2916001600160a01b0316906370a0823190602401602060405180830381865afa158015611766573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061178a91906129ed565b6117948487612a8a565b604051806060016040528060238152602001612dc8602391396128bb565b5f546040516370a0823160e01b81526001600160a01b0388811660048301526118479216906370a0823190602401602060405180830381865afa1580156117fb573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061181f91906129ed565b6118298486612a71565b604051806060016040528060238152602001612f46602391396128bb565b505050505050565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611895573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118b991906129ed565b90505f81116118c6575f80fd5b5f80546001600160a01b031663a9059cbb306118e3856001612a71565b6118ed9087612a5e565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015611935573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119599190612a04565b90506119a181151560011515146040518060400160405280601481526020017f4661696c65642073656c66207472616e73666572000000000000000000000000815250612877565b5f546040516370a0823160e01b81523060048201526105e59184916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156119ec573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a1091906129ed565b6040518060400160405280601f81526020017f53656c66207472616e7366657220627265616b73206163636f756e74696e67008152506128bb565b5f80546040516370a0823160e01b81526203000060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611a94573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ab891906129ed565b5f546040516370a0823160e01b81526202000060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611b00573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b2491906129ed565b5f546040516370a0823160e01b81526201000060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611b6c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b9091906129ed565b5f546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611bd5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bf991906129ed565b611c039190612a71565b611c0d9190612a71565b611c179190612a71565b9050611cad815f8054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c6b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c8f91906129ed565b604051806060016040528060328152602001612ca9603291396127f1565b50565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611cf6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d1a91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa158015611d65573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d8991906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa158015611dda573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dfe91906129ed565b90505f83118015611e0e57505f81115b611e16575f80fd5b5f80546040516323b872dd60e01b81523360048201526001600160a01b03878116602483015260448201849052909116906323b872dd906064016020604051808303815f875af1158015611e6c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e909190612a04565b9050611ed881151560011515146040518060400160405280601f81526020017f5a65726f20616d6f756e74207472616e7366657246726f6d206661696c656400815250612877565b5f546040516370a0823160e01b8152336004820152611f62916001600160a01b0316906370a0823190602401602060405180830381865afa158015611f1f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f4391906129ed565b85604051806060016040528060308152602001612d32603091396128bb565b5f546040516370a0823160e01b81526001600160a01b038781166004830152610b4a9216906370a0823190602401602060405180830381865afa158015611fab573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fcf91906129ed565b84604051806060016040528060308152602001612ec8603091396128bb565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612034573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061205891906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa1580156120a3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120c791906129ed565b90505f82116120d4575f80fd5b5f805460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018490529091169063a9059cbb906044016020604051808303815f875af1158015612124573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121489190612a04565b905061219081151560011515146040518060400160405280601b81526020017f5a65726f20616d6f756e74207472616e73666572206661696c65640000000000815250612877565b5f546040516370a0823160e01b815230600482015261221a916001600160a01b0316906370a0823190602401602060405180830381865afa1580156121d7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121fb91906129ed565b846040518060600160405280602c8152602001612d62602c91396128bb565b5f546040516370a0823160e01b81526001600160a01b0386811660048301526110779216906370a0823190602401602060405180830381865afa158015612263573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061228791906129ed565b836040518060600160405280602c8152602001612c48602c91396128bb565b6001600160a01b03821630148015906122c757506001600160a01b03821615155b6122cf575f80fd5b336001600160a01b038316036122e3575f80fd5b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612329573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234d91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa15801561239e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123c291906129ed565b90505f821180156123d257508181115b6123da575f80fd5b5f6123e58385612a5e565b6123f0906001612a71565b5f80546040516323b872dd60e01b81523360048201526001600160a01b03898116602483015260448201859052939450919216906323b872dd906064016020604051808303815f875af1158015612449573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061246d9190612a04565b90506124b581151560011515146040518060400160405280601381526020017f7472616e7366657246726f6d206661696c656400000000000000000000000000815250612877565b5f198314611847575f54604051636eb1769f60e11b8152336004820152306024820152611847916001600160a01b03169063dd62ed3e90604401602060405180830381865afa15801561250a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061252e91906129ed565b6125388486612a8a565b6040518060400160405280601f81526020017f416c6c6f77616e6365206e6f74207570646174656420636f72726563746c79008152506128bb565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156125b9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125dd91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa15801561262e573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061265291906129ed565b90505f8211801561266257505f81115b61266a575f80fd5b5f81831015612679578261267b565b815b5f8054919250906001600160a01b03166323b872dd338061269d866001612a71565b6126a7908a612a5e565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af11580156126f8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061271c9190612a04565b905061276481151560011515146040518060400160405280601881526020017f4661696c65642073656c66207472616e7366657246726f6d0000000000000000815250612877565b5f546040516370a0823160e01b8152336004820152610b4a9186916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156127af573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127d391906129ed565b604051806060016040528060238152602001612f69602391396128bb565b818311156105e5575f61280384612930565b90505f61280f84612930565b90505f82828560405160200161282793929190612abf565b60405160208183030381529060405290507f62bdda9a05cdbcdbf905cbad99c6ebdc098b6f0933d8f2eb3cfab7400b602514816040516128679190612b4e565b60405180910390a1611847612b80565b81611191577feb03ca8c87c7849bef8f54cfdd2c6b967b2734fe872f751978c34bb91e13d351816040516128ab9190612b4e565b60405180910390a1611191612b80565b8183146105e5575f6128cc84612930565b90505f6128d884612930565b90505f8282856040516020016128f093929190612b94565b60405160208183030381529060405290507f2d2d38c9a34df9887a6dcb2a54c1f79ff8bf9c4d4cafacd7d1f7277f57baab6f816040516128679190612b4e565b606060a06040510180604052602081039150505f815280825b600183039250600a81066030018353600a9004806129495750819003601f19909101908152919050565b80356001600160a01b0381168114612989575f80fd5b919050565b5f806040838503121561299f575f80fd5b6129a883612973565b946020939093013593505050565b5f602082840312156129c6575f80fd5b5035919050565b5f602082840312156129dd575f80fd5b6129e682612973565b9392505050565b5f602082840312156129fd575f80fd5b5051919050565b5f60208284031215612a14575f80fd5b815180151581146129e6575f80fd5b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f82612a5957612a59612a23565b500490565b5f82612a6c57612a6c612a23565b500690565b80820180821115612a8457612a84612a37565b92915050565b81810381811115612a8457612a84612a37565b5f5b83811015612ab7578181015183820152602001612a9f565b50505f910152565b68024b73b30b634b21d160bd1b81525f8451612ae2816009850160208901612a9d565b601f60f91b6009918401918201528451612b0381600a840160208901612a9d565b7f206661696c65642c20726561736f6e3a20000000000000000000000000000000600a92909101918201528351612b4181601b840160208801612a9d565b01601b0195945050505050565b602081525f8251806020840152612b6c816040850160208701612a9d565b601f01601f19169190910160400192915050565b634e487b7160e01b5f52600160045260245ffd5b68024b73b30b634b21d160bd1b81525f8451612bb7816009850160208901612a9d565b61213d60f01b6009918401918201528451612bd981600b840160208901612a9d565b69016103932b0b9b7b71d160b51b600b92909101918201528351612c04816015840160208801612a9d565b016015019594505050505056fe5472616e7366657220666f72206d6f7265207468616e2062616c616e6365206d6f646966696564207461726765742062616c616e63655a65726f20616d6f756e74207472616e73666572206d6f646966696564207461726765742062616c616e63655375636365737366756c207472616e7366657246726f6d20666f72206d6f7265207468616e206163636f756e742062616c616e636553756d206f6620757365722062616c616e636573206172652067726561746572207468616e20746f74616c20737570706c7941646472657373207a65726f2062616c616e6365206e6f7420657175616c20746f207a65726f5375636365737366756c207472616e7366657220666f72206d6f7265207468616e206163636f756e742062616c616e63655a65726f20616d6f756e74207472616e7366657246726f6d206d6f64696669656420736f757263652062616c616e63655a65726f20616d6f756e74207472616e73666572206d6f64696669656420736f757263652062616c616e63655472616e7366657246726f6d20666f72206d6f7265207468616e2062616c616e6365206d6f646966696564207461726765742062616c616e636557726f6e6720736f757263652062616c616e6365206166746572207472616e736665724661696c656420746f2073657420616c6c6f77616e63652076696120617070726f76655472616e7366657220666f72206d6f7265207468616e2062616c616e6365206d6f64696669656420736f757263652062616c616e63655375636365737366756c207472616e7366657220746f2061646472657373207a65726f5472616e7366657246726f6d20666f72206d6f7265207468616e2062616c616e6365206d6f64696669656420736f757263652062616c616e63655375636365737366756c207472616e7366657246726f6d20746f2061646472657373207a65726f5a65726f20616d6f756e74207472616e7366657246726f6d206d6f646966696564207461726765742062616c616e636557726f6e67207461726765742062616c616e6365206166746572207472616e7366657246726f6d57726f6e6720736f757263652062616c616e6365206166746572207472616e7366657246726f6d57726f6e67207461726765742062616c616e6365206166746572207472616e7366657253656c66207472616e7366657246726f6d20627265616b73206163636f756e74696e67557365722062616c616e636520686967686572207468616e20746f74616c20737570706c79a2646970667358221220b8b9df3ec01a97c95b52873c4caa1d11a083a5bc26d71ddba8ab30afc73abaa164736f6c63430008170033608060405234801562000010575f80fd5b506040518060400160405280601381526020017f42616c616e63657220506f6f6c20546f6b656e000000000000000000000000008152506040518060400160405280600381526020016210941560ea1b81525081600390816200007491906200030f565b5060046200008382826200030f565b505050620000a462010000683635c9adc5dea000006200010260201b60201c565b620000bc62020000683635c9adc5dea0000062000102565b620000d462030000683635c9adc5dea0000062000102565b620000e933683635c9adc5dea0000062000102565b6002546006556005805460ff1916600117905562000401565b6001600160a01b038216620001315760405163ec442f0560e01b81525f60048201526024015b60405180910390fd5b6200013e5f838362000142565b5050565b6001600160a01b03831662000170578060025f828254620001649190620003db565b90915550620001e29050565b6001600160a01b0383165f9081526020819052604090205481811015620001c45760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640162000128565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821662000200576002805482900390556200021e565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200026491815260200190565b60405180910390a3505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200029a57607f821691505b602082108103620002b957634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200030a57805f5260205f20601f840160051c81016020851015620002e65750805b601f840160051c820191505b8181101562000307575f8155600101620002f2565b50505b505050565b81516001600160401b038111156200032b576200032b62000271565b62000343816200033c845462000285565b84620002bf565b602080601f83116001811462000379575f8415620003615750858301515b5f19600386901b1c1916600185901b178555620003d3565b5f85815260208120601f198616915b82811015620003a95788860151825594840194600190910190840162000388565b5085821015620003c757878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b80820180821115620003fb57634e487b7160e01b5f52601160045260245ffd5b92915050565b610828806200040f5f395ff3fe608060405234801561000f575f80fd5b50600436106100da575f3560e01c80636618846311610088578063a9059cbb11610063578063a9059cbb1461019f578063ab789fa3146101b2578063d73dd623146101bf578063dd62ed3e146101d2575f80fd5b8063661884631461015c57806370a082311461016f57806395d89b4114610197575f80fd5b806323b872dd116100b857806323b872dd14610131578063313ce56714610144578063378dc3dc14610153575f80fd5b806306fdde03146100de578063095ea7b3146100fc57806318160ddd1461011f575b5f80fd5b6100e661020a565b6040516100f39190610667565b60405180910390f35b61010f61010a3660046106ce565b61029a565b60405190151581526020016100f3565b6002545b6040519081526020016100f3565b61010f61013f3660046106f6565b6102b3565b604051601281526020016100f3565b61012360065481565b61010f61016a3660046106ce565b6102d6565b61012361017d36600461072f565b6001600160a01b03165f9081526020819052604090205490565b6100e6610325565b61010f6101ad3660046106ce565b610334565b60055461010f9060ff1681565b61010f6101cd3660046106ce565b610341565b6101236101e036600461074f565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b60606003805461021990610780565b80601f016020809104026020016040519081016040528092919081815260200182805461024590610780565b80156102905780601f1061026757610100808354040283529160200191610290565b820191905f5260205f20905b81548152906001019060200180831161027357829003601f168201915b5050505050905090565b5f336102a7818585610380565b60019150505b92915050565b5f336102c0858285610392565b6102cb858585610412565b506001949350505050565b335f9081526001602090815260408083206001600160a01b0386168452909152812054808311156103115761030c33855f610380565b6102a7565b6102a7338561032086856107cc565b610380565b60606004805461021990610780565b5f336102a7818585610412565b335f8181526001602090815260408083206001600160a01b038716845290915281205490916103779185906103209086906107df565b50600192915050565b61038d838383600161046f565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461040c57818110156103fe57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61040c84848484035f61046f565b50505050565b6001600160a01b03831661043b57604051634b637e8f60e11b81525f60048201526024016103f5565b6001600160a01b0382166104645760405163ec442f0560e01b81525f60048201526024016103f5565b61038d838383610541565b6001600160a01b0384166104985760405163e602df0560e01b81525f60048201526024016103f5565b6001600160a01b0383166104c157604051634a1406b160e11b81525f60048201526024016103f5565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561040c57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161053391815260200190565b60405180910390a350505050565b6001600160a01b03831661056b578060025f82825461056091906107df565b909155506105db9050565b6001600160a01b0383165f90815260208190526040902054818110156105bd5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016103f5565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166105f757600280548290039055610615565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161065a91815260200190565b60405180910390a3505050565b5f602080835283518060208501525f5b8181101561069357858101830151858201604001528201610677565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146106c9575f80fd5b919050565b5f80604083850312156106df575f80fd5b6106e8836106b3565b946020939093013593505050565b5f805f60608486031215610708575f80fd5b610711846106b3565b925061071f602085016106b3565b9150604084013590509250925092565b5f6020828403121561073f575f80fd5b610748826106b3565b9392505050565b5f8060408385031215610760575f80fd5b610769836106b3565b9150610777602084016106b3565b90509250929050565b600181811c9082168061079457607f821691505b6020821081036107b257634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156102ad576102ad6107b8565b808201808211156102ad576102ad6107b856fea264697066735822122045d198b9eef0f86a3260bb5ca902ab5aa3b444a24d3d4e593ead7080bdd0166864736f6c63430008170033", "bin-runtime": "608060405234801561000f575f80fd5b506004361061011b575f3560e01c80639ece0e86116100a9578063cdbebc511161006e578063cdbebc51146101e1578063ecb9d4aa146101f4578063ee5f3aeb14610207578063f16dcaa614610127578063fd8593f91461021a575f80fd5b80639ece0e86146101ab578063a0662c50146101b3578063aa2c209e14610127578063be61b745146101c6578063c2698205146101d9575f80fd5b806331261479116100ef57806331261479146101625780635d1dfde01461016a5780636706ede01461017d5780636eee9ce4146101905780638c18671814610198575f80fd5b806269650b1461011f57806301b0710a146101295780632adaa1c91461013c5780632edf61871461014f575b5f80fd5b61012761022d565b005b61012761013736600461298e565b61032a565b61012761014a36600461298e565b6105ea565b61012761015d3660046129b6565b610977565b610127610b51565b61012761017836600461298e565b610cf0565b61012761018b3660046129cd565b610dc8565b61012761107d565b6101276101a63660046129cd565b611195565b6101276114ce565b6101276101c136600461298e565b61155d565b6101276101d43660046129b6565b61184f565b610127611a4b565b6101276101ef3660046129cd565b611cb0565b6101276102023660046129cd565b611fee565b61012761021536600461298e565b6122a6565b6101276102283660046129b6565b612573565b5f546040516370a0823160e01b8152336004820152610328916001600160a01b0316906370a0823190602401602060405180830381865afa158015610274573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061029891906129ed565b5f8054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102e6573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061030a91906129ed565b604051806060016040528060258152602001612f8c602591396127f1565b565b5f805460405163095ea7b360e01b81526001600160a01b038581166004830152602482018590529091169063095ea7b3906044016020604051808303815f875af115801561037a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061039e9190612a04565b90506103c98115156001151514604051806060016040528060238152602001612deb60239139612877565b5f54604051636eb1769f60e11b81523060048201526001600160a01b03858116602483015261047992169063dd62ed3e906044015b602060405180830381865afa158015610419573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043d91906129ed565b836040518060400160405280601b81526020017f416c6c6f77616e6365206e6f742073657420636f72726563746c7900000000008152506128bb565b5f546001600160a01b031663095ea7b384610495600286612a4b565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af11580156104dd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105019190612a04565b905061052c8115156001151514604051806060016040528060238152602001612deb60239139612877565b5f54604051636eb1769f60e11b81523060048201526001600160a01b0385811660248301526105e592169063dd62ed3e90604401602060405180830381865afa15801561057b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061059f91906129ed565b6105aa600285612a4b565b6040518060400160405280601b81526020017f416c6c6f77616e6365206e6f742073657420636f72726563746c7900000000008152506128bb565b505050565b306001600160a01b038316036105fe575f80fd5b336001600160a01b03831603610612575f80fd5b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610658573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061067c91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038781166004830152939450919216906370a0823190602401602060405180830381865afa1580156106c7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106eb91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa15801561073c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061076091906129ed565b905060028311801561077157508281115b610779575f80fd5b5f6107848486612a5e565b61078f906001612a71565b5f80546040516323b872dd60e01b81523360048201526001600160a01b038a8116602483015260448201859052939450919216906323b872dd906064016020604051808303815f875af11580156107e8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061080c9190612a04565b905061084681151560011515146040518060400160405280600f81526020016e1d1c985b9cd9995c8819985a5b1959608a1b815250612877565b5f546040516370a0823160e01b81523360048201526108d9916001600160a01b0316906370a0823190602401602060405180830381865afa15801561088d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b191906129ed565b6108bb8488612a8a565b604051806060016040528060278152602001612f1f602791396128bb565b5f546040516370a0823160e01b81526001600160a01b03898116600483015261096e9216906370a0823190602401602060405180830381865afa158015610922573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061094691906129ed565b6109508487612a71565b604051806060016040528060278152602001612ef8602791396128bb565b50505050505050565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156109bd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109e191906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa158015610a32573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a5691906129ed565b90505f82118015610a6657505f81115b610a6e575f80fd5b5f81831015610a7d5782610a7f565b815b5f8054919250906001600160a01b03166323b872dd3383610aa1866001612a71565b610aab908a612a5e565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af1158015610afc573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b209190612a04565b9050610b4a8115155f151514604051806060016040528060278152602001612ea160279139612877565b5050505050565b5f8054906101000a90046001600160a01b03166001600160a01b031663ab789fa36040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610ba0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bc49190612a04565b15610bcd575f80fd5b6103285f8054906101000a90046001600160a01b03166001600160a01b031663378dc3dc6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610c1f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c4391906129ed565b5f8054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c91573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cb591906129ed565b6040518060400160405280601981526020017f546f6b656e20737570706c7920776173206d6f646966696564000000000000008152506128bb565b5f805460405163095ea7b360e01b81526001600160a01b038581166004830152602482018590529091169063095ea7b3906044016020604051808303815f875af1158015610d40573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d649190612a04565b9050610d8f8115156001151514604051806060016040528060238152602001612deb60239139612877565b5f54604051636eb1769f60e11b81523060048201526001600160a01b0385811660248301526105e592169063dd62ed3e906044016103fe565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610e0e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e3291906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa158015610e7d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ea191906129ed565b90505f8211610eae575f80fd5b5f80546001600160a01b031663a9059cbb85610ecb866001612a71565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015610f13573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f379190612a04565b9050610f618115155f151514604051806060016040528060318152602001612d0160319139612877565b5f546040516370a0823160e01b8152306004820152610feb916001600160a01b0316906370a0823190602401602060405180830381865afa158015610fa8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fcc91906129ed565b84604051806060016040528060368152602001612e0e603691396128bb565b5f546040516370a0823160e01b81526001600160a01b0386811660048301526110779216906370a0823190602401602060405180830381865afa158015611034573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061105891906129ed565b83604051806060016040528060368152602001612c12603691396128bb565b50505050565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156110c3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110e791906129ed565b90505f81116110f4575f80fd5b5f805460405163a9059cbb60e01b815260048101839052602481018490526001600160a01b039091169063a9059cbb906044016020604051808303815f875af1158015611143573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111679190612a04565b90506111918115155f151514604051806060016040528060238152602001612e4460239139612877565b5050565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156111db573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111ff91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa15801561124a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061126e91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa1580156112bf573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112e391906129ed565b90505f831180156112f357508281115b6112fb575f80fd5b5f80546001600160a01b03166323b872dd3387611319886001612a71565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af115801561136a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061138e9190612a04565b90506113b88115155f151514604051806060016040528060358152602001612c7460359139612877565b5f546040516370a0823160e01b8152336004820152611442916001600160a01b0316906370a0823190602401602060405180830381865afa1580156113ff573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061142391906129ed565b856040518060600160405280603a8152602001612e67603a91396128bb565b5f546040516370a0823160e01b81526001600160a01b038781166004830152610b4a9216906370a0823190602401602060405180830381865afa15801561148b573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114af91906129ed565b846040518060600160405280603a8152602001612d8e603a91396128bb565b5f80546040516370a0823160e01b81526004810192909252610328916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561151a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061153e91906129ed565b5f604051806060016040528060268152602001612cdb602691396128bb565b306001600160a01b03831603611571575f80fd5b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156115b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115db91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038781166004830152939450919216906370a0823190602401602060405180830381865afa158015611626573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061164a91906129ed565b905060028211611658575f80fd5b5f6116638385612a5e565b61166e906001612a71565b5f805460405163a9059cbb60e01b81526001600160a01b038981166004830152602482018590529394509192169063a9059cbb906044016020604051808303815f875af11580156116c1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116e59190612a04565b905061171f81151560011515146040518060400160405280600f81526020016e1d1c985b9cd9995c8819985a5b1959608a1b815250612877565b5f546040516370a0823160e01b81523060048201526117b2916001600160a01b0316906370a0823190602401602060405180830381865afa158015611766573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061178a91906129ed565b6117948487612a8a565b604051806060016040528060238152602001612dc8602391396128bb565b5f546040516370a0823160e01b81526001600160a01b0388811660048301526118479216906370a0823190602401602060405180830381865afa1580156117fb573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061181f91906129ed565b6118298486612a71565b604051806060016040528060238152602001612f46602391396128bb565b505050505050565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611895573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118b991906129ed565b90505f81116118c6575f80fd5b5f80546001600160a01b031663a9059cbb306118e3856001612a71565b6118ed9087612a5e565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015611935573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119599190612a04565b90506119a181151560011515146040518060400160405280601481526020017f4661696c65642073656c66207472616e73666572000000000000000000000000815250612877565b5f546040516370a0823160e01b81523060048201526105e59184916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156119ec573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a1091906129ed565b6040518060400160405280601f81526020017f53656c66207472616e7366657220627265616b73206163636f756e74696e67008152506128bb565b5f80546040516370a0823160e01b81526203000060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611a94573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ab891906129ed565b5f546040516370a0823160e01b81526202000060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611b00573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b2491906129ed565b5f546040516370a0823160e01b81526201000060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611b6c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b9091906129ed565b5f546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611bd5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bf991906129ed565b611c039190612a71565b611c0d9190612a71565b611c179190612a71565b9050611cad815f8054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c6b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c8f91906129ed565b604051806060016040528060328152602001612ca9603291396127f1565b50565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611cf6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d1a91906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa158015611d65573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d8991906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa158015611dda573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dfe91906129ed565b90505f83118015611e0e57505f81115b611e16575f80fd5b5f80546040516323b872dd60e01b81523360048201526001600160a01b03878116602483015260448201849052909116906323b872dd906064016020604051808303815f875af1158015611e6c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e909190612a04565b9050611ed881151560011515146040518060400160405280601f81526020017f5a65726f20616d6f756e74207472616e7366657246726f6d206661696c656400815250612877565b5f546040516370a0823160e01b8152336004820152611f62916001600160a01b0316906370a0823190602401602060405180830381865afa158015611f1f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f4391906129ed565b85604051806060016040528060308152602001612d32603091396128bb565b5f546040516370a0823160e01b81526001600160a01b038781166004830152610b4a9216906370a0823190602401602060405180830381865afa158015611fab573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fcf91906129ed565b84604051806060016040528060308152602001612ec8603091396128bb565b5f80546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612034573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061205891906129ed565b5f80546040516370a0823160e01b81526001600160a01b038681166004830152939450919216906370a0823190602401602060405180830381865afa1580156120a3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120c791906129ed565b90505f82116120d4575f80fd5b5f805460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018490529091169063a9059cbb906044016020604051808303815f875af1158015612124573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121489190612a04565b905061219081151560011515146040518060400160405280601b81526020017f5a65726f20616d6f756e74207472616e73666572206661696c65640000000000815250612877565b5f546040516370a0823160e01b815230600482015261221a916001600160a01b0316906370a0823190602401602060405180830381865afa1580156121d7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121fb91906129ed565b846040518060600160405280602c8152602001612d62602c91396128bb565b5f546040516370a0823160e01b81526001600160a01b0386811660048301526110779216906370a0823190602401602060405180830381865afa158015612263573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061228791906129ed565b836040518060600160405280602c8152602001612c48602c91396128bb565b6001600160a01b03821630148015906122c757506001600160a01b03821615155b6122cf575f80fd5b336001600160a01b038316036122e3575f80fd5b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612329573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061234d91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa15801561239e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123c291906129ed565b90505f821180156123d257508181115b6123da575f80fd5b5f6123e58385612a5e565b6123f0906001612a71565b5f80546040516323b872dd60e01b81523360048201526001600160a01b03898116602483015260448201859052939450919216906323b872dd906064016020604051808303815f875af1158015612449573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061246d9190612a04565b90506124b581151560011515146040518060400160405280601381526020017f7472616e7366657246726f6d206661696c656400000000000000000000000000815250612877565b5f198314611847575f54604051636eb1769f60e11b8152336004820152306024820152611847916001600160a01b03169063dd62ed3e90604401602060405180830381865afa15801561250a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061252e91906129ed565b6125388486612a8a565b6040518060400160405280601f81526020017f416c6c6f77616e6365206e6f74207570646174656420636f72726563746c79008152506128bb565b5f80546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156125b9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125dd91906129ed565b5f8054604051636eb1769f60e11b815233600482015230602482015292935090916001600160a01b039091169063dd62ed3e90604401602060405180830381865afa15801561262e573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061265291906129ed565b90505f8211801561266257505f81115b61266a575f80fd5b5f81831015612679578261267b565b815b5f8054919250906001600160a01b03166323b872dd338061269d866001612a71565b6126a7908a612a5e565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af11580156126f8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061271c9190612a04565b905061276481151560011515146040518060400160405280601881526020017f4661696c65642073656c66207472616e7366657246726f6d0000000000000000815250612877565b5f546040516370a0823160e01b8152336004820152610b4a9186916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156127af573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127d391906129ed565b604051806060016040528060238152602001612f69602391396128bb565b818311156105e5575f61280384612930565b90505f61280f84612930565b90505f82828560405160200161282793929190612abf565b60405160208183030381529060405290507f62bdda9a05cdbcdbf905cbad99c6ebdc098b6f0933d8f2eb3cfab7400b602514816040516128679190612b4e565b60405180910390a1611847612b80565b81611191577feb03ca8c87c7849bef8f54cfdd2c6b967b2734fe872f751978c34bb91e13d351816040516128ab9190612b4e565b60405180910390a1611191612b80565b8183146105e5575f6128cc84612930565b90505f6128d884612930565b90505f8282856040516020016128f093929190612b94565b60405160208183030381529060405290507f2d2d38c9a34df9887a6dcb2a54c1f79ff8bf9c4d4cafacd7d1f7277f57baab6f816040516128679190612b4e565b606060a06040510180604052602081039150505f815280825b600183039250600a81066030018353600a9004806129495750819003601f19909101908152919050565b80356001600160a01b0381168114612989575f80fd5b919050565b5f806040838503121561299f575f80fd5b6129a883612973565b946020939093013593505050565b5f602082840312156129c6575f80fd5b5035919050565b5f602082840312156129dd575f80fd5b6129e682612973565b9392505050565b5f602082840312156129fd575f80fd5b5051919050565b5f60208284031215612a14575f80fd5b815180151581146129e6575f80fd5b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f82612a5957612a59612a23565b500490565b5f82612a6c57612a6c612a23565b500690565b80820180821115612a8457612a84612a37565b92915050565b81810381811115612a8457612a84612a37565b5f5b83811015612ab7578181015183820152602001612a9f565b50505f910152565b68024b73b30b634b21d160bd1b81525f8451612ae2816009850160208901612a9d565b601f60f91b6009918401918201528451612b0381600a840160208901612a9d565b7f206661696c65642c20726561736f6e3a20000000000000000000000000000000600a92909101918201528351612b4181601b840160208801612a9d565b01601b0195945050505050565b602081525f8251806020840152612b6c816040850160208701612a9d565b601f01601f19169190910160400192915050565b634e487b7160e01b5f52600160045260245ffd5b68024b73b30b634b21d160bd1b81525f8451612bb7816009850160208901612a9d565b61213d60f01b6009918401918201528451612bd981600b840160208901612a9d565b69016103932b0b9b7b71d160b51b600b92909101918201528351612c04816015840160208801612a9d565b016015019594505050505056fe5472616e7366657220666f72206d6f7265207468616e2062616c616e6365206d6f646966696564207461726765742062616c616e63655a65726f20616d6f756e74207472616e73666572206d6f646966696564207461726765742062616c616e63655375636365737366756c207472616e7366657246726f6d20666f72206d6f7265207468616e206163636f756e742062616c616e636553756d206f6620757365722062616c616e636573206172652067726561746572207468616e20746f74616c20737570706c7941646472657373207a65726f2062616c616e6365206e6f7420657175616c20746f207a65726f5375636365737366756c207472616e7366657220666f72206d6f7265207468616e206163636f756e742062616c616e63655a65726f20616d6f756e74207472616e7366657246726f6d206d6f64696669656420736f757263652062616c616e63655a65726f20616d6f756e74207472616e73666572206d6f64696669656420736f757263652062616c616e63655472616e7366657246726f6d20666f72206d6f7265207468616e2062616c616e6365206d6f646966696564207461726765742062616c616e636557726f6e6720736f757263652062616c616e6365206166746572207472616e736665724661696c656420746f2073657420616c6c6f77616e63652076696120617070726f76655472616e7366657220666f72206d6f7265207468616e2062616c616e6365206d6f64696669656420736f757263652062616c616e63655375636365737366756c207472616e7366657220746f2061646472657373207a65726f5472616e7366657246726f6d20666f72206d6f7265207468616e2062616c616e6365206d6f64696669656420736f757263652062616c616e63655375636365737366756c207472616e7366657246726f6d20746f2061646472657373207a65726f5a65726f20616d6f756e74207472616e7366657246726f6d206d6f646966696564207461726765742062616c616e636557726f6e67207461726765742062616c616e6365206166746572207472616e7366657246726f6d57726f6e6720736f757263652062616c616e6365206166746572207472616e7366657246726f6d57726f6e67207461726765742062616c616e6365206166746572207472616e7366657253656c66207472616e7366657246726f6d20627265616b73206163636f756e74696e67557365722062616c616e636520686967686572207468616e20746f74616c20737570706c79a2646970667358221220b8b9df3ec01a97c95b52873c4caa1d11a083a5bc26d71ddba8ab30afc73abaa164736f6c63430008170033", "userdoc": {"methods": {}, "notice": null}, "devdoc": {"methods": {"fuzz_decreaseApproval()": {"author": null, "details": null, "params": {}, "return": null}, "fuzz_increaseApproval()": {"author": null, "details": null, "params": {}, "return": null}}, "author": null, "details": null, "title": null}, "libraries": {}}, "/Users/drgorilla/Documents/defiSucks/balancer-v1-amm/test/invariants/fuzz/external/BToken.sol:CryticTokenMock": {"srcmap": "952:397:12:-:0;;;1087:260;;;;;;;;;;1896:113:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1896:113:7;;;1970:5;1962;:13;;;;;;:::i;:::-;-1:-1:-1;1985:7:7;:17;1995:7;1985;:17;:::i;:::-;;1896:113;;1112:29:12;136:7:4;279;1112:5:12;;;:29;;:::i;:::-;1151;183:7:4;279;1151:5:12;:29::i;:::-;1190;230:7:4;279;1190:5:12;:29::i;:::-;1229:34;1235:10;279:7:4;1229:5:12;:34::i;:::-;3222:12:7;;1274:13:12;:29;1313:20;:27;;-1:-1:-1;;1313:27:12;1336:4;1313:27;;;952:397;;7721:208:7;-1:-1:-1;;;;;7791:21:7;;7787:91;;7835:32;;-1:-1:-1;;;7835:32:7;;7864:1;7835:32;;;2847:51:13;2820:18;;7835:32:7;;;;;;;;7787:91;7887:35;7903:1;7907:7;7916:5;7887:7;:35::i;:::-;7721:208;;:::o;6271:1107::-;-1:-1:-1;;;;;6360:18:7;;6356:540;;6512:5;6496:12;;:21;;;;;;;:::i;:::-;;;;-1:-1:-1;6356:540:7;;-1:-1:-1;6356:540:7;;-1:-1:-1;;;;;6570:15:7;;6548:19;6570:15;;;;;;;;;;;6603:19;;;6599:115;;;6649:50;;-1:-1:-1;;;6649:50:7;;-1:-1:-1;;;;;3356:32:13;;6649:50:7;;;3338:51:13;3405:18;;;3398:34;;;3448:18;;;3441:34;;;3311:18;;6649:50:7;3136:345:13;6599:115:7;-1:-1:-1;;;;;6834:15:7;;:9;:15;;;;;;;;;;6852:19;;;;6834:37;;6356:540;-1:-1:-1;;;;;6910:16:7;;6906:425;;7073:12;:21;;;;;;;6906:425;;;-1:-1:-1;;;;;7284:13:7;;:9;:13;;;;;;;;;;:22;;;;;;6906:425;7361:2;-1:-1:-1;;;;;7346:25:7;7355:4;-1:-1:-1;;;;;7346:25:7;;7365:5;7346:25;;;;3632::13;;3620:2;3605:18;;3486:177;7346:25:7;;;;;;;;6271:1107;;;:::o;14:127:13:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:380;225:1;221:12;;;;268;;;289:61;;343:4;335:6;331:17;321:27;;289:61;396:2;388:6;385:14;365:18;362:38;359:161;;442:10;437:3;433:20;430:1;423:31;477:4;474:1;467:15;505:4;502:1;495:15;359:161;;146:380;;;:::o;657:518::-;759:2;754:3;751:11;748:421;;;795:5;792:1;785:16;839:4;836:1;826:18;909:2;897:10;893:19;890:1;886:27;880:4;876:38;945:4;933:10;930:20;927:47;;;-1:-1:-1;968:4:13;927:47;1023:2;1018:3;1014:12;1011:1;1007:20;1001:4;997:31;987:41;;1078:81;1096:2;1089:5;1086:13;1078:81;;;1155:1;1141:16;;1122:1;1111:13;1078:81;;;1082:3;;748:421;657:518;;;:::o;1351:1345::-;1471:10;;-1:-1:-1;;;;;1493:30:13;;1490:56;;;1526:18;;:::i;:::-;1555:97;1645:6;1605:38;1637:4;1631:11;1605:38;:::i;:::-;1599:4;1555:97;:::i;:::-;1707:4;;1764:2;1753:14;;1781:1;1776:663;;;;2483:1;2500:6;2497:89;;;-1:-1:-1;2552:19:13;;;2546:26;2497:89;-1:-1:-1;;1308:1:13;1304:11;;;1300:24;1296:29;1286:40;1332:1;1328:11;;;1283:57;2599:81;;1746:944;;1776:663;604:1;597:14;;;641:4;628:18;;-1:-1:-1;;1812:20:13;;;1930:236;1944:7;1941:1;1938:14;1930:236;;;2033:19;;;2027:26;2012:42;;2125:27;;;;2093:1;2081:14;;;;1960:19;;1930:236;;;1934:3;2194:6;2185:7;2182:19;2179:201;;;2255:19;;;2249:26;-1:-1:-1;;2338:1:13;2334:14;;;2350:3;2330:24;2326:37;2322:42;2307:58;2292:74;;2179:201;;;2426:1;2417:6;2414:1;2410:14;2406:22;2400:4;2393:36;1746:944;;;;;1351:1345;;:::o;2909:222::-;2974:9;;;2995:10;;;2992:133;;;3047:10;3042:3;3038:20;3035:1;3028:31;3082:4;3079:1;3072:15;3110:4;3107:1;3100:15;2992:133;2909:222;;;;:::o;3486:177::-;952:397:12;;;;;;", "srcmap-runtime": "952:397:12:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89:7;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4293:186;;;;;;:::i;:::-;;:::i;:::-;;;1192:14:13;;1185:22;1167:41;;1155:2;1140:18;4293:186:7;1027:187:13;3144:97:7;3222:12;;3144:97;;;1365:25:13;;;1353:2;1338:18;3144:97:7;1219:177:13;5039:244:7;;;;;;:::i;:::-;;:::i;3002:82::-;;;3075:2;1876:36:13;;1864:2;1849:18;3002:82:7;1734:184:13;1053:28:12;;;;;;1024:312:11;;;;;;:::i;:::-;;:::i;3299:116:7:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3390:18:7;3364:7;3390:18;;;;;;;;;;;;3299:116;2276:93;;;:::i;3610:178::-;;;;;;:::i;:::-;;:::i;1015:32:12:-;;;;;;;;;579:189:11;;;;;;:::i;:::-;;:::i;3846:140:7:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3952:18:7;;;3926:7;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3846:140;2074:89;2119:13;2151:5;2144:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89;:::o;4293:186::-;4366:4;735:10:10;4420:31:7;735:10:10;4436:7:7;4445:5;4420:8;:31::i;:::-;4468:4;4461:11;;;4293:186;;;;;:::o;5039:244::-;5126:4;735:10:10;5182:37:7;5198:4;735:10:10;5213:5:7;5182:15;:37::i;:::-;5229:26;5239:4;5245:2;5249:5;5229:9;:26::i;:::-;-1:-1:-1;5272:4:7;;5039:244;-1:-1:-1;;;;5039:244:7:o;1024:312:11:-;1150:10;1101:12;3952:18:7;;;:11;:18;;;;;;;;-1:-1:-1;;;;;3952:27:7;;;;;;;;;;1189:8:11;1180:6;:17;1176:139;;;1207:32;1216:10;1228:7;1237:1;1207:8;:32::i;:::-;1176:139;;;1260:48;1269:10;1281:7;1290:17;1301:6;1290:8;:17;:::i;:::-;1260:8;:48::i;2276:93:7:-;2323:13;2355:7;2348:14;;;;;:::i;3610:178::-;3679:4;735:10:10;3733:27:7;735:10:10;3750:2:7;3754:5;3733:9;:27::i;579:189:11:-;685:10;656:12;3952:18:7;;;:11;:18;;;;;;;;-1:-1:-1;;;;;3952:27:7;;;;;;;;;;656:12:11;;676:70;;3952:27:7;;706:39:11;;739:6;;706:39;:::i;676:70::-;-1:-1:-1;759:4:11;579:189;;;;:::o;8989:128:7:-;9073:37;9082:5;9089:7;9098:5;9105:4;9073:8;:37::i;:::-;8989:128;;;:::o;10663:477::-;-1:-1:-1;;;;;3952:18:7;;;10762:24;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;-1:-1:-1;;10828:37:7;;10824:310;;10904:5;10885:16;:24;10881:130;;;10936:60;;-1:-1:-1;;;10936:60:7;;-1:-1:-1;;;;;3379:55:13;;10936:60:7;;;3361:74:13;3451:18;;;3444:34;;;3494:18;;;3487:34;;;3334:18;;10936:60:7;;;;;;;;10881:130;11052:57;11061:5;11068:7;11096:5;11077:16;:24;11103:5;11052:8;:57::i;:::-;10752:388;10663:477;;;:::o;5656:300::-;-1:-1:-1;;;;;5739:18:7;;5735:86;;5780:30;;-1:-1:-1;;;5780:30:7;;5807:1;5780:30;;;3678:74:13;3651:18;;5780:30:7;3532:226:13;5735:86:7;-1:-1:-1;;;;;5834:16:7;;5830:86;;5873:32;;-1:-1:-1;;;5873:32:7;;5902:1;5873:32;;;3678:74:13;3651:18;;5873:32:7;3532:226:13;5830:86:7;5925:24;5933:4;5939:2;5943:5;5925:7;:24::i;9949:432::-;-1:-1:-1;;;;;10061:19:7;;10057:89;;10103:32;;-1:-1:-1;;;10103:32:7;;10132:1;10103:32;;;3678:74:13;3651:18;;10103:32:7;3532:226:13;10057:89:7;-1:-1:-1;;;;;10159:21:7;;10155:90;;10203:31;;-1:-1:-1;;;10203:31:7;;10231:1;10203:31;;;3678:74:13;3651:18;;10203:31:7;3532:226:13;10155:90:7;-1:-1:-1;;;;;10254:18:7;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;:35;;;10299:76;;;;10349:7;-1:-1:-1;;;;;10333:31:7;10342:5;-1:-1:-1;;;;;10333:31:7;;10358:5;10333:31;;;;1365:25:13;;1353:2;1338:18;;1219:177;10333:31:7;;;;;;;;9949:432;;;;:::o;6271:1107::-;-1:-1:-1;;;;;6360:18:7;;6356:540;;6512:5;6496:12;;:21;;;;;;;:::i;:::-;;;;-1:-1:-1;6356:540:7;;-1:-1:-1;6356:540:7;;-1:-1:-1;;;;;6570:15:7;;6548:19;6570:15;;;;;;;;;;;6603:19;;;6599:115;;;6649:50;;-1:-1:-1;;;6649:50:7;;-1:-1:-1;;;;;3379:55:13;;6649:50:7;;;3361:74:13;3451:18;;;3444:34;;;3494:18;;;3487:34;;;3334:18;;6649:50:7;3159:368:13;6599:115:7;-1:-1:-1;;;;;6834:15:7;;:9;:15;;;;;;;;;;6852:19;;;;6834:37;;6356:540;-1:-1:-1;;;;;6910:16:7;;6906:425;;7073:12;:21;;;;;;;6906:425;;;-1:-1:-1;;;;;7284:13:7;;:9;:13;;;;;;;;;;:22;;;;;;6906:425;7361:2;-1:-1:-1;;;;;7346:25:7;7355:4;-1:-1:-1;;;;;7346:25:7;;7365:5;7346:25;;;;1365::13;;1353:2;1338:18;;1219:177;7346:25:7;;;;;;;;6271:1107;;;:::o;14:548:13:-;126:4;155:2;184;173:9;166:21;216:6;210:13;259:6;254:2;243:9;239:18;232:34;284:1;294:140;308:6;305:1;302:13;294:140;;;403:14;;;399:23;;393:30;369:17;;;388:2;365:26;358:66;323:10;;294:140;;;298:3;483:1;478:2;469:6;458:9;454:22;450:31;443:42;553:2;546;542:7;537:2;529:6;525:15;521:29;510:9;506:45;502:54;494:62;;;;14:548;;;;:::o;567:196::-;635:20;;-1:-1:-1;;;;;684:54:13;;674:65;;664:93;;753:1;750;743:12;664:93;567:196;;;:::o;768:254::-;836:6;844;897:2;885:9;876:7;872:23;868:32;865:52;;;913:1;910;903:12;865:52;936:29;955:9;936:29;:::i;:::-;926:39;1012:2;997:18;;;;984:32;;-1:-1:-1;;;768:254:13:o;1401:328::-;1478:6;1486;1494;1547:2;1535:9;1526:7;1522:23;1518:32;1515:52;;;1563:1;1560;1553:12;1515:52;1586:29;1605:9;1586:29;:::i;:::-;1576:39;;1634:38;1668:2;1657:9;1653:18;1634:38;:::i;:::-;1624:48;;1719:2;1708:9;1704:18;1691:32;1681:42;;1401:328;;;;;:::o;1923:186::-;1982:6;2035:2;2023:9;2014:7;2010:23;2006:32;2003:52;;;2051:1;2048;2041:12;2003:52;2074:29;2093:9;2074:29;:::i;:::-;2064:39;1923:186;-1:-1:-1;;;1923:186:13:o;2114:260::-;2182:6;2190;2243:2;2231:9;2222:7;2218:23;2214:32;2211:52;;;2259:1;2256;2249:12;2211:52;2282:29;2301:9;2282:29;:::i;:::-;2272:39;;2330:38;2364:2;2353:9;2349:18;2330:38;:::i;:::-;2320:48;;2114:260;;;;;:::o;2379:380::-;2458:1;2454:12;;;;2501;;;2522:61;;2576:4;2568:6;2564:17;2554:27;;2522:61;2629:2;2621:6;2618:14;2598:18;2595:38;2592:161;;2675:10;2670:3;2666:20;2663:1;2656:31;2710:4;2707:1;2700:15;2738:4;2735:1;2728:15;2592:161;;2379:380;;;:::o;2764:127::-;2825:10;2820:3;2816:20;2813:1;2806:31;2856:4;2853:1;2846:15;2880:4;2877:1;2870:15;2896:128;2963:9;;;2984:11;;;2981:37;;;2998:18;;:::i;3029:125::-;3094:9;;;3115:10;;;3112:36;;;3128:18;;:::i", "abi": "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMintableOrBurnable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", "bin": "608060405234801562000010575f80fd5b506040518060400160405280601381526020017f42616c616e63657220506f6f6c20546f6b656e000000000000000000000000008152506040518060400160405280600381526020016210941560ea1b81525081600390816200007491906200030f565b5060046200008382826200030f565b505050620000a462010000683635c9adc5dea000006200010260201b60201c565b620000bc62020000683635c9adc5dea0000062000102565b620000d462030000683635c9adc5dea0000062000102565b620000e933683635c9adc5dea0000062000102565b6002546006556005805460ff1916600117905562000401565b6001600160a01b038216620001315760405163ec442f0560e01b81525f60048201526024015b60405180910390fd5b6200013e5f838362000142565b5050565b6001600160a01b03831662000170578060025f828254620001649190620003db565b90915550620001e29050565b6001600160a01b0383165f9081526020819052604090205481811015620001c45760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640162000128565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821662000200576002805482900390556200021e565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200026491815260200190565b60405180910390a3505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200029a57607f821691505b602082108103620002b957634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200030a57805f5260205f20601f840160051c81016020851015620002e65750805b601f840160051c820191505b8181101562000307575f8155600101620002f2565b50505b505050565b81516001600160401b038111156200032b576200032b62000271565b62000343816200033c845462000285565b84620002bf565b602080601f83116001811462000379575f8415620003615750858301515b5f19600386901b1c1916600185901b178555620003d3565b5f85815260208120601f198616915b82811015620003a95788860151825594840194600190910190840162000388565b5085821015620003c757878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b80820180821115620003fb57634e487b7160e01b5f52601160045260245ffd5b92915050565b610828806200040f5f395ff3fe608060405234801561000f575f80fd5b50600436106100da575f3560e01c80636618846311610088578063a9059cbb11610063578063a9059cbb1461019f578063ab789fa3146101b2578063d73dd623146101bf578063dd62ed3e146101d2575f80fd5b8063661884631461015c57806370a082311461016f57806395d89b4114610197575f80fd5b806323b872dd116100b857806323b872dd14610131578063313ce56714610144578063378dc3dc14610153575f80fd5b806306fdde03146100de578063095ea7b3146100fc57806318160ddd1461011f575b5f80fd5b6100e661020a565b6040516100f39190610667565b60405180910390f35b61010f61010a3660046106ce565b61029a565b60405190151581526020016100f3565b6002545b6040519081526020016100f3565b61010f61013f3660046106f6565b6102b3565b604051601281526020016100f3565b61012360065481565b61010f61016a3660046106ce565b6102d6565b61012361017d36600461072f565b6001600160a01b03165f9081526020819052604090205490565b6100e6610325565b61010f6101ad3660046106ce565b610334565b60055461010f9060ff1681565b61010f6101cd3660046106ce565b610341565b6101236101e036600461074f565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b60606003805461021990610780565b80601f016020809104026020016040519081016040528092919081815260200182805461024590610780565b80156102905780601f1061026757610100808354040283529160200191610290565b820191905f5260205f20905b81548152906001019060200180831161027357829003601f168201915b5050505050905090565b5f336102a7818585610380565b60019150505b92915050565b5f336102c0858285610392565b6102cb858585610412565b506001949350505050565b335f9081526001602090815260408083206001600160a01b0386168452909152812054808311156103115761030c33855f610380565b6102a7565b6102a7338561032086856107cc565b610380565b60606004805461021990610780565b5f336102a7818585610412565b335f8181526001602090815260408083206001600160a01b038716845290915281205490916103779185906103209086906107df565b50600192915050565b61038d838383600161046f565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461040c57818110156103fe57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61040c84848484035f61046f565b50505050565b6001600160a01b03831661043b57604051634b637e8f60e11b81525f60048201526024016103f5565b6001600160a01b0382166104645760405163ec442f0560e01b81525f60048201526024016103f5565b61038d838383610541565b6001600160a01b0384166104985760405163e602df0560e01b81525f60048201526024016103f5565b6001600160a01b0383166104c157604051634a1406b160e11b81525f60048201526024016103f5565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561040c57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161053391815260200190565b60405180910390a350505050565b6001600160a01b03831661056b578060025f82825461056091906107df565b909155506105db9050565b6001600160a01b0383165f90815260208190526040902054818110156105bd5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016103f5565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166105f757600280548290039055610615565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161065a91815260200190565b60405180910390a3505050565b5f602080835283518060208501525f5b8181101561069357858101830151858201604001528201610677565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146106c9575f80fd5b919050565b5f80604083850312156106df575f80fd5b6106e8836106b3565b946020939093013593505050565b5f805f60608486031215610708575f80fd5b610711846106b3565b925061071f602085016106b3565b9150604084013590509250925092565b5f6020828403121561073f575f80fd5b610748826106b3565b9392505050565b5f8060408385031215610760575f80fd5b610769836106b3565b9150610777602084016106b3565b90509250929050565b600181811c9082168061079457607f821691505b6020821081036107b257634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156102ad576102ad6107b8565b808201808211156102ad576102ad6107b856fea264697066735822122045d198b9eef0f86a3260bb5ca902ab5aa3b444a24d3d4e593ead7080bdd0166864736f6c63430008170033", "bin-runtime": "608060405234801561000f575f80fd5b50600436106100da575f3560e01c80636618846311610088578063a9059cbb11610063578063a9059cbb1461019f578063ab789fa3146101b2578063d73dd623146101bf578063dd62ed3e146101d2575f80fd5b8063661884631461015c57806370a082311461016f57806395d89b4114610197575f80fd5b806323b872dd116100b857806323b872dd14610131578063313ce56714610144578063378dc3dc14610153575f80fd5b806306fdde03146100de578063095ea7b3146100fc57806318160ddd1461011f575b5f80fd5b6100e661020a565b6040516100f39190610667565b60405180910390f35b61010f61010a3660046106ce565b61029a565b60405190151581526020016100f3565b6002545b6040519081526020016100f3565b61010f61013f3660046106f6565b6102b3565b604051601281526020016100f3565b61012360065481565b61010f61016a3660046106ce565b6102d6565b61012361017d36600461072f565b6001600160a01b03165f9081526020819052604090205490565b6100e6610325565b61010f6101ad3660046106ce565b610334565b60055461010f9060ff1681565b61010f6101cd3660046106ce565b610341565b6101236101e036600461074f565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b60606003805461021990610780565b80601f016020809104026020016040519081016040528092919081815260200182805461024590610780565b80156102905780601f1061026757610100808354040283529160200191610290565b820191905f5260205f20905b81548152906001019060200180831161027357829003601f168201915b5050505050905090565b5f336102a7818585610380565b60019150505b92915050565b5f336102c0858285610392565b6102cb858585610412565b506001949350505050565b335f9081526001602090815260408083206001600160a01b0386168452909152812054808311156103115761030c33855f610380565b6102a7565b6102a7338561032086856107cc565b610380565b60606004805461021990610780565b5f336102a7818585610412565b335f8181526001602090815260408083206001600160a01b038716845290915281205490916103779185906103209086906107df565b50600192915050565b61038d838383600161046f565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461040c57818110156103fe57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61040c84848484035f61046f565b50505050565b6001600160a01b03831661043b57604051634b637e8f60e11b81525f60048201526024016103f5565b6001600160a01b0382166104645760405163ec442f0560e01b81525f60048201526024016103f5565b61038d838383610541565b6001600160a01b0384166104985760405163e602df0560e01b81525f60048201526024016103f5565b6001600160a01b0383166104c157604051634a1406b160e11b81525f60048201526024016103f5565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561040c57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161053391815260200190565b60405180910390a350505050565b6001600160a01b03831661056b578060025f82825461056091906107df565b909155506105db9050565b6001600160a01b0383165f90815260208190526040902054818110156105bd5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016103f5565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166105f757600280548290039055610615565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161065a91815260200190565b60405180910390a3505050565b5f602080835283518060208501525f5b8181101561069357858101830151858201604001528201610677565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146106c9575f80fd5b919050565b5f80604083850312156106df575f80fd5b6106e8836106b3565b946020939093013593505050565b5f805f60608486031215610708575f80fd5b610711846106b3565b925061071f602085016106b3565b9150604084013590509250925092565b5f6020828403121561073f575f80fd5b610748826106b3565b9392505050565b5f8060408385031215610760575f80fd5b610769836106b3565b9150610777602084016106b3565b90509250929050565b600181811c9082168061079457607f821691505b6020821081036107b257634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156102ad576102ad6107b8565b808201808211156102ad576102ad6107b856fea264697066735822122045d198b9eef0f86a3260bb5ca902ab5aa3b444a24d3d4e593ead7080bdd0166864736f6c63430008170033", "userdoc": {"methods": {"decreaseApproval(address,uint256)": {"notice": "Decrease the allowance of the spender."}, "increaseApproval(address,uint256)": {"notice": "Increase the allowance of the spender."}}, "notice": null}, "devdoc": {"methods": {"allowance(address,address)": {"author": null, "details": "See {IERC20-allowance}.", "params": {}, "return": null}, "approve(address,uint256)": {"author": null, "details": "See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.", "params": {}, "return": null}, "balanceOf(address)": {"author": null, "details": "See {IERC20-balanceOf}.", "params": {}, "return": null}, "decimals()": {"author": null, "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.", "params": {}, "return": null}, "decreaseApproval(address,uint256)": {"author": null, "details": null, "params": {"amount": "The amount of tokens to decrease the allowance by.", "spender": "The address which will spend the funds."}, "return": null}, "increaseApproval(address,uint256)": {"author": null, "details": null, "params": {"amount": "The amount of tokens to increase the allowance by.", "spender": "The address which will spend the funds."}, "return": null}, "name()": {"author": null, "details": "Returns the name of the token.", "params": {}, "return": null}, "symbol()": {"author": null, "details": "Returns the symbol of the token, usually a shorter version of the name.", "params": {}, "return": null}, "totalSupply()": {"author": null, "details": "See {IERC20-totalSupply}.", "params": {}, "return": null}, "transfer(address,uint256)": {"author": null, "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.", "params": {}, "return": null}, "transferFrom(address,address,uint256)": {"author": null, "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.", "params": {}, "return": null}}, "author": null, "details": null, "title": null}, "libraries": {}}}} \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index 928cacb1..8995bb1f 100644 --- a/foundry.toml +++ b/foundry.toml @@ -9,10 +9,10 @@ multiline_func_header = 'params_first' sort_imports = true [profile.default] -solc_version = '0.8.23' +solc_version = '0.8.25' libs = ["node_modules", "lib"] optimizer_runs = 500 -evm_version = 'cancun' +evm_version = 'shanghai' fs_permissions = [{ access = "read-write", path = ".forge-snapshots/"}] # 2018: function can be view, so far only caused by mocks # 2394: solc insists on reporting on every transient storage use diff --git a/script/DeployBCoWFactory.s.sol b/script/DeployBCoWFactory.s.sol index 6e479423..a2abfbdd 100644 --- a/script/DeployBCoWFactory.s.sol +++ b/script/DeployBCoWFactory.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BCoWFactory} from 'contracts/BCoWFactory.sol'; import {Script} from 'forge-std/Script.sol'; diff --git a/script/DeployBFactory.s.sol b/script/DeployBFactory.s.sol index 28d21d28..5d0c33bc 100644 --- a/script/DeployBFactory.s.sol +++ b/script/DeployBFactory.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BFactory} from 'contracts/BFactory.sol'; import {Script} from 'forge-std/Script.sol'; diff --git a/script/Params.s.sol b/script/Params.s.sol index 9d49fe59..b2f0eeab 100644 --- a/script/Params.s.sol +++ b/script/Params.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; contract Params { struct BFactoryDeploymentParams { diff --git a/src/contracts/BCoWConst.sol b/src/contracts/BCoWConst.sol index dc4e7032..c16c8f25 100644 --- a/src/contracts/BCoWConst.sol +++ b/src/contracts/BCoWConst.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.23; +pragma solidity 0.8.25; /** * @title BCoWConst diff --git a/src/contracts/BCoWFactory.sol b/src/contracts/BCoWFactory.sol index 2549db9a..1eadeefe 100644 --- a/src/contracts/BCoWFactory.sol +++ b/src/contracts/BCoWFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BCoWPool} from './BCoWPool.sol'; import {BFactory} from './BFactory.sol'; diff --git a/src/contracts/BCoWPool.sol b/src/contracts/BCoWPool.sol index f136c034..6ac87bec 100644 --- a/src/contracts/BCoWPool.sol +++ b/src/contracts/BCoWPool.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.23; +pragma solidity 0.8.25; /* diff --git a/src/contracts/BConst.sol b/src/contracts/BConst.sol index d4a0bb0f..3a184a01 100644 --- a/src/contracts/BConst.sol +++ b/src/contracts/BConst.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.23; +pragma solidity 0.8.25; /** * @title BConst diff --git a/src/contracts/BFactory.sol b/src/contracts/BFactory.sol index eff79dfe..60619bb6 100644 --- a/src/contracts/BFactory.sol +++ b/src/contracts/BFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BPool} from './BPool.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; diff --git a/src/contracts/BMath.sol b/src/contracts/BMath.sol index ce986681..25d7e123 100644 --- a/src/contracts/BMath.sol +++ b/src/contracts/BMath.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BConst} from './BConst.sol'; import {BNum} from './BNum.sol'; diff --git a/src/contracts/BNum.sol b/src/contracts/BNum.sol index e4470ad8..99824543 100644 --- a/src/contracts/BNum.sol +++ b/src/contracts/BNum.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BConst} from './BConst.sol'; diff --git a/src/contracts/BPool.sol b/src/contracts/BPool.sol index 15224a8f..2817419a 100644 --- a/src/contracts/BPool.sol +++ b/src/contracts/BPool.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BMath} from './BMath.sol'; import {BToken} from './BToken.sol'; diff --git a/src/contracts/BToken.sol b/src/contracts/BToken.sol index c7c1f231..0491b17d 100644 --- a/src/contracts/BToken.sol +++ b/src/contracts/BToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol'; diff --git a/src/interfaces/IBCoWFactory.sol b/src/interfaces/IBCoWFactory.sol index 9c1bf1f6..da757ef4 100644 --- a/src/interfaces/IBCoWFactory.sol +++ b/src/interfaces/IBCoWFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {IBFactory} from 'interfaces/IBFactory.sol'; diff --git a/src/interfaces/IBCoWPool.sol b/src/interfaces/IBCoWPool.sol index 236f56ad..0c362221 100644 --- a/src/interfaces/IBCoWPool.sol +++ b/src/interfaces/IBCoWPool.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {GPv2Order} from '@cowprotocol/libraries/GPv2Order.sol'; import {IERC1271} from '@openzeppelin/contracts/interfaces/IERC1271.sol'; diff --git a/src/interfaces/IBFactory.sol b/src/interfaces/IBFactory.sol index b93a6e22..edaff060 100644 --- a/src/interfaces/IBFactory.sol +++ b/src/interfaces/IBFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {IBPool} from 'interfaces/IBPool.sol'; diff --git a/src/interfaces/IBPool.sol b/src/interfaces/IBPool.sol index c8fb0ba6..9b18cfa4 100644 --- a/src/interfaces/IBPool.sol +++ b/src/interfaces/IBPool.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; diff --git a/src/interfaces/ISettlement.sol b/src/interfaces/ISettlement.sol index 5905220f..1b176cc1 100644 --- a/src/interfaces/ISettlement.sol +++ b/src/interfaces/ISettlement.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {IERC20} from '@cowprotocol/interfaces/IERC20.sol'; import {GPv2Interaction} from '@cowprotocol/libraries/GPv2Interaction.sol'; diff --git a/test/integration/BCowPool.t.sol b/test/integration/BCowPool.t.sol index 9095f3bf..83a16922 100644 --- a/test/integration/BCowPool.t.sol +++ b/test/integration/BCowPool.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BPoolIntegrationTest} from './BPool.t.sol'; import {GPv2TradeEncoder} from '@composable-cow/test/vendored/GPv2TradeEncoder.sol'; diff --git a/test/integration/BPool.t.sol b/test/integration/BPool.t.sol index 976c6962..36deb047 100644 --- a/test/integration/BPool.t.sol +++ b/test/integration/BPool.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {IERC20} from '@cowprotocol/interfaces/IERC20.sol'; import {BFactory} from 'contracts/BFactory.sol'; diff --git a/test/integration/DeploymentGas.t.sol b/test/integration/DeploymentGas.t.sol index 2d2419ed..e2b32d95 100644 --- a/test/integration/DeploymentGas.t.sol +++ b/test/integration/DeploymentGas.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BFactory} from 'contracts/BFactory.sol'; diff --git a/test/invariants/PROPERTIES.md b/test/invariants/PROPERTIES.md index b5bc2976..30d714ff 100644 --- a/test/invariants/PROPERTIES.md +++ b/test/invariants/PROPERTIES.md @@ -25,13 +25,13 @@ | when a hash has been commited, only this order can be settled | High level | 23 | [ ] | [ ] | | BToken should not break the ToB ERC20 properties** | High level | 24 | | [x] | -(*) Bundled with 24 +> (*) Bundled with 24 -(**) [Trail of Bits ERC20 properties](https://github.com/crytic/properties?tab=readme-ov-file#erc20-tests) +> (**) [Trail of Bits ERC20 properties](https://github.com/crytic/properties?tab=readme-ov-file#erc20-tests) [ ] planed to implement and still to do
[x] implemented and tested -
:( implemented but judged as incorrect (tool limitation, etc) +
:( implemented but test not passing due to an external factor (tool limitation - eg halmos max unrolling loop, etc)
empty not implemented and will not be (design, etc) # Unit-test properties for the math libs (BNum and BMath): @@ -85,6 +85,7 @@ bpow should be distributive over mult of the same base x^a * x^b == x^(a+b) bpow should be distributive over mult of the same exp a^x * b^x == (a*b)^x power of a power should mult the exp (x^a)^b == x^(a*b) +## Untested (precision issues in test settingsq) calcOutGivenIn should be inv with calcInGivenOut calcPoolOutGivenSingleIn should be inv with calcSingleInGivenPoolOut calcSingleOutGivenPoolIn should be inv with calcPoolInGivenSingleOut \ No newline at end of file diff --git a/test/invariants/fuzz/BMath.t.sol b/test/invariants/fuzz/BMath.t.sol.invalid similarity index 71% rename from test/invariants/fuzz/BMath.t.sol rename to test/invariants/fuzz/BMath.t.sol.invalid index 3dbb4df4..d1493923 100644 --- a/test/invariants/fuzz/BMath.t.sol +++ b/test/invariants/fuzz/BMath.t.sol.invalid @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {EchidnaTest} from '../helpers/AdvancedTestsUtils.sol'; @@ -17,50 +17,18 @@ contract FuzzBMath is BMath, EchidnaTest { ) public { tokenWeightIn = clamp(tokenWeightIn, MIN_WEIGHT, MAX_WEIGHT); tokenWeightOut = clamp(tokenWeightOut, MIN_WEIGHT, MAX_WEIGHT); - tokenBalanceIn = clamp(tokenBalanceIn, 1, type(uint256).max); - - uint256 calc_tokenAmountOut = - calcOutGivenIn(tokenBalanceIn, tokenWeightIn, tokenBalanceOut, tokenWeightOut, tokenAmountIn, swapFee); - - uint256 calc_tokenAmountIn = - calcInGivenOut(tokenBalanceOut, tokenWeightOut, tokenBalanceIn, tokenWeightIn, calc_tokenAmountOut, swapFee); - - assert(tokenAmountIn == calc_tokenAmountIn); - } - - event log_uint(uint256 value); - - function test_debug() public { - uint256 tokenBalanceIn = 0; - uint256 tokenWeightIn = 0; - uint256 tokenBalanceOut = 0; - uint256 tokenWeightOut = 0; - uint256 tokenAmountIn = 1; - uint256 swapFee = 0; - - tokenWeightIn = clamp(tokenWeightIn, MIN_WEIGHT, MAX_WEIGHT); - tokenWeightOut = clamp(tokenWeightOut, MIN_WEIGHT, MAX_WEIGHT); - tokenAmountIn = clamp(tokenAmountIn, 1, type(uint256).max); - tokenBalanceOut = clamp(tokenBalanceOut, 1, type(uint256).max); - tokenBalanceIn = clamp(tokenBalanceIn, 1, type(uint256).max); + tokenAmountIn = clamp(tokenAmountIn, 1 ether, 10 ether); + tokenBalanceOut = clamp(tokenBalanceOut, 1 ether, 10 ether); + tokenBalanceIn = clamp(tokenBalanceIn, 1 ether, 10 ether); swapFee = clamp(swapFee, MIN_FEE, MAX_FEE); - emit log_uint(tokenWeightIn); - emit log_uint(tokenWeightOut); - emit log_uint(tokenAmountIn); - emit log_uint(tokenBalanceOut); - emit log_uint(tokenBalanceIn); - emit log_uint(swapFee); - uint256 calc_tokenAmountOut = calcOutGivenIn(tokenBalanceIn, tokenWeightIn, tokenBalanceOut, tokenWeightOut, tokenAmountIn, swapFee); - emit log_uint(calc_tokenAmountOut); uint256 calc_tokenAmountIn = calcInGivenOut(tokenBalanceOut, tokenWeightOut, tokenBalanceIn, tokenWeightIn, calc_tokenAmountOut, swapFee); - emit log_uint(calc_tokenAmountIn); - assert(calc_tokenAmountOut == calc_tokenAmountIn); + assert(tokenAmountIn == calc_tokenAmountIn || tokenAmountIn > calc_tokenAmountIn ? tokenAmountIn - calc_tokenAmountIn < BONE : calc_tokenAmountIn - tokenAmountIn < BONE); } // calcInGivenOut should be inverse of calcOutGivenIn diff --git a/test/invariants/fuzz/BNum.t.sol b/test/invariants/fuzz/BNum.t.sol index 7d940a0a..72a518ca 100644 --- a/test/invariants/fuzz/BNum.t.sol +++ b/test/invariants/fuzz/BNum.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {EchidnaTest} from '../helpers/AdvancedTestsUtils.sol'; @@ -373,17 +373,25 @@ contract FuzzBNum is BNum, EchidnaTest, Test { } // bpowi should be distributive over mult of the same exp a^x b^x == (ab)^x - function bpowi_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public pure { + function bpowi_distributiveExp(uint256 _a, uint256 _b, uint256 _exp) public { + _a = clamp(_a, 1, 10_000); + _b = clamp(_b, 1, 10_000); + _exp = clamp(_exp, 1, 1000 * BONE); + uint256 _result1 = bpowi(bmul(_a, _b), _exp); uint256 _result2 = bmul(bpowi(_a, _exp), bpowi(_b, _exp)); + + emit log_named_uint('result1', _result1); + emit log_named_uint('result2', _result2); + assert(_result1 == _result2); } // power of a power should mult the exp (x^a)^b == x^(ab) function bpowi_powerOfPower(uint256 _base, uint256 _a, uint256 _b) public { _base = clamp(_base, 1, 10_000); - _a = clamp(_a, 1, 1000 * BONE); - _b = clamp(_b, 1, 1000 * BONE); + _a = clamp(_a, BONE, 1000 * BONE); + _b = clamp(_b, BONE, 1000 * BONE); uint256 _result1 = bpowi(bpowi(_base, _a), _b); uint256 _result2 = bpowi(_base, bmul(_a, _b)) / BONE; diff --git a/test/invariants/fuzz/BToken.sol b/test/invariants/fuzz/BToken.sol index dfdb76f8..77283c8d 100644 --- a/test/invariants/fuzz/BToken.sol +++ b/test/invariants/fuzz/BToken.sol @@ -1,4 +1,4 @@ -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {EchidnaTest} from '../helpers/AdvancedTestsUtils.sol'; import {CryticERC20ExternalBasicProperties} from diff --git a/test/invariants/fuzz/Protocol.t.sol b/test/invariants/fuzz/Protocol.t.sol index c19b5548..dc6298a9 100644 --- a/test/invariants/fuzz/Protocol.t.sol +++ b/test/invariants/fuzz/Protocol.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {EchidnaTest, FuzzERC20} from '../helpers/AdvancedTestsUtils.sol'; @@ -290,7 +290,10 @@ contract FuzzProtocol is EchidnaTest { // 19 assert(pool.isFinalized()); } catch { - assert(_inComputed > _maxAmountIn); + assert( + _inComputed > _maxAmountIn + || _amountOut > bnum.bmul_exposed(tokens[_tokenOut].balanceOf(address(pool)), bconst.MAX_OUT_RATIO()) + ); } } diff --git a/test/invariants/fuzz/Protocol.yaml b/test/invariants/fuzz/Protocol.yaml index 068cab40..1614810c 100644 --- a/test/invariants/fuzz/Protocol.yaml +++ b/test/invariants/fuzz/Protocol.yaml @@ -3,4 +3,4 @@ testMode: assertion corpusDir: test/invariants/fuzz/corpuses/Protocol/ coverageFormats: ["html","lcov"] allContracts: true -testLimit: 50000 +testLimit: 50000 \ No newline at end of file diff --git a/test/invariants/helpers/AdvancedTestsUtils.sol b/test/invariants/helpers/AdvancedTestsUtils.sol index c5db8c98..c6a13fe3 100644 --- a/test/invariants/helpers/AdvancedTestsUtils.sol +++ b/test/invariants/helpers/AdvancedTestsUtils.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {Test} from 'forge-std/Test.sol'; import {MockERC20} from 'forge-std/mocks/MockERC20.sol'; diff --git a/test/invariants/helpers/MockSettler.sol b/test/invariants/helpers/MockSettler.sol index d79dfa4b..f7a97e8f 100644 --- a/test/invariants/helpers/MockSettler.sol +++ b/test/invariants/helpers/MockSettler.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {GPv2Interaction, GPv2Trade, IERC20, ISettlement} from 'interfaces/ISettlement.sol'; diff --git a/test/invariants/symbolic/BNum.t.sol b/test/invariants/symbolic/BNum.t.sol index 122f0eec..2534e626 100644 --- a/test/invariants/symbolic/BNum.t.sol +++ b/test/invariants/symbolic/BNum.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {HalmosTest} from '../helpers/AdvancedTestsUtils.sol'; import {BNum} from 'contracts/BNum.sol'; diff --git a/test/invariants/symbolic/Protocol.t.sol b/test/invariants/symbolic/Protocol.t.sol index 16228d47..084ce330 100644 --- a/test/invariants/symbolic/Protocol.t.sol +++ b/test/invariants/symbolic/Protocol.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {FuzzERC20, HalmosTest} from '../helpers/AdvancedTestsUtils.sol'; diff --git a/test/unit/BCoWFactory.t.sol b/test/unit/BCoWFactory.t.sol index 71f2583e..1ff8070a 100644 --- a/test/unit/BCoWFactory.t.sol +++ b/test/unit/BCoWFactory.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BCoWPool} from 'contracts/BCoWPool.sol'; import {Test} from 'forge-std/Test.sol'; diff --git a/test/unit/BCoWPool.t.sol b/test/unit/BCoWPool.t.sol index 02eea7f9..7c7e566c 100644 --- a/test/unit/BCoWPool.t.sol +++ b/test/unit/BCoWPool.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BasePoolTest, SwapExactAmountInUtils} from './BPool.t.sol'; import {IERC20} from '@cowprotocol/interfaces/IERC20.sol'; diff --git a/test/unit/BFactory.t.sol b/test/unit/BFactory.t.sol index bcadfebd..b1426432 100644 --- a/test/unit/BFactory.t.sol +++ b/test/unit/BFactory.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {IERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; diff --git a/test/unit/BMath.t.sol b/test/unit/BMath.t.sol index 94190063..25158305 100644 --- a/test/unit/BMath.t.sol +++ b/test/unit/BMath.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BConst} from 'contracts/BConst.sol'; import {BMath, BNum} from 'contracts/BMath.sol'; diff --git a/test/unit/BNum.t.sol b/test/unit/BNum.t.sol index be09d4c7..58041f73 100644 --- a/test/unit/BNum.t.sol +++ b/test/unit/BNum.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BConst} from 'contracts/BConst.sol'; import {BNum} from 'contracts/BNum.sol'; diff --git a/test/unit/BPool.t.sol b/test/unit/BPool.t.sol index 003ffec1..4611daf6 100644 --- a/test/unit/BPool.t.sol +++ b/test/unit/BPool.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; diff --git a/test/unit/BPool/BPool.t.sol b/test/unit/BPool/BPool.t.sol index ac86c4d0..b3bebdee 100644 --- a/test/unit/BPool/BPool.t.sol +++ b/test/unit/BPool/BPool.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BPoolBase} from './BPoolBase.sol'; import {IBPool} from 'interfaces/IBPool.sol'; diff --git a/test/unit/BPool/BPoolBase.sol b/test/unit/BPool/BPoolBase.sol index 3f34ec12..41dd6c88 100644 --- a/test/unit/BPool/BPoolBase.sol +++ b/test/unit/BPool/BPoolBase.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {BConst} from 'contracts/BConst.sol'; diff --git a/test/unit/BPool/BPool_Bind.t.sol b/test/unit/BPool/BPool_Bind.t.sol index 80c01363..95ede7d6 100644 --- a/test/unit/BPool/BPool_Bind.t.sol +++ b/test/unit/BPool/BPool_Bind.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BPoolBase} from './BPoolBase.sol'; import {IBPool} from 'interfaces/IBPool.sol'; diff --git a/test/unit/BPool/BPool_JoinPool.t.sol b/test/unit/BPool/BPool_JoinPool.t.sol index d091a95d..6cc9f9a9 100644 --- a/test/unit/BPool/BPool_JoinPool.t.sol +++ b/test/unit/BPool/BPool_JoinPool.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BPoolBase} from './BPoolBase.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; diff --git a/test/unit/BPool/BPool_Unbind.t.sol b/test/unit/BPool/BPool_Unbind.t.sol index 5d6a3c27..f854c0c7 100644 --- a/test/unit/BPool/BPool_Unbind.t.sol +++ b/test/unit/BPool/BPool_Unbind.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BPoolBase} from './BPoolBase.sol'; diff --git a/test/unit/BToken.t.sol b/test/unit/BToken.t.sol index 5601d545..58c7f441 100644 --- a/test/unit/BToken.t.sol +++ b/test/unit/BToken.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3 -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {IERC20Errors} from '@openzeppelin/contracts/interfaces/draft-IERC6093.sol'; import {Test} from 'forge-std/Test.sol'; diff --git a/test/utils/Pow.sol b/test/utils/Pow.sol index b8f15d85..e9142c57 100644 --- a/test/utils/Pow.sol +++ b/test/utils/Pow.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {BNum} from 'contracts/BNum.sol'; diff --git a/test/utils/Utils.sol b/test/utils/Utils.sol index db195352..19225f9d 100644 --- a/test/utils/Utils.sol +++ b/test/utils/Utils.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.23; +pragma solidity 0.8.25; import {Test} from 'forge-std/Test.sol'; import {LibString} from 'solmate/utils/LibString.sol'; From c60f5fa206e53f7fd4479b6345ce12216aaf4186 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Tue, 23 Jul 2024 14:04:13 +0200 Subject: [PATCH 22/37] chore: summary --- test/SUMMARY.md | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/test/SUMMARY.md b/test/SUMMARY.md index 84a0c2ad..896bc113 100644 --- a/test/SUMMARY.md +++ b/test/SUMMARY.md @@ -1,20 +1,5 @@ # Tests Summary -There are 9 solidity files, totalling 939 sloc. - -| filename | language | code | comment | blank | total | -| :---------------------------- | :------- | :--- | :------ | :---- | :---- | -| src/contracts/BCoWConst.sol | solidity | 4 | 10 | 2 | 16 | -| src/contracts/BCoWFactory.sol | solidity | 20 | 13 | 7 | 40 | -| src/contracts/BCoWPool.sol | solidity | 90 | 41 | 24 | 155 | -| src/contracts/BConst.sol | solidity | 23 | 29 | 9 | 61 | -| src/contracts/BFactory.sol | solidity | 44 | 17 | 11 | 72 | -| src/contracts/BMath.sol | solidity | 128 | 156 | 18 | 302 | -| src/contracts/BNum.sol | solidity | 133 | 40 | 28 | 201 | -| src/contracts/BPool.sol | solidity | 473 | 104 | 107 | 684 | -| src/contracts/BToken.sol | solidity | 24 | 27 | 7 | 58 | - - ## Interdependencies BCoWFactory deploys a bcowpool BCoWPool is a bpool which adds signature validation @@ -23,28 +8,27 @@ Pool inherit btoken (which represents a LP) and bmath Bmath uses bnum # Unit tests -Current coverage is XXX % for the 9 contracts, accross XXX tests. All tests are passing. Unit tests are writtent using the branched-tree technique and Bulloak as templating tool. - -< TABLE > +Our unit tests are covering every branches, using the branched-tree technique with Bulloak. # Integration tests +Integration tests are covering various happy paths and not-so-happy paths, on a mainnet fork. # Property tests -We identified 24 properties. We challenged these either in a long-running fuzzing campaign (targeting 23 of these in XXX runs) or via symbolic execution (for 8 properties). +We identified 24 properties. We challenged these either in a long-running fuzzing campaign or via symbolic execution (for 8 chosen properties). ## Fuzzing campaign -We used echidna to test these 23 properties. In addition to these, another fuzzing campaign as been led against the mathematical contracts (BNum and BMath), insuring the operation properties were holding. +We used echidna to test these 23 properties. In addition to these, another fuzzing campaign as been led against the mathematical contracts (BNum and BMath). BMath properties are currently not triggered in CI, due to various rounding errors, and should be further validated. Limitations/future improvements Currently, the swap logic are tested against the swap in/out functions (and, in a similar way, liquidity management via the join/exit function). The combined equivalent (joinswapExternAmountIn, joinswapPoolAmountOut, etc) should be tested too. +BMath properties are currently not tested and should be refactored to quantify the rounding errors. ## Formal verification: Symbolic Execution We managed to test 10 properties out of the 23. Properties not tested are either not easily challenged with symbolic execution (statefullness needed) or limited by Halmos itself (hitting loops in the implementation for instance). Additional properties from BNum were tested independently too (with severe limitations due to loop unrolling boundaries). - ## Notes The bmath corresponding equations are: From c5c263fbc86ebc8e1ab5f29ec8d998a0d8d13b63 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Tue, 23 Jul 2024 16:43:19 +0200 Subject: [PATCH 23/37] fix: direct transfer then swapExactOut case --- test/invariants/fuzz/Protocol.t.sol | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/test/invariants/fuzz/Protocol.t.sol b/test/invariants/fuzz/Protocol.t.sol index dc6298a9..17e775b8 100644 --- a/test/invariants/fuzz/Protocol.t.sol +++ b/test/invariants/fuzz/Protocol.t.sol @@ -26,6 +26,7 @@ contract FuzzProtocol is EchidnaTest { uint256 ghost_bptMinted; uint256 ghost_bptBurned; + mapping(FuzzERC20 => uint256) ghost_amountDirectlyTransfered; constructor() { solutionSettler = address(new MockSettler()); @@ -231,7 +232,7 @@ contract FuzzProtocol is EchidnaTest { /// @custom:property-id 5 /// @custom:property the amount spent can never be greater than max amount in /// @custom:property-id 14 - /// @custom:property an exact amount out is earned only if the amount in calculated in bmath is transfere + /// @custom:property an exact amount out is earned only if the amount in calculated in bmath is transfered /// @custom:property-id 15 /// @custom:property there can't be any amount out for a 0 amount in /// @custom:property-id 19 @@ -277,6 +278,12 @@ contract FuzzProtocol is EchidnaTest { uint256 _balanceInAfter = tokens[_tokenIn].balanceOf(currentCaller); uint256 _balanceOutAfter = tokens[_tokenOut].balanceOf(currentCaller); + // Take into account previous direct transfers (only way to get free token) + uint256 _tokenOutInExcess = ghost_amountDirectlyTransfered[tokens[_tokenOut]] > _amountOut + ? _amountOut + : ghost_amountDirectlyTransfered[tokens[_tokenOut]]; + ghost_amountDirectlyTransfered[tokens[_tokenOut]] -= _tokenOutInExcess; + // 5 assert(_balanceInBefore - _balanceInAfter <= _maxAmountIn); @@ -285,14 +292,25 @@ contract FuzzProtocol is EchidnaTest { else assert(_balanceOutAfter == _balanceOutBefore - _inComputed + _amountOut); // 15 - if (_balanceInBefore == _balanceInAfter) assert(_balanceOutBefore == _balanceOutAfter); + if (_balanceInBefore == _balanceInAfter) assert(_balanceOutBefore + _tokenOutInExcess == _balanceOutAfter); // 19 assert(pool.isFinalized()); } catch { + uint256 _spotBefore = bmath.calcSpotPrice( + tokens[_tokenIn].balanceOf(address(pool)), + pool.getDenormalizedWeight(address(tokens[_tokenIn])), + tokens[_tokenOut].balanceOf(address(pool)), + pool.getDenormalizedWeight(address(tokens[_tokenOut])), + bconst.MIN_FEE() + ); + + uint256 _outRatio = bnum.bmul_exposed(tokens[_tokenOut].balanceOf(address(pool)), bconst.MAX_OUT_RATIO()); + assert( - _inComputed > _maxAmountIn - || _amountOut > bnum.bmul_exposed(tokens[_tokenOut].balanceOf(address(pool)), bconst.MAX_OUT_RATIO()) + _inComputed > _maxAmountIn // 5 + || _amountOut > _outRatio // 14 + || _spotBefore > bnum.bdiv_exposed(_inComputed, _amountOut) ); } } @@ -419,6 +437,8 @@ contract FuzzProtocol is EchidnaTest { ); assert(_redeemedAmountAfter >= _redeemedAmountBeforeTransfer); + + ghost_amountDirectlyTransfered[_token] += _amountToTransfer; } /// @custom:property-id 18 From 09d332d968e2e77a1e307dc66b807b0d1cb8efa4 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:06:03 +0200 Subject: [PATCH 24/37] chore: fmt --- test/SUMMARY.md | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/test/SUMMARY.md b/test/SUMMARY.md index 896bc113..65bd7f11 100644 --- a/test/SUMMARY.md +++ b/test/SUMMARY.md @@ -1,22 +1,15 @@ # Tests Summary -## Interdependencies -BCoWFactory deploys a bcowpool -BCoWPool is a bpool which adds signature validation -Factory deploys a pool and can "collect" from the pool -Pool inherit btoken (which represents a LP) and bmath -Bmath uses bnum +## Unit tests +Our unit tests are covering every branches, using the branched-tree technique with [Bulloak](https://github.com/alexfertel/bulloak). -# Unit tests -Our unit tests are covering every branches, using the branched-tree technique with Bulloak. - -# Integration tests +## Integration tests Integration tests are covering various happy paths and not-so-happy paths, on a mainnet fork. -# Property tests +## Property tests We identified 24 properties. We challenged these either in a long-running fuzzing campaign or via symbolic execution (for 8 chosen properties). -## Fuzzing campaign +### Fuzzing campaign We used echidna to test these 23 properties. In addition to these, another fuzzing campaign as been led against the mathematical contracts (BNum and BMath). BMath properties are currently not triggered in CI, due to various rounding errors, and should be further validated. @@ -24,12 +17,12 @@ Limitations/future improvements Currently, the swap logic are tested against the swap in/out functions (and, in a similar way, liquidity management via the join/exit function). The combined equivalent (joinswapExternAmountIn, joinswapPoolAmountOut, etc) should be tested too. BMath properties are currently not tested and should be refactored to quantify the rounding errors. -## Formal verification: Symbolic Execution -We managed to test 10 properties out of the 23. Properties not tested are either not easily challenged with symbolic execution (statefullness needed) or limited by Halmos itself (hitting loops in the implementation for instance). +### Formal verification: Symbolic Execution +We managed to test 10 properties out of the 23. Properties not tested are either not easily challenged with symbolic execution (statefullness needed) or limited by Halmos itself (hitting loop unrolling boundaries in the implementation for instance). -Additional properties from BNum were tested independently too (with severe limitations due to loop unrolling boundaries). +Additional properties from BNum were tested independently too (with severe limitations due to previously mentionned loop unrolling boundaries). -## Notes +# Notes The bmath corresponding equations are: `Spot price:` From 888ebe9a0c6a9eb04a568df93fc341d323eefab3 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:10:05 +0200 Subject: [PATCH 25/37] feat: shanghai in summary --- test/SUMMARY.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/SUMMARY.md b/test/SUMMARY.md index 65bd7f11..f86a75bc 100644 --- a/test/SUMMARY.md +++ b/test/SUMMARY.md @@ -1,4 +1,8 @@ -# Tests Summary +# Tests Summary + +## Warning +The repo is using solc 0.8.25, which compiles to the Cancun EVM version by default. Unfortunately, the hevm has no implementation of this EVM version ([or not yet](https://github.com/ethereum/hevm/issues/469#issuecomment-2220677206)). +Solc using a mcopy opcode somewhere, the property tests are run on Shanghai for now (at least until the hevm catches up), preventing this branch to be merged with the main one. ## Unit tests Our unit tests are covering every branches, using the branched-tree technique with [Bulloak](https://github.com/alexfertel/bulloak). From 0c0e1c4a319e17643bcb871e602ca3070b057b6a Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:33:31 +0200 Subject: [PATCH 26/37] fix: typo --- foundry.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foundry.toml b/foundry.toml index 8995bb1f..ed1f23df 100644 --- a/foundry.toml +++ b/foundry.toml @@ -17,7 +17,7 @@ fs_permissions = [{ access = "read-write", path = ".forge-snapshots/"}] # 2018: function can be view, so far only caused by mocks # 2394: solc insists on reporting on every transient storage use # 5574, 3860: bytecode size limit, so far only caused by test contracts -# 1858: Some imports don't have the license identifier +# 1878: Some imports don't have the license identifier ignored_error_codes = [2018, 2394, 5574, 3860, 1878] deny_warnings = true From 00cd7d134a595710fbc6178fad7dcfb42de189a7 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:55:38 +0200 Subject: [PATCH 27/37] chore: typo --- test/invariants/fuzz/{BToken.sol => BToken.t.sol} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/invariants/fuzz/{BToken.sol => BToken.t.sol} (100%) diff --git a/test/invariants/fuzz/BToken.sol b/test/invariants/fuzz/BToken.t.sol similarity index 100% rename from test/invariants/fuzz/BToken.sol rename to test/invariants/fuzz/BToken.t.sol From ea280d9ad0d4078b48c710554d440ac6d4edd956 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:56:38 +0200 Subject: [PATCH 28/37] chore: revert consistency --- test/invariants/helpers/AdvancedTestsUtils.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/invariants/helpers/AdvancedTestsUtils.sol b/test/invariants/helpers/AdvancedTestsUtils.sol index c6a13fe3..ab261170 100644 --- a/test/invariants/helpers/AdvancedTestsUtils.sol +++ b/test/invariants/helpers/AdvancedTestsUtils.sol @@ -53,9 +53,9 @@ contract EchidnaTest is AgentsHandler { constructor() AgentsHandler(5) {} - function clamp(uint256 _value, uint256 _min, uint256 _max) internal returns (uint256) { + function clamp(uint256 _value, uint256 _min, uint256 _max) internal pure returns (uint256) { if (_min > _max) { - emit AssertionFailed(); + assert(false); } if (_value < _min || _value > _max) { From 5555afcfe06f806288e0ac5c21ece5c65a8defc3 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Fri, 26 Jul 2024 14:46:12 +0200 Subject: [PATCH 29/37] chore: summary fmt --- test/SUMMARY.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/test/SUMMARY.md b/test/SUMMARY.md index f86a75bc..96a35483 100644 --- a/test/SUMMARY.md +++ b/test/SUMMARY.md @@ -29,32 +29,32 @@ Additional properties from BNum were tested independently too (with severe limit # Notes The bmath corresponding equations are: -`Spot price:` -$\text{spotPrice} = \frac{\text{tokenBalanceIn}/\text{tokenWeightIn}}{\text{tokenBalanceOut}/\text{tokenWeightOut}} \cdot \frac{1}{1 - \text{swapFee}}$ +**Spot price:** +$$\text{spotPrice} = \frac{\text{tokenBalanceIn}/\text{tokenWeightIn}}{\text{tokenBalanceOut}/\text{tokenWeightOut}} \cdot \frac{1}{1 - \text{swapFee}}$$ -`Out given in:` -$\text{tokenAmountOut} = \text{tokenBalanceOut} \cdot \left( 1 - \left( \frac{\text{tokenBalanceIn}}{\text{tokenBalanceIn} + \left( \text{tokenAmountIn} \cdot \left(1 - \text{swapFee}\right)\right)} \right)^{\frac{\text{tokenWeightIn}}{\text{tokenWeightOut}}} \right)$ +**Out given in:** +$$\text{tokenAmountOut} = \text{tokenBalanceOut} \cdot \left( 1 - \left( \frac{\text{tokenBalanceIn}}{\text{tokenBalanceIn} + \left( \text{tokenAmountIn} \cdot \left(1 - \text{swapFee}\right)\right)} \right)^{\frac{\text{tokenWeightIn}}{\text{tokenWeightOut}}} \right)$$ -`In given out:` -$\text{tokenAmountIn} = \frac{\text{tokenBalanceIn} \cdot \left( \frac{\text{tokenBalanceOut}}{\text{tokenBalanceOut} - \text{tokenAmountOut}} \right)^{\frac{\text{tokenWeightOut}}{\text{tokenWeightIn}}} - 1}{1 - \text{swapFee}}$ +**In given out:** +$$\text{tokenAmountIn} = \frac{\text{tokenBalanceIn} \cdot \left( \frac{\text{tokenBalanceOut}}{\text{tokenBalanceOut} - \text{tokenAmountOut}} \right)^{\frac{\text{tokenWeightOut}}{\text{tokenWeightIn}}} - 1}{1 - \text{swapFee}}$$ -`Pool out given single in` -$\text{poolAmountOut} = \left(\frac{\text{tokenAmountIn} \cdot \left(1 - \left(1 - \frac{\text{tokenWeightIn}}{\text{totalWeight}}\right) \cdot \text{swapFee}\right) + \text{tokenBalanceIn}}{\text{tokenBalanceIn}}\right)^{\frac{\text{tokenWeightIn}}{\text{totalWeight}}} \cdot \text{poolSupply} - \text{poolSupply}$ +**Pool out given single in** +$$\text{poolAmountOut} = \left(\frac{\text{tokenAmountIn} \cdot \left(1 - \left(1 - \frac{\text{tokenWeightIn}}{\text{totalWeight}}\right) \cdot \text{swapFee}\right) + \text{tokenBalanceIn}}{\text{tokenBalanceIn}}\right)^{\frac{\text{tokenWeightIn}}{\text{totalWeight}}} \cdot \text{poolSupply} - \text{poolSupply}$$ -`Single in given pool out` -$\text{tokenAmountIn} = \frac{\left(\frac{\text{poolSupply} + \text{poolAmountOut}}{\text{poolSupply}}\right)^{\frac{1}{\frac{\text{weightIn}}{\text{totalWeight}}}} \cdot \text{balanceIn} - \text{balanceIn}}{\left(1 - \frac{\text{weightIn}}{\text{totalWeight}}\right) \cdot \text{swapFee}}$ +**Single in given pool out** +$$\text{tokenAmountIn} = \frac{\left(\frac{\text{poolSupply} + \text{poolAmountOut}}{\text{poolSupply}}\right)^{\frac{1}{\frac{\text{weightIn}}{\text{totalWeight}}}} \cdot \text{balanceIn} - \text{balanceIn}}{\left(1 - \frac{\text{weightIn}}{\text{totalWeight}}\right) \cdot \text{swapFee}}$$ -`Single out given pool in` -$\text{tokenAmountOut} = \left( \text{tokenBalanceOut} - \left( \frac{\text{poolSupply} - \left(\text{poolAmountIn} \cdot \left(1 - \text{exitFee}\right)\right)}{\text{poolSupply}} \right)^{\frac{1}{\frac{\text{tokenWeightOut}}{\text{totalWeight}}}} \cdot \text{tokenBalanceOut} \right) \cdot \left(1 - \left(1 - \frac{\text{tokenWeightOut}}{\text{totalWeight}}\right) \cdot \text{swapFee}\right)$ +**Single out given pool in** +$$\text{tokenAmountOut} = \left( \text{tokenBalanceOut} - \left( \frac{\text{poolSupply} - \left(\text{poolAmountIn} \cdot \left(1 - \text{exitFee}\right)\right)}{\text{poolSupply}} \right)^{\frac{1}{\frac{\text{tokenWeightOut}}{\text{totalWeight}}}} \cdot \text{tokenBalanceOut} \right) \cdot \left(1 - \left(1 - \frac{\text{tokenWeightOut}}{\text{totalWeight}}\right) \cdot \text{swapFee}\right)$$ -`Pool in given single out` -$\text{poolAmountIn} = \frac{\text{poolSupply} - \left( \frac{\text{tokenBalanceOut} - \frac{\text{tokenAmountOut}}{1 - \left(1 - \frac{\text{tokenWeightOut}}{\text{totalWeight}}\right) \cdot \text{swapFee}}}{\text{tokenBalanceOut}} \right)^{\frac{\text{tokenWeightOut}}{\text{totalWeight}}} \cdot \text{poolSupply}}{1 - \text{exitFee}}$ +**Pool in given single out** +$$\text{poolAmountIn} = \frac{\text{poolSupply} - \left( \frac{\text{tokenBalanceOut} - \frac{\text{tokenAmountOut}}{1 - \left(1 - \frac{\text{tokenWeightOut}}{\text{totalWeight}}\right) \cdot \text{swapFee}}}{\text{tokenBalanceOut}} \right)^{\frac{\text{tokenWeightOut}}{\text{totalWeight}}} \cdot \text{poolSupply}}{1 - \text{exitFee}}$$ BNum bpow is based on exponentiation by squaring and hold true because (see dapphub dsmath): https://github.com/dapphub/ds-math/blob/e70a364787804c1ded9801ed6c27b440a86ebd32/src/math.sol#L62 From 637aa830186a516e8b6978550758ae35b6f777f8 Mon Sep 17 00:00:00 2001 From: drgorillamd <83670532+drgorillamd@users.noreply.github.com> Date: Fri, 26 Jul 2024 14:51:50 +0200 Subject: [PATCH 30/37] chore: fmt --- test/SUMMARY.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/SUMMARY.md b/test/SUMMARY.md index 96a35483..404b0e5d 100644 --- a/test/SUMMARY.md +++ b/test/SUMMARY.md @@ -17,9 +17,9 @@ We identified 24 properties. We challenged these either in a long-running fuzzin We used echidna to test these 23 properties. In addition to these, another fuzzing campaign as been led against the mathematical contracts (BNum and BMath). BMath properties are currently not triggered in CI, due to various rounding errors, and should be further validated. -Limitations/future improvements +#### Limitations/future improvements Currently, the swap logic are tested against the swap in/out functions (and, in a similar way, liquidity management via the join/exit function). The combined equivalent (joinswapExternAmountIn, joinswapPoolAmountOut, etc) should be tested too. -BMath properties are currently not tested and should be refactored to quantify the rounding errors. +BMath properties are currently not tested and current tests should be refactored to quantify the precision errors. ### Formal verification: Symbolic Execution We managed to test 10 properties out of the 23. Properties not tested are either not easily challenged with symbolic execution (statefullness needed) or limited by Halmos itself (hitting loop unrolling boundaries in the implementation for instance). From 42d2a04c2a4a94e266892d44e4b06b3bbace8382 Mon Sep 17 00:00:00 2001 From: teddy Date: Mon, 29 Jul 2024 12:58:17 -0300 Subject: [PATCH 31/37] Fix/fuzz tests improvements (#178) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: fix linter setup * chore: update smocked files * chore: add missing spdx identifier * chore: add an npm script to run echidna tests * test: ensure SpotPriceAfterBelowSpotPriceBefore is never thrown * chore: fix natspec issues * test: ensure fuzz_joinExitPool body is runnable * chore: cleaning up fuzz (#179) * feat: creating BCoWPoolForTest to avoid modifying core contracts * fix: test:echidna script * fix: safeTransfer issue with echidna * chore: update test contract licenses * test: document property 25 * chore: remove unimplemented function --------- Co-authored-by: Weißer Hase --- .forge-snapshots/newBFactory.snap | 2 +- .gitignore | 3 +- .solhintignore | 1 - foundry.toml | 2 +- package.json | 1 + src/contracts/BPool.sol | 20 ++-- test/invariants/.solhint.json | 13 +++ test/invariants/PROPERTIES.md | 3 +- test/invariants/fuzz/BNum.t.sol | 2 +- test/invariants/fuzz/BToken.t.sol | 3 +- test/invariants/fuzz/Protocol.t.sol | 97 ++++++++++--------- .../invariants/helpers/AdvancedTestsUtils.sol | 4 +- .../invariants/helpers/BCoWFactoryForTest.sol | 14 +++ test/invariants/helpers/BCoWPoolForTest.sol | 31 ++++++ test/invariants/helpers/MockSettler.sol | 2 +- test/invariants/symbolic/BNum.t.sol | 2 +- test/invariants/symbolic/Protocol.t.sol | 2 +- 17 files changed, 129 insertions(+), 73 deletions(-) create mode 100644 test/invariants/.solhint.json create mode 100644 test/invariants/helpers/BCoWFactoryForTest.sol create mode 100644 test/invariants/helpers/BCoWPoolForTest.sol diff --git a/.forge-snapshots/newBFactory.snap b/.forge-snapshots/newBFactory.snap index c54b6046..95e984ca 100644 --- a/.forge-snapshots/newBFactory.snap +++ b/.forge-snapshots/newBFactory.snap @@ -1 +1 @@ -4130633 \ No newline at end of file +4130621 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3a54c827..00955047 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,5 @@ broadcast/*/*/* out # echidna corpuses -**/corpuses/* \ No newline at end of file +**/corpuses/* +**/crytic-export/* \ No newline at end of file diff --git a/.solhintignore b/.solhintignore index 4611d082..0790ddf4 100644 --- a/.solhintignore +++ b/.solhintignore @@ -1,3 +1,2 @@ test/smock/* test/manual-smock/* -test/invariants/* \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index ed1f23df..1adc6fc7 100644 --- a/foundry.toml +++ b/foundry.toml @@ -12,7 +12,7 @@ sort_imports = true solc_version = '0.8.25' libs = ["node_modules", "lib"] optimizer_runs = 500 -evm_version = 'shanghai' +evm_version = 'cancun' fs_permissions = [{ access = "read-write", path = ".forge-snapshots/"}] # 2018: function can be view, so far only caused by mocks # 2394: solc insists on reporting on every transient storage use diff --git a/package.json b/package.json index 20611680..12f99f4e 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "prepare": "husky install", "smock": "smock-foundry --contracts src/contracts", "test": "yarn test:integration && yarn test:unit", + "test:echidna": "find test/invariants/fuzz -regex '.*\\.t\\.sol$' |cut -d '/' -f 4 | cut -d . -f 1 |xargs -I{} echidna test/invariants/fuzz/{}.t.sol --contract Fuzz{} --config test/invariants/fuzz/{}.yaml", "test:integration": "forge test --ffi --match-path 'test/integration/**' -vvv --isolate", "test:local": "FOUNDRY_FUZZ_RUNS=100 forge test -vvv", "test:scaffold": "bulloak check --fix test/unit/*.tree && forge fmt", diff --git a/src/contracts/BPool.sol b/src/contracts/BPool.sol index 2817419a..2af48596 100644 --- a/src/contracts/BPool.sol +++ b/src/contracts/BPool.sol @@ -30,10 +30,6 @@ contract BPool is BToken, BMath, IBPool { /// @dev Sum of all token weights uint256 internal _totalWeight; - /// TEST TEST TEST TEST TEST TEST TEST TEST - bytes32 internal _reenteringMutex; - /// TEST TEST TEST TEST TEST TEST TEST TEST - /// @dev Logs the call data modifier _logs_() { emit LOG_CALL(msg.sig, msg.sender, msg.data); @@ -152,8 +148,8 @@ contract BPool is BToken, BMath, IBPool { _pullUnderlying(token, msg.sender, balance); } - /// @inheritdoc IBPool + /// @inheritdoc IBPool function unbind(address token) external _logs_ _lock_ _controller_ _notFinalized_ { if (!_records[token].bound) { revert BPool_TokenNotBound(); @@ -601,10 +597,9 @@ contract BPool is BToken, BMath, IBPool { * be interpreted as locked */ function _setLock(bytes32 value) internal virtual { - // assembly ("memory-safe") { - // tstore(_MUTEX_TRANSIENT_STORAGE_SLOT, value) - // } - _reenteringMutex = value; + assembly ("memory-safe") { + tstore(_MUTEX_TRANSIENT_STORAGE_SLOT, value) + } } /** @@ -675,9 +670,8 @@ contract BPool is BToken, BMath, IBPool { * allowing calls */ function _getLock() internal view virtual returns (bytes32 value) { - // assembly ("memory-safe") { - // value := tload(_MUTEX_TRANSIENT_STORAGE_SLOT) - // } - value = _reenteringMutex; + assembly ("memory-safe") { + value := tload(_MUTEX_TRANSIENT_STORAGE_SLOT) + } } } diff --git a/test/invariants/.solhint.json b/test/invariants/.solhint.json new file mode 100644 index 00000000..d3749ca8 --- /dev/null +++ b/test/invariants/.solhint.json @@ -0,0 +1,13 @@ +{ + "rules": { + "custom-errors": "off", + "no-empty-blocks":"off", + "reason-string": "off", + "reentrancy": "off", + "style-guide-casing": [ "warn", { + "ignoreVariables": true, + "ignorePublicFunctions": true, + "ignoreExternalFunctions": true + }] + } +} diff --git a/test/invariants/PROPERTIES.md b/test/invariants/PROPERTIES.md index 30d714ff..c4c18501 100644 --- a/test/invariants/PROPERTIES.md +++ b/test/invariants/PROPERTIES.md @@ -24,6 +24,7 @@ | only the settler can commit a hash | High level | 22 | [x] | [x] | | when a hash has been commited, only this order can be settled | High level | 23 | [ ] | [ ] | | BToken should not break the ToB ERC20 properties** | High level | 24 | | [x] | +| Spot price after swap is always greater than before swap | High level | 25 | | [x] | > (*) Bundled with 24 @@ -88,4 +89,4 @@ power of a power should mult the exp (x^a)^b == x^(a*b) ## Untested (precision issues in test settingsq) calcOutGivenIn should be inv with calcInGivenOut calcPoolOutGivenSingleIn should be inv with calcSingleInGivenPoolOut -calcSingleOutGivenPoolIn should be inv with calcPoolInGivenSingleOut \ No newline at end of file +calcSingleOutGivenPoolIn should be inv with calcPoolInGivenSingleOut diff --git a/test/invariants/fuzz/BNum.t.sol b/test/invariants/fuzz/BNum.t.sol index 72a518ca..79db38b3 100644 --- a/test/invariants/fuzz/BNum.t.sol +++ b/test/invariants/fuzz/BNum.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: MIT pragma solidity 0.8.25; import {EchidnaTest} from '../helpers/AdvancedTestsUtils.sol'; diff --git a/test/invariants/fuzz/BToken.t.sol b/test/invariants/fuzz/BToken.t.sol index 77283c8d..f712ad08 100644 --- a/test/invariants/fuzz/BToken.t.sol +++ b/test/invariants/fuzz/BToken.t.sol @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MIT pragma solidity 0.8.25; import {EchidnaTest} from '../helpers/AdvancedTestsUtils.sol'; @@ -5,7 +6,7 @@ import {CryticERC20ExternalBasicProperties} from '@crytic/properties/contracts/ERC20/external/properties/ERC20ExternalBasicProperties.sol'; import {ITokenMock} from '@crytic/properties/contracts/ERC20/external/util/ITokenMock.sol'; import {PropertiesConstants} from '@crytic/properties/contracts/util/PropertiesConstants.sol'; -import 'contracts/BToken.sol'; +import {BToken} from 'contracts/BToken.sol'; contract FuzzBToken is CryticERC20ExternalBasicProperties, EchidnaTest { constructor() { diff --git a/test/invariants/fuzz/Protocol.t.sol b/test/invariants/fuzz/Protocol.t.sol index 17e775b8..766d7f8f 100644 --- a/test/invariants/fuzz/Protocol.t.sol +++ b/test/invariants/fuzz/Protocol.t.sol @@ -1,26 +1,30 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: MIT pragma solidity 0.8.25; import {EchidnaTest, FuzzERC20} from '../helpers/AdvancedTestsUtils.sol'; +import {MockBNum as BNum} from '../../manual-smock/MockBNum.sol'; +import {BCoWFactoryForTest as BCoWFactory} from '../helpers/BCoWFactoryForTest.sol'; import {MockSettler} from '../helpers/MockSettler.sol'; -import {BCoWFactory, BCoWPool, IBPool} from 'contracts/BCoWFactory.sol'; + import {BConst} from 'contracts/BConst.sol'; import {BMath} from 'contracts/BMath.sol'; -import {BNum} from 'contracts/BNum.sol'; + +import {IBCoWPool} from 'interfaces/IBCoWPool.sol'; +import {IBPool} from 'interfaces/IBPool.sol'; contract FuzzProtocol is EchidnaTest { // System under test BCoWFactory factory; BConst bconst; BMath bmath; - BNum_exposed bnum; + BNum bnum; address solutionSettler; bytes32 appData; FuzzERC20[] tokens; - BCoWPool pool; + IBCoWPool pool; IBPool[] poolsToFinalize; @@ -34,17 +38,11 @@ contract FuzzProtocol is EchidnaTest { factory = new BCoWFactory(solutionSettler, appData); bconst = new BConst(); bmath = new BMath(); - bnum = new BNum_exposed(); + bnum = new BNum(); - // max bound token is 8 - for (uint256 i; i < 4; i++) { - FuzzERC20 _token = new FuzzERC20(); - _token.initialize('', '', 18); - tokens.push(_token); - } - - pool = BCoWPool(address(factory.newBPool())); + pool = IBCoWPool(address(factory.newBPool())); + // first 4 tokens bound to the finalized pool for (uint256 i; i < 4; i++) { FuzzERC20 _token = new FuzzERC20(); _token.initialize('', '', 18); @@ -61,15 +59,22 @@ contract FuzzProtocol is EchidnaTest { } } + // 4 other tokens to bind to pools in poolsToFinalize, since max bound token is 8 + for (uint256 i; i < 4; i++) { + FuzzERC20 _token = new FuzzERC20(); + _token.initialize('', '', 18); + tokens.push(_token); + } + pool.finalize(); - ghost_bptMinted = pool.INIT_POOL_SUPPLY(); + ghost_bptMinted = bconst.INIT_POOL_SUPPLY(); } // Randomly add or remove tokens to a pool // Insure caller has enough token // Main objective is to have an arbitrary number of tokens in the pool, peripheral objective is another // test of min/max token bound (properties 20 and 21) - function setup_joinExitPool(bool _join, uint256 _amountBpt) public AgentOrDeployer { + function setup_joinExitPool(bool _join, uint256 _amountBpt) public agentOrDeployer { if (_join) { uint256[] memory _maxAmountsIn; @@ -77,7 +82,7 @@ contract FuzzProtocol is EchidnaTest { for (uint256 i; i < _maxAmountsIn.length; i++) { uint256 _maxIn = - bnum.bmul_exposed(bnum.bdiv_exposed(_amountBpt, pool.totalSupply()), pool.getBalance(address(tokens[i]))); + bnum.call_bmul(bnum.call_bdiv(_amountBpt, pool.totalSupply()), pool.getBalance(address(tokens[i]))); _maxAmountsIn[i] = _maxIn; tokens[i].mint(currentCaller, _maxIn); @@ -109,7 +114,7 @@ contract FuzzProtocol is EchidnaTest { /// @custom:property-id 1 /// @custom:property BFactory should always be able to deploy new pools - function fuzz_BFactoryAlwaysDeploy() public AgentOrDeployer { + function fuzz_BFactoryAlwaysDeploy() public agentOrDeployer { // Precondition hevm.prank(currentCaller); @@ -127,7 +132,7 @@ contract FuzzProtocol is EchidnaTest { /// @custom:property-id 2 /// @custom:property BFactory's blab should always be modifiable by the current blabs - function fuzz_blabAlwaysModByBLab() public AgentOrDeployer { + function fuzz_blabAlwaysModByBLab() public agentOrDeployer { // Precondition address _currentBLab = factory.getBLabs(); @@ -142,9 +147,10 @@ contract FuzzProtocol is EchidnaTest { } } + /* TODO: re-enable this test after fixing the hevm issue with SafeTransfer library /// @custom:property-id 3 /// @custom:property BFactory should always be able to transfer the BToken to the blab, if called by it - function fuzz_alwaysCollect() public AgentOrDeployer { + function fuzz_alwaysCollect() public agentOrDeployer { // Precondition address _currentBLab = factory.getBLabs(); @@ -162,6 +168,7 @@ contract FuzzProtocol is EchidnaTest { assert(_currentBLab != currentCaller); } } + */ /// @custom:property-id 4 /// @custom:property the amount received can never be less than min amount out @@ -171,12 +178,14 @@ contract FuzzProtocol is EchidnaTest { /// @custom:property there can't be any amount out for a 0 amount in /// @custom:property-id 19 /// @custom:property a swap can only happen when the pool is finalized + /// @custom:property-id 25 + /// @custom:property spot price after swap is always greater than before swap function fuzz_swapExactIn( uint256 _minAmountOut, uint256 _amountIn, uint256 _tokenIn, uint256 _tokenOut - ) public AgentOrDeployer { + ) public agentOrDeployer { // Preconditions require(pool.isFinalized()); @@ -219,10 +228,14 @@ contract FuzzProtocol is EchidnaTest { // 19 assert(pool.isFinalized()); - } catch { + } catch (bytes memory errorData) { + // 25 + if (keccak256(errorData) == IBPool.BPool_SpotPriceAfterBelowSpotPriceBefore.selector) { + assert(false); + } assert( // above max ratio - _amountIn > bnum.bmul_exposed(tokens[_tokenIn].balanceOf(address(pool)), bconst.MAX_IN_RATIO()) + _amountIn > bnum.call_bmul(tokens[_tokenIn].balanceOf(address(pool)), bconst.MAX_IN_RATIO()) // below min amount out || _outComputed < _minAmountOut ); @@ -242,7 +255,7 @@ contract FuzzProtocol is EchidnaTest { uint256 _amountOut, uint256 _tokenIn, uint256 _tokenOut - ) public AgentOrDeployer { + ) public agentOrDeployer { // Precondition require(pool.isFinalized()); @@ -296,7 +309,10 @@ contract FuzzProtocol is EchidnaTest { // 19 assert(pool.isFinalized()); - } catch { + } catch (bytes memory errorData) { + if (keccak256(errorData) == IBPool.BPool_SpotPriceAfterBelowSpotPriceBefore.selector) { + assert(false); + } uint256 _spotBefore = bmath.calcSpotPrice( tokens[_tokenIn].balanceOf(address(pool)), pool.getDenormalizedWeight(address(tokens[_tokenIn])), @@ -305,12 +321,12 @@ contract FuzzProtocol is EchidnaTest { bconst.MIN_FEE() ); - uint256 _outRatio = bnum.bmul_exposed(tokens[_tokenOut].balanceOf(address(pool)), bconst.MAX_OUT_RATIO()); + uint256 _outRatio = bnum.call_bmul(tokens[_tokenOut].balanceOf(address(pool)), bconst.MAX_OUT_RATIO()); assert( _inComputed > _maxAmountIn // 5 || _amountOut > _outRatio // 14 - || _spotBefore > bnum.bdiv_exposed(_inComputed, _amountOut) + || _spotBefore > bnum.call_bdiv(_inComputed, _amountOut) ); } } @@ -325,7 +341,7 @@ contract FuzzProtocol is EchidnaTest { /// @custom:property total weight can be up to 50e18 function fuzz_totalWeightMax(uint256 _numberTokens, uint256[8] calldata _weights) public { // Precondition - BCoWPool _pool = BCoWPool(address(factory.newBPool())); + IBPool _pool = IBPool(address(factory.newBPool())); _numberTokens = clamp(_numberTokens, bconst.MIN_BOUND_TOKENS(), bconst.MAX_BOUND_TOKENS()); @@ -373,7 +389,7 @@ contract FuzzProtocol is EchidnaTest { /// @custom:property-id 12 /// @custom:property a non-finalized pool can only be finalized when the controller calls finalize() - function fuzz_poolFinalizedByController() public AgentOrDeployer { + function fuzz_poolFinalizedByController() public agentOrDeployer { // Precondition if (poolsToFinalize.length == 0) { return; @@ -409,7 +425,7 @@ contract FuzzProtocol is EchidnaTest { uint256 _amountPoolToken, uint256 _amountToTransfer, uint256 _tokenIdx - ) public AgentOrDeployer { + ) public agentOrDeployer { _tokenIdx = clamp(_tokenIdx, 0, tokens.length - 1); FuzzERC20 _token = tokens[_tokenIdx]; @@ -443,7 +459,7 @@ contract FuzzProtocol is EchidnaTest { /// @custom:property-id 18 /// @custom:property the amount of underlying token when exiting should always be the amount calculated in bmath - function fuzz_correctBPTBurnAmount(uint256 _amountPoolToken) public AgentOrDeployer { + function fuzz_correctBPTBurnAmount(uint256 _amountPoolToken) public agentOrDeployer { _amountPoolToken = clamp(_amountPoolToken, 0, pool.balanceOf(currentCaller)); uint256[] memory _amountsToReceive = new uint256[](4); @@ -480,7 +496,7 @@ contract FuzzProtocol is EchidnaTest { /// @custom:property-id 20 /// @custom:property bounding and unbounding token can only be done on a non-finalized pool, by the controller - function fuzz_boundOnlyNotFinalized() public AgentOrDeployer { + function fuzz_boundOnlyNotFinalized() public agentOrDeployer { // Precondition if (poolsToFinalize.length == 0) { return; @@ -538,7 +554,7 @@ contract FuzzProtocol is EchidnaTest { /// @custom:property-id 22 /// @custom:property only the settler can commit a hash - function fuzz_settlerCommit() public AgentOrDeployer { + function fuzz_settlerCommit() public agentOrDeployer { // Precondition hevm.prank(currentCaller); @@ -550,19 +566,4 @@ contract FuzzProtocol is EchidnaTest { assert(currentCaller != solutionSettler); } } - - /// @custom:property-id 23 - /// @custom:property when a hash has been commited, only this order can be settled - /// @custom:property-not-implemented - function fuzz_settlerSettle() public {} -} - -contract BNum_exposed is BNum { - function bdiv_exposed(uint256 a, uint256 b) public pure returns (uint256) { - return bdiv(a, b); - } - - function bmul_exposed(uint256 a, uint256 b) public pure returns (uint256) { - return bmul(a, b); - } } diff --git a/test/invariants/helpers/AdvancedTestsUtils.sol b/test/invariants/helpers/AdvancedTestsUtils.sol index ab261170..b44ed3d3 100644 --- a/test/invariants/helpers/AdvancedTestsUtils.sol +++ b/test/invariants/helpers/AdvancedTestsUtils.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: MIT pragma solidity 0.8.25; import {Test} from 'forge-std/Test.sol'; @@ -25,7 +25,7 @@ contract AgentsHandler { address internal currentCaller; - modifier AgentOrDeployer() { + modifier agentOrDeployer() { uint256 _currentAgentIndex = agentsIndex; currentCaller = _currentAgentIndex == 0 ? address(this) : agents[agentsIndex]; _; diff --git a/test/invariants/helpers/BCoWFactoryForTest.sol b/test/invariants/helpers/BCoWFactoryForTest.sol new file mode 100644 index 00000000..5ea032e1 --- /dev/null +++ b/test/invariants/helpers/BCoWFactoryForTest.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity 0.8.25; + +import {BCoWPoolForTest} from './BCoWPoolForTest.sol'; +import {BCoWFactory} from 'contracts/BCoWFactory.sol'; +import {IBPool} from 'interfaces/IBPool.sol'; + +contract BCoWFactoryForTest is BCoWFactory { + constructor(address cowSolutionSettler, bytes32 appData) BCoWFactory(cowSolutionSettler, appData) {} + + function _newBPool() internal virtual override returns (IBPool bCoWPool) { + bCoWPool = new BCoWPoolForTest(SOLUTION_SETTLER, APP_DATA); + } +} diff --git a/test/invariants/helpers/BCoWPoolForTest.sol b/test/invariants/helpers/BCoWPoolForTest.sol new file mode 100644 index 00000000..a411c5bf --- /dev/null +++ b/test/invariants/helpers/BCoWPoolForTest.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity 0.8.25; + +import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; +import {BCoWPool} from 'contracts/BCoWPool.sol'; + +contract BCoWPoolForTest is BCoWPool { + constructor(address cowSolutionSettler, bytes32 appData) BCoWPool(cowSolutionSettler, appData) {} + + bytes32 private _reenteringMutex; + + /// @dev workaround for hevm not supporting tload/tstore + function _setLock(bytes32 value) internal override { + _reenteringMutex = value; + } + + /// @dev workaround for hevm not supporting tload/tstore + function _getLock() internal view override returns (bytes32 value) { + value = _reenteringMutex; + } + + /// @dev workaround for hevm not supporting mcopy + function _pullUnderlying(address token, address from, uint256 amount) internal override { + IERC20(token).transferFrom(from, address(this), amount); + } + + /// @dev workaround for hevm not supporting mcopy + function _pushUnderlying(address token, address to, uint256 amount) internal override { + IERC20(token).transfer(to, amount); + } +} diff --git a/test/invariants/helpers/MockSettler.sol b/test/invariants/helpers/MockSettler.sol index f7a97e8f..598f47aa 100644 --- a/test/invariants/helpers/MockSettler.sol +++ b/test/invariants/helpers/MockSettler.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: MIT pragma solidity 0.8.25; import {GPv2Interaction, GPv2Trade, IERC20, ISettlement} from 'interfaces/ISettlement.sol'; diff --git a/test/invariants/symbolic/BNum.t.sol b/test/invariants/symbolic/BNum.t.sol index 2534e626..2f218f6f 100644 --- a/test/invariants/symbolic/BNum.t.sol +++ b/test/invariants/symbolic/BNum.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: MIT pragma solidity 0.8.25; import {HalmosTest} from '../helpers/AdvancedTestsUtils.sol'; diff --git a/test/invariants/symbolic/Protocol.t.sol b/test/invariants/symbolic/Protocol.t.sol index 084ce330..db717e33 100644 --- a/test/invariants/symbolic/Protocol.t.sol +++ b/test/invariants/symbolic/Protocol.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: MIT pragma solidity 0.8.25; import {FuzzERC20, HalmosTest} from '../helpers/AdvancedTestsUtils.sol'; From 23a8264d41fadcc842189bbc5b41a78a9dbd400c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wei=C3=9Fer=20Hase?= Date: Mon, 29 Jul 2024 18:11:25 +0200 Subject: [PATCH 32/37] chore: update forge snapshots --- .forge-snapshots/exitPool.snap | 2 +- .forge-snapshots/joinPool.snap | 2 +- .forge-snapshots/newBCoWFactory.snap | 2 +- .forge-snapshots/newBCoWPool.snap | 2 +- .forge-snapshots/newBFactory.snap | 2 +- .forge-snapshots/newBPool.snap | 2 +- .forge-snapshots/settlementCoWSwap.snap | 2 +- .forge-snapshots/settlementCoWSwapInverse.snap | 2 +- .forge-snapshots/swapExactAmountIn.snap | 2 +- .forge-snapshots/swapExactAmountInInverse.snap | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.forge-snapshots/exitPool.snap b/.forge-snapshots/exitPool.snap index 741b1af0..8739cb2f 100644 --- a/.forge-snapshots/exitPool.snap +++ b/.forge-snapshots/exitPool.snap @@ -1 +1 @@ -174820 \ No newline at end of file +178732 \ No newline at end of file diff --git a/.forge-snapshots/joinPool.snap b/.forge-snapshots/joinPool.snap index 44abd9c6..b8bdef9a 100644 --- a/.forge-snapshots/joinPool.snap +++ b/.forge-snapshots/joinPool.snap @@ -1 +1 @@ -138974 \ No newline at end of file +157147 \ No newline at end of file diff --git a/.forge-snapshots/newBCoWFactory.snap b/.forge-snapshots/newBCoWFactory.snap index ae0b3b91..1e0daeea 100644 --- a/.forge-snapshots/newBCoWFactory.snap +++ b/.forge-snapshots/newBCoWFactory.snap @@ -1 +1 @@ -4200675 \ No newline at end of file +4176056 \ No newline at end of file diff --git a/.forge-snapshots/newBCoWPool.snap b/.forge-snapshots/newBCoWPool.snap index 319c0adc..7f501b59 100644 --- a/.forge-snapshots/newBCoWPool.snap +++ b/.forge-snapshots/newBCoWPool.snap @@ -1 +1 @@ -3397437 \ No newline at end of file +3372040 \ No newline at end of file diff --git a/.forge-snapshots/newBFactory.snap b/.forge-snapshots/newBFactory.snap index 56f18daf..991f05ae 100644 --- a/.forge-snapshots/newBFactory.snap +++ b/.forge-snapshots/newBFactory.snap @@ -1 +1 @@ -3442127 \ No newline at end of file +3421308 \ No newline at end of file diff --git a/.forge-snapshots/newBPool.snap b/.forge-snapshots/newBPool.snap index 88d3594d..7adc1667 100644 --- a/.forge-snapshots/newBPool.snap +++ b/.forge-snapshots/newBPool.snap @@ -1 +1 @@ -2841995 \ No newline at end of file +2820010 \ No newline at end of file diff --git a/.forge-snapshots/settlementCoWSwap.snap b/.forge-snapshots/settlementCoWSwap.snap index 7742ce52..2fb16f9f 100644 --- a/.forge-snapshots/settlementCoWSwap.snap +++ b/.forge-snapshots/settlementCoWSwap.snap @@ -1 +1 @@ -215771 \ No newline at end of file +238850 \ No newline at end of file diff --git a/.forge-snapshots/settlementCoWSwapInverse.snap b/.forge-snapshots/settlementCoWSwapInverse.snap index f28a2b44..f2cea8d9 100644 --- a/.forge-snapshots/settlementCoWSwapInverse.snap +++ b/.forge-snapshots/settlementCoWSwapInverse.snap @@ -1 +1 @@ -225619 \ No newline at end of file +248698 \ No newline at end of file diff --git a/.forge-snapshots/swapExactAmountIn.snap b/.forge-snapshots/swapExactAmountIn.snap index d800720e..88f0e0bb 100644 --- a/.forge-snapshots/swapExactAmountIn.snap +++ b/.forge-snapshots/swapExactAmountIn.snap @@ -1 +1 @@ -104964 \ No newline at end of file +107416 \ No newline at end of file diff --git a/.forge-snapshots/swapExactAmountInInverse.snap b/.forge-snapshots/swapExactAmountInInverse.snap index 6ad7203f..0d037fea 100644 --- a/.forge-snapshots/swapExactAmountInInverse.snap +++ b/.forge-snapshots/swapExactAmountInInverse.snap @@ -1 +1 @@ -114787 \ No newline at end of file +117239 \ No newline at end of file From 5abef5153dfecfe9110828686cc755e503579c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wei=C3=9Fer=20Hase?= Date: Mon, 29 Jul 2024 18:13:13 +0200 Subject: [PATCH 33/37] chore: update gas snapshots --- .forge-snapshots/exitPool.snap | 2 +- .forge-snapshots/joinPool.snap | 2 +- .forge-snapshots/newBCoWFactory.snap | 2 +- .forge-snapshots/newBCoWPool.snap | 2 +- .forge-snapshots/newBFactory.snap | 2 +- .forge-snapshots/newBPool.snap | 2 +- .forge-snapshots/settlementCoWSwap.snap | 2 +- .forge-snapshots/settlementCoWSwapInverse.snap | 2 +- .forge-snapshots/swapExactAmountIn.snap | 2 +- .forge-snapshots/swapExactAmountInInverse.snap | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.forge-snapshots/exitPool.snap b/.forge-snapshots/exitPool.snap index 8739cb2f..741b1af0 100644 --- a/.forge-snapshots/exitPool.snap +++ b/.forge-snapshots/exitPool.snap @@ -1 +1 @@ -178732 \ No newline at end of file +174820 \ No newline at end of file diff --git a/.forge-snapshots/joinPool.snap b/.forge-snapshots/joinPool.snap index b8bdef9a..44abd9c6 100644 --- a/.forge-snapshots/joinPool.snap +++ b/.forge-snapshots/joinPool.snap @@ -1 +1 @@ -157147 \ No newline at end of file +138974 \ No newline at end of file diff --git a/.forge-snapshots/newBCoWFactory.snap b/.forge-snapshots/newBCoWFactory.snap index 1e0daeea..ae0b3b91 100644 --- a/.forge-snapshots/newBCoWFactory.snap +++ b/.forge-snapshots/newBCoWFactory.snap @@ -1 +1 @@ -4176056 \ No newline at end of file +4200675 \ No newline at end of file diff --git a/.forge-snapshots/newBCoWPool.snap b/.forge-snapshots/newBCoWPool.snap index 7f501b59..319c0adc 100644 --- a/.forge-snapshots/newBCoWPool.snap +++ b/.forge-snapshots/newBCoWPool.snap @@ -1 +1 @@ -3372040 \ No newline at end of file +3397437 \ No newline at end of file diff --git a/.forge-snapshots/newBFactory.snap b/.forge-snapshots/newBFactory.snap index 51186f34..56f18daf 100644 --- a/.forge-snapshots/newBFactory.snap +++ b/.forge-snapshots/newBFactory.snap @@ -1 +1 @@ -3421308 +3442127 \ No newline at end of file diff --git a/.forge-snapshots/newBPool.snap b/.forge-snapshots/newBPool.snap index 7adc1667..88d3594d 100644 --- a/.forge-snapshots/newBPool.snap +++ b/.forge-snapshots/newBPool.snap @@ -1 +1 @@ -2820010 \ No newline at end of file +2841995 \ No newline at end of file diff --git a/.forge-snapshots/settlementCoWSwap.snap b/.forge-snapshots/settlementCoWSwap.snap index 2fb16f9f..7742ce52 100644 --- a/.forge-snapshots/settlementCoWSwap.snap +++ b/.forge-snapshots/settlementCoWSwap.snap @@ -1 +1 @@ -238850 \ No newline at end of file +215771 \ No newline at end of file diff --git a/.forge-snapshots/settlementCoWSwapInverse.snap b/.forge-snapshots/settlementCoWSwapInverse.snap index f2cea8d9..f28a2b44 100644 --- a/.forge-snapshots/settlementCoWSwapInverse.snap +++ b/.forge-snapshots/settlementCoWSwapInverse.snap @@ -1 +1 @@ -248698 \ No newline at end of file +225619 \ No newline at end of file diff --git a/.forge-snapshots/swapExactAmountIn.snap b/.forge-snapshots/swapExactAmountIn.snap index 88f0e0bb..d800720e 100644 --- a/.forge-snapshots/swapExactAmountIn.snap +++ b/.forge-snapshots/swapExactAmountIn.snap @@ -1 +1 @@ -107416 \ No newline at end of file +104964 \ No newline at end of file diff --git a/.forge-snapshots/swapExactAmountInInverse.snap b/.forge-snapshots/swapExactAmountInInverse.snap index 0d037fea..6ad7203f 100644 --- a/.forge-snapshots/swapExactAmountInInverse.snap +++ b/.forge-snapshots/swapExactAmountInInverse.snap @@ -1 +1 @@ -117239 \ No newline at end of file +114787 \ No newline at end of file From a793e9dd89f78e3ccc314860b69700795472bb23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wei=C3=9Fer=20Hase?= Date: Wed, 31 Jul 2024 14:54:33 +0200 Subject: [PATCH 34/37] chore: updating Properties document after merge --- test/invariants/PROPERTIES.md | 27 +++++++++++++------------ test/invariants/symbolic/Protocol.t.sol | 3 +-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/test/invariants/PROPERTIES.md b/test/invariants/PROPERTIES.md index 0a3185c4..823548da 100644 --- a/test/invariants/PROPERTIES.md +++ b/test/invariants/PROPERTIES.md @@ -1,14 +1,14 @@ | Properties | Type | Id | Halmos | Echidna | | ------------------------------------------------------------------------------------------- | ------------------- | --- | ------ | ------- | | BFactory should always be able to deploy new pools | Unit | 1 | [x] | [x] | -| BFactory's BDao should always be modifiable by the current BDao | Unit | 2 | [x] | [x] | +| BFactory's BDao should always be modifiable by the current BDao | Unit | 2 | [x] | [x] | | BFactory should always be able to transfer the BToken to the BDao, if called by it | Unit | 3 | [x] | [x] | | the amount received can never be less than min amount out | Unit | 4 | :( | [x] | | the amount spent can never be greater than max amount in | Unit | 5 | :( | [x] | -| swap fee can only be 0 (cow pool) | Valid state | 6 | [x] | [x] | +| swap fee can only be 0 (cow pool) | Valid state | 6 | | [x] | | total weight can be up to 50e18 | Variable transition | 7 | [x] | [x] | -| BToken increaseApproval should increase the approval of the address by the amount* | Variable transition | 8 | [x] | [x] | -| BToken decreaseApproval should decrease the approval to max(old-amount, 0)* | Variable transition | 9 | [x] | [x] | +| BToken increaseApproval should increase the approval of the address by the amount* | Variable transition | 8 | | [x] | +| BToken decreaseApproval should decrease the approval to max(old-amount, 0)* | Variable transition | 9 | | [x] | | a pool can either be finalized or not finalized | Valid state | 10 | | [x] | | a finalized pool cannot switch back to non-finalized | State transition | 11 | | [x] | | a non-finalized pool can only be finalized when the controller calls finalize() | State transition | 12 | [x] | [x] | @@ -16,8 +16,8 @@ | an exact amount out is earned only if the amount in calculated in bmath is transfered | High level | 14 | :( | [x] | | there can't be any amount out for a 0 amount in | High level | 15 | :( | [x] | | the pool btoken can only be minted/burned in the join and exit operations | High level | 16 | | [x] | -| a direct token transfer can never reduce the underlying amount of a given token per BPT | High level | 17 | :( | [x] | -| the amount of underlying token when exiting should always be the amount calculated in bmath | High level | 18 | :( | [x] | +| ~~a direct token transfer can never reduce the underlying amount of a given token per BPT~~ | High level | 17 | :( | # | +| ~~the amount of underlying token when exiting should always be the amount calculated in bmath~~ | High level | 18 | :( | # | | a swap can only happen when the pool is finalized | High level | 19 | | [x] | | bounding and unbounding token can only be done on a non-finalized pool, by the controller | High level | 20 | [x] | [x] | | there always should be between MIN_BOUND_TOKENS and MAX_BOUND_TOKENS bound in a pool | High level | 21 | | [x] | @@ -30,10 +30,11 @@ > (**) [Trail of Bits ERC20 properties](https://github.com/crytic/properties?tab=readme-ov-file#erc20-tests) -[ ] planed to implement and still to do -
[x] implemented and tested -
:( implemented but test not passing due to an external factor (tool limitation - eg halmos max unrolling loop, etc) -
empty not implemented and will not be (design, etc) +
`[ ]` planed to implement and still to do +
`[x]` implemented and tested +
`:(` implemented but test not passing due to an external factor (tool limitation - eg halmos max unrolling loop, etc) +
`#` implemented but deprecated feature / property +
`` empty not implemented and will not be (design, etc) # Unit-test properties for the math libs (BNum and BMath): @@ -86,7 +87,7 @@ bpow should be distributive over mult of the same base x^a * x^b == x^(a+b) bpow should be distributive over mult of the same exp a^x * b^x == (a*b)^x power of a power should mult the exp (x^a)^b == x^(a*b) -## Untested (precision issues in test settingsq) calcOutGivenIn should be inv with calcInGivenOut -calcPoolOutGivenSingleIn should be inv with calcSingleInGivenPoolOut -calcSingleOutGivenPoolIn should be inv with calcPoolInGivenSingleOut +calcInGivenOut should be inv with calcOutGivenIn +~~calcPoolOutGivenSingleIn should be inv with calcSingleInGivenPoolOut~~ +~~calcSingleOutGivenPoolIn should be inv with calcPoolInGivenSingleOut~~ diff --git a/test/invariants/symbolic/Protocol.t.sol b/test/invariants/symbolic/Protocol.t.sol index 02108484..d67b4f9c 100644 --- a/test/invariants/symbolic/Protocol.t.sol +++ b/test/invariants/symbolic/Protocol.t.sol @@ -23,7 +23,6 @@ contract HalmosBalancer is HalmosTest { BCoWPool pool; address currentCaller = svm.createAddress('currentCaller'); - // address currentCaller = address(234); constructor() { solutionSettler = address(new MockSettler()); @@ -107,10 +106,10 @@ contract HalmosBalancer is HalmosTest { assert(_currentBDao != currentCaller); } } + /// @custom:property-id 7 /// @custom:property total weight can be up to 50e18 /// @dev Only 2 tokens are used, to avoid hitting the limit in loop unrolling - function check_totalWeightMax(uint256[2] calldata _weights) public { // Precondition BCoWPool _pool = BCoWPool(address(factory.newBPool())); From df49eb912afb0b33b9e8d193e1a342e00160265e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wei=C3=9Fer=20Hase?= Date: Thu, 1 Aug 2024 22:00:46 +0200 Subject: [PATCH 35/37] dev: improving bmath fuzz test (#184) * feat: improving bmath fuzz test * chore: updating Properties file * feat: adding min amount to test environment * test: ensure results are 0.1% from each other (#187) --------- Co-authored-by: teddy --- test/invariants/PROPERTIES.md | 2 +- test/invariants/fuzz/BMath.t.sol | 91 ++++++++++++++++++++++ test/invariants/fuzz/BMath.t.sol.invalid | 98 ------------------------ test/invariants/fuzz/BMath.yaml | 3 +- 4 files changed, 94 insertions(+), 100 deletions(-) create mode 100644 test/invariants/fuzz/BMath.t.sol delete mode 100644 test/invariants/fuzz/BMath.t.sol.invalid diff --git a/test/invariants/PROPERTIES.md b/test/invariants/PROPERTIES.md index 823548da..40b535ea 100644 --- a/test/invariants/PROPERTIES.md +++ b/test/invariants/PROPERTIES.md @@ -90,4 +90,4 @@ power of a power should mult the exp (x^a)^b == x^(a*b) calcOutGivenIn should be inv with calcInGivenOut calcInGivenOut should be inv with calcOutGivenIn ~~calcPoolOutGivenSingleIn should be inv with calcSingleInGivenPoolOut~~ -~~calcSingleOutGivenPoolIn should be inv with calcPoolInGivenSingleOut~~ +~~calcSingleOutGivenPoolIn should be inv with calcPoolInGivenSingleOut~~ \ No newline at end of file diff --git a/test/invariants/fuzz/BMath.t.sol b/test/invariants/fuzz/BMath.t.sol new file mode 100644 index 00000000..593d0e83 --- /dev/null +++ b/test/invariants/fuzz/BMath.t.sol @@ -0,0 +1,91 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.25; + +import {EchidnaTest} from '../helpers/AdvancedTestsUtils.sol'; +import {BMath} from 'contracts/BMath.sol'; + +contract FuzzBMath is EchidnaTest { + BMath bMath; + + uint256 immutable MIN_WEIGHT; + uint256 immutable MAX_WEIGHT; + uint256 immutable MIN_FEE; + uint256 immutable MAX_FEE; + + /** + * NOTE: These values were chosen to pass the fuzzing tests + * @dev Reducing BPOW_PRECISION may allow broader range of values increasing the gas cost + */ + uint256 constant MAX_BALANCE = 1_000_000e18; + uint256 constant MIN_BALANCE = 100e18; + uint256 constant MIN_AMOUNT = 1e12; + uint256 constant TOLERANCE_PRECISION = 1e18; + uint256 constant MAX_TOLERANCE = 1e18 + 1e15; //0.1% + + constructor() { + bMath = new BMath(); + + MIN_WEIGHT = bMath.MIN_WEIGHT(); + MAX_WEIGHT = bMath.MAX_WEIGHT(); + MIN_FEE = bMath.MIN_FEE(); + MAX_FEE = bMath.MAX_FEE(); + } + + // calcOutGivenIn should be inverse of calcInGivenOut + function testCalcInGivenOut_InvCalcInGivenOut( + uint256 tokenBalanceIn, + uint256 tokenWeightIn, + uint256 tokenBalanceOut, + uint256 tokenWeightOut, + uint256 tokenAmountIn, + uint256 swapFee + ) public view { + tokenWeightIn = clamp(tokenWeightIn, MIN_WEIGHT, MAX_WEIGHT); + tokenWeightOut = clamp(tokenWeightOut, MIN_WEIGHT, MAX_WEIGHT); + tokenAmountIn = clamp(tokenAmountIn, MIN_AMOUNT, MAX_BALANCE); + tokenBalanceOut = clamp(tokenBalanceOut, MIN_BALANCE, MAX_BALANCE); + tokenBalanceIn = clamp(tokenBalanceIn, MIN_BALANCE, MAX_BALANCE); + swapFee = clamp(swapFee, MIN_FEE, MAX_FEE); + + uint256 calc_tokenAmountOut = + bMath.calcOutGivenIn(tokenBalanceIn, tokenWeightIn, tokenBalanceOut, tokenWeightOut, tokenAmountIn, swapFee); + + uint256 calc_tokenAmountIn = + bMath.calcInGivenOut(tokenBalanceIn, tokenWeightIn, tokenBalanceOut, tokenWeightOut, calc_tokenAmountOut, swapFee); + + assert( + tokenAmountIn >= calc_tokenAmountIn + ? (tokenAmountIn * TOLERANCE_PRECISION / calc_tokenAmountIn) <= MAX_TOLERANCE + : (calc_tokenAmountIn * TOLERANCE_PRECISION / tokenAmountIn) <= MAX_TOLERANCE + ); + } + + // calcInGivenOut should be inverse of calcOutGivenIn + function testCalcOutGivenIn_InvCalcOutGivenIn( + uint256 tokenBalanceIn, + uint256 tokenWeightIn, + uint256 tokenBalanceOut, + uint256 tokenWeightOut, + uint256 tokenAmountOut, + uint256 swapFee + ) public view { + tokenWeightIn = clamp(tokenWeightIn, MIN_WEIGHT, MAX_WEIGHT); + tokenWeightOut = clamp(tokenWeightOut, MIN_WEIGHT, MAX_WEIGHT); + tokenAmountOut = clamp(tokenAmountOut, MIN_AMOUNT, MAX_BALANCE); + tokenBalanceOut = clamp(tokenBalanceOut, MIN_BALANCE, MAX_BALANCE); + tokenBalanceIn = clamp(tokenBalanceIn, MIN_BALANCE, MAX_BALANCE); + swapFee = clamp(swapFee, MIN_FEE, MAX_FEE); + + uint256 calc_tokenAmountIn = + bMath.calcInGivenOut(tokenBalanceOut, tokenWeightOut, tokenBalanceIn, tokenWeightIn, tokenAmountOut, swapFee); + + uint256 calc_tokenAmountOut = + bMath.calcOutGivenIn(tokenBalanceOut, tokenWeightOut, tokenBalanceIn, tokenWeightIn, calc_tokenAmountIn, swapFee); + + assert( + tokenAmountOut >= calc_tokenAmountOut + ? (tokenAmountOut * TOLERANCE_PRECISION / calc_tokenAmountOut) <= MAX_TOLERANCE + : (calc_tokenAmountOut * TOLERANCE_PRECISION / tokenAmountOut) <= MAX_TOLERANCE + ); + } +} diff --git a/test/invariants/fuzz/BMath.t.sol.invalid b/test/invariants/fuzz/BMath.t.sol.invalid deleted file mode 100644 index d1493923..00000000 --- a/test/invariants/fuzz/BMath.t.sol.invalid +++ /dev/null @@ -1,98 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; - -import {EchidnaTest} from '../helpers/AdvancedTestsUtils.sol'; - -import {BMath} from 'contracts/BMath.sol'; - -contract FuzzBMath is BMath, EchidnaTest { - // calcOutGivenIn should be inverse of calcInGivenOut - function testCalcInGivenOut_InvCalcInGivenOut( - uint256 tokenBalanceIn, - uint256 tokenWeightIn, - uint256 tokenBalanceOut, - uint256 tokenWeightOut, - uint256 tokenAmountIn, - uint256 swapFee - ) public { - tokenWeightIn = clamp(tokenWeightIn, MIN_WEIGHT, MAX_WEIGHT); - tokenWeightOut = clamp(tokenWeightOut, MIN_WEIGHT, MAX_WEIGHT); - tokenAmountIn = clamp(tokenAmountIn, 1 ether, 10 ether); - tokenBalanceOut = clamp(tokenBalanceOut, 1 ether, 10 ether); - tokenBalanceIn = clamp(tokenBalanceIn, 1 ether, 10 ether); - swapFee = clamp(swapFee, MIN_FEE, MAX_FEE); - - uint256 calc_tokenAmountOut = - calcOutGivenIn(tokenBalanceIn, tokenWeightIn, tokenBalanceOut, tokenWeightOut, tokenAmountIn, swapFee); - - uint256 calc_tokenAmountIn = - calcInGivenOut(tokenBalanceOut, tokenWeightOut, tokenBalanceIn, tokenWeightIn, calc_tokenAmountOut, swapFee); - - assert(tokenAmountIn == calc_tokenAmountIn || tokenAmountIn > calc_tokenAmountIn ? tokenAmountIn - calc_tokenAmountIn < BONE : calc_tokenAmountIn - tokenAmountIn < BONE); - } - - // calcInGivenOut should be inverse of calcOutGivenIn - function testCalcOutGivenIn_InvCalcOutGivenIn( - uint256 tokenBalanceIn, - uint256 tokenWeightIn, - uint256 tokenBalanceOut, - uint256 tokenWeightOut, - uint256 tokenAmountOut, - uint256 swapFee - ) public { - tokenWeightIn = clamp(tokenWeightIn, MIN_WEIGHT, MAX_WEIGHT); - tokenWeightOut = clamp(tokenWeightOut, MIN_WEIGHT, MAX_WEIGHT); - - uint256 calc_tokenAmountIn = - calcInGivenOut(tokenBalanceOut, tokenWeightOut, tokenBalanceIn, tokenWeightIn, tokenAmountOut, swapFee); - - uint256 calc_tokenAmountOut = - calcOutGivenIn(tokenBalanceIn, tokenWeightIn, tokenBalanceOut, tokenWeightOut, calc_tokenAmountIn, swapFee); - - assert(tokenAmountOut == calc_tokenAmountOut); - } - - // calcSingleInGivenPoolOut should be inverse of calcPoolOutGivenSingleIn - function testCalcSingleInGivenPoolOut_InvCalcPoolOutGivenSingle( - uint256 tokenBalanceIn, - uint256 tokenWeightIn, - uint256 poolSupply, - uint256 totalWeight, - uint256 tokenAmountOut, - uint256 swapFee - ) public { - tokenWeightIn = clamp(tokenWeightIn, MIN_WEIGHT, MAX_WEIGHT); - totalWeight = clamp(totalWeight, MIN_WEIGHT, MAX_TOTAL_WEIGHT); - tokenBalanceIn = clamp(tokenBalanceIn, 1, type(uint256).max); - - uint256 calc_tokenAmountIn = - calcSingleInGivenPoolOut(tokenBalanceIn, tokenWeightIn, poolSupply, totalWeight, tokenAmountOut, swapFee); - - uint256 calc_poolAmountOut = - calcPoolOutGivenSingleIn(tokenBalanceIn, tokenWeightIn, poolSupply, totalWeight, calc_tokenAmountIn, swapFee); - - assert(tokenAmountOut == calc_poolAmountOut); - } - - // calcPoolOutGivenSingleIn should be inverse of calcSingleInGivenPoolOut - function testCalcPoolOutGivenSingle_InvCalcSingleInGivenPoolOut( - uint256 tokenBalanceIn, - uint256 tokenWeightIn, - uint256 poolSupply, - uint256 totalWeight, - uint256 poolAmountOut, - uint256 swapFee - ) public { - tokenWeightIn = clamp(tokenWeightIn, MIN_WEIGHT, MAX_WEIGHT); - totalWeight = clamp(totalWeight, MIN_WEIGHT, MAX_TOTAL_WEIGHT); - tokenBalanceIn = clamp(tokenBalanceIn, 1, type(uint256).max); - - uint256 calc_poolAmountIn = - calcPoolOutGivenSingleIn(tokenBalanceIn, tokenWeightIn, poolSupply, totalWeight, poolAmountOut, swapFee); - - uint256 calc_tokenAmountOut = - calcSingleInGivenPoolOut(tokenBalanceIn, tokenWeightIn, poolSupply, totalWeight, calc_poolAmountIn, swapFee); - - assert(poolAmountOut == calc_tokenAmountOut); - } -} diff --git a/test/invariants/fuzz/BMath.yaml b/test/invariants/fuzz/BMath.yaml index b14f887c..f937a26a 100644 --- a/test/invariants/fuzz/BMath.yaml +++ b/test/invariants/fuzz/BMath.yaml @@ -2,5 +2,6 @@ testMode: assertion corpusDir: test/invariants/fuzz/corpuses/BMath/ coverageFormats: ["html","lcov"] -allContracts: true +allContracts: false testLimit: 50000 +seqLen: 1 From 9d976ffe259ae0366f6c442557be10ab746c26da Mon Sep 17 00:00:00 2001 From: teddy Date: Thu, 1 Aug 2024 17:37:23 -0300 Subject: [PATCH 36/37] docs: update test summary (#189) --- test/SUMMARY.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/SUMMARY.md b/test/SUMMARY.md index 404b0e5d..5f2479b9 100644 --- a/test/SUMMARY.md +++ b/test/SUMMARY.md @@ -2,7 +2,7 @@ ## Warning The repo is using solc 0.8.25, which compiles to the Cancun EVM version by default. Unfortunately, the hevm has no implementation of this EVM version ([or not yet](https://github.com/ethereum/hevm/issues/469#issuecomment-2220677206)). -Solc using a mcopy opcode somewhere, the property tests are run on Shanghai for now (at least until the hevm catches up), preventing this branch to be merged with the main one. +By using `ForTest` contracts in for property tests (which avoid using transient storage and `mcopy`) we managed to make the tests run under Cancun. ## Unit tests Our unit tests are covering every branches, using the branched-tree technique with [Bulloak](https://github.com/alexfertel/bulloak). @@ -15,11 +15,10 @@ We identified 24 properties. We challenged these either in a long-running fuzzin ### Fuzzing campaign -We used echidna to test these 23 properties. In addition to these, another fuzzing campaign as been led against the mathematical contracts (BNum and BMath). BMath properties are currently not triggered in CI, due to various rounding errors, and should be further validated. +We used echidna to test these 23 properties. In addition to these, another fuzzing campaign as been led against the mathematical contracts (BNum and BMath). #### Limitations/future improvements -Currently, the swap logic are tested against the swap in/out functions (and, in a similar way, liquidity management via the join/exit function). The combined equivalent (joinswapExternAmountIn, joinswapPoolAmountOut, etc) should be tested too. -BMath properties are currently not tested and current tests should be refactored to quantify the precision errors. +Currently, the swap logic are tested against the swap in/out functions (and, in a similar way, liquidity management via the join/exit function). ### Formal verification: Symbolic Execution We managed to test 10 properties out of the 23. Properties not tested are either not easily challenged with symbolic execution (statefullness needed) or limited by Halmos itself (hitting loop unrolling boundaries in the implementation for instance). From cd1ef623ae952ac9f46623f0cc0842fa107bf2a5 Mon Sep 17 00:00:00 2001 From: teddy Date: Fri, 2 Aug 2024 05:10:40 -0300 Subject: [PATCH 37/37] chore: fuzz sym fixes (#190) * test: deal with previously commented code * chore: pass name and symbol to ForTest contracts * fix: work around hevm not supporting mcopy * fix: remove unprovable property and replace it with two provable ones --- src/contracts/BCoWPool.sol | 2 +- src/contracts/BFactory.sol | 2 +- test/invariants/PROPERTIES.md | 3 +- test/invariants/fuzz/BToken.t.sol | 2 +- test/invariants/fuzz/Protocol.t.sol | 88 ++----------------- .../invariants/helpers/BCoWFactoryForTest.sol | 14 ++- test/invariants/helpers/BCoWPoolForTest.sol | 17 +++- test/invariants/symbolic/BNum.t.sol | 39 +++++--- test/invariants/symbolic/Protocol.t.sol | 19 ++-- 9 files changed, 75 insertions(+), 111 deletions(-) diff --git a/src/contracts/BCoWPool.sol b/src/contracts/BCoWPool.sol index ef2a7811..aae926d8 100644 --- a/src/contracts/BCoWPool.sol +++ b/src/contracts/BCoWPool.sol @@ -145,7 +145,7 @@ contract BCoWPool is IERC1271, IBCoWPool, BPool, BCoWConst { * @dev Grants infinite approval to the vault relayer for all tokens in the * pool after the finalization of the setup. Also emits COWAMMPoolCreated() event. */ - function _afterFinalize() internal override { + function _afterFinalize() internal virtual override { uint256 tokensLength = _tokens.length; for (uint256 i; i < tokensLength; i++) { IERC20(_tokens[i]).forceApprove(VAULT_RELAYER, type(uint256).max); diff --git a/src/contracts/BFactory.sol b/src/contracts/BFactory.sol index 22a768db..b9500d02 100644 --- a/src/contracts/BFactory.sol +++ b/src/contracts/BFactory.sol @@ -42,7 +42,7 @@ contract BFactory is IBFactory { } /// @inheritdoc IBFactory - function collect(IBPool bPool) external { + function collect(IBPool bPool) external virtual { if (msg.sender != _bDao) { revert BFactory_NotBDao(); } diff --git a/test/invariants/PROPERTIES.md b/test/invariants/PROPERTIES.md index 40b535ea..ff3d6ed1 100644 --- a/test/invariants/PROPERTIES.md +++ b/test/invariants/PROPERTIES.md @@ -49,12 +49,13 @@ badd result should always be gte its terms badd should never sum terms which have a sum gt uint max badd should have bsub as reverse operation -bsub should not be commutative bsub should not be associative bsub should have 0 as identity bsub result should always be lte its terms bsub should alway revert if b > a (duplicate with previous tho) +bsubSign should not be commutative sign-wise +bsubSign should be commutative value-wise bsubSign result should always be negative if b > a bsubSign result should always be positive if a > b bsubSign result should always be 0 if a == b diff --git a/test/invariants/fuzz/BToken.t.sol b/test/invariants/fuzz/BToken.t.sol index f712ad08..f4eb2bd3 100644 --- a/test/invariants/fuzz/BToken.t.sol +++ b/test/invariants/fuzz/BToken.t.sol @@ -47,7 +47,7 @@ contract FuzzBToken is CryticERC20ExternalBasicProperties, EchidnaTest { } } -contract CryticTokenMock is BToken, PropertiesConstants { +contract CryticTokenMock is BToken('Balancer Pool Token', 'BPT'), PropertiesConstants { bool public isMintableOrBurnable; uint256 public initialSupply; diff --git a/test/invariants/fuzz/Protocol.t.sol b/test/invariants/fuzz/Protocol.t.sol index 8a389a1a..7203ccd6 100644 --- a/test/invariants/fuzz/Protocol.t.sol +++ b/test/invariants/fuzz/Protocol.t.sol @@ -32,6 +32,9 @@ contract FuzzProtocol is EchidnaTest { uint256 ghost_bptBurned; mapping(FuzzERC20 => uint256) ghost_amountDirectlyTransfered; + string constant ERC20_SYMBOL = 'BPT'; + string constant ERC20_NAME = 'Balancer Pool Token'; + constructor() { solutionSettler = address(new MockSettler()); @@ -40,7 +43,7 @@ contract FuzzProtocol is EchidnaTest { bmath = new BMath(); bnum = new BNum(); - pool = IBCoWPool(address(factory.newBPool())); + pool = IBCoWPool(address(factory.newBPool('Balancer Pool Token', 'BPT'))); // first 4 tokens bound to the finalized pool for (uint256 i; i < 4; i++) { @@ -119,7 +122,7 @@ contract FuzzProtocol is EchidnaTest { hevm.prank(currentCaller); // Action - try factory.newBPool() returns (IBPool _newPool) { + try factory.newBPool(ERC20_NAME, ERC20_SYMBOL) returns (IBPool _newPool) { // Postcondition assert(address(_newPool).code.length > 0); assert(factory.isBPool(address(_newPool))); @@ -147,7 +150,6 @@ contract FuzzProtocol is EchidnaTest { } } - /* TODO: re-enable this test after fixing the hevm issue with SafeTransfer library /// @custom:property-id 3 /// @custom:property BFactory should always be able to transfer the BToken to the BDao, if called by it function fuzz_alwaysCollect() public agentOrDeployer { @@ -168,7 +170,6 @@ contract FuzzProtocol is EchidnaTest { assert(_currentBDao != currentCaller); } } - */ /// @custom:property-id 4 /// @custom:property the amount received can never be less than min amount out @@ -341,7 +342,7 @@ contract FuzzProtocol is EchidnaTest { /// @custom:property total weight can be up to 50e18 function fuzz_totalWeightMax(uint256 _numberTokens, uint256[8] calldata _weights) public { // Precondition - IBPool _pool = IBPool(address(factory.newBPool())); + IBPool _pool = IBPool(address(factory.newBPool(ERC20_NAME, ERC20_SYMBOL))); _numberTokens = clamp(_numberTokens, bconst.MIN_BOUND_TOKENS(), bconst.MAX_BOUND_TOKENS()); @@ -419,83 +420,6 @@ contract FuzzProtocol is EchidnaTest { assert(ghost_bptMinted - ghost_bptBurned == pool.totalSupply()); } - /* NOTE: deprecated calcSingleOutGivenPoolIn - /// @custom:property-id 17 - /// @custom:property a direct token transfer can never reduce the underlying amount of a given token per BPT - function fuzz_directTransfer( - uint256 _amountPoolToken, - uint256 _amountToTransfer, - uint256 _tokenIdx - ) public agentOrDeployer { - _tokenIdx = clamp(_tokenIdx, 0, tokens.length - 1); - FuzzERC20 _token = tokens[_tokenIdx]; - - uint256 _redeemedAmountBeforeTransfer = bmath.calcSingleOutGivenPoolIn( - _token.balanceOf(address(pool)), - pool.getDenormalizedWeight(address(_token)), - pool.totalSupply(), - pool.getTotalDenormalizedWeight(), - _amountPoolToken, - bconst.MIN_FEE() - ); - - _token.mint(address(this), _amountToTransfer); - // Action - _token.transfer(address(pool), _amountToTransfer); - - // Postcondition - uint256 _redeemedAmountAfter = bmath.calcSingleOutGivenPoolIn( - _token.balanceOf(address(pool)), - pool.getDenormalizedWeight(address(_token)), - pool.totalSupply(), - pool.getTotalDenormalizedWeight(), - _amountPoolToken, - bconst.MIN_FEE() - ); - - assert(_redeemedAmountAfter >= _redeemedAmountBeforeTransfer); - - ghost_amountDirectlyTransfered[_token] += _amountToTransfer; - } - - /// @custom:property-id 18 - /// @custom:property the amount of underlying token when exiting should always be the amount calculated in bmath - function fuzz_correctBPTBurnAmount(uint256 _amountPoolToken) public agentOrDeployer { - _amountPoolToken = clamp(_amountPoolToken, 0, pool.balanceOf(currentCaller)); - - uint256[] memory _amountsToReceive = new uint256[](4); - uint256[] memory _previousBalances = new uint256[](4); - - for (uint256 i; i < tokens.length; i++) { - FuzzERC20 _token = tokens[i]; - - _amountsToReceive[i] = bmath.calcSingleOutGivenPoolIn( - _token.balanceOf(address(pool)), - pool.getDenormalizedWeight(address(_token)), - pool.totalSupply(), - pool.getTotalDenormalizedWeight(), - _amountPoolToken, - bconst.MIN_FEE() - ); - - _previousBalances[i] = _token.balanceOf(currentCaller); - } - - hevm.prank(currentCaller); - pool.approve(address(pool), _amountPoolToken); - - hevm.prank(currentCaller); - - // Action - pool.exitPool(_amountPoolToken, new uint256[](4)); - - // PostCondition - for (uint256 i; i < tokens.length; i++) { - assert(tokens[i].balanceOf(currentCaller) == _previousBalances[i] + _amountsToReceive[i]); - } - } - */ - /// @custom:property-id 20 /// @custom:property bounding and unbounding token can only be done on a non-finalized pool, by the controller function fuzz_boundOnlyNotFinalized() public agentOrDeployer { diff --git a/test/invariants/helpers/BCoWFactoryForTest.sol b/test/invariants/helpers/BCoWFactoryForTest.sol index 5ea032e1..477abf41 100644 --- a/test/invariants/helpers/BCoWFactoryForTest.sol +++ b/test/invariants/helpers/BCoWFactoryForTest.sol @@ -3,12 +3,24 @@ pragma solidity 0.8.25; import {BCoWPoolForTest} from './BCoWPoolForTest.sol'; import {BCoWFactory} from 'contracts/BCoWFactory.sol'; + +import {BFactory} from 'contracts/BFactory.sol'; +import {IBFactory} from 'interfaces/IBFactory.sol'; import {IBPool} from 'interfaces/IBPool.sol'; contract BCoWFactoryForTest is BCoWFactory { constructor(address cowSolutionSettler, bytes32 appData) BCoWFactory(cowSolutionSettler, appData) {} - function _newBPool() internal virtual override returns (IBPool bCoWPool) { + function _newBPool(string memory, string memory) internal virtual override returns (IBPool bCoWPool) { bCoWPool = new BCoWPoolForTest(SOLUTION_SETTLER, APP_DATA); } + + /// @dev workaround for hevm not supporting mcopy + function collect(IBPool bPool) external override(BFactory, IBFactory) { + if (msg.sender != _bDao) { + revert BFactory_NotBDao(); + } + uint256 collected = bPool.balanceOf(address(this)); + bPool.transfer(_bDao, collected); + } } diff --git a/test/invariants/helpers/BCoWPoolForTest.sol b/test/invariants/helpers/BCoWPoolForTest.sol index a411c5bf..707ccc45 100644 --- a/test/invariants/helpers/BCoWPoolForTest.sol +++ b/test/invariants/helpers/BCoWPoolForTest.sol @@ -2,10 +2,12 @@ pragma solidity 0.8.25; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; + import {BCoWPool} from 'contracts/BCoWPool.sol'; +import {IBCoWFactory} from 'interfaces/IBCoWFactory.sol'; contract BCoWPoolForTest is BCoWPool { - constructor(address cowSolutionSettler, bytes32 appData) BCoWPool(cowSolutionSettler, appData) {} + constructor(address cowSolutionSettler, bytes32 appData) BCoWPool(cowSolutionSettler, appData, 'name', 'symbol') {} bytes32 private _reenteringMutex; @@ -28,4 +30,17 @@ contract BCoWPoolForTest is BCoWPool { function _pushUnderlying(address token, address to, uint256 amount) internal override { IERC20(token).transfer(to, amount); } + + /// @dev workaround for hevm not supporting mcopy + function _afterFinalize() internal override { + uint256 tokensLength = _tokens.length; + for (uint256 i; i < tokensLength; i++) { + IERC20(_tokens[i]).approve(VAULT_RELAYER, type(uint256).max); + } + + try IBCoWFactory(FACTORY).logBCoWPool() {} + catch { + emit IBCoWFactory.COWAMMPoolCreated(address(this)); + } + } } diff --git a/test/invariants/symbolic/BNum.t.sol b/test/invariants/symbolic/BNum.t.sol index 2f218f6f..9a4b9cd1 100644 --- a/test/invariants/symbolic/BNum.t.sol +++ b/test/invariants/symbolic/BNum.t.sol @@ -100,19 +100,6 @@ contract SymbolicBNum is BNum, HalmosTest { // Bnum::bsub // ///////////////////////////////////////////////////////////////////// - // bsub should not be commutative - function check_bsub_notCommut(uint256 _a, uint256 _b) public pure { - // precondition - vm.assume(_a != _b); - - // action - uint256 _result1 = bsub(_a, _b); - uint256 _result2 = bsub(_b, _a); - - // post condition - assert(_result1 != _result2); - } - // bsub should not be associative function check_bsub_notAssoc(uint256 _a, uint256 _b, uint256 _c) public pure { // precondition @@ -152,6 +139,32 @@ contract SymbolicBNum is BNum, HalmosTest { // Bnum::bsubSign // ///////////////////////////////////////////////////////////////////// + // bsubSign should be commutative value-wise + function check_bsubSign_CommutValue(uint256 _a, uint256 _b) public pure { + // precondition + vm.assume(_a != _b); + + // action + (uint256 _result1,) = bsubSign(_a, _b); + (uint256 _result2,) = bsubSign(_b, _a); + + // post condition + assert(_result1 == _result2); + } + + // bsubSign should not be commutative sign-wise + function check_bsubSign_notCommutSign(uint256 _a, uint256 _b) public pure { + // precondition + vm.assume(_a != _b); + + // action + (, bool _sign1) = bsubSign(_a, _b); + (, bool _sign2) = bsubSign(_b, _a); + + // post condition + assert(_sign1 != _sign2); + } + // bsubSign result should always be negative if b > a function check_bsubSign_negative(uint256 _a, uint256 _b) public pure { // precondition diff --git a/test/invariants/symbolic/Protocol.t.sol b/test/invariants/symbolic/Protocol.t.sol index d67b4f9c..cb0dec82 100644 --- a/test/invariants/symbolic/Protocol.t.sol +++ b/test/invariants/symbolic/Protocol.t.sol @@ -3,24 +3,24 @@ pragma solidity 0.8.25; import {FuzzERC20, HalmosTest} from '../helpers/AdvancedTestsUtils.sol'; +import {BCoWFactoryForTest as BCoWFactory} from '../helpers/BCoWFactoryForTest.sol'; import {MockSettler} from '../helpers/MockSettler.sol'; -import {BCoWFactory, BCoWPool, IBPool} from 'contracts/BCoWFactory.sol'; +import {IBCoWPool} from 'interfaces/IBCoWPool.sol'; +import {IBPool} from 'interfaces/IBPool.sol'; import {BConst} from 'contracts/BConst.sol'; -import {BMath} from 'contracts/BMath.sol'; import {BToken} from 'contracts/BToken.sol'; contract HalmosBalancer is HalmosTest { // System under test BCoWFactory factory; BConst bconst; - BMath bmath; address solutionSettler; bytes32 appData; FuzzERC20[] tokens; - BCoWPool pool; + IBCoWPool pool; address currentCaller = svm.createAddress('currentCaller'); @@ -28,8 +28,7 @@ contract HalmosBalancer is HalmosTest { solutionSettler = address(new MockSettler()); factory = new BCoWFactory(solutionSettler, appData); bconst = new BConst(); - bmath = new BMath(); - pool = BCoWPool(address(factory.newBPool())); + pool = IBCoWPool(address(factory.newBPool('Balancer Pool Token', 'BPT'))); // max bound token is 8 for (uint256 i; i < 5; i++) { @@ -63,7 +62,7 @@ contract HalmosBalancer is HalmosTest { vm.prank(_caller); // Action - try factory.newBPool() returns (IBPool _newPool) { + try factory.newBPool('Balancer Pool Token', 'BPT') returns (IBPool _newPool) { // Postcondition assert(address(_newPool).code.length > 0); assert(factory.isBPool(address(_newPool))); @@ -112,7 +111,7 @@ contract HalmosBalancer is HalmosTest { /// @dev Only 2 tokens are used, to avoid hitting the limit in loop unrolling function check_totalWeightMax(uint256[2] calldata _weights) public { // Precondition - BCoWPool _pool = BCoWPool(address(factory.newBPool())); + IBCoWPool _pool = IBCoWPool(address(factory.newBPool('Balancer Pool Token', 'BPT'))); uint256 _totalWeight = 0; @@ -179,7 +178,7 @@ contract HalmosBalancer is HalmosTest { /// @custom:property a non-finalized pool can only be finalized when the controller calls finalize() function check_poolFinalizedByController() public { // Precondition - IBPool _nonFinalizedPool = factory.newBPool(); + IBPool _nonFinalizedPool = factory.newBPool('Balancer Pool Token', 'BPT'); vm.prank(_nonFinalizedPool.getController()); @@ -209,7 +208,7 @@ contract HalmosBalancer is HalmosTest { /// @custom:property bounding and unbounding token can only be done on a non-finalized pool, by the controller function check_boundOnlyNotFinalized() public { // Precondition - IBPool _nonFinalizedPool = factory.newBPool(); + IBPool _nonFinalizedPool = factory.newBPool('Balancer Pool Token', 'BPT'); address _callerBind = svm.createAddress('callerBind'); address _callerUnbind = svm.createAddress('callerUnbind');