From 50b729039d1189ab6f03d8eb1f0222fe2b3eee49 Mon Sep 17 00:00:00 2001 From: Njoku Emmanuel Date: Mon, 5 Feb 2024 22:55:57 +0100 Subject: [PATCH 1/5] chore: refactor to support base sepolia --- src/contracts/abis/Currency.json | 3811 ++-- src/contracts/abis/Feed.json | 2552 +-- src/contracts/abis/Rate.json | 1068 + src/contracts/abis/Vault.json | 17800 ++++++++-------- src/contracts/abis/VaultGetters.json | 7450 ++++--- src/contracts/abis/VaultRouter.json | 11411 ++++++++-- src/contracts/abis/index.ts | 1 + src/contracts/getContractAddresses.ts | 47 +- src/contracts/types.ts | 6 +- src/generated/Currency.ts | 452 +- src/generated/Feed.ts | 330 +- src/generated/Rate.ts | 140 + src/generated/Vault.ts | 440 +- src/generated/VaultRouter.ts | 259 +- src/generated/factories/Currency__factory.ts | 544 +- src/generated/factories/Feed__factory.ts | 245 +- src/generated/factories/Rate__factory.ts | 155 + .../factories/VaultGetters__factory.ts | 14 +- .../factories/VaultRouter__factory.ts | 206 +- src/generated/factories/Vault__factory.ts | 417 +- src/generated/factories/index.ts | 1 + src/generated/index.ts | 2 + src/index.ts | 5 +- src/services/getters.ts | 18 +- src/services/utility.ts | 16 +- src/services/vault.ts | 34 +- 26 files changed, 27669 insertions(+), 19755 deletions(-) create mode 100644 src/contracts/abis/Rate.json create mode 100644 src/generated/Rate.ts create mode 100644 src/generated/factories/Rate__factory.ts diff --git a/src/contracts/abis/Currency.json b/src/contracts/abis/Currency.json index 3abe9e6..adb3d1a 100644 --- a/src/contracts/abis/Currency.json +++ b/src/contracts/abis/Currency.json @@ -4,12 +4,12 @@ "inputs": [ { "internalType": "string", - "name": "_name", + "name": "name_", "type": "string" }, { "internalType": "string", - "name": "_symbol", + "name": "symbol_", "type": "string" } ], @@ -18,233 +18,62 @@ }, { "inputs": [], - "name": "AccessControlBadConfirmation", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], - "name": "AccessControlUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "AddressEmptyCode", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "AddressInsufficientBalance", + "name": "AllowanceOverflow", "type": "error" }, { "inputs": [], - "name": "ECDSAInvalidSignature", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "ECDSAInvalidSignatureLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "ECDSAInvalidSignatureS", - "type": "error" - }, - { - "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", + "name": "AllowanceUnderflow", "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "ERC20InvalidReceiver", + "inputs": [], + "name": "AlreadyInitialized", "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "ERC20InvalidSender", + "inputs": [], + "name": "InsufficientAllowance", "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "ERC20InvalidSpender", + "inputs": [], + "name": "InsufficientBalance", "type": "error" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "ERC2612ExpiredSignature", + "inputs": [], + "name": "InvalidPermit", "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "signer", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "ERC2612InvalidSigner", + "inputs": [], + "name": "NewOwnerIsZeroAddress", "type": "error" }, { "inputs": [], - "name": "FailedInnerCall", + "name": "NoHandoverRequest", "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "currentNonce", - "type": "uint256" - } - ], - "name": "InvalidAccountNonce", + "inputs": [], + "name": "NotMinter", "type": "error" }, { "inputs": [], - "name": "InvalidShortString", + "name": "PermitExpired", "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "SafeERC20FailedOperation", + "inputs": [], + "name": "TotalSupplyOverflow", "type": "error" }, { - "inputs": [ - { - "internalType": "string", - "name": "str", - "type": "string" - } - ], - "name": "StringTooLong", + "inputs": [], + "name": "Unauthorized", "type": "error" }, { @@ -265,30 +94,24 @@ { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], "name": "Approval", "type": "event" }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "bool", - "name": "enabled", - "type": "bool" + "indexed": true, + "internalType": "address", + "name": "pendingOwner", + "type": "address" } ], - "name": "Permit2AllowanceUpdated", + "name": "OwnershipHandoverCanceled", "type": "event" }, { @@ -296,74 +119,44 @@ "inputs": [ { "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" + "internalType": "address", + "name": "pendingOwner", + "type": "address" } ], - "name": "RoleAdminChanged", + "name": "OwnershipHandoverRequested", "type": "event" }, { "anonymous": false, "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "indexed": true, "internalType": "address", - "name": "account", + "name": "oldOwner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "sender", + "name": "newOwner", "type": "address" } ], - "name": "RoleGranted", + "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" + "indexed": false, + "internalType": "bool", + "name": "enabled", + "type": "bool" } ], - "name": "RoleRevoked", + "name": "Permit2AllowanceUpdated", "type": "event" }, { @@ -384,33 +177,20 @@ { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], "name": "Transfer", "type": "event" }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "DOMAIN_SEPARATOR", "outputs": [ { "internalType": "bytes32", - "name": "", + "name": "result", "type": "bytes32" } ], @@ -434,7 +214,7 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "_owner", "type": "address" }, { @@ -463,7 +243,7 @@ }, { "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], @@ -482,7 +262,7 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "owner", "type": "address" } ], @@ -490,7 +270,7 @@ "outputs": [ { "internalType": "uint256", - "name": "", + "name": "result", "type": "uint256" } ], @@ -523,111 +303,70 @@ }, { "inputs": [], - "name": "decimals", - "outputs": [ + "name": "cancelOwnershipHandover", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "uint8", - "name": "", - "type": "uint8" + "internalType": "address", + "name": "pendingOwner", + "type": "address" } ], - "stateMutability": "view", + "name": "completeOwnershipHandover", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { "inputs": [], - "name": "eip712Domain", + "name": "decimals", "outputs": [ { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" + "internalType": "uint8", + "name": "", + "type": "uint8" } ], - "stateMutability": "view", + "stateMutability": "pure", "type": "function" }, { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "getRoleAdmin", + "name": "mint", "outputs": [ { - "internalType": "bytes32", + "internalType": "bool", "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" + "type": "bool" } ], - "name": "grantRole", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], - "name": "hasRole", + "name": "minterRole", "outputs": [ { "internalType": "bool", @@ -638,38 +377,46 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { "internalType": "address", - "name": "account", + "name": "owner", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "mint", + "name": "nonces", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "result", + "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "name", + "name": "owner", "outputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "address", + "name": "result", + "type": "address" } ], "stateMutability": "view", @@ -679,15 +426,15 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "pendingOwner", "type": "address" } ], - "name": "nonces", + "name": "ownershipHandoverExpiresAt", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "result", "type": "uint256" } ], @@ -753,7 +500,7 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "token", "type": "address" }, @@ -769,39 +516,17 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "name": "renounceRole", + "inputs": [], + "name": "renounceOwnership", "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", + "inputs": [], + "name": "requestOwnershipHandover", "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { @@ -810,30 +535,16 @@ "internalType": "address", "name": "account", "type": "address" - } - ], - "name": "setMinterRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ + }, { "internalType": "bool", - "name": "", + "name": "isMinter", "type": "bool" } ], - "stateMutability": "view", + "name": "setMinterRole", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { @@ -855,7 +566,7 @@ "outputs": [ { "internalType": "uint256", - "name": "", + "name": "result", "type": "uint256" } ], @@ -871,7 +582,7 @@ }, { "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], @@ -900,7 +611,7 @@ }, { "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], @@ -915,6 +626,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, { "inputs": [ { @@ -930,89 +654,45 @@ } ], "bytecode": { - "object": "0x6101606040523480156200001257600080fd5b50604051620025653803806200256583398101604081905262000035916200034e565b6040805180820190915260018152603160f81b6020820152819081908482600462000061838262000447565b50600562000070828262000447565b5062000082915083905060066200014e565b61012052620000938160076200014e565b61014052815160208084019190912060e052815190820120610100524660a0526200012160e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c052506200013860003362000187565b50506009805460ff19166001179055506200056d565b60006020835110156200016e57620001668362000235565b905062000181565b816200017b848262000447565b5060ff90505b92915050565b6000828152602081815260408083206001600160a01b038516845290915281205460ff166200022c576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620001e33390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600162000181565b50600062000181565b600080829050601f815111156200026c578260405163305a27a960e01b815260040162000263919062000513565b60405180910390fd5b8051620002798262000548565b179392505050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620002b45781810151838201526020016200029a565b50506000910152565b600082601f830112620002cf57600080fd5b81516001600160401b0380821115620002ec57620002ec62000281565b604051601f8301601f19908116603f0116810190828211818310171562000317576200031762000281565b816040528381528660208588010111156200033157600080fd5b6200034484602083016020890162000297565b9695505050505050565b600080604083850312156200036257600080fd5b82516001600160401b03808211156200037a57600080fd5b6200038886838701620002bd565b935060208501519150808211156200039f57600080fd5b50620003ae85828601620002bd565b9150509250929050565b600181811c90821680620003cd57607f821691505b602082108103620003ee57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200044257600081815260208120601f850160051c810160208610156200041d5750805b601f850160051c820191505b818110156200043e5782815560010162000429565b5050505b505050565b81516001600160401b0381111562000463576200046362000281565b6200047b81620004748454620003b8565b84620003f4565b602080601f831160018114620004b357600084156200049a5750858301515b600019600386901b1c1916600185901b1785556200043e565b600085815260208120601f198616915b82811015620004e457888601518255948401946001909101908401620004c3565b5085821015620005035787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208152600082518060208401526200053481604085016020870162000297565b601f01601f19169190910160400192915050565b80516020808301519190811015620003ee5760001960209190910360031b1b16919050565b60805160a05160c05160e051610100516101205161014051611f9d620005c860003960006110e9015260006110bc01526000610f4901526000610f2101526000610e7c01526000610ea601526000610ed00152611f9d6000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c8063705e6a5b116100f95780639dc29fac11610097578063d505accf11610071578063d505accf146103f4578063d547741f14610407578063dd62ed3e1461041a578063feaea5861461042d57600080fd5b80639dc29fac146103c6578063a217fddf146103d9578063a9059cbb146103e157600080fd5b806384b0196e116100d357806384b0196e1461034c57806391d1485414610367578063945d1229146103ab57806395d89b41146103be57600080fd5b8063705e6a5b146102f057806370a08231146103035780637ecebe001461033957600080fd5b80632f2ff15d1161016657806336568abe1161014057806336568abe14610282578063407c48b41461029557806340c10f19146102a25780636afdd850146102b557600080fd5b80632f2ff15d14610256578063313ce5671461026b5780633644e5151461027a57600080fd5b806318160ddd1161019757806318160ddd1461020e57806323b872dd14610220578063248a9ca31461023357600080fd5b806301ffc9a7146101be57806306fdde03146101e6578063095ea7b3146101fb575b600080fd5b6101d16101cc366004611b48565b610440565b60405190151581526020015b60405180910390f35b6101ee6104d9565b6040516101dd9190611bf8565b6101d1610209366004611c2d565b61056b565b6003545b6040519081526020016101dd565b6101d161022e366004611c59565b610583565b610212610241366004611c9a565b60009081526020819052604090206001015490565b610269610264366004611cb3565b6105a9565b005b604051601281526020016101dd565b6102126105d4565b610269610290366004611cb3565b6105e3565b6009546101d19060ff1681565b6101d16102b0366004611c2d565b610641565b6102cb6e22d473030f116ddee9f6b43ac78ba381565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101dd565b6102696102fe366004611cf1565b610677565b610212610311366004611d0e565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610212610347366004611d0e565b6106e9565b610354610714565b6040516101dd9796959493929190611d2b565b6101d1610375366004611cb3565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6102696103b9366004611d0e565b610776565b6101ee6107ab565b6101d16103d4366004611c2d565b6107ba565b610212600081565b6101d16103ef366004611c2d565b6107f0565b610269610402366004611dea565b6107fe565b610269610415366004611cb3565b6109b0565b610212610428366004611e61565b6109d5565b61026961043b366004611e61565b610a71565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806104d357507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600480546104e890611e8f565b80601f016020809104026020016040519081016040528092919081815260200182805461051490611e8f565b80156105615780601f1061053657610100808354040283529160200191610561565b820191906000526020600020905b81548152906001019060200180831161054457829003601f168201915b5050505050905090565b600033610579818585610bfd565b5060019392505050565b600033610591858285610c0a565b61059c858585610cae565b60019150505b9392505050565b6000828152602081905260409020600101546105c481610d59565b6105ce8383610d66565b50505050565b60006105de610e62565b905090565b73ffffffffffffffffffffffffffffffffffffffff81163314610632576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61063c8282610f9a565b505050565b60007fcfd53186d792f1ec9d0679afc2dc3ffc86fc31fe1e0f342b838eb6c3eade62b361066d81610d59565b6105798484611055565b600061068281610d59565b60405182151581527f383d8f27281deff0ab982f76ad2feac76f0cb5d922008a4642d8765c748591329060200160405180910390a150600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600860205260408120546104d3565b6000606080600080600060606107286110b5565b6107306110e2565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b600061078181610d59565b61063c7fcfd53186d792f1ec9d0679afc2dc3ffc86fc31fe1e0f342b838eb6c3eade62b383610d66565b6060600580546104e890611e8f565b60007fcfd53186d792f1ec9d0679afc2dc3ffc86fc31fe1e0f342b838eb6c3eade62b36107e681610d59565b610579848461110f565b600033610579818585610cae565b83421115610840576040517f62791302000000000000000000000000000000000000000000000000000000008152600481018590526024015b60405180910390fd5b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861089a8c73ffffffffffffffffffffffffffffffffffffffff16600090815260086020526040902080546001810190915590565b60408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006109028261116b565b90506000610912828787876111b3565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610999576040517f4b800e4600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80831660048301528b166024820152604401610837565b6109a48a8a8a610bfd565b50505050505050505050565b6000828152602081905260409020600101546109cb81610d59565b6105ce8383610f9a565b600073ffffffffffffffffffffffffffffffffffffffff82166e22d473030f116ddee9f6b43ac78ba3148015610a0d575060095460ff165b15610a3957507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6104d3565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600260209081526040808320938616835292905220546105a2565b6000610a7c81610d59565b73ffffffffffffffffffffffffffffffffffffffff831615610b33576040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015261063c908490849073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015610b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2e9190611ee2565b6111e1565b60008273ffffffffffffffffffffffffffffffffffffffff164760405160006040518083038185875af1925050503d8060008114610b8d576040519150601f19603f3d011682016040523d82523d6000602084013e610b92565b606091505b50509050806105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f7769746864726177206661696c656400000000000000000000000000000000006044820152606401610837565b61063c838383600161126e565b6000610c1684846109d5565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146105ce5781811015610c9f576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810182905260448101839052606401610837565b6105ce8484848403600061126e565b73ffffffffffffffffffffffffffffffffffffffff8316610cfe576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b73ffffffffffffffffffffffffffffffffffffffff8216610d4e576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b61063c8383836113b6565b610d638133611561565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff16610e5a5760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610df83390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016104d3565b5060006104d3565b60003073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610ec857507f000000000000000000000000000000000000000000000000000000000000000046145b15610ef257507f000000000000000000000000000000000000000000000000000000000000000090565b6105de604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff1615610e5a5760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016104d3565b73ffffffffffffffffffffffffffffffffffffffff82166110a5576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b6110b1600083836113b6565b5050565b60606105de7f000000000000000000000000000000000000000000000000000000000000000060066115e7565b60606105de7f000000000000000000000000000000000000000000000000000000000000000060076115e7565b73ffffffffffffffffffffffffffffffffffffffff821661115f576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b6110b1826000836113b6565b60006104d3611178610e62565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b6000806000806111c588888888611692565b9250925092506111d5828261178c565b50909695505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261063c908490611890565b73ffffffffffffffffffffffffffffffffffffffff84166112be576040517fe602df0500000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b73ffffffffffffffffffffffffffffffffffffffff831661130e576040517f94280d6200000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260026020908152604080832093871683529290522082905580156105ce578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516113a891815260200190565b60405180910390a350505050565b73ffffffffffffffffffffffffffffffffffffffff83166113ee5780600360008282546113e39190611efb565b909155506114a09050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205481811015611474576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526024810182905260448101839052606401610837565b73ffffffffffffffffffffffffffffffffffffffff841660009081526001602052604090209082900390555b73ffffffffffffffffffffffffffffffffffffffff82166114c9576003805482900390556114f5565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090208054820190555b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161155491815260200190565b60405180910390a3505050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166110b1576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260248101839052604401610837565b606060ff8314611601576115fa83611926565b90506104d3565b81805461160d90611e8f565b80601f016020809104026020016040519081016040528092919081815260200182805461163990611e8f565b80156116865780601f1061165b57610100808354040283529160200191611686565b820191906000526020600020905b81548152906001019060200180831161166957829003601f168201915b505050505090506104d3565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156116cd5750600091506003905082611782565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611721573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661177857506000925060019150829050611782565b9250600091508190505b9450945094915050565b60008260038111156117a0576117a0611f35565b036117a9575050565b60018260038111156117bd576117bd611f35565b036117f4576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282600381111561180857611808611f35565b03611842576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401610837565b600382600381111561185657611856611f35565b036110b1576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401610837565b60006118b273ffffffffffffffffffffffffffffffffffffffff841683611965565b905080516000141580156118d75750808060200190518101906118d59190611f64565b155b1561063c576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610837565b6060600061193383611973565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b60606105a2838360006119b4565b600060ff8216601f8111156104d3576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060814710156119f2576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610837565b6000808573ffffffffffffffffffffffffffffffffffffffff168486604051611a1b9190611f81565b60006040518083038185875af1925050503d8060008114611a58576040519150601f19603f3d011682016040523d82523d6000602084013e611a5d565b606091505b5091509150611a6d868383611a77565b9695505050505050565b606082611a8c57611a8782611b06565b6105a2565b8151158015611ab0575073ffffffffffffffffffffffffffffffffffffffff84163b155b15611aff576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610837565b50806105a2565b805115611b165780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060208284031215611b5a57600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146105a257600080fd5b60005b83811015611ba5578181015183820152602001611b8d565b50506000910152565b60008151808452611bc6816020860160208601611b8a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006105a26020830184611bae565b73ffffffffffffffffffffffffffffffffffffffff81168114610d6357600080fd5b60008060408385031215611c4057600080fd5b8235611c4b81611c0b565b946020939093013593505050565b600080600060608486031215611c6e57600080fd5b8335611c7981611c0b565b92506020840135611c8981611c0b565b929592945050506040919091013590565b600060208284031215611cac57600080fd5b5035919050565b60008060408385031215611cc657600080fd5b823591506020830135611cd881611c0b565b809150509250929050565b8015158114610d6357600080fd5b600060208284031215611d0357600080fd5b81356105a281611ce3565b600060208284031215611d2057600080fd5b81356105a281611c0b565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e081840152611d6760e084018a611bae565b8381036040850152611d79818a611bae565b6060850189905273ffffffffffffffffffffffffffffffffffffffff8816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015611dd857835183529284019291840191600101611dbc565b50909c9b505050505050505050505050565b600080600080600080600060e0888a031215611e0557600080fd5b8735611e1081611c0b565b96506020880135611e2081611c0b565b95506040880135945060608801359350608088013560ff81168114611e4457600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611e7457600080fd5b8235611e7f81611c0b565b91506020830135611cd881611c0b565b600181811c90821680611ea357607f821691505b602082108103611edc577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060208284031215611ef457600080fd5b5051919050565b808201808211156104d3577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060208284031215611f7657600080fd5b81516105a281611ce3565b60008251611f93818460208701611b8a565b919091019291505056", - "sourceMap": "425:2710:44:-:0;;;797:189;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3328:431:36;;;;;;;;;;;;-1:-1:-1;;;3328:431:36;;;;887:7:44;;;;859:5;887:7;1962:5:23;:13;859:5:44;1962::23;:13;:::i;:::-;-1:-1:-1;1985:7:23;:17;1995:7;1985;:17;:::i;:::-;-1:-1:-1;3401:45:36;;-1:-1:-1;3401:4:36;;-1:-1:-1;3432:13:36;3401:30;:45::i;:::-;3393:53;;3467:51;:7;3501:16;3467:33;:51::i;:::-;3456:62;;3542:22;;;;;;;;;;3528:36;;3591:25;;;;;;3574:42;;3644:13;3627:30;;3692:23;4226:11;;4239:14;;4204:80;;;2079:95;4204:80;;;4520:25:60;4561:18;;;4554:34;;;;4604:18;;;4597:34;4255:13:36;4647:18:60;;;4640:34;4278:4:36;4690:19:60;;;4683:61;4168:7:36;;4492:19:60;;4204:80:36;;;;;;;;;;;;4194:91;;;;;;4187:98;;4113:179;;3692:23;3667:48;;-1:-1:-1;;3747:4:36;3725:27;;-1:-1:-1;906:42:44::2;2232:4:19;937:10:44;906;:42::i;:::-;-1:-1:-1::0;;958:14:44::2;:21:::0;;-1:-1:-1;;958:21:44::2;975:4;958:21;::::0;;-1:-1:-1;425:2710:44;;2914:340:32;3010:11;3059:2;3043:5;3037:19;:24;3033:215;;;3084:20;3098:5;3084:13;:20::i;:::-;3077:27;;;;3033:215;3161:5;3135:46;3176:5;3161;3135:46;:::i;:::-;-1:-1:-1;1390:66:32;;-1:-1:-1;3033:215:32;2914:340;;;;:::o;6179:316:19:-;6256:4;2954:12;;;;;;;;;;;-1:-1:-1;;;;;2954:29:19;;;;;;;;;;;;6272:217;;6315:6;:12;;;;;;;;;;;-1:-1:-1;;;;;6315:29:19;;;;;;;;;:36;;-1:-1:-1;;6315:36:19;6347:4;6315:36;;;6397:12;735:10:30;;656:96;6397:12:19;-1:-1:-1;;;;;6370:40:19;6388:7;-1:-1:-1;;;;;6370:40:19;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:19;6424:11;;6272:217;-1:-1:-1;6473:5:19;6466:12;;1708:286:32;1773:11;1796:17;1822:3;1796:30;;1854:2;1840:4;:11;:16;1836:72;;;1893:3;1879:18;;-1:-1:-1;;;1879:18:32;;;;;;;;:::i;:::-;;;;;;;;1836:72;1974:11;;1957:13;1974:4;1957:13;:::i;:::-;1949:36;;1708:286;-1:-1:-1;;;1708:286:32:o;14:127:60:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:250;231:1;241:113;255:6;252:1;249:13;241:113;;;331:11;;;325:18;312:11;;;305:39;277:2;270:10;241:113;;;-1:-1:-1;;388:1:60;370:16;;363:27;146:250::o;401:699::-;455:5;508:3;501:4;493:6;489:17;485:27;475:55;;526:1;523;516:12;475:55;549:13;;-1:-1:-1;;;;;611:10:60;;;608:36;;;624:18;;:::i;:::-;699:2;693:9;667:2;753:13;;-1:-1:-1;;749:22:60;;;773:2;745:31;741:40;729:53;;;797:18;;;817:22;;;794:46;791:72;;;843:18;;:::i;:::-;883:10;879:2;872:22;918:2;910:6;903:18;964:3;957:4;952:2;944:6;940:15;936:26;933:35;930:55;;;981:1;978;971:12;930:55;994:76;1067:2;1060:4;1052:6;1048:17;1041:4;1033:6;1029:17;994:76;:::i;:::-;1088:6;401:699;-1:-1:-1;;;;;;401:699:60:o;1105:562::-;1204:6;1212;1265:2;1253:9;1244:7;1240:23;1236:32;1233:52;;;1281:1;1278;1271:12;1233:52;1308:16;;-1:-1:-1;;;;;1373:14:60;;;1370:34;;;1400:1;1397;1390:12;1370:34;1423:61;1476:7;1467:6;1456:9;1452:22;1423:61;:::i;:::-;1413:71;;1530:2;1519:9;1515:18;1509:25;1493:41;;1559:2;1549:8;1546:16;1543:36;;;1575:1;1572;1565:12;1543:36;;1598:63;1653:7;1642:8;1631:9;1627:24;1598:63;:::i;:::-;1588:73;;;1105:562;;;;;:::o;1672:380::-;1751:1;1747:12;;;;1794;;;1815:61;;1869:4;1861:6;1857:17;1847:27;;1815:61;1922:2;1914:6;1911:14;1891:18;1888:38;1885:161;;1968:10;1963:3;1959:20;1956:1;1949:31;2003:4;2000:1;1993:15;2031:4;2028:1;2021:15;1885:161;;1672:380;;;:::o;2183:545::-;2285:2;2280:3;2277:11;2274:448;;;2321:1;2346:5;2342:2;2335:17;2391:4;2387:2;2377:19;2461:2;2449:10;2445:19;2442:1;2438:27;2432:4;2428:38;2497:4;2485:10;2482:20;2479:47;;;-1:-1:-1;2520:4:60;2479:47;2575:2;2570:3;2566:12;2563:1;2559:20;2553:4;2549:31;2539:41;;2630:82;2648:2;2641:5;2638:13;2630:82;;;2693:17;;;2674:1;2663:13;2630:82;;;2634:3;;;2274:448;2183:545;;;:::o;2904:1352::-;3024:10;;-1:-1:-1;;;;;3046:30:60;;3043:56;;;3079:18;;:::i;:::-;3108:97;3198:6;3158:38;3190:4;3184:11;3158:38;:::i;:::-;3152:4;3108:97;:::i;:::-;3260:4;;3324:2;3313:14;;3341:1;3336:663;;;;4043:1;4060:6;4057:89;;;-1:-1:-1;4112:19:60;;;4106:26;4057:89;-1:-1:-1;;2861:1:60;2857:11;;;2853:24;2849:29;2839:40;2885:1;2881:11;;;2836:57;4159:81;;3306:944;;3336:663;2130:1;2123:14;;;2167:4;2154:18;;-1:-1:-1;;3372:20:60;;;3490:236;3504:7;3501:1;3498:14;3490:236;;;3593:19;;;3587:26;3572:42;;3685:27;;;;3653:1;3641:14;;;;3520:19;;3490:236;;;3494:3;3754:6;3745:7;3742:19;3739:201;;;3815:19;;;3809:26;-1:-1:-1;;3898:1:60;3894:14;;;3910:3;3890:24;3886:37;3882:42;3867:58;3852:74;;3739:201;-1:-1:-1;;;;;3986:1:60;3970:14;;;3966:22;3953:36;;-1:-1:-1;2904:1352:60:o;4755:396::-;4904:2;4893:9;4886:21;4867:4;4936:6;4930:13;4979:6;4974:2;4963:9;4959:18;4952:34;4995:79;5067:6;5062:2;5051:9;5047:18;5042:2;5034:6;5030:15;4995:79;:::i;:::-;5135:2;5114:15;-1:-1:-1;;5110:29:60;5095:45;;;;5142:2;5091:54;;4755:396;-1:-1:-1;;4755:396:60:o;5156:297::-;5274:12;;5321:4;5310:16;;;5304:23;;5274:12;5339:16;;5336:111;;;-1:-1:-1;;5413:4:60;5409:17;;;;5406:1;5402:25;5398:38;5387:50;;5156:297;-1:-1:-1;5156:297:60:o;:::-;425:2710:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", + "object": "0x60806040523480156200001157600080fd5b506040516200160938038062001609833981016040819052620000349162000173565b6200003f3362000072565b60006200004d83826200026c565b5060016200005c82826200026c565b50506002805460ff191660011790555062000338565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000d657600080fd5b81516001600160401b0380821115620000f357620000f3620000ae565b604051601f8301601f19908116603f011681019082821181831017156200011e576200011e620000ae565b816040528381526020925086838588010111156200013b57600080fd5b600091505b838210156200015f578582018301518183018401529082019062000140565b600093810190920192909252949350505050565b600080604083850312156200018757600080fd5b82516001600160401b03808211156200019f57600080fd5b620001ad86838701620000c4565b93506020850151915080821115620001c457600080fd5b50620001d385828601620000c4565b9150509250929050565b600181811c90821680620001f257607f821691505b6020821081036200021357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200026757600081815260208120601f850160051c81016020861015620002425750805b601f850160051c820191505b8181101562000263578281556001016200024e565b5050505b505050565b81516001600160401b03811115620002885762000288620000ae565b620002a081620002998454620001dd565b8462000219565b602080601f831160018114620002d85760008415620002bf5750858301515b600019600386901b1c1916600185901b17855562000263565b600085815260208120601f198616915b828110156200030957888601518255948401946001909101908401620002e8565b5085821015620003285787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6112c180620003486000396000f3fe6080604052600436106101ac5760003560e01c8063715018a6116100ec578063cb177b1e1161008a578063f04e283e11610064578063f04e283e146104bf578063f2fde38b146104d2578063feaea586146104e5578063fee81cf41461050557600080fd5b8063cb177b1e1461045f578063d505accf1461047f578063dd62ed3e1461049f57600080fd5b806395d89b41116100c657806395d89b41146103da5780639dc29fac146103ef578063a9059cbb1461040f578063ad0e7d8c1461042f57600080fd5b8063715018a61461036b5780637ecebe00146103735780638da5cb5b146103a657600080fd5b80633644e5151161015957806354d1f13d1161013357806354d1f13d146102c85780636afdd850146102d0578063705e6a5b1461031857806370a082311461033857600080fd5b80633644e51514610279578063407c48b41461028e57806340c10f19146102a857600080fd5b806323b872dd1161018a57806323b872dd146102335780632569296214610253578063313ce5671461025d57600080fd5b806306fdde03146101b1578063095ea7b3146101dc57806318160ddd1461020c575b600080fd5b3480156101bd57600080fd5b506101c6610538565b6040516101d39190611028565b60405180910390f35b3480156101e857600080fd5b506101fc6101f73660046110b6565b6105ca565b60405190151581526020016101d3565b34801561021857600080fd5b506805345cdf77eb68f44c545b6040519081526020016101d3565b34801561023f57600080fd5b506101fc61024e3660046110e2565b61061e565b61025b6106dc565b005b34801561026957600080fd5b50604051601281526020016101d3565b34801561028557600080fd5b5061022561072c565b34801561029a57600080fd5b506002546101fc9060ff1681565b3480156102b457600080fd5b506101fc6102c33660046110b6565b6107a9565b61025b610805565b3480156102dc57600080fd5b506102f36e22d473030f116ddee9f6b43ac78ba381565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d3565b34801561032457600080fd5b5061025b610333366004611138565b610841565b34801561034457600080fd5b50610225610353366004611153565b6387a211a2600c908152600091909152602090205490565b61025b6108af565b34801561037f57600080fd5b5061022561038e366004611153565b6338377508600c908152600091909152602090205490565b3480156103b257600080fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927546102f3565b3480156103e657600080fd5b506101c66108c3565b3480156103fb57600080fd5b506101fc61040a3660046110b6565b6108d2565b34801561041b57600080fd5b506101fc61042a3660046110b6565b610906565b34801561043b57600080fd5b506101fc61044a366004611153565b60036020526000908152604090205460ff1681565b34801561046b57600080fd5b5061025b61047a366004611170565b61097d565b34801561048b57600080fd5b5061025b61049a3660046111a5565b6109db565b3480156104ab57600080fd5b506102256104ba36600461121c565b610b75565b61025b6104cd366004611153565b610bfa565b61025b6104e0366004611153565b610c3a565b3480156104f157600080fd5b5061025b61050036600461121c565b610c61565b34801561051157600080fd5b50610225610520366004611153565b63389a75e1600c908152600091909152602090205490565b60606000805461054790611255565b80601f016020809104026020016040519081016040528092919081815260200182805461057390611255565b80156105c05780601f10610595576101008083540402835291602001916105c0565b820191906000526020600020905b8154815290600101906020018083116105a357829003601f168201915b5050505050905090565b600082602052637f5e9f20600c5233600052816034600c205581600052602c5160601c337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560206000a35060015b92915050565b60008360601b33602052637f5e9f208117600c526034600c208054600181011561065e5780851115610658576313be252b6000526004601cfd5b84810382555b50506387a211a28117600c526020600c208054808511156106875763f4d678b86000526004601cfd5b84810382555050836000526020600c208381540181555082602052600c5160601c8160601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a3505060019392505050565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b600080610737610538565b8051906020012090506040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81528160208201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6604082015246606082015230608082015260a081209250505090565b3360009081526003602052604081205460ff166107f2576040517ff8d2906c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107fc8383610df7565b50600192915050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b610849610e76565b60405181151581527f383d8f27281deff0ab982f76ad2feac76f0cb5d922008a4642d8765c748591329060200160405180910390a1600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6108b7610e76565b6108c16000610eac565b565b60606001805461054790611255565b600073ffffffffffffffffffffffffffffffffffffffff831633146108fc576108fc833384610f12565b6107fc8383610f55565b60006387a211a2600c52336000526020600c208054808411156109315763f4d678b86000526004601cfd5b83810382555050826000526020600c208281540181555081602052600c5160601c337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a36107fc565b610985610e76565b73ffffffffffffffffffffffffffffffffffffffff91909116600090815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60006109e5610538565b80519060200120905084421115610a0457631a15a3cc6000526004601cfd5b6040518860601b60601c98508760601b60601c975065383775081901600e52886000526020600c2080547f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f83528360208401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6604084015246606084015230608084015260a08320602e527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c983528a60208401528960408401528860608401528060808401528760a084015260c08320604e526042602c206000528660ff1660205285604052846060526020806080600060015afa8b3d5114610b105763ddafbaef6000526004601cfd5b019055777f5e9f20000000000000000000000000000000000000000088176040526034602c2087905587897f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602060608501a360405250506000606052505050505050565b600073ffffffffffffffffffffffffffffffffffffffff82166e22d473030f116ddee9f6b43ac78ba3148015610bad575060025460ff165b15610bd957507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610618565b6020829052637f5e9f20600c908152600084905260349020545b9392505050565b610c02610e76565b63389a75e1600c52806000526020600c208054421115610c2a57636f5e88186000526004601cfd5b60009055610c3781610eac565b50565b610c42610e76565b8060601b610c5857637448fbae6000526004601cfd5b610c3781610eac565b610c69610e76565b73ffffffffffffffffffffffffffffffffffffffff821615610d24576040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152610d20908390839073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015610cf7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1b91906112a8565b610fd9565b5050565b60008173ffffffffffffffffffffffffffffffffffffffff164760405160006040518083038185875af1925050503d8060008114610d7e576040519150601f19603f3d011682016040523d82523d6000602084013e610d83565b606091505b5050905080610df2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f7769746864726177206661696c65640000000000000000000000000000000000604482015260640160405180910390fd5b505050565b6805345cdf77eb68f44c5481810181811015610e1b5763e5cfe9576000526004601cfd5b806805345cdf77eb68f44c5550506387a211a2600c52816000526020600c208181540181555080602052600c5160601c60007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a35050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275433146108c1576382b429006000526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b81602052637f5e9f20600c52826000526034600c2080546001810115610f4e5780831115610f48576313be252b6000526004601cfd5b82810382555b5050505050565b6387a211a2600c52816000526020600c20805480831115610f7e5763f4d678b86000526004601cfd5b82900390556805345cdf77eb68f44c80548290039055600081815273ffffffffffffffffffffffffffffffffffffffff83167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602083a35050565b81601452806034526fa9059cbb00000000000000000000000060005260206000604460106000875af13d15600160005114171661101e576390b8ec186000526004601cfd5b6000603452505050565b600060208083528351808285015260005b8181101561105557858101830151858201604001528201611039565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c3757600080fd5b600080604083850312156110c957600080fd5b82356110d481611094565b946020939093013593505050565b6000806000606084860312156110f757600080fd5b833561110281611094565b9250602084013561111281611094565b929592945050506040919091013590565b8035801515811461113357600080fd5b919050565b60006020828403121561114a57600080fd5b610bf382611123565b60006020828403121561116557600080fd5b8135610bf381611094565b6000806040838503121561118357600080fd5b823561118e81611094565b915061119c60208401611123565b90509250929050565b600080600080600080600060e0888a0312156111c057600080fd5b87356111cb81611094565b965060208801356111db81611094565b95506040880135945060608801359350608088013560ff811681146111ff57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561122f57600080fd5b823561123a81611094565b9150602083013561124a81611094565b809150509250929050565b600181811c9082168061126957607f821691505b6020821081036112a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b6000602082840312156112ba57600080fd5b505191905056", + "sourceMap": "376:3092:28:-:0;;;719:183;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;785:28;802:10;785:16;:28::i;:::-;823:5;:13;831:5;823;:13;:::i;:::-;-1:-1:-1;846:7:28;:17;856:7;846;:17;:::i;:::-;-1:-1:-1;;874:14:28;:21;;-1:-1:-1;;874:21:28;891:4;874:21;;;-1:-1:-1;376:3092:28;;4883:1190:22;-1:-1:-1;;;;;5793:26:22;-1:-1:-1;;5876:29:22;;;5793:26;6031:1;5991:38;6031:1;;5980:63;4883:1190;:::o;14:127:61:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:840;200:5;253:3;246:4;238:6;234:17;230:27;220:55;;271:1;268;261:12;220:55;294:13;;-1:-1:-1;;;;;356:10:61;;;353:36;;;369:18;;:::i;:::-;444:2;438:9;412:2;498:13;;-1:-1:-1;;494:22:61;;;518:2;490:31;486:40;474:53;;;542:18;;;562:22;;;539:46;536:72;;;588:18;;:::i;:::-;628:10;624:2;617:22;663:2;655:6;648:18;685:4;675:14;;730:3;725:2;720;712:6;708:15;704:24;701:33;698:53;;;747:1;744;737:12;698:53;769:1;760:10;;779:133;793:2;790:1;787:9;779:133;;;881:14;;;877:23;;871:30;850:14;;;846:23;;839:63;804:10;;;;779:133;;;954:1;932:15;;;928:24;;;921:35;;;;936:6;146:840;-1:-1:-1;;;;146:840:61:o;991:562::-;1090:6;1098;1151:2;1139:9;1130:7;1126:23;1122:32;1119:52;;;1167:1;1164;1157:12;1119:52;1194:16;;-1:-1:-1;;;;;1259:14:61;;;1256:34;;;1286:1;1283;1276:12;1256:34;1309:61;1362:7;1353:6;1342:9;1338:22;1309:61;:::i;:::-;1299:71;;1416:2;1405:9;1401:18;1395:25;1379:41;;1445:2;1435:8;1432:16;1429:36;;;1461:1;1458;1451:12;1429:36;;1484:63;1539:7;1528:8;1517:9;1513:24;1484:63;:::i;:::-;1474:73;;;991:562;;;;;:::o;1558:380::-;1637:1;1633:12;;;;1680;;;1701:61;;1755:4;1747:6;1743:17;1733:27;;1701:61;1808:2;1800:6;1797:14;1777:18;1774:38;1771:161;;1854:10;1849:3;1845:20;1842:1;1835:31;1889:4;1886:1;1879:15;1917:4;1914:1;1907:15;1771:161;;1558:380;;;:::o;2069:545::-;2171:2;2166:3;2163:11;2160:448;;;2207:1;2232:5;2228:2;2221:17;2277:4;2273:2;2263:19;2347:2;2335:10;2331:19;2328:1;2324:27;2318:4;2314:38;2383:4;2371:10;2368:20;2365:47;;;-1:-1:-1;2406:4:61;2365:47;2461:2;2456:3;2452:12;2449:1;2445:20;2439:4;2435:31;2425:41;;2516:82;2534:2;2527:5;2524:13;2516:82;;;2579:17;;;2560:1;2549:13;2516:82;;;2520:3;;;2160:448;2069:545;;;:::o;2790:1352::-;2910:10;;-1:-1:-1;;;;;2932:30:61;;2929:56;;;2965:18;;:::i;:::-;2994:97;3084:6;3044:38;3076:4;3070:11;3044:38;:::i;:::-;3038:4;2994:97;:::i;:::-;3146:4;;3210:2;3199:14;;3227:1;3222:663;;;;3929:1;3946:6;3943:89;;;-1:-1:-1;3998:19:61;;;3992:26;3943:89;-1:-1:-1;;2747:1:61;2743:11;;;2739:24;2735:29;2725:40;2771:1;2767:11;;;2722:57;4045:81;;3192:944;;3222:663;2016:1;2009:14;;;2053:4;2040:18;;-1:-1:-1;;3258:20:61;;;3376:236;3390:7;3387:1;3384:14;3376:236;;;3479:19;;;3473:26;3458:42;;3571:27;;;;3539:1;3527:14;;;;3406:19;;3376:236;;;3380:3;3640:6;3631:7;3628:19;3625:201;;;3701:19;;;3695:26;-1:-1:-1;;3784:1:61;3780:14;;;3796:3;3776:24;3772:37;3768:42;3753:58;3738:74;;3625:201;-1:-1:-1;;;;;3872:1:61;3856:14;;;3852:22;3839:36;;-1:-1:-1;2790:1352:61:o;:::-;376:3092:28;;;;;;", "linkReferences": {} }, "deployedBytecode": { - "object": "0x608060405234801561001057600080fd5b50600436106101b95760003560e01c8063705e6a5b116100f95780639dc29fac11610097578063d505accf11610071578063d505accf146103f4578063d547741f14610407578063dd62ed3e1461041a578063feaea5861461042d57600080fd5b80639dc29fac146103c6578063a217fddf146103d9578063a9059cbb146103e157600080fd5b806384b0196e116100d357806384b0196e1461034c57806391d1485414610367578063945d1229146103ab57806395d89b41146103be57600080fd5b8063705e6a5b146102f057806370a08231146103035780637ecebe001461033957600080fd5b80632f2ff15d1161016657806336568abe1161014057806336568abe14610282578063407c48b41461029557806340c10f19146102a25780636afdd850146102b557600080fd5b80632f2ff15d14610256578063313ce5671461026b5780633644e5151461027a57600080fd5b806318160ddd1161019757806318160ddd1461020e57806323b872dd14610220578063248a9ca31461023357600080fd5b806301ffc9a7146101be57806306fdde03146101e6578063095ea7b3146101fb575b600080fd5b6101d16101cc366004611b48565b610440565b60405190151581526020015b60405180910390f35b6101ee6104d9565b6040516101dd9190611bf8565b6101d1610209366004611c2d565b61056b565b6003545b6040519081526020016101dd565b6101d161022e366004611c59565b610583565b610212610241366004611c9a565b60009081526020819052604090206001015490565b610269610264366004611cb3565b6105a9565b005b604051601281526020016101dd565b6102126105d4565b610269610290366004611cb3565b6105e3565b6009546101d19060ff1681565b6101d16102b0366004611c2d565b610641565b6102cb6e22d473030f116ddee9f6b43ac78ba381565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101dd565b6102696102fe366004611cf1565b610677565b610212610311366004611d0e565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610212610347366004611d0e565b6106e9565b610354610714565b6040516101dd9796959493929190611d2b565b6101d1610375366004611cb3565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6102696103b9366004611d0e565b610776565b6101ee6107ab565b6101d16103d4366004611c2d565b6107ba565b610212600081565b6101d16103ef366004611c2d565b6107f0565b610269610402366004611dea565b6107fe565b610269610415366004611cb3565b6109b0565b610212610428366004611e61565b6109d5565b61026961043b366004611e61565b610a71565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806104d357507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600480546104e890611e8f565b80601f016020809104026020016040519081016040528092919081815260200182805461051490611e8f565b80156105615780601f1061053657610100808354040283529160200191610561565b820191906000526020600020905b81548152906001019060200180831161054457829003601f168201915b5050505050905090565b600033610579818585610bfd565b5060019392505050565b600033610591858285610c0a565b61059c858585610cae565b60019150505b9392505050565b6000828152602081905260409020600101546105c481610d59565b6105ce8383610d66565b50505050565b60006105de610e62565b905090565b73ffffffffffffffffffffffffffffffffffffffff81163314610632576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61063c8282610f9a565b505050565b60007fcfd53186d792f1ec9d0679afc2dc3ffc86fc31fe1e0f342b838eb6c3eade62b361066d81610d59565b6105798484611055565b600061068281610d59565b60405182151581527f383d8f27281deff0ab982f76ad2feac76f0cb5d922008a4642d8765c748591329060200160405180910390a150600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600860205260408120546104d3565b6000606080600080600060606107286110b5565b6107306110e2565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b600061078181610d59565b61063c7fcfd53186d792f1ec9d0679afc2dc3ffc86fc31fe1e0f342b838eb6c3eade62b383610d66565b6060600580546104e890611e8f565b60007fcfd53186d792f1ec9d0679afc2dc3ffc86fc31fe1e0f342b838eb6c3eade62b36107e681610d59565b610579848461110f565b600033610579818585610cae565b83421115610840576040517f62791302000000000000000000000000000000000000000000000000000000008152600481018590526024015b60405180910390fd5b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861089a8c73ffffffffffffffffffffffffffffffffffffffff16600090815260086020526040902080546001810190915590565b60408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006109028261116b565b90506000610912828787876111b3565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610999576040517f4b800e4600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80831660048301528b166024820152604401610837565b6109a48a8a8a610bfd565b50505050505050505050565b6000828152602081905260409020600101546109cb81610d59565b6105ce8383610f9a565b600073ffffffffffffffffffffffffffffffffffffffff82166e22d473030f116ddee9f6b43ac78ba3148015610a0d575060095460ff165b15610a3957507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6104d3565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600260209081526040808320938616835292905220546105a2565b6000610a7c81610d59565b73ffffffffffffffffffffffffffffffffffffffff831615610b33576040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015261063c908490849073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015610b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2e9190611ee2565b6111e1565b60008273ffffffffffffffffffffffffffffffffffffffff164760405160006040518083038185875af1925050503d8060008114610b8d576040519150601f19603f3d011682016040523d82523d6000602084013e610b92565b606091505b50509050806105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f7769746864726177206661696c656400000000000000000000000000000000006044820152606401610837565b61063c838383600161126e565b6000610c1684846109d5565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146105ce5781811015610c9f576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810182905260448101839052606401610837565b6105ce8484848403600061126e565b73ffffffffffffffffffffffffffffffffffffffff8316610cfe576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b73ffffffffffffffffffffffffffffffffffffffff8216610d4e576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b61063c8383836113b6565b610d638133611561565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff16610e5a5760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610df83390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016104d3565b5060006104d3565b60003073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610ec857507f000000000000000000000000000000000000000000000000000000000000000046145b15610ef257507f000000000000000000000000000000000000000000000000000000000000000090565b6105de604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff1615610e5a5760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016104d3565b73ffffffffffffffffffffffffffffffffffffffff82166110a5576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b6110b1600083836113b6565b5050565b60606105de7f000000000000000000000000000000000000000000000000000000000000000060066115e7565b60606105de7f000000000000000000000000000000000000000000000000000000000000000060076115e7565b73ffffffffffffffffffffffffffffffffffffffff821661115f576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b6110b1826000836113b6565b60006104d3611178610e62565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b6000806000806111c588888888611692565b9250925092506111d5828261178c565b50909695505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261063c908490611890565b73ffffffffffffffffffffffffffffffffffffffff84166112be576040517fe602df0500000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b73ffffffffffffffffffffffffffffffffffffffff831661130e576040517f94280d6200000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260026020908152604080832093871683529290522082905580156105ce578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516113a891815260200190565b60405180910390a350505050565b73ffffffffffffffffffffffffffffffffffffffff83166113ee5780600360008282546113e39190611efb565b909155506114a09050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205481811015611474576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526024810182905260448101839052606401610837565b73ffffffffffffffffffffffffffffffffffffffff841660009081526001602052604090209082900390555b73ffffffffffffffffffffffffffffffffffffffff82166114c9576003805482900390556114f5565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090208054820190555b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161155491815260200190565b60405180910390a3505050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166110b1576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260248101839052604401610837565b606060ff8314611601576115fa83611926565b90506104d3565b81805461160d90611e8f565b80601f016020809104026020016040519081016040528092919081815260200182805461163990611e8f565b80156116865780601f1061165b57610100808354040283529160200191611686565b820191906000526020600020905b81548152906001019060200180831161166957829003601f168201915b505050505090506104d3565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156116cd5750600091506003905082611782565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611721573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661177857506000925060019150829050611782565b9250600091508190505b9450945094915050565b60008260038111156117a0576117a0611f35565b036117a9575050565b60018260038111156117bd576117bd611f35565b036117f4576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282600381111561180857611808611f35565b03611842576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401610837565b600382600381111561185657611856611f35565b036110b1576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401610837565b60006118b273ffffffffffffffffffffffffffffffffffffffff841683611965565b905080516000141580156118d75750808060200190518101906118d59190611f64565b155b1561063c576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610837565b6060600061193383611973565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b60606105a2838360006119b4565b600060ff8216601f8111156104d3576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060814710156119f2576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610837565b6000808573ffffffffffffffffffffffffffffffffffffffff168486604051611a1b9190611f81565b60006040518083038185875af1925050503d8060008114611a58576040519150601f19603f3d011682016040523d82523d6000602084013e611a5d565b606091505b5091509150611a6d868383611a77565b9695505050505050565b606082611a8c57611a8782611b06565b6105a2565b8151158015611ab0575073ffffffffffffffffffffffffffffffffffffffff84163b155b15611aff576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610837565b50806105a2565b805115611b165780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060208284031215611b5a57600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146105a257600080fd5b60005b83811015611ba5578181015183820152602001611b8d565b50506000910152565b60008151808452611bc6816020860160208601611b8a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006105a26020830184611bae565b73ffffffffffffffffffffffffffffffffffffffff81168114610d6357600080fd5b60008060408385031215611c4057600080fd5b8235611c4b81611c0b565b946020939093013593505050565b600080600060608486031215611c6e57600080fd5b8335611c7981611c0b565b92506020840135611c8981611c0b565b929592945050506040919091013590565b600060208284031215611cac57600080fd5b5035919050565b60008060408385031215611cc657600080fd5b823591506020830135611cd881611c0b565b809150509250929050565b8015158114610d6357600080fd5b600060208284031215611d0357600080fd5b81356105a281611ce3565b600060208284031215611d2057600080fd5b81356105a281611c0b565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e081840152611d6760e084018a611bae565b8381036040850152611d79818a611bae565b6060850189905273ffffffffffffffffffffffffffffffffffffffff8816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015611dd857835183529284019291840191600101611dbc565b50909c9b505050505050505050505050565b600080600080600080600060e0888a031215611e0557600080fd5b8735611e1081611c0b565b96506020880135611e2081611c0b565b95506040880135945060608801359350608088013560ff81168114611e4457600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611e7457600080fd5b8235611e7f81611c0b565b91506020830135611cd881611c0b565b600181811c90821680611ea357607f821691505b602082108103611edc577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060208284031215611ef457600080fd5b5051919050565b808201808211156104d3577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060208284031215611f7657600080fd5b81516105a281611ce3565b60008251611f93818460208701611b8a565b919091019291505056", - "sourceMap": "425:2710:44:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2565:202:19;;;;;;:::i;:::-;;:::i;:::-;;;516:14:60;;509:22;491:41;;479:2;464:18;2565:202:19;;;;;;;;2074:89:23;;;:::i;:::-;;;;;;;:::i;4293:186::-;;;;;;:::i;:::-;;:::i;3144:97::-;3222:12;;3144:97;;;1983:25:60;;;1971:2;1956:18;3144:97:23;1837:177:60;5039:244:23;;;;;;:::i;:::-;;:::i;3810:120:19:-;;;;;;:::i;:::-;3875:7;3901:12;;;;;;;;;;:22;;;;3810:120;4226:136;;;;;;:::i;:::-;;:::i;:::-;;3002:82:23;;;3075:2;3309:36:60;;3297:2;3282:18;3002:82:23;3167:184:60;2656:112:25;;;:::i;5328:245:19:-;;;;;;:::i;:::-;;:::i;720:26:44:-;;;;;;;;;1380:160;;;;;;:::i;:::-;;:::i;617:76::-;;651:42;617:76;;;;;3532:42:60;3520:55;;;3502:74;;3490:2;3475:18;617:76:44;3356:226:60;2018:172:44;;;;;;:::i;:::-;;:::i;3299:116:23:-;;;;;;:::i;:::-;3390:18;;3364:7;3390:18;;;:9;:18;;;;;;;3299:116;2406:143:25;;;;;;:::i;:::-;;:::i;5144:557:36:-;;;:::i;:::-;;;;;;;;;;;;;:::i;2854:136:19:-;;;;;;:::i;:::-;2931:4;2954:12;;;;;;;;;;;:29;;;;;;;;;;;;;;;;2854:136;1089:134:44;;;;;;:::i;:::-;;:::i;2276:93:23:-;;;:::i;1685:160:44:-;;;;;;:::i;:::-;;:::i;2187:49:19:-;;2232:4;2187:49;;3610:178:23;;;;;;:::i;:::-;;:::i;1680:672:25:-;;;;;;:::i;:::-;;:::i;4642:138:19:-;;;;;;:::i;:::-;;:::i;2323:221:44:-;;;;;;:::i;:::-;;:::i;2762:371::-;;;;;;:::i;:::-;;:::i;2565:202:19:-;2650:4;2673:47;;;2688:32;2673:47;;:87;;-1:-1:-1;876:25:38;861:40;;;;2724:36:19;2666:94;2565:202;-1:-1:-1;;2565:202:19:o;2074:89:23:-;2119:13;2151:5;2144:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89;:::o;4293:186::-;4366:4;735:10:30;4420:31:23;735:10:30;4436:7:23;4445:5;4420:8;:31::i;:::-;-1:-1:-1;4468:4:23;;4293:186;-1:-1:-1;;;4293:186:23:o;5039:244::-;5126:4;735:10:30;5182:37:23;5198:4;735:10:30;5213:5:23;5182:15;:37::i;:::-;5229:26;5239:4;5245:2;5249:5;5229:9;:26::i;:::-;5272:4;5265:11;;;5039:244;;;;;;:::o;4226:136:19:-;3875:7;3901:12;;;;;;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4330:25:::1;4341:4;4347:7;4330:10;:25::i;:::-;;4226:136:::0;;;:::o;2656:112:25:-;2715:7;2741:20;:18;:20::i;:::-;2734:27;;2656:112;:::o;5328:245:19:-;5421:34;;;735:10:30;5421:34:19;5417:102;;5478:30;;;;;;;;;;;;;;5417:102;5529:37;5541:4;5547:18;5529:11;:37::i;:::-;;5328:245;;:::o;1380:160:44:-;1474:4;528:31;2464:16:19;2475:4;2464:10;:16::i;:::-;1490:22:44::1;1496:7;1505:6;1490:5;:22::i;2018:172::-:0;2232:4:19;2464:16;2232:4;2464:10;:16::i;:::-;2117:32:44::1;::::0;516:14:60;;509:22;491:41;;2117:32:44::1;::::0;479:2:60;464:18;2117:32:44::1;;;;;;;-1:-1:-1::0;2159:14:44::1;:24:::0;;;::::1;::::0;::::1;;::::0;;;::::1;::::0;;2018:172::o;2406:143:25:-;624:14:31;;;2497:7:25;624:14:31;;;:7;:14;;;;;;2523:19:25;538:107:31;5144:557:36;5242:13;5269:18;5301:21;5336:15;5365:25;5404:12;5430:27;5533:13;:11;:13::i;:::-;5560:16;:14;:16::i;:::-;5668;;;5652:1;5668:16;;;;;;;;;5482:212;;;;-1:-1:-1;5482:212:36;;-1:-1:-1;5590:13:36;;-1:-1:-1;5625:4:36;;-1:-1:-1;5652:1:36;-1:-1:-1;5668:16:36;-1:-1:-1;5482:212:36;-1:-1:-1;5144:557:36:o;1089:134:44:-;2232:4:19;2464:16;2232:4;2464:10;:16::i;:::-;1177:39:44::1;528:31;1208:7;1177:10;:39::i;2276:93:23:-:0;2323:13;2355:7;2348:14;;;;;:::i;1685:160:44:-;1779:4;528:31;2464:16:19;2475:4;2464:10;:16::i;:::-;1795:22:44::1;1801:7;1810:6;1795:5;:22::i;3610:178:23:-:0;3679:4;735:10:30;3733:27:23;735:10:30;3750:2:23;3754:5;3733:9;:27::i;1680:672:25:-;1901:8;1883:15;:26;1879:97;;;1932:33;;;;;;;;1983:25:60;;;1956:18;;1932:33:25;;;;;;;;1879:97;1986:18;1022:95;2045:5;2052:7;2061:5;2068:16;2078:5;1121:14:31;;819:7;1121:14;;;:7;:14;;;;;:16;;;;;;;;;759:395;2068:16:25;2017:78;;;;;;8101:25:60;;;;8145:42;8223:15;;;8203:18;;;8196:43;8275:15;;;;8255:18;;;8248:43;8307:18;;;8300:34;8350:19;;;8343:35;8394:19;;;8387:35;;;8073:19;;2017:78:25;;;;;;;;;;;;2007:89;;;;;;1986:110;;2107:12;2122:28;2139:10;2122:16;:28::i;:::-;2107:43;;2161:14;2178:28;2192:4;2198:1;2201;2204;2178:13;:28::i;:::-;2161:45;;2230:5;2220:15;;:6;:15;;;2216:88;;2258:35;;;;;8617:42:60;8686:15;;;2258:35:25;;;8668:34:60;8738:15;;8718:18;;;8711:43;8580:18;;2258:35:25;8433:327:60;2216:88:25;2314:31;2323:5;2330:7;2339:5;2314:8;:31::i;:::-;1869:483;;;1680:672;;;;;;;:::o;4642:138:19:-;3875:7;3901:12;;;;;;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4747:26:::1;4759:4;4765:7;4747:11;:26::i;2323:221:44:-:0;2404:7;2427:18;;;651:42;2427:18;:36;;;;-1:-1:-1;2449:14:44;;;;2427:36;2423:66;;;-1:-1:-1;2472:17:44;2465:24;;2423:66;3952:18:23;;;;3926:7;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;2506:31:44;3846:140:23;2762:371:44;2232:4:19;2464:16;2232:4;2464:10;:16::i;:::-;2859:28:44::1;::::0;::::1;::::0;2855:272:::1;;2937:30;::::0;;;;2961:4:::1;2937:30;::::0;::::1;3502:74:60::0;2903:65:44::1;::::0;2926:5;;2933:2;;2937:15:::1;::::0;::::1;::::0;::::1;::::0;3475:18:60;;2937:30:44::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2903:22;:65::i;2855:272::-;3000:12;3025:2;3017:16;;3041:21;3017:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2999:68;;;3089:7;3081:35;;;::::0;::::1;::::0;;9366:2:60;3081:35:44::1;::::0;::::1;9348:21:60::0;9405:2;9385:18;;;9378:30;9444:17;9424:18;;;9417:45;9479:18;;3081:35:44::1;9164:339:60::0;8989:128:23;9073:37;9082:5;9089:7;9098:5;9105:4;9073:8;:37::i;10663:477::-;10762:24;10789:25;10799:5;10806:7;10789:9;:25::i;:::-;10762:52;;10848:17;10828:16;:37;10824:310;;10904:5;10885:16;:24;10881:130;;;10936:60;;;;;9740:42:60;9728:55;;10936:60:23;;;9710:74:60;9800:18;;;9793:34;;;9843:18;;;9836:34;;;9683:18;;10936:60:23;9508:368:60;10881:130:23;11052:57;11061:5;11068:7;11096:5;11077:16;:24;11103:5;11052:8;:57::i;5656:300::-;5739:18;;;5735:86;;5780:30;;;;;5807:1;5780:30;;;3502:74:60;3475:18;;5780:30:23;3356:226:60;5735:86:23;5834:16;;;5830:86;;5873:32;;;;;5902:1;5873:32;;;3502:74:60;3475:18;;5873:32:23;3356:226:60;5830:86:23;5925:24;5933:4;5939:2;5943:5;5925:7;:24::i;3199:103:19:-;3265:30;3276:4;735:10:30;3265::19;:30::i;:::-;3199:103;:::o;6179:316::-;6256:4;2954:12;;;;;;;;;;;:29;;;;;;;;;;;;;6272:217;;6315:6;:12;;;;;;;;;;;:29;;;;;;;;;;:36;;;;6347:4;6315:36;;;6397:12;735:10:30;;656:96;6397:12:19;6370:40;;6388:7;6370:40;;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:19;6424:11;;6272:217;-1:-1:-1;6473:5:19;6466:12;;3845:262:36;3898:7;3929:4;3921:28;3938:11;3921:28;;:63;;;;;3970:14;3953:13;:31;3921:63;3917:184;;;-1:-1:-1;4007:22:36;;3845:262::o;3917:184::-;4067:23;4204:80;;;2079:95;4204:80;;;11028:25:60;4226:11:36;11069:18:60;;;11062:34;;;;4239:14:36;11112:18:60;;;11105:34;4255:13:36;11155:18:60;;;11148:34;4278:4:36;11198:19:60;;;11191:84;4168:7:36;;11000:19:60;;4204:80:36;;;;;;;;;;;;4194:91;;;;;;4187:98;;4113:179;;6730:317:19;6808:4;2954:12;;;;;;;;;;;:29;;;;;;;;;;;;;6824:217;;;6898:5;6866:12;;;;;;;;;;;:29;;;;;;;;;;;:37;;;;;;6922:40;735:10:30;;6866:12:19;;6922:40;;6898:5;6922:40;-1:-1:-1;6983:4:19;6976:11;;7721:208:23;7791:21;;;7787:91;;7835:32;;;;;7864:1;7835:32;;;3502:74:60;3475:18;;7835:32:23;3356:226:60;7787:91:23;7887:35;7903:1;7907:7;7916:5;7887:7;:35::i;:::-;7721:208;;:::o;6021:126:36:-;6067:13;6099:41;:5;6126:13;6099:26;:41::i;6473:135::-;6522:13;6554:47;:8;6584:16;6554:29;:47::i;8247:206:23:-;8317:21;;;8313:89;;8361:30;;;;;8388:1;8361:30;;;3502:74:60;3475:18;;8361:30:23;3356:226:60;8313:89:23;8411:35;8419:7;8436:1;8440:5;8411:7;:35::i;4917:176:36:-;4994:7;5020:66;5053:20;:18;:20::i;:::-;5075:10;3555:4:37;3549:11;3585:10;3573:23;;3625:4;3616:14;;3609:39;;;;3677:4;3668:14;;3661:34;3733:4;3718:20;;;3353:401;6803:260:35;6888:7;6908:17;6927:18;6947:16;6967:25;6978:4;6984:1;6987;6990;6967:10;:25::i;:::-;6907:85;;;;;;7002:28;7014:5;7021:8;7002:11;:28::i;:::-;-1:-1:-1;7047:9:35;;6803:260;-1:-1:-1;;;;;;6803:260:35:o;1303:160:28:-;1412:43;;;1427:14;10073:55:60;;1412:43:28;;;10055:74:60;10145:18;;;;10138:34;;;1412:43:28;;;;;;;;;;10028:18:60;;;;1412:43:28;;;;;;;;;;;;;;1385:71;;1405:5;;1385:19;:71::i;9949:432:23:-;10061:19;;;10057:89;;10103:32;;;;;10132:1;10103:32;;;3502:74:60;3475:18;;10103:32:23;3356:226:60;10057:89:23;10159:21;;;10155:90;;10203:31;;;;;10231:1;10203:31;;;3502:74:60;3475:18;;10203:31:23;3356:226:60;10155:90:23;10254:18;;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;:35;;;10299:76;;;;10349:7;10333:31;;10342:5;10333:31;;;10358:5;10333:31;;;;1983:25:60;;1971:2;1956:18;;1837:177;10333:31:23;;;;;;;;9949:432;;;;:::o;6271:1107::-;6360:18;;;6356:540;;6512:5;6496:12;;:21;;;;;;;:::i;:::-;;;;-1:-1:-1;6356:540:23;;-1:-1:-1;6356:540:23;;6570:15;;;6548:19;6570:15;;;:9;:15;;;;;;6603:19;;;6599:115;;;6649:50;;;;;9740:42:60;9728:55;;6649:50:23;;;9710:74:60;9800:18;;;9793:34;;;9843:18;;;9836:34;;;9683:18;;6649:50:23;9508:368:60;6599:115:23;6834:15;;;;;;;:9;:15;;;;;6852:19;;;;6834:37;;6356:540;6910:16;;;6906:425;;7073:12;:21;;;;;;;6906:425;;;7284:13;;;;;;;:9;:13;;;;;:22;;;;;;6906:425;7361:2;7346:25;;7355:4;7346:25;;;7365:5;7346:25;;;;1983::60;;1971:2;1956:18;;1837:177;7346:25:23;;;;;;;;6271:1107;;;:::o;3432:197:19:-;2931:4;2954:12;;;;;;;;;;;:29;;;;;;;;;;;;;3515:108;;3565:47;;;;;10085:42:60;10073:55;;3565:47:19;;;10055:74:60;10145:18;;;10138:34;;;10028:18;;3565:47:19;9881:297:60;3385:267:32;3479:13;1390:66;3508:46;;3504:142;;3577:15;3586:5;3577:8;:15::i;:::-;3570:22;;;;3504:142;3630:5;3623:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5140:1530:35;5266:7;;;6199:66;6186:79;;6182:164;;;-1:-1:-1;6297:1:35;;-1:-1:-1;6301:30:35;;-1:-1:-1;6333:1:35;6281:54;;6182:164;6457:24;;;6440:14;6457:24;;;;;;;;;11513:25:60;;;11586:4;11574:17;;11554:18;;;11547:45;;;;11608:18;;;11601:34;;;11651:18;;;11644:34;;;6457:24:35;;11485:19:60;;6457:24:35;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6457:24:35;;;;;;-1:-1:-1;;6495:20:35;;;6491:113;;-1:-1:-1;6547:1:35;;-1:-1:-1;6551:29:35;;-1:-1:-1;6547:1:35;;-1:-1:-1;6531:62:35;;6491:113;6622:6;-1:-1:-1;6630:20:35;;-1:-1:-1;6630:20:35;;-1:-1:-1;5140:1530:35;;;;;;;;;:::o;7196:532::-;7291:20;7282:5;:29;;;;;;;;:::i;:::-;;7278:444;;7196:532;;:::o;7278:444::-;7387:29;7378:5;:38;;;;;;;;:::i;:::-;;7374:348;;7439:23;;;;;;;;;;;;;;7374:348;7492:35;7483:5;:44;;;;;;;;:::i;:::-;;7479:243;;7550:46;;;;;;;;1983:25:60;;;1956:18;;7550:46:35;1837:177:60;7479:243:35;7626:30;7617:5;:39;;;;;;;;:::i;:::-;;7613:109;;7679:32;;;;;;;;1983:25:60;;;1956:18;;7679:32:35;1837:177:60;4059:629:28;4478:23;4504:33;:27;;;4532:4;4504:27;:33::i;:::-;4478:59;;4551:10;:17;4572:1;4551:22;;:57;;;;;4589:10;4578:30;;;;;;;;;;;;:::i;:::-;4577:31;4551:57;4547:135;;;4631:40;;;;;3532:42:60;3520:55;;4631:40:28;;;3502:74:60;3475:18;;4631:40:28;3356:226:60;2078:405:32;2137:13;2162:11;2176:16;2187:4;2176:10;:16::i;:::-;2300:14;;;2311:2;2300:14;;;;;;;;;2162:30;;-1:-1:-1;2280:17:32;;2300:14;;;;;;;;;-1:-1:-1;;;2390:16:32;;;-1:-1:-1;2435:4:32;2426:14;;2419:28;;;;-1:-1:-1;2390:16:32;2078:405::o;2705:151:29:-;2780:12;2811:38;2833:6;2841:4;2847:1;2811:21;:38::i;2555:245:32:-;2616:7;2688:4;2652:40;;2715:2;2706:11;;2702:69;;;2740:20;;;;;;;;;;;;;;3180:392:29;3279:12;3331:5;3307:21;:29;3303:108;;;3359:41;;;;;3394:4;3359:41;;;3502:74:60;3475:18;;3359:41:29;3356:226:60;3303:108:29;3421:12;3435:23;3462:6;:11;;3481:5;3488:4;3462:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3420:73;;;;3510:55;3537:6;3545:7;3554:10;3510:26;:55::i;:::-;3503:62;3180:392;-1:-1:-1;;;;;;3180:392:29:o;4625:582::-;4769:12;4798:7;4793:408;;4821:19;4829:10;4821:7;:19::i;:::-;4793:408;;;5045:17;;:22;:49;;;;-1:-1:-1;5071:18:29;;;;:23;5045:49;5041:119;;;5121:24;;;;;3532:42:60;3520:55;;5121:24:29;;;3502:74:60;3475:18;;5121:24:29;3356:226:60;5041:119:29;-1:-1:-1;5180:10:29;5173:17;;5743:516;5874:17;;:21;5870:383;;6102:10;6096:17;6158:15;6145:10;6141:2;6137:19;6130:44;5870:383;6225:17;;;;;;;;;;;;;;14:332:60;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;180:9;167:23;230:66;223:5;219:78;212:5;209:89;199:117;;312:1;309;302:12;543:250;628:1;638:113;652:6;649:1;646:13;638:113;;;728:11;;;722:18;709:11;;;702:39;674:2;667:10;638:113;;;-1:-1:-1;;785:1:60;767:16;;760:27;543:250::o;798:330::-;840:3;878:5;872:12;905:6;900:3;893:19;921:76;990:6;983:4;978:3;974:14;967:4;960:5;956:16;921:76;:::i;:::-;1042:2;1030:15;1047:66;1026:88;1017:98;;;;1117:4;1013:109;;798:330;-1:-1:-1;;798:330:60:o;1133:220::-;1282:2;1271:9;1264:21;1245:4;1302:45;1343:2;1332:9;1328:18;1320:6;1302:45;:::i;1358:154::-;1444:42;1437:5;1433:54;1426:5;1423:65;1413:93;;1502:1;1499;1492:12;1517:315;1585:6;1593;1646:2;1634:9;1625:7;1621:23;1617:32;1614:52;;;1662:1;1659;1652:12;1614:52;1701:9;1688:23;1720:31;1745:5;1720:31;:::i;:::-;1770:5;1822:2;1807:18;;;;1794:32;;-1:-1:-1;;;1517:315:60:o;2019:456::-;2096:6;2104;2112;2165:2;2153:9;2144:7;2140:23;2136:32;2133:52;;;2181:1;2178;2171:12;2133:52;2220:9;2207:23;2239:31;2264:5;2239:31;:::i;:::-;2289:5;-1:-1:-1;2346:2:60;2331:18;;2318:32;2359:33;2318:32;2359:33;:::i;:::-;2019:456;;2411:7;;-1:-1:-1;;;2465:2:60;2450:18;;;;2437:32;;2019:456::o;2480:180::-;2539:6;2592:2;2580:9;2571:7;2567:23;2563:32;2560:52;;;2608:1;2605;2598:12;2560:52;-1:-1:-1;2631:23:60;;2480:180;-1:-1:-1;2480:180:60:o;2847:315::-;2915:6;2923;2976:2;2964:9;2955:7;2951:23;2947:32;2944:52;;;2992:1;2989;2982:12;2944:52;3028:9;3015:23;3005:33;;3088:2;3077:9;3073:18;3060:32;3101:31;3126:5;3101:31;:::i;:::-;3151:5;3141:15;;;2847:315;;;;;:::o;3587:118::-;3673:5;3666:13;3659:21;3652:5;3649:32;3639:60;;3695:1;3692;3685:12;3710:241;3766:6;3819:2;3807:9;3798:7;3794:23;3790:32;3787:52;;;3835:1;3832;3825:12;3787:52;3874:9;3861:23;3893:28;3915:5;3893:28;:::i;3956:247::-;4015:6;4068:2;4056:9;4047:7;4043:23;4039:32;4036:52;;;4084:1;4081;4074:12;4036:52;4123:9;4110:23;4142:31;4167:5;4142:31;:::i;4208:1335::-;4605:66;4597:6;4593:79;4582:9;4575:98;4556:4;4692:2;4730:3;4725:2;4714:9;4710:18;4703:31;4757:46;4798:3;4787:9;4783:19;4775:6;4757:46;:::i;:::-;4851:9;4843:6;4839:22;4834:2;4823:9;4819:18;4812:50;4885:33;4911:6;4903;4885:33;:::i;:::-;4949:2;4934:18;;4927:34;;;5010:42;4998:55;;4992:3;4977:19;;4970:84;5085:3;5070:19;;5063:35;;;5135:22;;;5129:3;5114:19;;5107:51;5207:13;;5229:22;;;5305:15;;;;-1:-1:-1;5267:15:60;;;;-1:-1:-1;5348:169:60;5362:6;5359:1;5356:13;5348:169;;;5423:13;;5411:26;;5492:15;;;;5457:12;;;;5384:1;5377:9;5348:169;;;-1:-1:-1;5534:3:60;;4208:1335;-1:-1:-1;;;;;;;;;;;;4208:1335:60:o;5548:829::-;5659:6;5667;5675;5683;5691;5699;5707;5760:3;5748:9;5739:7;5735:23;5731:33;5728:53;;;5777:1;5774;5767:12;5728:53;5816:9;5803:23;5835:31;5860:5;5835:31;:::i;:::-;5885:5;-1:-1:-1;5942:2:60;5927:18;;5914:32;5955:33;5914:32;5955:33;:::i;:::-;6007:7;-1:-1:-1;6061:2:60;6046:18;;6033:32;;-1:-1:-1;6112:2:60;6097:18;;6084:32;;-1:-1:-1;6168:3:60;6153:19;;6140:33;6217:4;6204:18;;6192:31;;6182:59;;6237:1;6234;6227:12;6182:59;5548:829;;;;-1:-1:-1;5548:829:60;;;;6260:7;6314:3;6299:19;;6286:33;;-1:-1:-1;6366:3:60;6351:19;;;6338:33;;5548:829;-1:-1:-1;;5548:829:60:o;6382:388::-;6450:6;6458;6511:2;6499:9;6490:7;6486:23;6482:32;6479:52;;;6527:1;6524;6517:12;6479:52;6566:9;6553:23;6585:31;6610:5;6585:31;:::i;:::-;6635:5;-1:-1:-1;6692:2:60;6677:18;;6664:32;6705:33;6664:32;6705:33;:::i;7183:437::-;7262:1;7258:12;;;;7305;;;7326:61;;7380:4;7372:6;7368:17;7358:27;;7326:61;7433:2;7425:6;7422:14;7402:18;7399:38;7396:218;;7470:77;7467:1;7460:88;7571:4;7568:1;7561:15;7599:4;7596:1;7589:15;7396:218;;7183:437;;;:::o;8765:184::-;8835:6;8888:2;8876:9;8867:7;8863:23;8859:32;8856:52;;;8904:1;8901;8894:12;8856:52;-1:-1:-1;8927:16:60;;8765:184;-1:-1:-1;8765:184:60:o;10183:279::-;10248:9;;;10269:10;;;10266:190;;;10312:77;10309:1;10302:88;10413:4;10410:1;10403:15;10441:4;10438:1;10431:15;11689:184;11741:77;11738:1;11731:88;11838:4;11835:1;11828:15;11862:4;11859:1;11852:15;11878:245;11945:6;11998:2;11986:9;11977:7;11973:23;11969:32;11966:52;;;12014:1;12011;12004:12;11966:52;12046:9;12040:16;12065:28;12087:5;12065:28;:::i;12128:287::-;12257:3;12295:6;12289:13;12311:66;12370:6;12365:3;12358:4;12350:6;12346:17;12311:66;:::i;:::-;12393:16;;;;;12128:287;-1:-1:-1;;12128:287:60:o", - "linkReferences": {}, - "immutableReferences": { - "46321": [ - { - "start": 3792, - "length": 32 - } - ], - "46323": [ - { - "start": 3750, - "length": 32 - } - ], - "46325": [ - { - "start": 3708, - "length": 32 - } - ], - "46327": [ - { - "start": 3873, - "length": 32 - } - ], - "46329": [ - { - "start": 3913, - "length": 32 - } - ], - "46332": [ - { - "start": 4284, - "length": 32 - } - ], - "46335": [ - { - "start": 4329, - "length": 32 - } - ] - } + "object": "0x6080604052600436106101ac5760003560e01c8063715018a6116100ec578063cb177b1e1161008a578063f04e283e11610064578063f04e283e146104bf578063f2fde38b146104d2578063feaea586146104e5578063fee81cf41461050557600080fd5b8063cb177b1e1461045f578063d505accf1461047f578063dd62ed3e1461049f57600080fd5b806395d89b41116100c657806395d89b41146103da5780639dc29fac146103ef578063a9059cbb1461040f578063ad0e7d8c1461042f57600080fd5b8063715018a61461036b5780637ecebe00146103735780638da5cb5b146103a657600080fd5b80633644e5151161015957806354d1f13d1161013357806354d1f13d146102c85780636afdd850146102d0578063705e6a5b1461031857806370a082311461033857600080fd5b80633644e51514610279578063407c48b41461028e57806340c10f19146102a857600080fd5b806323b872dd1161018a57806323b872dd146102335780632569296214610253578063313ce5671461025d57600080fd5b806306fdde03146101b1578063095ea7b3146101dc57806318160ddd1461020c575b600080fd5b3480156101bd57600080fd5b506101c6610538565b6040516101d39190611028565b60405180910390f35b3480156101e857600080fd5b506101fc6101f73660046110b6565b6105ca565b60405190151581526020016101d3565b34801561021857600080fd5b506805345cdf77eb68f44c545b6040519081526020016101d3565b34801561023f57600080fd5b506101fc61024e3660046110e2565b61061e565b61025b6106dc565b005b34801561026957600080fd5b50604051601281526020016101d3565b34801561028557600080fd5b5061022561072c565b34801561029a57600080fd5b506002546101fc9060ff1681565b3480156102b457600080fd5b506101fc6102c33660046110b6565b6107a9565b61025b610805565b3480156102dc57600080fd5b506102f36e22d473030f116ddee9f6b43ac78ba381565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d3565b34801561032457600080fd5b5061025b610333366004611138565b610841565b34801561034457600080fd5b50610225610353366004611153565b6387a211a2600c908152600091909152602090205490565b61025b6108af565b34801561037f57600080fd5b5061022561038e366004611153565b6338377508600c908152600091909152602090205490565b3480156103b257600080fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927546102f3565b3480156103e657600080fd5b506101c66108c3565b3480156103fb57600080fd5b506101fc61040a3660046110b6565b6108d2565b34801561041b57600080fd5b506101fc61042a3660046110b6565b610906565b34801561043b57600080fd5b506101fc61044a366004611153565b60036020526000908152604090205460ff1681565b34801561046b57600080fd5b5061025b61047a366004611170565b61097d565b34801561048b57600080fd5b5061025b61049a3660046111a5565b6109db565b3480156104ab57600080fd5b506102256104ba36600461121c565b610b75565b61025b6104cd366004611153565b610bfa565b61025b6104e0366004611153565b610c3a565b3480156104f157600080fd5b5061025b61050036600461121c565b610c61565b34801561051157600080fd5b50610225610520366004611153565b63389a75e1600c908152600091909152602090205490565b60606000805461054790611255565b80601f016020809104026020016040519081016040528092919081815260200182805461057390611255565b80156105c05780601f10610595576101008083540402835291602001916105c0565b820191906000526020600020905b8154815290600101906020018083116105a357829003601f168201915b5050505050905090565b600082602052637f5e9f20600c5233600052816034600c205581600052602c5160601c337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560206000a35060015b92915050565b60008360601b33602052637f5e9f208117600c526034600c208054600181011561065e5780851115610658576313be252b6000526004601cfd5b84810382555b50506387a211a28117600c526020600c208054808511156106875763f4d678b86000526004601cfd5b84810382555050836000526020600c208381540181555082602052600c5160601c8160601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a3505060019392505050565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b600080610737610538565b8051906020012090506040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81528160208201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6604082015246606082015230608082015260a081209250505090565b3360009081526003602052604081205460ff166107f2576040517ff8d2906c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107fc8383610df7565b50600192915050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b610849610e76565b60405181151581527f383d8f27281deff0ab982f76ad2feac76f0cb5d922008a4642d8765c748591329060200160405180910390a1600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6108b7610e76565b6108c16000610eac565b565b60606001805461054790611255565b600073ffffffffffffffffffffffffffffffffffffffff831633146108fc576108fc833384610f12565b6107fc8383610f55565b60006387a211a2600c52336000526020600c208054808411156109315763f4d678b86000526004601cfd5b83810382555050826000526020600c208281540181555081602052600c5160601c337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a36107fc565b610985610e76565b73ffffffffffffffffffffffffffffffffffffffff91909116600090815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60006109e5610538565b80519060200120905084421115610a0457631a15a3cc6000526004601cfd5b6040518860601b60601c98508760601b60601c975065383775081901600e52886000526020600c2080547f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f83528360208401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6604084015246606084015230608084015260a08320602e527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c983528a60208401528960408401528860608401528060808401528760a084015260c08320604e526042602c206000528660ff1660205285604052846060526020806080600060015afa8b3d5114610b105763ddafbaef6000526004601cfd5b019055777f5e9f20000000000000000000000000000000000000000088176040526034602c2087905587897f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602060608501a360405250506000606052505050505050565b600073ffffffffffffffffffffffffffffffffffffffff82166e22d473030f116ddee9f6b43ac78ba3148015610bad575060025460ff165b15610bd957507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610618565b6020829052637f5e9f20600c908152600084905260349020545b9392505050565b610c02610e76565b63389a75e1600c52806000526020600c208054421115610c2a57636f5e88186000526004601cfd5b60009055610c3781610eac565b50565b610c42610e76565b8060601b610c5857637448fbae6000526004601cfd5b610c3781610eac565b610c69610e76565b73ffffffffffffffffffffffffffffffffffffffff821615610d24576040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152610d20908390839073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015610cf7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1b91906112a8565b610fd9565b5050565b60008173ffffffffffffffffffffffffffffffffffffffff164760405160006040518083038185875af1925050503d8060008114610d7e576040519150601f19603f3d011682016040523d82523d6000602084013e610d83565b606091505b5050905080610df2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f7769746864726177206661696c65640000000000000000000000000000000000604482015260640160405180910390fd5b505050565b6805345cdf77eb68f44c5481810181811015610e1b5763e5cfe9576000526004601cfd5b806805345cdf77eb68f44c5550506387a211a2600c52816000526020600c208181540181555080602052600c5160601c60007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a35050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275433146108c1576382b429006000526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b81602052637f5e9f20600c52826000526034600c2080546001810115610f4e5780831115610f48576313be252b6000526004601cfd5b82810382555b5050505050565b6387a211a2600c52816000526020600c20805480831115610f7e5763f4d678b86000526004601cfd5b82900390556805345cdf77eb68f44c80548290039055600081815273ffffffffffffffffffffffffffffffffffffffff83167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602083a35050565b81601452806034526fa9059cbb00000000000000000000000060005260206000604460106000875af13d15600160005114171661101e576390b8ec186000526004601cfd5b6000603452505050565b600060208083528351808285015260005b8181101561105557858101830151858201604001528201611039565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c3757600080fd5b600080604083850312156110c957600080fd5b82356110d481611094565b946020939093013593505050565b6000806000606084860312156110f757600080fd5b833561110281611094565b9250602084013561111281611094565b929592945050506040919091013590565b8035801515811461113357600080fd5b919050565b60006020828403121561114a57600080fd5b610bf382611123565b60006020828403121561116557600080fd5b8135610bf381611094565b6000806040838503121561118357600080fd5b823561118e81611094565b915061119c60208401611123565b90509250929050565b600080600080600080600060e0888a0312156111c057600080fd5b87356111cb81611094565b965060208801356111db81611094565b95506040880135945060608801359350608088013560ff811681146111ff57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561122f57600080fd5b823561123a81611094565b9150602083013561124a81611094565b809150509250929050565b600181811c9082168061126957607f821691505b6020821081036112a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b6000602082840312156112ba57600080fd5b505191905056", + "sourceMap": "376:3092:28:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;997:90;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;7435:573:23;;;;;;;;;;-1:-1:-1;7435:573:23;;;;;:::i;:::-;;:::i;:::-;;;1270:14:61;;1263:22;1245:41;;1233:2;1218:18;7435:573:23;1105:187:61;6287:195:23;;;;;;;;;;-1:-1:-1;6447:18:23;6441:25;6287:195;;;1443:25:61;;;1431:2;1416:18;6287:195:23;1297:177:61;9969:2191:23;;;;;;;;;;-1:-1:-1;9969:2191:23;;;;;:::i;:::-;;:::i;9021:617:22:-;;;:::i;:::-;;908:83:28;;;;;;;;;;-1:-1:-1;908:83:28;;982:2;2082:36:61;;2070:2;2055:18;908:83:28;1940:184:61;16620:693:23;;;;;;;;;;;;;:::i;594:26:28:-;;;;;;;;;;-1:-1:-1;594:26:28;;;;;;;;1671:142;;;;;;;;;;-1:-1:-1;1671:142:28;;;;;:::i;:::-;;:::i;9720:456:22:-;;;:::i;453:76:28:-;;;;;;;;;;;;487:42;453:76;;;;;2487:42:61;2475:55;;;2457:74;;2445:2;2430:18;453:76:28;2311:226:61;2367:153:28;;;;;;;;;;-1:-1:-1;2367:153:28;;;;;:::i;:::-;;:::i;6548:286:23:-;;;;;;;;;;-1:-1:-1;6548:286:23;;;;;:::i;:::-;6716:18;6710:4;6703:32;;;6611:14;6748:19;;;;6812:4;6796:21;;6790:28;;6548:286;8762:100:22;;;:::i;12800:340:23:-;;;;;;;;;;-1:-1:-1;12800:340:23;;;;;:::i;:::-;13023:17;13017:4;13010:31;;;12860:14;13054:19;;;;13118:4;13102:21;;13096:28;;12800:340;11408:182:22;;;;;;;;;;-1:-1:-1;11562:11:22;11556:18;11408:182;;1093:94:28;;;;;;;;;;;;;:::i;1958:236::-;;;;;;;;;;-1:-1:-1;1958:236:28;;;;;:::i;:::-;;:::i;8195:1406:23:-;;;;;;;;;;-1:-1:-1;8195:1406:23;;;;;:::i;:::-;;:::i;670:42:28:-;;;;;;;;;;-1:-1:-1;670:42:28;;;;;:::i;:::-;;;;;;;;;;;;;;;;1393:121;;;;;;;;;;-1:-1:-1;1393:121:28;;;;;:::i;:::-;;:::i;13324:3215:23:-;;;;;;;;;;-1:-1:-1;13324:3215:23;;;;;:::i;:::-;;:::i;2653:223:28:-;;;;;;;;;;-1:-1:-1;2653:223:28;;;;;:::i;:::-;;:::i;10363:708:22:-;;;;;;:::i;:::-;;:::i;8348:349::-;;;;;;:::i;:::-;;:::i;3094:372:28:-;;;;;;;;;;-1:-1:-1;3094:372:28;;;;;:::i;:::-;;:::i;11693:435:22:-;;;;;;;;;;-1:-1:-1;11693:435:22;;;;;:::i;:::-;11963:19;11957:4;11950:33;;;11812:14;11996:26;;;;12106:4;12090:21;;12084:28;;11693:435;997:90:28;1043:13;1075:5;1068:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;997:90;:::o;7435:573:23:-;7509:4;7668:7;7662:4;7655:21;7702:20;7696:4;7689:34;7749:8;7743:4;7736:22;7801:6;7794:4;7788;7778:21;7771:37;7876:6;7870:4;7863:20;7964:4;7958:11;7954:2;7950:20;7940:8;7913:25;7907:4;7901;7896:75;-1:-1:-1;7997:4:23;7435:573;;;;;:::o;9969:2191::-;10057:4;10208;10204:2;10200:13;10301:8;10295:4;10288:22;10346:20;10339:5;10336:31;10330:4;10323:45;10418:4;10412;10402:21;10460:13;10454:20;10572:1;10560:10;10556:18;10553:418;;;10688:10;10680:6;10677:22;10674:159;;;10735:10;10729:4;10722:24;10810:4;10804;10797:18;10674:159;10949:6;10937:10;10933:23;10918:13;10911:46;10553:418;;;11067:18;11060:5;11057:29;11051:4;11044:43;11139:4;11133;11123:21;11182:15;11176:22;11272:11;11264:6;11261:23;11258:146;;;11316:10;11310:4;11303:24;11385:4;11379;11372:18;11258:146;11513:6;11500:11;11496:24;11479:15;11472:49;;;11596:2;11590:4;11583:16;11649:4;11643;11633:21;11899:6;11883:13;11877:20;11873:33;11858:13;11851:56;;11975:6;11969:4;11962:20;12069:4;12063:11;12059:2;12055:20;12047:5;12043:2;12039:14;12012:25;12006:4;12000;11995:81;;-1:-1:-1;12149:4:23;9969:2191;;;;;:::o;9021:617:22:-;9114:15;7972:9;9132:46;;:15;:46;9114:64;;9346:19;9340:4;9333:33;9396:8;9390:4;9383:22;9452:7;9445:4;9439;9429:21;9422:38;9599:8;9552:45;9549:1;9546;9541:67;9248:374;9021:617::o;16620:693:23:-;16677:14;;16900:6;:4;:6::i;:::-;16884:24;;;;;;16873:35;;16999:4;16993:11;17060:16;17057:1;17050:27;17111:8;17104:4;17101:1;17097:12;17090:30;17154:13;17147:4;17144:1;17140:12;17133:35;17202:9;17195:4;17192:1;17188:12;17181:31;17246:9;17239:4;17236:1;17232:12;17225:31;17292:4;17289:1;17279:18;17269:28;;;16970:337;16620:693;:::o;1671:142:28:-;1241:10;1747:4;1230:22;;;:10;:22;;;;;;;;1225:47;;1261:11;;;;;;;;;;;;;;1225:47;1763:22:::1;1769:7;1778:6;1763:5;:22::i;:::-;-1:-1:-1::0;1802:4:28::1;1671:142:::0;;;;:::o;9720:456:22:-;9922:19;9916:4;9909:33;9968:8;9962:4;9955:22;10020:1;10013:4;10007;9997:21;9990:32;10151:8;10105:44;10102:1;10099;10094:66;9720:456::o;2367:153:28:-;12517:13:22;:11;:13::i;:::-;2447:32:28::1;::::0;1270:14:61;;1263:22;1245:41;;2447:32:28::1;::::0;1233:2:61;1218:18;2447:32:28::1;;;;;;;2489:14;:24:::0;;;::::1;::::0;::::1;;::::0;;;::::1;::::0;;2367:153::o;8762:100:22:-;12517:13;:11;:13::i;:::-;8834:21:::1;8852:1;8834:9;:21::i;:::-;8762:100::o:0;1093:94:28:-;1141:13;1173:7;1166:14;;;;;:::i;1958:236::-;2023:4;2043:21;;;2054:10;2043:21;2039:96;;2080:44;2096:7;2105:10;2117:6;2080:15;:44::i;:::-;2144:22;2150:7;2159:6;2144:5;:22::i;8195:1406:23:-;8265:4;8474:18;8468:4;8461:32;8519:8;8513:4;8506:22;8580:4;8574;8564:21;8623:15;8617:22;8713:11;8705:6;8702:23;8699:146;;;8757:10;8751:4;8744:24;8826:4;8820;8813:18;8699:146;8954:6;8941:11;8937:24;8920:15;8913:49;;;9037:2;9031:4;9024:16;9090:4;9084;9074:21;9340:6;9324:13;9318:20;9314:33;9299:13;9292:56;;9416:6;9410:4;9403:20;9504:4;9498:11;9494:2;9490:20;9480:8;9453:25;9447:4;9441;9436:75;9530:43;3094:372:28;1393:121;12517:13:22;:11;:13::i;:::-;1477:19:28::1;::::0;;;::::1;;::::0;;;:10:::1;:19;::::0;;;;:30;;;::::1;::::0;::::1;;::::0;;;::::1;::::0;;1393:121::o;13324:3215:23:-;13523:16;13720:6;:4;:6::i;:::-;13704:24;;;;;;13693:35;;13896:8;13883:11;13880:25;13877:142;;;13937:10;13931:4;13924:24;14000:4;13994;13987:18;13877:142;14047:4;14041:11;14163:5;14159:2;14155:14;14151:2;14147:23;14138:32;;14210:7;14206:2;14202:16;14198:2;14194:25;14183:36;;14303:39;14297:4;14290:53;14369:5;14363:4;14356:19;14421:4;14415;14405:21;14463:9;14457:16;14541;14538:1;14531:27;14592:8;14585:4;14582:1;14578:12;14571:30;14635:13;14628:4;14625:1;14621:12;14614:35;14683:9;14676:4;14673:1;14669:12;14662:31;14727:9;14720:4;14717:1;14713:12;14706:31;14776:4;14773:1;14763:18;14757:4;14750:32;14845:16;14842:1;14835:27;14896:5;14889:4;14886:1;14882:12;14875:27;14936:7;14929:4;14926:1;14922:12;14915:29;14978:5;14971:4;14968:1;14964:12;14957:27;15018:10;15011:4;15008:1;15004:12;14997:32;15063:8;15056:4;15053:1;15049:12;15042:30;15111:4;15108:1;15098:18;15092:4;15085:32;15206:4;15200;15190:21;15184:4;15177:35;15248:1;15242:4;15238:12;15232:4;15225:26;15277:1;15271:4;15264:15;15305:1;15299:4;15292:15;15365:4;15359;15353;15350:1;15347;15340:5;15329:41;15786:5;15767:16;15761:23;15758:34;15748:159;;15825:10;15819:4;15812:24;15888:4;15882;15875:18;15748:159;15992:18;15974:37;;16190:30;16187:43;;16181:4;16174:57;16267:4;16261;16251:21;16244:36;;;16222:7;16387:5;16360:25;-1:-1:-1;16347:4:23;16340:12;;16335:67;16422:4;16415:15;-1:-1:-1;;16492:1:23;16486:4;16479:15;-1:-1:-1;;;;;;13324:3215:23:o;2653:223:28:-;2735:7;2758:18;;;487:42;2758:18;:36;;;;-1:-1:-1;2780:14:28;;;;2758:36;2754:66;;;-1:-1:-1;2803:17:28;2796:24;;2754:66;7144:4:23;7137:21;;;7184:20;7178:4;7171:34;;;7041:14;7218:19;;;7282:4;7266:21;;7260:28;2837:32:28;2830:39;2653:223;-1:-1:-1;;;2653:223:28:o;10363:708:22:-;12517:13;:11;:13::i;:::-;10597:19:::1;10591:4;10584:33;10643:12;10637:4;10630:26;10705:4;10699;10689:21;10811:12;10805:19;10792:11;10789:36;10786:157;;;10857:10;10851:4;10844:24;10924:4;10918;10911:18;10786:157;11020:1;10999:23:::0;;11041::::1;11051:12:::0;11041:9:::1;:23::i;:::-;10363:708:::0;:::o;8348:349::-;12517:13;:11;:13::i;:::-;8520:8:::1;8516:2;8512:17;8502:150;;8562:10;8556:4;8549:24;8633:4;8627;8620:18;8502:150;8671:19;8681:8;8671:9;:19::i;3094:372:28:-:0;12517:13:22;:11;:13::i;:::-;3177:28:28::1;::::0;::::1;::::0;3173:287:::1;;3270:30;::::0;;;;3294:4:::1;3270:30;::::0;::::1;2457:74:61::0;3221:80:28::1;::::0;3258:5;;3266:2;;3270:15:::1;::::0;::::1;::::0;::::1;::::0;2430:18:61;;3270:30:28::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3221:28;:80::i;:::-;3094:372:::0;;:::o;3173:287::-:1;3333:12;3358:2;3350:16;;3374:21;3350:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3332:68;;;3422:7;3414:35;;;::::0;::::1;::::0;;6147:2:61;3414:35:28::1;::::0;::::1;6129:21:61::0;6186:2;6166:18;;;6159:30;6225:17;6205:18;;;6198:45;6260:18;;3414:35:28::1;;;;;;;;3318:142;3094:372:::0;;:::o;17717:1172:23:-;17938:18;17932:25;18017:6;17998:17;17994:30;18114:17;18096:16;18093:39;18090:162;;;18164:10;18158:4;18151:24;18233:4;18227;18220:18;18090:162;18339:16;18319:18;18312:44;;;18442:18;18436:4;18429:32;18487:2;18481:4;18474:16;18540:4;18534;18524:21;18656:6;18640:13;18634:20;18630:33;18615:13;18608:56;;18732:6;18726:4;18719:20;18813:4;18807:11;18803:2;18799:20;18796:1;18769:25;18763:4;18757;18752:68;3094:372:28;;:::o;7292:355:22:-;7504:11;7498:18;7488:8;7485:32;7475:156;;7550:10;7544:4;7537:24;7612:4;7606;7599:18;6145:1089;6857:11;7093:16;;6941:26;;;;;;;7053:38;7050:1;;7042:78;7177:27;6145:1089::o;22532:947:23:-;22773:7;22767:4;22760:21;22807:20;22801:4;22794:34;22854:5;22848:4;22841:19;22910:4;22904;22894:21;22952:13;22946:20;23064:1;23052:10;23048:18;23045:418;;;23180:10;23172:6;23169:22;23166:159;;;23227:10;23221:4;23214:24;23302:4;23296;23289:18;23166:159;23441:6;23429:10;23425:23;23410:13;23403:46;23045:418;;;22532:947;;;:::o;19295:1119::-;19562:18;19556:4;19549:32;19607:4;19601;19594:18;19664:4;19658;19648:21;19707:15;19701:22;19797:11;19789:6;19786:23;19783:146;;;19841:10;19835:4;19828:24;19910:4;19904;19897:18;19783:146;20021:24;;;19997:49;;20156:18;20150:25;;20146:38;;;20119:66;;-1:-1:-1;20240:20:23;;;20317:22;;;20290:25;20284:4;-1:-1:-1;20273:70:23;3094:372:28;;:::o;11375:939:24:-;11538:2;11532:4;11525:16;11595:6;11589:4;11582:20;11660:34;11654:4;11647:48;12049:4;12043;12037;12031;12028:1;12021:5;12014;12009:45;11943:16;11936:24;11932:1;11925:4;11919:11;11916:18;11913:48;11828:244;11801:400;;12118:10;12112:4;12105:24;12182:4;12176;12169:18;11801:400;12227:1;12221:4;12214:15;11375:939;;;:::o;14:607:61:-;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;612:2;542:66;537:2;529:6;525:15;521:88;510:9;506:104;502:113;494:121;;;;14:607;;;;:::o;626:154::-;712:42;705:5;701:54;694:5;691:65;681:93;;770:1;767;760:12;785:315;853:6;861;914:2;902:9;893:7;889:23;885:32;882:52;;;930:1;927;920:12;882:52;969:9;956:23;988:31;1013:5;988:31;:::i;:::-;1038:5;1090:2;1075:18;;;;1062:32;;-1:-1:-1;;;785:315:61:o;1479:456::-;1556:6;1564;1572;1625:2;1613:9;1604:7;1600:23;1596:32;1593:52;;;1641:1;1638;1631:12;1593:52;1680:9;1667:23;1699:31;1724:5;1699:31;:::i;:::-;1749:5;-1:-1:-1;1806:2:61;1791:18;;1778:32;1819:33;1778:32;1819:33;:::i;:::-;1479:456;;1871:7;;-1:-1:-1;;;1925:2:61;1910:18;;;;1897:32;;1479:456::o;2542:160::-;2607:20;;2663:13;;2656:21;2646:32;;2636:60;;2692:1;2689;2682:12;2636:60;2542:160;;;:::o;2707:180::-;2763:6;2816:2;2804:9;2795:7;2791:23;2787:32;2784:52;;;2832:1;2829;2822:12;2784:52;2855:26;2871:9;2855:26;:::i;2892:247::-;2951:6;3004:2;2992:9;2983:7;2979:23;2975:32;2972:52;;;3020:1;3017;3010:12;2972:52;3059:9;3046:23;3078:31;3103:5;3078:31;:::i;3144:315::-;3209:6;3217;3270:2;3258:9;3249:7;3245:23;3241:32;3238:52;;;3286:1;3283;3276:12;3238:52;3325:9;3312:23;3344:31;3369:5;3344:31;:::i;:::-;3394:5;-1:-1:-1;3418:35:61;3449:2;3434:18;;3418:35;:::i;:::-;3408:45;;3144:315;;;;;:::o;3464:829::-;3575:6;3583;3591;3599;3607;3615;3623;3676:3;3664:9;3655:7;3651:23;3647:33;3644:53;;;3693:1;3690;3683:12;3644:53;3732:9;3719:23;3751:31;3776:5;3751:31;:::i;:::-;3801:5;-1:-1:-1;3858:2:61;3843:18;;3830:32;3871:33;3830:32;3871:33;:::i;:::-;3923:7;-1:-1:-1;3977:2:61;3962:18;;3949:32;;-1:-1:-1;4028:2:61;4013:18;;4000:32;;-1:-1:-1;4084:3:61;4069:19;;4056:33;4133:4;4120:18;;4108:31;;4098:59;;4153:1;4150;4143:12;4098:59;3464:829;;;;-1:-1:-1;3464:829:61;;;;4176:7;4230:3;4215:19;;4202:33;;-1:-1:-1;4282:3:61;4267:19;;;4254:33;;3464:829;-1:-1:-1;;3464:829:61:o;4298:388::-;4366:6;4374;4427:2;4415:9;4406:7;4402:23;4398:32;4395:52;;;4443:1;4440;4433:12;4395:52;4482:9;4469:23;4501:31;4526:5;4501:31;:::i;:::-;4551:5;-1:-1:-1;4608:2:61;4593:18;;4580:32;4621:33;4580:32;4621:33;:::i;:::-;4673:7;4663:17;;;4298:388;;;;;:::o;5104:437::-;5183:1;5179:12;;;;5226;;;5247:61;;5301:4;5293:6;5289:17;5279:27;;5247:61;5354:2;5346:6;5343:14;5323:18;5320:38;5317:218;;5391:77;5388:1;5381:88;5492:4;5489:1;5482:15;5520:4;5517:1;5510:15;5317:218;;5104:437;;;:::o;5546:184::-;5616:6;5669:2;5657:9;5648:7;5644:23;5640:32;5637:52;;;5685:1;5682;5675:12;5637:52;-1:-1:-1;5708:16:61;;5546:184;-1:-1:-1;5546:184:61:o", + "linkReferences": {} }, "methodIdentifiers": { - "DEFAULT_ADMIN_ROLE()": "a217fddf", "DOMAIN_SEPARATOR()": "3644e515", "PERMIT2()": "6afdd850", "allowance(address,address)": "dd62ed3e", "approve(address,uint256)": "095ea7b3", "balanceOf(address)": "70a08231", "burn(address,uint256)": "9dc29fac", + "cancelOwnershipHandover()": "54d1f13d", + "completeOwnershipHandover(address)": "f04e283e", "decimals()": "313ce567", - "eip712Domain()": "84b0196e", - "getRoleAdmin(bytes32)": "248a9ca3", - "grantRole(bytes32,address)": "2f2ff15d", - "hasRole(bytes32,address)": "91d14854", "mint(address,uint256)": "40c10f19", + "minterRole(address)": "ad0e7d8c", "name()": "06fdde03", "nonces(address)": "7ecebe00", + "owner()": "8da5cb5b", + "ownershipHandoverExpiresAt(address)": "fee81cf4", "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf", "permit2Enabled()": "407c48b4", "recoverToken(address,address)": "feaea586", - "renounceRole(bytes32,address)": "36568abe", - "revokeRole(bytes32,address)": "d547741f", - "setMinterRole(address)": "945d1229", - "supportsInterface(bytes4)": "01ffc9a7", + "renounceOwnership()": "715018a6", + "requestOwnershipHandover()": "25692962", + "setMinterRole(address,bool)": "cb177b1e", "symbol()": "95d89b41", "totalSupply()": "18160ddd", "transfer(address,uint256)": "a9059cbb", "transferFrom(address,address,uint256)": "23b872dd", + "transferOwnership(address)": "f2fde38b", "updatePermit2Allowance(bool)": "705e6a5b" }, - "rawMetadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"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\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"ERC2612ExpiredSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC2612InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"currentNonce\",\"type\":\"uint256\"}],\"name\":\"InvalidAccountNonce\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidShortString\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"}],\"name\":\"StringTooLong\",\"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\":[],\"name\":\"EIP712DomainChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"Permit2AllowanceUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"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\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMIT2\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"eip712Domain\",\"outputs\":[{\"internalType\":\"bytes1\",\"name\":\"fields\",\"type\":\"bytes1\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"verifyingContract\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"extensions\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"permit2Enabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"setMinterRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"updatePermit2Allowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}],\"AddressEmptyCode(address)\":[{\"details\":\"There's no code at `target` (it is not a contract).\"}],\"AddressInsufficientBalance(address)\":[{\"details\":\"The ETH balance of the account is not enough to perform the operation.\"}],\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"ERC20InsufficientAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\",\"params\":{\"allowance\":\"Amount of tokens a `spender` is allowed to operate with.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC20InsufficientBalance(address,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC20InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC20InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidSpender(address)\":[{\"details\":\"Indicates a failure with the `spender` to be approved. Used in approvals.\",\"params\":{\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC2612ExpiredSignature(uint256)\":[{\"details\":\"Permit deadline has expired.\"}],\"ERC2612InvalidSigner(address,address)\":[{\"details\":\"Mismatched signature.\"}],\"FailedInnerCall()\":[{\"details\":\"A call to an address target failed. The target may have reverted.\"}],\"InvalidAccountNonce(address,uint256)\":[{\"details\":\"The nonce used for an `account` is not the expected current nonce.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC20 token failed.\"}]},\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"EIP712DomainChanged()\":{\"details\":\"MAY be emitted to signal that the domain could have changed.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\"},\"allowance(address,address)\":{\"details\":\"The permit2 contract has full approval by default. If the approval is revoked, it can still be manually approved.\"},\"approve(address,uint256)\":{\"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.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"burn(address,uint256)\":{\"details\":\"Burns a token\",\"params\":{\"account\":\"address to burn tokens from\",\"amount\":\"amount of tokens to burn\"}},\"decimals()\":{\"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}.\"},\"eip712Domain()\":{\"details\":\"See {IERC-5267}.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"mint(address,uint256)\":{\"details\":\"Mints a new token\",\"params\":{\"account\":\"address to send the minted tokens to\",\"amount\":\"amount of tokens to mint\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Sets `value` as the allowance of `spender` over ``owner``'s tokens, given ``owner``'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]. CAUTION: See Security Considerations above.\"},\"recoverToken(address,address)\":{\"details\":\"withdraw token. For cases where people mistakenly send other tokens to this address\",\"params\":{\"to\":\"account to withdraw tokens to\",\"token\":\"address of the token to withdraw\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"setMinterRole(address)\":{\"details\":\"sets a minter role\",\"params\":{\"account\":\"address for the minter role\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.\"},\"transferFrom(address,address,uint256)\":{\"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`.\"},\"updatePermit2Allowance(bool)\":{\"details\":\"used to update if to default approve permit2 address for all addresses\",\"params\":{\"enabled\":\"if the default approval should be done or not\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/currency.sol\":\"Currency\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"appendCBOR\":false,\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"keccak256\":\"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80\",\"dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z\"]},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol\":{\"keccak256\":\"0x92aa1df62dc3d33f1656d63bede0923e0df0b706ad4137c8b10b0a8fe549fd92\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5c0f29195ad64cbe556da8e257dac8f05f78c53f90323c0d2accf8e6922d33a\",\"dweb:/ipfs/QmQ61TED8uaCZwcbh8KkgRSsCav7x7HbcGHwHts3U4DmUP\"]},\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229\",\"dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Permit.sol\":{\"keccak256\":\"0xc858a86a35701004d89022a5e98819aac46ccbdc4072fc9dd43928a676b1a2ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://18acebb483c512c0eaafcb437f09c839972c3f0d36f0201ea7baa2926b987dd2\",\"dweb:/ipfs/Qmd9bf2noaDSYDtf6FMSzKu7LPhuf91jsVNmcoCuTCuGic\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f5196ec75139918c6c7bb4251b36395e668f1fa6d206beba7e7520e74913940d\",\"dweb:/ipfs/QmSyqjksXxmm2mCG6qRd1yuwLykypkSVBbnBnGqJRcuJMi\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3036b3a83b7c48f96641f2a9002b9f2dcb6a5958dd670894ada21ae8229b3d0\",\"dweb:/ipfs/QmUNfSBdoVtjhETaUJCYcaC7pTMgbhht926tJ2uXJbiVd3\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7bd24e224f67f65bfadf85dc2929fa965456bb2415478bd0125471b5ce35245\",\"dweb:/ipfs/QmRaydGr8BTHs1kvaZfsNU69pKzUAGFrvABn1KiRSbE51y\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0c4e6cb30d3601e2f7af5af09e265508147cb275a8dcd99d6f7363645cc56867\",\"dweb:/ipfs/QmNgFkoXNWoUbAyw71rr1sKQ95Rj2GfvYiWg79xEYDn2NY\"]},\"lib/openzeppelin-contracts/contracts/utils/Nonces.sol\":{\"keccak256\":\"0x0082767004fca261c332e9ad100868327a863a88ef724e844857128845ab350f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://132dce9686a54e025eb5ba5d2e48208f847a1ec3e60a3e527766d7bf53fb7f9e\",\"dweb:/ipfs/QmXn1a2nUZMpu2z6S88UoTfMVtY2YNh86iGrzJDYmMkKeZ\"]},\"lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol\":{\"keccak256\":\"0x18a7171df639a934592915a520ecb97c5bbc9675a1105607aac8a94e72bf62c6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7478e1f13da69a2867ccd883001d836b75620362e743f196376d63ed0c422a1c\",\"dweb:/ipfs/QmWywcQ9TNfwtoqAxbn25d8C5VrV12PrPS9UjtGe6pL2BA\"]},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0x32ba59b4b7299237c8ba56319110989d7978a039faf754793064e967e5894418\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1ae50c8b562427df610cc4540c9bf104acca7ef8e2dcae567ae7e52272281e9c\",\"dweb:/ipfs/QmTHiadFCSJUPpRjNegc5SahmeU8bAoY8i9Aq6tVscbcKR\"]},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba80ba06c8e6be852847e4c5f4492cef801feb6558ae09ed705ff2e04ea8b13c\",\"dweb:/ipfs/QmXRJDv3xHLVQCVXg1ZvR35QS9sij5y9NDWYzMfUfAdTHF\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol\":{\"keccak256\":\"0x999f705a027ed6dc2d4e0df2cc4a509852c6bfd11de1c8161bf88832d0503fd0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0798def67258d9a3cc20b2b4da7ebf351a5cefe0abfdd665d2d81f8e32f89b21\",\"dweb:/ipfs/QmPEvJosnPfzHNjKvCv2D3891mA2Ww8eUwkqrxBjuYdHCt\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol\":{\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2ceacff44c0fdc81e48e0e0b1db87a2076d3c1fb497341de077bf1da9f6b406c\",\"dweb:/ipfs/QmRUo1muMRAewxrKQ7TkXUtknyRoR57AyEkoPpiuZQ8FzX\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]},\"lib/openzeppelin-contracts/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/currency.sol\":{\"keccak256\":\"0xcff030c4bad135b27acbe405aba19da1184c406c30fe6839b17ffcb8548938d4\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://8ca7791099d9f9851622964e2668477dbe07441c4d687621eaff725c7e25d48b\",\"dweb:/ipfs/QmdsMzD9aVqBym5bS4QnYnGtN8872iBck94NFeyfLirJ8Y\"]},\"src/interfaces/ICurrency.sol\":{\"keccak256\":\"0x3b7adace3df08c34906612358d435ffff3b90b5eec0eae34b6335cc8dcd0e7ed\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://370c80ec5636bd95342256d4116f703e633e6b0467ee530397e9b5cada37f998\",\"dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz\"]}},\"version\":1}", + "rawMetadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AllowanceOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AllowanceUnderflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPermit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewOwnerIsZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoHandoverRequest\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotMinter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PermitExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TotalSupplyOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"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\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"OwnershipHandoverCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"OwnershipHandoverRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"Permit2AllowanceUpdated\",\"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\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"result\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMIT2\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cancelOwnershipHandover\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"completeOwnershipHandover\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"minterRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"result\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"ownershipHandoverExpiresAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"permit2Enabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requestOwnershipHandover\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isMinter\",\"type\":\"bool\"}],\"name\":\"setMinterRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"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\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"updatePermit2Allowance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AllowanceOverflow()\":[{\"details\":\"The allowance has overflowed.\"}],\"AllowanceUnderflow()\":[{\"details\":\"The allowance has underflowed.\"}],\"AlreadyInitialized()\":[{\"details\":\"Cannot double-initialize.\"}],\"InsufficientAllowance()\":[{\"details\":\"Insufficient allowance.\"}],\"InsufficientBalance()\":[{\"details\":\"Insufficient balance.\"}],\"InvalidPermit()\":[{\"details\":\"The permit is invalid.\"}],\"NewOwnerIsZeroAddress()\":[{\"details\":\"The `newOwner` cannot be the zero address.\"}],\"NoHandoverRequest()\":[{\"details\":\"The `pendingOwner` does not have a valid handover request.\"}],\"PermitExpired()\":[{\"details\":\"The permit has expired.\"}],\"TotalSupplyOverflow()\":[{\"details\":\"The total supply has overflowed.\"}],\"Unauthorized()\":[{\"details\":\"The caller is not authorized to call the function.\"}]},\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when `amount` tokens is approved by `owner` to be used by `spender`.\"},\"OwnershipHandoverCanceled(address)\":{\"details\":\"The ownership handover to `pendingOwner` has been canceled.\"},\"OwnershipHandoverRequested(address)\":{\"details\":\"An ownership handover to `pendingOwner` has been requested.\"},\"OwnershipTransferred(address,address)\":{\"details\":\"The ownership is transferred from `oldOwner` to `newOwner`. This event is intentionally kept the same as OpenZeppelin's Ownable to be compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173), despite it not being as lightweight as a single argument event.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `amount` tokens is transferred from `from` to `to`.\"}},\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the EIP-712 domain separator for the EIP-2612 permit.\"},\"allowance(address,address)\":{\"details\":\"The permit2 contract has full approval by default. If the approval is revoked, it can still be manually approved.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Emits a {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `owner`.\"},\"burn(address,uint256)\":{\"details\":\"Burns a token\",\"params\":{\"account\":\"address to burn tokens from\",\"amount\":\"amount of tokens to burn\"}},\"cancelOwnershipHandover()\":{\"details\":\"Cancels the two-step ownership handover to the caller, if any.\"},\"completeOwnershipHandover(address)\":{\"details\":\"Allows the owner to complete the two-step ownership handover to `pendingOwner`. Reverts if there is no existing ownership handover requested by `pendingOwner`.\"},\"decimals()\":{\"details\":\"Returns the decimals places of the token.\"},\"mint(address,uint256)\":{\"details\":\"Mints a new token\",\"params\":{\"account\":\"address to send the minted tokens to\",\"amount\":\"amount of tokens to mint\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"Returns the current nonce for `owner`. This value is used to compute the signature for EIP-2612 permit.\"},\"owner()\":{\"details\":\"Returns the owner of the contract.\"},\"ownershipHandoverExpiresAt(address)\":{\"details\":\"Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Sets `value` as the allowance of `spender` over the tokens of `owner`, authorized by a signed approval by `owner`. Emits a {Approval} event.\"},\"recoverToken(address,address)\":{\"details\":\"withdraw token. For cases where people mistakenly send other tokens to this address\",\"params\":{\"to\":\"account to withdraw tokens to\",\"token\":\"address of the token to withdraw\"}},\"renounceOwnership()\":{\"details\":\"Allows the owner to renounce their ownership.\"},\"requestOwnershipHandover()\":{\"details\":\"Request a two-step ownership handover to the caller. The request will automatically expire in 48 hours (172800 seconds) by default.\"},\"setMinterRole(address,bool)\":{\"details\":\"sets a minter role\",\"params\":{\"account\":\"address for the minter role\"}},\"symbol()\":{\"details\":\"Returns the symbol of the token.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Transfer `amount` tokens from the caller to `to`. Requirements: - `from` must at least have `amount`. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Transfers `amount` tokens from `from` to `to`. Note: Does not update the allowance if it is the maximum uint256 value. Requirements: - `from` must at least have `amount`. - The caller must have at least `amount` of allowance to transfer the tokens of `from`. Emits a {Transfer} event.\"},\"transferOwnership(address)\":{\"details\":\"Allows the owner to transfer the ownership to `newOwner`.\"},\"updatePermit2Allowance(bool)\":{\"details\":\"used to update if to default approve permit2 address for all addresses\",\"params\":{\"enabled\":\"if the default approval should be done or not\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/currency.sol\":\"Currency\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"appendCBOR\":false,\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":descent-collective/oracle-module/=lib/oracle-module/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":oracle-module/=lib/oracle-module/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/solady/src/auth/Ownable.sol\":{\"keccak256\":\"0xc208cdd9de02bbf4b5edad18b88e23a2be7ff56d2287d5649329dc7cda64b9a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e8fba079cc7230c617f7493a2e97873f88e59a53a5018fcb2e2b6ac42d8aa5a3\",\"dweb:/ipfs/QmTXg8GSt8hsK2cZhbPFrund1mrwVdkLQmEPoQaFy4fhjs\"]},\"lib/solady/src/tokens/ERC20.sol\":{\"keccak256\":\"0xb4a3f9ba8a05107f7370de42cff57f3ad26dafd438712c11531a5892de2f59e0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f0a9ca06e3cf6dea1f9a4c5599581573b7d81cd64dc3afb582f325ccf5fdd6dc\",\"dweb:/ipfs/Qmb9r5dDceNF4W8S5u6i85RsNTgE5XG9HbTXkyS25ad3C6\"]},\"lib/solady/src/utils/SafeTransferLib.sol\":{\"keccak256\":\"0xf98506fade18a92e3d8d0a0ca0bdaeaa099d7620aac2a9d76b5f3d0bcd10691c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a3495c9d108bc69951a12c5ce9f05851cc921f0bb69e2505756e79f3ddab4e1a\",\"dweb:/ipfs/QmT3XwbmdbQCxw7iNcF7DoiypDd5vs2ETFWirXqmJ86Meg\"]},\"src/currency.sol\":{\"keccak256\":\"0xc266e97010a71e6ac755dce3e51a5a5844663b355e20ab40bf2020fd9308369b\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://d2660220b8a14c6d06351765dd7accec03e350e7fa9ae960c1505bea1e5d8d2d\",\"dweb:/ipfs/QmdYdPSnQC2nym38Fca4vRLKU4A78AQkgYasdg3TaRLGNY\"]},\"src/interfaces/ICurrency.sol\":{\"keccak256\":\"0x3b7adace3df08c34906612358d435ffff3b90b5eec0eae34b6335cc8dcd0e7ed\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://370c80ec5636bd95342256d4116f703e633e6b0467ee530397e9b5cada37f998\",\"dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz\"]},\"src/mocks/ERC20Token.sol\":{\"keccak256\":\"0x62b878fb4dde1f455866e0c1290cc50714805d02c2848a4a9bb33c5dfbc8464d\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://7af3f5638d366abfbca3186813449259a33ed43e7c13ec983d389d73df1ad204\",\"dweb:/ipfs/QmeMdoEVTGqdcgSicTTcmycSQjToT7Sn5ZTgZdVFH9E6HA\"]}},\"version\":1}", "metadata": { "compiler": { "version": "0.8.21+commit.d9974bed" @@ -1024,12 +704,12 @@ "inputs": [ { "internalType": "string", - "name": "_name", + "name": "name_", "type": "string" }, { "internalType": "string", - "name": "_symbol", + "name": "symbol_", "type": "string" } ], @@ -1039,251 +719,80 @@ { "inputs": [], "type": "error", - "name": "AccessControlBadConfirmation" + "name": "AllowanceOverflow" }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], + "inputs": [], "type": "error", - "name": "AccessControlUnauthorizedAccount" + "name": "AllowanceUnderflow" }, { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], + "inputs": [], "type": "error", - "name": "AddressEmptyCode" + "name": "AlreadyInitialized" }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], + "inputs": [], "type": "error", - "name": "AddressInsufficientBalance" + "name": "InsufficientAllowance" }, { "inputs": [], "type": "error", - "name": "ECDSAInvalidSignature" + "name": "InsufficientBalance" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], + "inputs": [], "type": "error", - "name": "ECDSAInvalidSignatureLength" + "name": "InvalidPermit" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], + "inputs": [], + "type": "error", + "name": "NewOwnerIsZeroAddress" + }, + { + "inputs": [], + "type": "error", + "name": "NoHandoverRequest" + }, + { + "inputs": [], + "type": "error", + "name": "NotMinter" + }, + { + "inputs": [], + "type": "error", + "name": "PermitExpired" + }, + { + "inputs": [], + "type": "error", + "name": "TotalSupplyOverflow" + }, + { + "inputs": [], "type": "error", - "name": "ECDSAInvalidSignatureS" + "name": "Unauthorized" }, { "inputs": [ { "internalType": "address", - "name": "spender", - "type": "address" + "name": "owner", + "type": "address", + "indexed": true }, { - "internalType": "uint256", - "name": "allowance", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address", + "indexed": true }, { "internalType": "uint256", - "name": "needed", - "type": "uint256" - } - ], - "type": "error", - "name": "ERC20InsufficientAllowance" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "needed", - "type": "uint256" - } - ], - "type": "error", - "name": "ERC20InsufficientBalance" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "approver", - "type": "address" - } - ], - "type": "error", - "name": "ERC20InvalidApprover" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "type": "error", - "name": "ERC20InvalidReceiver" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "type": "error", - "name": "ERC20InvalidSender" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "type": "error", - "name": "ERC20InvalidSpender" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "type": "error", - "name": "ERC2612ExpiredSignature" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "signer", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "type": "error", - "name": "ERC2612InvalidSigner" - }, - { - "inputs": [], - "type": "error", - "name": "FailedInnerCall" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "currentNonce", - "type": "uint256" - } - ], - "type": "error", - "name": "InvalidAccountNonce" - }, - { - "inputs": [], - "type": "error", - "name": "InvalidShortString" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "type": "error", - "name": "SafeERC20FailedOperation" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "str", - "type": "string" - } - ], - "type": "error", - "name": "StringTooLong" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address", - "indexed": true - }, - { - "internalType": "address", - "name": "spender", - "type": "address", - "indexed": true - }, - { - "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256", "indexed": false } @@ -1292,98 +801,62 @@ "name": "Approval", "anonymous": false }, - { - "inputs": [], - "type": "event", - "name": "EIP712DomainChanged", - "anonymous": false - }, { "inputs": [ { - "internalType": "bool", - "name": "enabled", - "type": "bool", - "indexed": false + "internalType": "address", + "name": "pendingOwner", + "type": "address", + "indexed": true } ], "type": "event", - "name": "Permit2AllowanceUpdated", + "name": "OwnershipHandoverCanceled", "anonymous": false }, { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32", - "indexed": true - }, - { - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32", - "indexed": true - }, - { - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32", + "internalType": "address", + "name": "pendingOwner", + "type": "address", "indexed": true } ], "type": "event", - "name": "RoleAdminChanged", + "name": "OwnershipHandoverRequested", "anonymous": false }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32", - "indexed": true - }, { "internalType": "address", - "name": "account", + "name": "oldOwner", "type": "address", "indexed": true }, { "internalType": "address", - "name": "sender", + "name": "newOwner", "type": "address", "indexed": true } ], "type": "event", - "name": "RoleGranted", + "name": "OwnershipTransferred", "anonymous": false }, { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32", - "indexed": true - }, - { - "internalType": "address", - "name": "account", - "type": "address", - "indexed": true - }, - { - "internalType": "address", - "name": "sender", - "type": "address", - "indexed": true + "internalType": "bool", + "name": "enabled", + "type": "bool", + "indexed": false } ], "type": "event", - "name": "RoleRevoked", + "name": "Permit2AllowanceUpdated", "anonymous": false }, { @@ -1402,7 +875,7 @@ }, { "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256", "indexed": false } @@ -1411,19 +884,6 @@ "name": "Transfer", "anonymous": false }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ] - }, { "inputs": [], "stateMutability": "view", @@ -1432,7 +892,7 @@ "outputs": [ { "internalType": "bytes32", - "name": "", + "name": "result", "type": "bytes32" } ] @@ -1454,7 +914,7 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "_owner", "type": "address" }, { @@ -1483,7 +943,7 @@ }, { "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], @@ -1502,7 +962,7 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "owner", "type": "address" } ], @@ -1512,7 +972,7 @@ "outputs": [ { "internalType": "uint256", - "name": "", + "name": "result", "type": "uint256" } ] @@ -1543,7 +1003,25 @@ }, { "inputs": [], - "stateMutability": "view", + "stateMutability": "payable", + "type": "function", + "name": "cancelOwnershipHandover" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pendingOwner", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function", + "name": "completeOwnershipHandover" + }, + { + "inputs": [], + "stateMutability": "pure", "type": "function", "name": "decimals", "outputs": [ @@ -1555,105 +1033,58 @@ ] }, { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, + "inputs": [ { "internalType": "address", - "name": "verifyingContract", + "name": "account", "type": "address" }, { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ] - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function", - "name": "getRoleAdmin", + "name": "mint", "outputs": [ { - "internalType": "bytes32", + "internalType": "bool", "name": "", - "type": "bytes32" + "type": "bool" } ] }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function", - "name": "grantRole" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, + "name": "minterRole", + "outputs": [ { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } - ], + ] + }, + { + "inputs": [], "stateMutability": "view", "type": "function", - "name": "hasRole", + "name": "name", "outputs": [ { - "internalType": "bool", + "internalType": "string", "name": "", - "type": "bool" + "type": "string" } ] }, @@ -1661,23 +1092,18 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "owner", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function", - "name": "mint", + "name": "nonces", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "result", + "type": "uint256" } ] }, @@ -1685,12 +1111,12 @@ "inputs": [], "stateMutability": "view", "type": "function", - "name": "name", + "name": "owner", "outputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "address", + "name": "result", + "type": "address" } ] }, @@ -1698,17 +1124,17 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "pendingOwner", "type": "address" } ], "stateMutability": "view", "type": "function", - "name": "nonces", + "name": "ownershipHandoverExpiresAt", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "result", "type": "uint256" } ] @@ -1771,7 +1197,7 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "token", "type": "address" }, @@ -1786,38 +1212,16 @@ "name": "recoverToken" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "stateMutability": "nonpayable", + "inputs": [], + "stateMutability": "payable", "type": "function", - "name": "renounceRole" + "name": "renounceOwnership" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "stateMutability": "nonpayable", + "inputs": [], + "stateMutability": "payable", "type": "function", - "name": "revokeRole" + "name": "requestOwnershipHandover" }, { "inputs": [ @@ -1825,31 +1229,17 @@ "internalType": "address", "name": "account", "type": "address" + }, + { + "internalType": "bool", + "name": "isMinter", + "type": "bool" } ], "stateMutability": "nonpayable", "type": "function", "name": "setMinterRole" }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "stateMutability": "view", - "type": "function", - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ] - }, { "inputs": [], "stateMutability": "view", @@ -1871,7 +1261,7 @@ "outputs": [ { "internalType": "uint256", - "name": "", + "name": "result", "type": "uint256" } ] @@ -1885,7 +1275,7 @@ }, { "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], @@ -1914,7 +1304,7 @@ }, { "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], @@ -1929,6 +1319,18 @@ } ] }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function", + "name": "transferOwnership" + }, { "inputs": [ { @@ -1946,16 +1348,16 @@ "kind": "dev", "methods": { "DOMAIN_SEPARATOR()": { - "details": "Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}." + "details": "Returns the EIP-712 domain separator for the EIP-2612 permit." }, "allowance(address,address)": { "details": "The permit2 contract has full approval by default. If the approval is revoked, it can still be manually approved." }, "approve(address,uint256)": { - "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." + "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Emits a {Approval} event." }, "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." + "details": "Returns the amount of tokens owned by `owner`." }, "burn(address,uint256)": { "details": "Burns a token", @@ -1964,20 +1366,14 @@ "amount": "amount of tokens to burn" } }, - "decimals()": { - "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}." - }, - "eip712Domain()": { - "details": "See {IERC-5267}." + "cancelOwnershipHandover()": { + "details": "Cancels the two-step ownership handover to the caller, if any." }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + "completeOwnershipHandover(address)": { + "details": "Allows the owner to complete the two-step ownership handover to `pendingOwner`. Reverts if there is no existing ownership handover requested by `pendingOwner`." }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." + "decimals()": { + "details": "Returns the decimals places of the token." }, "mint(address,uint256)": { "details": "Mints a new token", @@ -1990,10 +1386,16 @@ "details": "Returns the name of the token." }, "nonces(address)": { - "details": "Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times." + "details": "Returns the current nonce for `owner`. This value is used to compute the signature for EIP-2612 permit." + }, + "owner()": { + "details": "Returns the owner of the contract." + }, + "ownershipHandoverExpiresAt(address)": { + "details": "Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`." }, "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { - "details": "Sets `value` as the allowance of `spender` over ``owner``'s tokens, given ``owner``'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]. CAUTION: See Security Considerations above." + "details": "Sets `value` as the allowance of `spender` over the tokens of `owner`, authorized by a signed approval by `owner`. Emits a {Approval} event." }, "recoverToken(address,address)": { "details": "withdraw token. For cases where people mistakenly send other tokens to this address", @@ -2002,32 +1404,32 @@ "token": "address of the token to withdraw" } }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event." + "renounceOwnership()": { + "details": "Allows the owner to renounce their ownership." }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." + "requestOwnershipHandover()": { + "details": "Request a two-step ownership handover to the caller. The request will automatically expire in 48 hours (172800 seconds) by default." }, - "setMinterRole(address)": { + "setMinterRole(address,bool)": { "details": "sets a minter role", "params": { "account": "address for the minter role" } }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." - }, "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." + "details": "Returns the symbol of the token." }, "totalSupply()": { - "details": "See {IERC20-totalSupply}." + "details": "Returns the amount of tokens in existence." }, "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`." + "details": "Transfer `amount` tokens from the caller to `to`. Requirements: - `from` must at least have `amount`. Emits a {Transfer} event." }, "transferFrom(address,address,uint256)": { - "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`." + "details": "Transfers `amount` tokens from `from` to `to`. Note: Does not update the allowance if it is the maximum uint256 value. Requirements: - `from` must at least have `amount`. - The caller must have at least `amount` of allowance to transfer the tokens of `from`. Emits a {Transfer} event." + }, + "transferOwnership(address)": { + "details": "Allows the owner to transfer the ownership to `newOwner`." }, "updatePermit2Allowance(bool)": { "details": "used to update if to default approve permit2 address for all addresses", @@ -2047,10 +1449,13 @@ "settings": { "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", + "descent-collective/oracle-module/=lib/oracle-module/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", - "openzeppelin-contracts/=lib/openzeppelin-contracts/" + "openzeppelin-contracts/=lib/openzeppelin-contracts/", + "oracle-module/=lib/oracle-module/", + "solady/=lib/solady/src/" ], "optimizer": { "enabled": true, @@ -2066,195 +1471,35 @@ "libraries": {} }, "sources": { - "lib/openzeppelin-contracts/contracts/access/AccessControl.sol": { - "keccak256": "0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308", - "urls": [ - "bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80", - "dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/access/IAccessControl.sol": { - "keccak256": "0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41", - "urls": [ - "bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26", - "dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol": { - "keccak256": "0x92aa1df62dc3d33f1656d63bede0923e0df0b706ad4137c8b10b0a8fe549fd92", - "urls": [ - "bzz-raw://c5c0f29195ad64cbe556da8e257dac8f05f78c53f90323c0d2accf8e6922d33a", - "dweb:/ipfs/QmQ61TED8uaCZwcbh8KkgRSsCav7x7HbcGHwHts3U4DmUP" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol": { - "keccak256": "0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7", - "urls": [ - "bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f", - "dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol": { - "keccak256": "0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80", - "urls": [ - "bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229", - "dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol": { - "keccak256": "0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70", - "urls": [ - "bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c", - "dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Permit.sol": { - "keccak256": "0xc858a86a35701004d89022a5e98819aac46ccbdc4072fc9dd43928a676b1a2ee", - "urls": [ - "bzz-raw://18acebb483c512c0eaafcb437f09c839972c3f0d36f0201ea7baa2926b987dd2", - "dweb:/ipfs/Qmd9bf2noaDSYDtf6FMSzKu7LPhuf91jsVNmcoCuTCuGic" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "keccak256": "0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2", - "urls": [ - "bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850", - "dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol": { - "keccak256": "0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff", - "urls": [ - "bzz-raw://f5196ec75139918c6c7bb4251b36395e668f1fa6d206beba7e7520e74913940d", - "dweb:/ipfs/QmSyqjksXxmm2mCG6qRd1yuwLykypkSVBbnBnGqJRcuJMi" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol": { - "keccak256": "0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386", - "urls": [ - "bzz-raw://b3036b3a83b7c48f96641f2a9002b9f2dcb6a5958dd670894ada21ae8229b3d0", - "dweb:/ipfs/QmUNfSBdoVtjhETaUJCYcaC7pTMgbhht926tJ2uXJbiVd3" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/Address.sol": { - "keccak256": "0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721", - "urls": [ - "bzz-raw://b7bd24e224f67f65bfadf85dc2929fa965456bb2415478bd0125471b5ce35245", - "dweb:/ipfs/QmRaydGr8BTHs1kvaZfsNU69pKzUAGFrvABn1KiRSbE51y" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/Context.sol": { - "keccak256": "0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3", - "urls": [ - "bzz-raw://0c4e6cb30d3601e2f7af5af09e265508147cb275a8dcd99d6f7363645cc56867", - "dweb:/ipfs/QmNgFkoXNWoUbAyw71rr1sKQ95Rj2GfvYiWg79xEYDn2NY" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/Nonces.sol": { - "keccak256": "0x0082767004fca261c332e9ad100868327a863a88ef724e844857128845ab350f", - "urls": [ - "bzz-raw://132dce9686a54e025eb5ba5d2e48208f847a1ec3e60a3e527766d7bf53fb7f9e", - "dweb:/ipfs/QmXn1a2nUZMpu2z6S88UoTfMVtY2YNh86iGrzJDYmMkKeZ" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol": { - "keccak256": "0x18a7171df639a934592915a520ecb97c5bbc9675a1105607aac8a94e72bf62c6", - "urls": [ - "bzz-raw://7478e1f13da69a2867ccd883001d836b75620362e743f196376d63ed0c422a1c", - "dweb:/ipfs/QmWywcQ9TNfwtoqAxbn25d8C5VrV12PrPS9UjtGe6pL2BA" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol": { - "keccak256": "0x32ba59b4b7299237c8ba56319110989d7978a039faf754793064e967e5894418", - "urls": [ - "bzz-raw://1ae50c8b562427df610cc4540c9bf104acca7ef8e2dcae567ae7e52272281e9c", - "dweb:/ipfs/QmTHiadFCSJUPpRjNegc5SahmeU8bAoY8i9Aq6tVscbcKR" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/Strings.sol": { - "keccak256": "0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792", - "urls": [ - "bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453", - "dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol": { - "keccak256": "0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf", - "urls": [ - "bzz-raw://ba80ba06c8e6be852847e4c5f4492cef801feb6558ae09ed705ff2e04ea8b13c", - "dweb:/ipfs/QmXRJDv3xHLVQCVXg1ZvR35QS9sij5y9NDWYzMfUfAdTHF" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol": { - "keccak256": "0x999f705a027ed6dc2d4e0df2cc4a509852c6bfd11de1c8161bf88832d0503fd0", - "urls": [ - "bzz-raw://0798def67258d9a3cc20b2b4da7ebf351a5cefe0abfdd665d2d81f8e32f89b21", - "dweb:/ipfs/QmPEvJosnPfzHNjKvCv2D3891mA2Ww8eUwkqrxBjuYdHCt" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol": { - "keccak256": "0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435", - "urls": [ - "bzz-raw://2ceacff44c0fdc81e48e0e0b1db87a2076d3c1fb497341de077bf1da9f6b406c", - "dweb:/ipfs/QmRUo1muMRAewxrKQ7TkXUtknyRoR57AyEkoPpiuZQ8FzX" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol": { - "keccak256": "0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133", - "urls": [ - "bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8", - "dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol": { - "keccak256": "0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b", + "lib/solady/src/auth/Ownable.sol": { + "keccak256": "0xc208cdd9de02bbf4b5edad18b88e23a2be7ff56d2287d5649329dc7cda64b9a3", "urls": [ - "bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df", - "dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL" + "bzz-raw://e8fba079cc7230c617f7493a2e97873f88e59a53a5018fcb2e2b6ac42d8aa5a3", + "dweb:/ipfs/QmTXg8GSt8hsK2cZhbPFrund1mrwVdkLQmEPoQaFy4fhjs" ], "license": "MIT" }, - "lib/openzeppelin-contracts/contracts/utils/math/Math.sol": { - "keccak256": "0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d", + "lib/solady/src/tokens/ERC20.sol": { + "keccak256": "0xb4a3f9ba8a05107f7370de42cff57f3ad26dafd438712c11531a5892de2f59e0", "urls": [ - "bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875", - "dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L" + "bzz-raw://f0a9ca06e3cf6dea1f9a4c5599581573b7d81cd64dc3afb582f325ccf5fdd6dc", + "dweb:/ipfs/Qmb9r5dDceNF4W8S5u6i85RsNTgE5XG9HbTXkyS25ad3C6" ], "license": "MIT" }, - "lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol": { - "keccak256": "0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72", + "lib/solady/src/utils/SafeTransferLib.sol": { + "keccak256": "0xf98506fade18a92e3d8d0a0ca0bdaeaa099d7620aac2a9d76b5f3d0bcd10691c", "urls": [ - "bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc", - "dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT" + "bzz-raw://a3495c9d108bc69951a12c5ce9f05851cc921f0bb69e2505756e79f3ddab4e1a", + "dweb:/ipfs/QmT3XwbmdbQCxw7iNcF7DoiypDd5vs2ETFWirXqmJ86Meg" ], "license": "MIT" }, "src/currency.sol": { - "keccak256": "0xcff030c4bad135b27acbe405aba19da1184c406c30fe6839b17ffcb8548938d4", + "keccak256": "0xc266e97010a71e6ac755dce3e51a5a5844663b355e20ab40bf2020fd9308369b", "urls": [ - "bzz-raw://8ca7791099d9f9851622964e2668477dbe07441c4d687621eaff725c7e25d48b", - "dweb:/ipfs/QmdsMzD9aVqBym5bS4QnYnGtN8872iBck94NFeyfLirJ8Y" + "bzz-raw://d2660220b8a14c6d06351765dd7accec03e350e7fa9ae960c1505bea1e5d8d2d", + "dweb:/ipfs/QmdYdPSnQC2nym38Fca4vRLKU4A78AQkgYasdg3TaRLGNY" ], "license": "GPL-3.0" }, @@ -2265,50 +1510,58 @@ "dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz" ], "license": "GPL-3.0" + }, + "src/mocks/ERC20Token.sol": { + "keccak256": "0x62b878fb4dde1f455866e0c1290cc50714805d02c2848a4a9bb33c5dfbc8464d", + "urls": [ + "bzz-raw://7af3f5638d366abfbca3186813449259a33ed43e7c13ec983d389d73df1ad204", + "dweb:/ipfs/QmeMdoEVTGqdcgSicTTcmycSQjToT7Sn5ZTgZdVFH9E6HA" + ], + "license": "GPL-3.0" } }, "version": 1 }, "ast": { "absolutePath": "src/currency.sol", - "id": 48348, + "id": 46011, "exportedSymbols": { - "AccessControl": [43683], - "Currency": [48347], - "ERC20": [44443], - "ERC20Permit": [44675], - "ICurrency": [48595], - "SafeERC20": [45027] + "Currency": [46010], + "ERC20": [44800], + "ERC20Token": [46406], + "ICurrency": [46096], + "Ownable": [44381], + "SafeTransferLib": [44996] }, "nodeType": "SourceUnit", - "src": "36:3100:44", + "src": "36:3433:28", "nodes": [ { - "id": 48131, + "id": 45736, "nodeType": "PragmaDirective", - "src": "36:23:44", + "src": "36:23:28", "nodes": [], "literals": ["solidity", "0.8", ".21"] }, { - "id": 48133, + "id": 45738, "nodeType": "ImportDirective", - "src": "108:79:44", + "src": "108:53:28", "nodes": [], - "absolutePath": "lib/openzeppelin-contracts/contracts/access/AccessControl.sol", - "file": "@openzeppelin/contracts/access/AccessControl.sol", + "absolutePath": "src/interfaces/ICurrency.sol", + "file": "./interfaces/ICurrency.sol", "nameLocation": "-1:-1:-1", - "scope": 48348, - "sourceUnit": 43684, + "scope": 46011, + "sourceUnit": 46097, "symbolAliases": [ { "foreign": { - "id": 48132, - "name": "AccessControl", + "id": 45737, + "name": "ICurrency", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 43683, - "src": "116:13:44", + "referencedDeclaration": 46096, + "src": "116:9:28", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -2317,36 +1570,50 @@ "unitAlias": "" }, { - "id": 48136, + "id": 45740, "nodeType": "ImportDirective", - "src": "188:98:44", + "src": "162:48:28", "nodes": [], - "absolutePath": "lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Permit.sol", - "file": "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol", + "absolutePath": "lib/solady/src/auth/Ownable.sol", + "file": "solady/auth/Ownable.sol", "nameLocation": "-1:-1:-1", - "scope": 48348, - "sourceUnit": 44676, + "scope": 46011, + "sourceUnit": 44382, "symbolAliases": [ { "foreign": { - "id": 48134, - "name": "ERC20Permit", + "id": 45739, + "name": "Ownable", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44675, - "src": "196:11:44", + "referencedDeclaration": 44381, + "src": "170:7:28", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" - }, + } + ], + "unitAlias": "" + }, + { + "id": 45742, + "nodeType": "ImportDirective", + "src": "211:50:28", + "nodes": [], + "absolutePath": "src/mocks/ERC20Token.sol", + "file": "./mocks/ERC20Token.sol", + "nameLocation": "-1:-1:-1", + "scope": 46011, + "sourceUnit": 46407, + "symbolAliases": [ { "foreign": { - "id": 48135, - "name": "ERC20", + "id": 45741, + "name": "ERC20Token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44443, - "src": "209:5:44", + "referencedDeclaration": 46406, + "src": "219:10:28", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -2355,24 +1622,24 @@ "unitAlias": "" }, { - "id": 48138, + "id": 45744, "nodeType": "ImportDirective", - "src": "287:82:44", + "src": "262:65:28", "nodes": [], - "absolutePath": "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "absolutePath": "lib/solady/src/utils/SafeTransferLib.sol", + "file": "solady/utils/SafeTransferLib.sol", "nameLocation": "-1:-1:-1", - "scope": 48348, - "sourceUnit": 45028, + "scope": 46011, + "sourceUnit": 44997, "symbolAliases": [ { "foreign": { - "id": 48137, - "name": "SafeERC20", + "id": 45743, + "name": "SafeTransferLib", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 45027, - "src": "295:9:44", + "referencedDeclaration": 44996, + "src": "270:15:28", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -2381,24 +1648,24 @@ "unitAlias": "" }, { - "id": 48140, + "id": 45746, "nodeType": "ImportDirective", - "src": "370:53:44", + "src": "328:46:28", "nodes": [], - "absolutePath": "src/interfaces/ICurrency.sol", - "file": "./interfaces/ICurrency.sol", + "absolutePath": "lib/solady/src/tokens/ERC20.sol", + "file": "solady/tokens/ERC20.sol", "nameLocation": "-1:-1:-1", - "scope": 48348, - "sourceUnit": 48596, + "scope": 46011, + "sourceUnit": 44801, "symbolAliases": [ { "foreign": { - "id": 48139, - "name": "ICurrency", + "id": 45745, + "name": "ERC20", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48595, - "src": "378:9:44", + "referencedDeclaration": 44800, + "src": "336:5:28", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -2407,148 +1674,138 @@ "unitAlias": "" }, { - "id": 48347, + "id": 46010, "nodeType": "ContractDefinition", - "src": "425:2710:44", + "src": "376:3092:28", "nodes": [ { - "id": 48151, + "id": 45754, + "nodeType": "ErrorDefinition", + "src": "429:18:28", + "nodes": [], + "errorSelector": "f8d2906c", + "name": "NotMinter", + "nameLocation": "435:9:28", + "parameters": { + "id": 45753, + "nodeType": "ParameterList", + "parameters": [], + "src": "444:2:28" + } + }, + { + "id": 45757, "nodeType": "VariableDeclaration", - "src": "490:69:44", + "src": "453:76:28", "nodes": [], "constant": true, + "functionSelector": "6afdd850", "mutability": "constant", - "name": "MINTER_BURNER_ROLE", - "nameLocation": "507:18:44", - "scope": 48347, + "name": "PERMIT2", + "nameLocation": "477:7:28", + "scope": 46010, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 48147, - "name": "bytes32", + "id": 45755, + "name": "address", "nodeType": "ElementaryTypeName", - "src": "490:7:44", + "src": "453:7:28", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_address", + "typeString": "address" } }, "value": { - "arguments": [ - { - "hexValue": "4d494e5445525f4255524e45525f524f4c45", - "id": 48149, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "538:20:44", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cfd53186d792f1ec9d0679afc2dc3ffc86fc31fe1e0f342b838eb6c3eade62b3", - "typeString": "literal_string \"MINTER_BURNER_ROLE\"" - }, - "value": "MINTER_BURNER_ROLE" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_cfd53186d792f1ec9d0679afc2dc3ffc86fc31fe1e0f342b838eb6c3eade62b3", - "typeString": "literal_string \"MINTER_BURNER_ROLE\"" - } - ], - "id": 48148, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "528:9:44", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 48150, + "hexValue": "307830303030303030303030323244343733303330463131366444454539463642343361433738424133", + "id": 45756, "isConstant": false, "isLValue": false, "isPure": true, - "kind": "functionCall", + "kind": "number", "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "528:31:44", - "tryCall": false, + "nodeType": "Literal", + "src": "487:42:28", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x000000000022D473030F116dDEE9F6B43aC78BA3" }, - "visibility": "internal" + "visibility": "public" }, { - "id": 48154, + "id": 45759, "nodeType": "VariableDeclaration", - "src": "617:76:44", + "src": "555:12:28", "nodes": [], - "constant": true, - "functionSelector": "6afdd850", - "mutability": "constant", - "name": "PERMIT2", - "nameLocation": "641:7:44", - "scope": 48347, + "constant": false, + "mutability": "mutable", + "name": "_name", + "nameLocation": "562:5:28", + "scope": 46010, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_string_storage", + "typeString": "string" }, "typeName": { - "id": 48152, - "name": "address", + "id": 45758, + "name": "string", "nodeType": "ElementaryTypeName", - "src": "617:7:44", - "stateMutability": "nonpayable", + "src": "555:6:28", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" } }, - "value": { - "hexValue": "307830303030303030303030323244343733303330463131366444454539463642343361433738424133", - "id": 48153, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "651:42:44", + "visibility": "internal" + }, + { + "id": 45761, + "nodeType": "VariableDeclaration", + "src": "573:14:28", + "nodes": [], + "constant": false, + "mutability": "mutable", + "name": "_symbol", + "nameLocation": "580:7:28", + "scope": 46010, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 45760, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "573:6:28", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "value": "0x000000000022D473030F116dDEE9F6B43aC78BA3" + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } }, - "visibility": "public" + "visibility": "internal" }, { - "id": 48156, + "id": 45763, "nodeType": "VariableDeclaration", - "src": "720:26:44", + "src": "594:26:28", "nodes": [], "constant": false, "functionSelector": "407c48b4", "mutability": "mutable", "name": "permit2Enabled", - "nameLocation": "732:14:44", - "scope": 48347, + "nameLocation": "606:14:28", + "scope": 46010, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2556,10 +1813,10 @@ "typeString": "bool" }, "typeName": { - "id": 48155, + "id": 45762, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "720:4:44", + "src": "594:4:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2568,53 +1825,93 @@ "visibility": "public" }, { - "id": 48181, + "id": 45767, + "nodeType": "VariableDeclaration", + "src": "670:42:28", + "nodes": [], + "constant": false, + "functionSelector": "ad0e7d8c", + "mutability": "mutable", + "name": "minterRole", + "nameLocation": "702:10:28", + "scope": 46010, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 45766, + "keyName": "", + "keyNameLocation": "-1:-1:-1", + "keyType": { + "id": 45764, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "678:7:28", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "670:24:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueName": "", + "valueNameLocation": "-1:-1:-1", + "valueType": { + "id": 45765, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "689:4:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "visibility": "public" + }, + { + "id": 45792, "nodeType": "FunctionDefinition", - "src": "797:189:44", + "src": "719:183:28", "nodes": [], "body": { - "id": 48180, + "id": 45791, "nodeType": "Block", - "src": "896:90:44", + "src": "775:127:28", "nodes": [], "statements": [ { "expression": { "arguments": [ - { - "id": 48171, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "917:18:44", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, { "expression": { - "id": 48172, + "id": 45775, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "937:3:44", + "src": "802:3:28", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 48173, + "id": 45776, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "941:6:44", + "memberLocation": "806:6:28", "memberName": "sender", "nodeType": "MemberAccess", - "src": "937:10:44", + "src": "802:10:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2623,27 +1920,23 @@ ], "expression": { "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, { "typeIdentifier": "t_address", "typeString": "address" } ], - "id": 48170, - "name": "_grantRole", + "id": 45774, + "name": "_initializeOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 43644, - "src": "906:10:44", + "referencedDeclaration": 44260, + "src": "785:16:28", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) returns (bool)" + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" } }, - "id": 48174, + "id": 45777, "isConstant": false, "isLValue": false, "isPure": false, @@ -2652,31 +1945,117 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "906:42:44", + "src": "785:28:28", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 45778, + "nodeType": "ExpressionStatement", + "src": "785:28:28" + }, + { + "expression": { + "id": 45781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 45779, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45759, + "src": "823:5:28", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 45780, + "name": "name_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45769, + "src": "831:5:28", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "823:13:28", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" } }, - "id": 48175, + "id": 45782, "nodeType": "ExpressionStatement", - "src": "906:42:44" + "src": "823:13:28" }, { "expression": { - "id": 48178, + "id": 45785, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 48176, + "id": 45783, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45761, + "src": "846:7:28", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 45784, + "name": "symbol_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45771, + "src": "856:7:28", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "846:17:28", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 45786, + "nodeType": "ExpressionStatement", + "src": "846:17:28" + }, + { + "expression": { + "id": 45789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 45787, "name": "permit2Enabled", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48156, - "src": "958:14:44", + "referencedDeclaration": 45763, + "src": "874:14:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2686,119 +2065,265 @@ "operator": "=", "rightHandSide": { "hexValue": "74727565", - "id": 48177, + "id": 45788, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "975:4:44", + "src": "891:4:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "src": "958:21:44", + "src": "874:21:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 48179, + "id": 45790, "nodeType": "ExpressionStatement", - "src": "958:21:44" + "src": "874:21:28" } ] }, "implemented": true, "kind": "constructor", - "modifiers": [ - { - "arguments": [ - { - "id": 48163, - "name": "_name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48158, - "src": "859:5:44", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "parameters": { + "id": 45772, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 45769, + "mutability": "mutable", + "name": "name_", + "nameLocation": "745:5:28", + "nodeType": "VariableDeclaration", + "scope": 45792, + "src": "731:19:28", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 45768, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "731:6:28", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" } }, - { - "id": 48164, - "name": "_symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48160, - "src": "866:7:44", + "visibility": "internal" + }, + { + "constant": false, + "id": 45771, + "mutability": "mutable", + "name": "symbol_", + "nameLocation": "766:7:28", + "nodeType": "VariableDeclaration", + "scope": 45792, + "src": "752:21:28", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 45770, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "752:6:28", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" } - } - ], - "id": 48165, - "kind": "baseConstructorSpecifier", - "modifierName": { - "id": 48162, - "name": "ERC20", - "nameLocations": ["853:5:44"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "853:5:44" - }, - "nodeType": "ModifierInvocation", - "src": "853:21:44" - }, - { - "arguments": [ - { - "id": 48167, - "name": "_symbol", + }, + "visibility": "internal" + } + ], + "src": "730:44:28" + }, + "returnParameters": { + "id": 45773, + "nodeType": "ParameterList", + "parameters": [], + "src": "775:0:28" + }, + "scope": 46010, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "id": 45801, + "nodeType": "FunctionDefinition", + "src": "908:83:28", + "nodes": [], + "body": { + "id": 45800, + "nodeType": "Block", + "src": "965:26:28", + "nodes": [], + "statements": [ + { + "expression": { + "hexValue": "3138", + "id": 45798, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "982:2:28", + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "functionReturnParameters": 45797, + "id": 45799, + "nodeType": "Return", + "src": "975:9:28" + } + ] + }, + "baseFunctions": [44484], + "functionSelector": "313ce567", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nameLocation": "917:8:28", + "overrides": { + "id": 45794, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "940:8:28" + }, + "parameters": { + "id": 45793, + "nodeType": "ParameterList", + "parameters": [], + "src": "925:2:28" + }, + "returnParameters": { + "id": 45797, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 45796, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 45801, + "src": "958:5:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 45795, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "958:5:28", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "957:7:28" + }, + "scope": 46010, + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "id": 45810, + "nodeType": "FunctionDefinition", + "src": "997:90:28", + "nodes": [], + "body": { + "id": 45809, + "nodeType": "Block", + "src": "1058:29:28", + "nodes": [], + "statements": [ + { + "expression": { + "id": 45807, + "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48160, - "src": "887:7:44", + "referencedDeclaration": 45759, + "src": "1075:5:28", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" } - } - ], - "id": 48168, - "kind": "baseConstructorSpecifier", - "modifierName": { - "id": 48166, - "name": "ERC20Permit", - "nameLocations": ["875:11:44"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 44675, - "src": "875:11:44" - }, - "nodeType": "ModifierInvocation", - "src": "875:20:44" - } - ], - "name": "", - "nameLocation": "-1:-1:-1", + }, + "functionReturnParameters": 45806, + "id": 45808, + "nodeType": "Return", + "src": "1068:12:28" + } + ] + }, + "baseFunctions": [44469], + "functionSelector": "06fdde03", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "name", + "nameLocation": "1006:4:28", + "overrides": { + "id": 45803, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1025:8:28" + }, "parameters": { - "id": 48161, + "id": 45802, + "nodeType": "ParameterList", + "parameters": [], + "src": "1010:2:28" + }, + "returnParameters": { + "id": 45806, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 48158, + "id": 45805, "mutability": "mutable", - "name": "_name", - "nameLocation": "823:5:44", + "name": "", + "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 48181, - "src": "809:19:44", + "scope": 45810, + "src": "1043:13:28", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -2806,26 +2331,88 @@ "typeString": "string" }, "typeName": { - "id": 48157, + "id": 45804, "name": "string", "nodeType": "ElementaryTypeName", - "src": "809:6:44", + "src": "1043:6:28", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" - }, + } + ], + "src": "1042:15:28" + }, + "scope": 46010, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 45819, + "nodeType": "FunctionDefinition", + "src": "1093:94:28", + "nodes": [], + "body": { + "id": 45818, + "nodeType": "Block", + "src": "1156:31:28", + "nodes": [], + "statements": [ + { + "expression": { + "id": 45816, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45761, + "src": "1173:7:28", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 45815, + "id": 45817, + "nodeType": "Return", + "src": "1166:14:28" + } + ] + }, + "baseFunctions": [44475], + "functionSelector": "95d89b41", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nameLocation": "1102:6:28", + "overrides": { + "id": 45812, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1123:8:28" + }, + "parameters": { + "id": 45811, + "nodeType": "ParameterList", + "parameters": [], + "src": "1108:2:28" + }, + "returnParameters": { + "id": 45815, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 48160, + "id": 45814, "mutability": "mutable", - "name": "_symbol", - "nameLocation": "844:7:44", + "name": "", + "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 48181, - "src": "830:21:44", + "scope": 45819, + "src": "1141:13:28", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -2833,10 +2420,10 @@ "typeString": "string" }, "typeName": { - "id": 48159, + "id": 45813, "name": "string", "nodeType": "ElementaryTypeName", - "src": "830:6:44", + "src": "1141:6:28", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -2845,156 +2432,271 @@ "visibility": "internal" } ], - "src": "808:44:44" + "src": "1140:15:28" + }, + "scope": 46010, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "id": 45832, + "nodeType": "ModifierDefinition", + "src": "1193:97:28", + "nodes": [], + "body": { + "id": 45831, + "nodeType": "Block", + "src": "1215:75:28", + "nodes": [], + "statements": [ + { + "condition": { + "id": 45825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1229:23:28", + "subExpression": { + "baseExpression": { + "id": 45821, + "name": "minterRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45767, + "src": "1230:10:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 45824, + "indexExpression": { + "expression": { + "id": 45822, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1241:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 45823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1245:6:28", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1241:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1230:22:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 45829, + "nodeType": "IfStatement", + "src": "1225:47:28", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 45826, + "name": "NotMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45754, + "src": "1261:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 45827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1261:11:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 45828, + "nodeType": "RevertStatement", + "src": "1254:18:28" + } + }, + { + "id": 45830, + "nodeType": "PlaceholderStatement", + "src": "1282:1:28" + } + ] }, - "returnParameters": { - "id": 48169, + "name": "onlyMinter", + "nameLocation": "1202:10:28", + "parameters": { + "id": 45820, "nodeType": "ParameterList", "parameters": [], - "src": "896:0:44" + "src": "1212:2:28" }, - "scope": 48347, - "stateMutability": "nonpayable", "virtual": false, - "visibility": "public" + "visibility": "internal" }, { - "id": 48196, + "id": 45849, "nodeType": "FunctionDefinition", - "src": "1089:134:44", + "src": "1393:121:28", "nodes": [], "body": { - "id": 48195, + "id": 45848, "nodeType": "Block", - "src": "1167:56:44", + "src": "1467:47:28", "nodes": [], "statements": [ { "expression": { - "arguments": [ - { - "id": 48191, - "name": "MINTER_BURNER_ROLE", + "id": 45846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 45842, + "name": "minterRole", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48151, - "src": "1188:18:44", + "referencedDeclaration": 45767, + "src": "1477:10:28", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" } }, - { - "id": 48192, + "id": 45844, + "indexExpression": { + "id": 45843, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48184, - "src": "1208:7:44", + "referencedDeclaration": 45835, + "src": "1488:7:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1477:19:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 48190, - "name": "_grantRole", + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 45845, + "name": "isMinter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 43644, - "src": "1177:10:44", + "referencedDeclaration": 45837, + "src": "1499:8:28", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) returns (bool)" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 48193, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1177:39:44", - "tryCall": false, + "src": "1477:30:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 48194, + "id": 45847, "nodeType": "ExpressionStatement", - "src": "1177:39:44" + "src": "1477:30:28" } ] }, "documentation": { - "id": 48182, + "id": 45833, "nodeType": "StructuredDocumentation", - "src": "992:92:44", + "src": "1296:92:28", "text": " @dev sets a minter role\n @param account address for the minter role" }, - "functionSelector": "945d1229", + "functionSelector": "cb177b1e", "implemented": true, "kind": "function", "modifiers": [ { - "arguments": [ - { - "id": 48187, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "1147:18:44", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 48188, + "id": 45840, "kind": "modifierInvocation", "modifierName": { - "id": 48186, - "name": "onlyRole", - "nameLocations": ["1138:8:44"], + "id": 45839, + "name": "onlyOwner", + "nameLocations": ["1457:9:28"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "1138:8:44" + "referencedDeclaration": 44380, + "src": "1457:9:28" }, "nodeType": "ModifierInvocation", - "src": "1138:28:44" + "src": "1457:9:28" } ], "name": "setMinterRole", - "nameLocation": "1098:13:44", + "nameLocation": "1402:13:28", "parameters": { - "id": 48185, + "id": 45838, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 48184, + "id": 45835, "mutability": "mutable", "name": "account", - "nameLocation": "1120:7:44", + "nameLocation": "1424:7:28", "nodeType": "VariableDeclaration", - "scope": 48196, - "src": "1112:15:44", + "scope": 45849, + "src": "1416:15:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3002,10 +2704,10 @@ "typeString": "address" }, "typeName": { - "id": 48183, + "id": 45834, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1112:7:44", + "src": "1416:7:28", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -3013,54 +2715,81 @@ } }, "visibility": "internal" + }, + { + "constant": false, + "id": 45837, + "mutability": "mutable", + "name": "isMinter", + "nameLocation": "1438:8:28", + "nodeType": "VariableDeclaration", + "scope": 45849, + "src": "1433:13:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 45836, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1433:4:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" } ], - "src": "1111:17:44" + "src": "1415:32:28" }, "returnParameters": { - "id": 48189, + "id": 45841, "nodeType": "ParameterList", "parameters": [], - "src": "1167:0:44" + "src": "1467:0:28" }, - "scope": 48347, + "scope": 46010, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 48217, + "id": 45869, "nodeType": "FunctionDefinition", - "src": "1380:160:44", + "src": "1671:142:28", "nodes": [], "body": { - "id": 48216, + "id": 45868, "nodeType": "Block", - "src": "1480:60:44", + "src": "1753:60:28", "nodes": [], "statements": [ { "expression": { "arguments": [ { - "id": 48210, + "id": 45862, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48199, - "src": "1496:7:44", + "referencedDeclaration": 45852, + "src": "1769:7:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 48211, + "id": 45863, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48201, - "src": "1505:6:44", + "referencedDeclaration": 45854, + "src": "1778:6:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3078,18 +2807,18 @@ "typeString": "uint256" } ], - "id": 48209, + "id": 45861, "name": "_mint", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44283, - "src": "1490:5:44", + "referencedDeclaration": 44701, + "src": "1763:5:28", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, - "id": 48212, + "id": 45864, "isConstant": false, "isLValue": false, "isPure": false, @@ -3098,46 +2827,46 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "1490:22:44", + "src": "1763:22:28", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 48213, + "id": 45865, "nodeType": "ExpressionStatement", - "src": "1490:22:44" + "src": "1763:22:28" }, { "expression": { "hexValue": "74727565", - "id": 48214, + "id": 45866, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "1529:4:44", + "src": "1802:4:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "functionReturnParameters": 48208, - "id": 48215, + "functionReturnParameters": 45860, + "id": 45867, "nodeType": "Return", - "src": "1522:11:44" + "src": "1795:11:28" } ] }, - "baseFunctions": [48585], + "baseFunctions": [46086], "documentation": { - "id": 48197, + "id": 45850, "nodeType": "StructuredDocumentation", - "src": "1229:146:44", + "src": "1520:146:28", "text": " @dev Mints a new token\n @param account address to send the minted tokens to\n @param amount amount of tokens to mint" }, "functionSelector": "40c10f19", @@ -3145,49 +2874,35 @@ "kind": "function", "modifiers": [ { - "arguments": [ - { - "id": 48204, - "name": "MINTER_BURNER_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48151, - "src": "1445:18:44", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 48205, + "id": 45857, "kind": "modifierInvocation", "modifierName": { - "id": 48203, - "name": "onlyRole", - "nameLocations": ["1436:8:44"], + "id": 45856, + "name": "onlyMinter", + "nameLocations": ["1727:10:28"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "1436:8:44" + "referencedDeclaration": 45832, + "src": "1727:10:28" }, "nodeType": "ModifierInvocation", - "src": "1436:28:44" + "src": "1727:10:28" } ], "name": "mint", - "nameLocation": "1389:4:44", + "nameLocation": "1680:4:28", "parameters": { - "id": 48202, + "id": 45855, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 48199, + "id": 45852, "mutability": "mutable", "name": "account", - "nameLocation": "1402:7:44", + "nameLocation": "1693:7:28", "nodeType": "VariableDeclaration", - "scope": 48217, - "src": "1394:15:44", + "scope": 45869, + "src": "1685:15:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3195,10 +2910,10 @@ "typeString": "address" }, "typeName": { - "id": 48198, + "id": 45851, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1394:7:44", + "src": "1685:7:28", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -3209,13 +2924,13 @@ }, { "constant": false, - "id": 48201, + "id": 45854, "mutability": "mutable", "name": "amount", - "nameLocation": "1419:6:44", + "nameLocation": "1710:6:28", "nodeType": "VariableDeclaration", - "scope": 48217, - "src": "1411:14:44", + "scope": 45869, + "src": "1702:14:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3223,10 +2938,10 @@ "typeString": "uint256" }, "typeName": { - "id": 48200, + "id": 45853, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1411:7:44", + "src": "1702:7:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3235,21 +2950,21 @@ "visibility": "internal" } ], - "src": "1393:33:44" + "src": "1684:33:28" }, "returnParameters": { - "id": 48208, + "id": 45860, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 48207, + "id": 45859, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 48217, - "src": "1474:4:44", + "scope": 45869, + "src": "1747:4:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3257,10 +2972,10 @@ "typeString": "bool" }, "typeName": { - "id": 48206, + "id": 45858, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1474:4:44", + "src": "1747:4:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3269,46 +2984,216 @@ "visibility": "internal" } ], - "src": "1473:6:44" + "src": "1746:6:28" }, - "scope": 48347, + "scope": 46010, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 48238, + "id": 45900, "nodeType": "FunctionDefinition", - "src": "1685:160:44", + "src": "1958:236:28", "nodes": [], "body": { - "id": 48237, + "id": 45899, "nodeType": "Block", - "src": "1785:60:44", + "src": "2029:165:28", "nodes": [], "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 45882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 45879, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45872, + "src": "2043:7:28", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 45880, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2054:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 45881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2058:6:28", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2054:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2043:21:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 45891, + "nodeType": "IfStatement", + "src": "2039:96:28", + "trueBody": { + "id": 45890, + "nodeType": "Block", + "src": "2066:69:28", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 45884, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45872, + "src": "2096:7:28", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 45885, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2105:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 45886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2109:6:28", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2105:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 45887, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45874, + "src": "2117:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 45883, + "name": "_spendAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44765, + "src": "2080:15:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 45888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2080:44:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 45889, + "nodeType": "ExpressionStatement", + "src": "2080:44:28" + } + ] + } + }, { "expression": { "arguments": [ { - "id": 48231, + "id": 45893, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48220, - "src": "1801:7:44", + "referencedDeclaration": 45872, + "src": "2150:7:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 48232, + "id": 45894, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48222, - "src": "1810:6:44", + "referencedDeclaration": 45874, + "src": "2159:6:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3326,18 +3211,18 @@ "typeString": "uint256" } ], - "id": 48230, + "id": 45892, "name": "_burn", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44316, - "src": "1795:5:44", + "referencedDeclaration": 44729, + "src": "2144:5:28", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, - "id": 48233, + "id": 45895, "isConstant": false, "isLValue": false, "isPure": false, @@ -3346,96 +3231,67 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "1795:22:44", + "src": "2144:22:28", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 48234, + "id": 45896, "nodeType": "ExpressionStatement", - "src": "1795:22:44" + "src": "2144:22:28" }, { "expression": { "hexValue": "74727565", - "id": 48235, + "id": 45897, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "1834:4:44", + "src": "2183:4:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "functionReturnParameters": 48229, - "id": 48236, + "functionReturnParameters": 45878, + "id": 45898, "nodeType": "Return", - "src": "1827:11:44" + "src": "2176:11:28" } ] }, - "baseFunctions": [48594], + "baseFunctions": [46095], "documentation": { - "id": 48218, + "id": 45870, "nodeType": "StructuredDocumentation", - "src": "1546:134:44", + "src": "1819:134:28", "text": " @dev Burns a token\n @param account address to burn tokens from\n @param amount amount of tokens to burn" }, "functionSelector": "9dc29fac", "implemented": true, "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "id": 48225, - "name": "MINTER_BURNER_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48151, - "src": "1750:18:44", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 48226, - "kind": "modifierInvocation", - "modifierName": { - "id": 48224, - "name": "onlyRole", - "nameLocations": ["1741:8:44"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "1741:8:44" - }, - "nodeType": "ModifierInvocation", - "src": "1741:28:44" - } - ], + "modifiers": [], "name": "burn", - "nameLocation": "1694:4:44", + "nameLocation": "1967:4:28", "parameters": { - "id": 48223, + "id": 45875, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 48220, + "id": 45872, "mutability": "mutable", "name": "account", - "nameLocation": "1707:7:44", + "nameLocation": "1980:7:28", "nodeType": "VariableDeclaration", - "scope": 48238, - "src": "1699:15:44", + "scope": 45900, + "src": "1972:15:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3443,10 +3299,10 @@ "typeString": "address" }, "typeName": { - "id": 48219, + "id": 45871, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1699:7:44", + "src": "1972:7:28", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -3457,13 +3313,13 @@ }, { "constant": false, - "id": 48222, + "id": 45874, "mutability": "mutable", "name": "amount", - "nameLocation": "1724:6:44", + "nameLocation": "1997:6:28", "nodeType": "VariableDeclaration", - "scope": 48238, - "src": "1716:14:44", + "scope": 45900, + "src": "1989:14:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3471,10 +3327,10 @@ "typeString": "uint256" }, "typeName": { - "id": 48221, + "id": 45873, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1716:7:44", + "src": "1989:7:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3483,21 +3339,21 @@ "visibility": "internal" } ], - "src": "1698:33:44" + "src": "1971:33:28" }, "returnParameters": { - "id": 48229, + "id": 45878, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 48228, + "id": 45877, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 48238, - "src": "1779:4:44", + "scope": 45900, + "src": "2023:4:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3505,10 +3361,10 @@ "typeString": "bool" }, "typeName": { - "id": 48227, + "id": 45876, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1779:4:44", + "src": "2023:4:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3517,34 +3373,34 @@ "visibility": "internal" } ], - "src": "1778:6:44" + "src": "2022:6:28" }, - "scope": 48347, + "scope": 46010, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 48256, + "id": 45917, "nodeType": "FunctionDefinition", - "src": "2018:172:44", + "src": "2367:153:28", "nodes": [], "body": { - "id": 48255, + "id": 45916, "nodeType": "Block", - "src": "2102:88:44", + "src": "2432:88:28", "nodes": [], "statements": [ { "eventCall": { "arguments": [ { - "id": 48248, + "id": 45909, "name": "enabled", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48241, - "src": "2141:7:44", + "referencedDeclaration": 45903, + "src": "2471:7:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3558,18 +3414,18 @@ "typeString": "bool" } ], - "id": 48247, + "id": 45908, "name": "Permit2AllowanceUpdated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48576, - "src": "2117:23:44", + "referencedDeclaration": 46077, + "src": "2447:23:28", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bool_$returns$__$", "typeString": "function (bool)" } }, - "id": 48249, + "id": 45910, "isConstant": false, "isLValue": false, "isPure": false, @@ -3578,31 +3434,31 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "2117:32:44", + "src": "2447:32:28", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 48250, + "id": 45911, "nodeType": "EmitStatement", - "src": "2112:37:44" + "src": "2442:37:28" }, { "expression": { - "id": 48253, + "id": 45914, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 48251, + "id": 45912, "name": "permit2Enabled", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48156, - "src": "2159:14:44", + "referencedDeclaration": 45763, + "src": "2489:14:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3611,33 +3467,33 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 48252, + "id": 45913, "name": "enabled", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48241, - "src": "2176:7:44", + "referencedDeclaration": 45903, + "src": "2506:7:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "2159:24:44", + "src": "2489:24:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 48254, + "id": 45915, "nodeType": "ExpressionStatement", - "src": "2159:24:44" + "src": "2489:24:28" } ] }, "documentation": { - "id": 48239, + "id": 45901, "nodeType": "StructuredDocumentation", - "src": "1851:162:44", + "src": "2200:162:28", "text": " @dev used to update if to default approve permit2 address for all addresses\n @param enabled if the default approval should be done or not" }, "functionSelector": "705e6a5b", @@ -3645,49 +3501,35 @@ "kind": "function", "modifiers": [ { - "arguments": [ - { - "id": 48244, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "2082:18:44", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 48245, + "id": 45906, "kind": "modifierInvocation", "modifierName": { - "id": 48243, - "name": "onlyRole", - "nameLocations": ["2073:8:44"], + "id": 45905, + "name": "onlyOwner", + "nameLocations": ["2422:9:28"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "2073:8:44" + "referencedDeclaration": 44380, + "src": "2422:9:28" }, "nodeType": "ModifierInvocation", - "src": "2073:28:44" + "src": "2422:9:28" } ], "name": "updatePermit2Allowance", - "nameLocation": "2027:22:44", + "nameLocation": "2376:22:28", "parameters": { - "id": 48242, + "id": 45904, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 48241, + "id": 45903, "mutability": "mutable", "name": "enabled", - "nameLocation": "2055:7:44", + "nameLocation": "2404:7:28", "nodeType": "VariableDeclaration", - "scope": 48256, - "src": "2050:12:44", + "scope": 45917, + "src": "2399:12:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3695,10 +3537,10 @@ "typeString": "bool" }, "typeName": { - "id": 48240, + "id": 45902, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2050:4:44", + "src": "2399:4:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3707,28 +3549,28 @@ "visibility": "internal" } ], - "src": "2049:14:44" + "src": "2398:14:28" }, "returnParameters": { - "id": 48246, + "id": 45907, "nodeType": "ParameterList", "parameters": [], - "src": "2102:0:44" + "src": "2432:0:28" }, - "scope": 48347, + "scope": 46010, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 48286, + "id": 45947, "nodeType": "FunctionDefinition", - "src": "2323:221:44", + "src": "2653:223:28", "nodes": [], "body": { - "id": 48285, + "id": 45946, "nodeType": "Block", - "src": "2413:131:44", + "src": "2744:132:28", "nodes": [], "statements": [ { @@ -3737,7 +3579,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 48271, + "id": 45932, "isConstant": false, "isLValue": false, "isPure": false, @@ -3747,18 +3589,18 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 48269, + "id": 45930, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 48267, + "id": 45928, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48261, - "src": "2427:7:44", + "referencedDeclaration": 45922, + "src": "2758:7:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3767,18 +3609,18 @@ "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { - "id": 48268, + "id": 45929, "name": "PERMIT2", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48154, - "src": "2438:7:44", + "referencedDeclaration": 45757, + "src": "2769:7:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "2427:18:44", + "src": "2758:18:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3787,47 +3629,47 @@ "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { - "id": 48270, + "id": 45931, "name": "permit2Enabled", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48156, - "src": "2449:14:44", + "referencedDeclaration": 45763, + "src": "2780:14:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "2427:36:44", + "src": "2758:36:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 48278, + "id": 45939, "nodeType": "IfStatement", - "src": "2423:66:44", + "src": "2754:66:28", "trueBody": { "expression": { "expression": { "arguments": [ { - "id": 48274, + "id": 45935, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "2477:7:44", + "src": "2808:7:28", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { - "id": 48273, + "id": 45934, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2477:7:44", + "src": "2808:7:28", "typeDescriptions": {} } } @@ -3839,18 +3681,18 @@ "typeString": "type(uint256)" } ], - "id": 48272, + "id": 45933, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, - "src": "2472:4:44", + "src": "2803:4:28", "typeDescriptions": { "typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure" } }, - "id": 48275, + "id": 45936, "isConstant": false, "isLValue": false, "isPure": true, @@ -3859,55 +3701,55 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "2472:13:44", + "src": "2803:13:28", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_magic_meta_type_t_uint256", "typeString": "type(uint256)" } }, - "id": 48276, + "id": 45937, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "memberLocation": "2486:3:44", + "memberLocation": "2817:3:28", "memberName": "max", "nodeType": "MemberAccess", - "src": "2472:17:44", + "src": "2803:17:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 48266, - "id": 48277, + "functionReturnParameters": 45927, + "id": 45938, "nodeType": "Return", - "src": "2465:24:44" + "src": "2796:24:28" } }, { "expression": { "arguments": [ { - "id": 48281, - "name": "owner", + "id": 45942, + "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48259, - "src": "2522:5:44", + "referencedDeclaration": 45920, + "src": "2853:6:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 48282, + "id": 45943, "name": "spender", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48261, - "src": "2529:7:44", + "referencedDeclaration": 45922, + "src": "2861:7:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3926,33 +3768,33 @@ } ], "expression": { - "id": 48279, + "id": 45940, "name": "super", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -25, - "src": "2506:5:44", + "src": "2837:5:28", "typeDescriptions": { - "typeIdentifier": "t_type$_t_super$_Currency_$48347_$", + "typeIdentifier": "t_type$_t_super$_Currency_$46010_$", "typeString": "type(contract super Currency)" } }, - "id": 48280, + "id": 45941, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "2512:9:44", + "memberLocation": "2843:9:28", "memberName": "allowance", "nodeType": "MemberAccess", - "referencedDeclaration": 44070, - "src": "2506:15:44", + "referencedDeclaration": 44514, + "src": "2837:15:28", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view returns (uint256)" } }, - "id": 48283, + "id": 45944, "isConstant": false, "isLValue": false, "isPure": false, @@ -3961,25 +3803,25 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "2506:31:44", + "src": "2837:32:28", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 48266, - "id": 48284, + "functionReturnParameters": 45927, + "id": 45945, "nodeType": "Return", - "src": "2499:38:44" + "src": "2830:39:28" } ] }, - "baseFunctions": [44070], + "baseFunctions": [44514], "documentation": { - "id": 48257, + "id": 45918, "nodeType": "StructuredDocumentation", - "src": "2196:122:44", + "src": "2526:122:28", "text": "@dev The permit2 contract has full approval by default. If the approval is revoked, it can still be manually approved." }, "functionSelector": "dd62ed3e", @@ -3987,26 +3829,26 @@ "kind": "function", "modifiers": [], "name": "allowance", - "nameLocation": "2332:9:44", + "nameLocation": "2662:9:28", "overrides": { - "id": 48263, + "id": 45924, "nodeType": "OverrideSpecifier", "overrides": [], - "src": "2386:8:44" + "src": "2717:8:28" }, "parameters": { - "id": 48262, + "id": 45923, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 48259, + "id": 45920, "mutability": "mutable", - "name": "owner", - "nameLocation": "2350:5:44", + "name": "_owner", + "nameLocation": "2680:6:28", "nodeType": "VariableDeclaration", - "scope": 48286, - "src": "2342:13:44", + "scope": 45947, + "src": "2672:14:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4014,10 +3856,10 @@ "typeString": "address" }, "typeName": { - "id": 48258, + "id": 45919, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2342:7:44", + "src": "2672:7:28", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4028,13 +3870,13 @@ }, { "constant": false, - "id": 48261, + "id": 45922, "mutability": "mutable", "name": "spender", - "nameLocation": "2365:7:44", + "nameLocation": "2696:7:28", "nodeType": "VariableDeclaration", - "scope": 48286, - "src": "2357:15:44", + "scope": 45947, + "src": "2688:15:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4042,10 +3884,10 @@ "typeString": "address" }, "typeName": { - "id": 48260, + "id": 45921, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2357:7:44", + "src": "2688:7:28", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4055,21 +3897,21 @@ "visibility": "internal" } ], - "src": "2341:32:44" + "src": "2671:33:28" }, "returnParameters": { - "id": 48266, + "id": 45927, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 48265, + "id": 45926, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 48286, - "src": "2404:7:44", + "scope": 45947, + "src": "2735:7:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4077,10 +3919,10 @@ "typeString": "uint256" }, "typeName": { - "id": 48264, + "id": 45925, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2404:7:44", + "src": "2735:7:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4089,22 +3931,22 @@ "visibility": "internal" } ], - "src": "2403:9:44" + "src": "2734:9:28" }, - "scope": 48347, + "scope": 46010, "stateMutability": "view", "virtual": false, "visibility": "public" }, { - "id": 48346, + "id": 46009, "nodeType": "FunctionDefinition", - "src": "2762:371:44", + "src": "3094:372:28", "nodes": [], "body": { - "id": 48345, + "id": 46008, "nodeType": "Block", - "src": "2845:288:44", + "src": "3163:303:28", "nodes": [], "statements": [ { @@ -4113,7 +3955,7 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 48306, + "id": 45966, "isConstant": false, "isLValue": false, "isPure": false, @@ -4121,45 +3963,45 @@ "leftExpression": { "arguments": [ { - "id": 48300, + "id": 45960, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48290, - "src": "2867:5:44", + "referencedDeclaration": 45951, + "src": "3185:5:28", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46406", + "typeString": "contract ERC20Token" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46406", + "typeString": "contract ERC20Token" } ], - "id": 48299, + "id": 45959, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "2859:7:44", + "src": "3177:7:28", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 48298, + "id": 45958, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2859:7:44", + "src": "3177:7:28", "typeDescriptions": {} } }, - "id": 48301, + "id": 45961, "isConstant": false, "isLValue": false, "isPure": false, @@ -4168,7 +4010,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "2859:14:44", + "src": "3177:14:28", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", @@ -4181,14 +4023,14 @@ "arguments": [ { "hexValue": "30", - "id": 48304, + "id": 45964, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2885:1:44", + "src": "3203:1:28", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" @@ -4203,26 +4045,26 @@ "typeString": "int_const 0" } ], - "id": 48303, + "id": 45963, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "2877:7:44", + "src": "3195:7:28", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 48302, + "id": 45962, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2877:7:44", + "src": "3195:7:28", "typeDescriptions": {} } }, - "id": 48305, + "id": 45965, "isConstant": false, "isLValue": false, "isPure": true, @@ -4231,36 +4073,36 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "2877:10:44", + "src": "3195:10:28", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "2859:28:44", + "src": "3177:28:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 48343, + "id": 46006, "nodeType": "Block", - "src": "2985:142:44", + "src": "3318:142:28", "statements": [ { - "assignments": [48323, null], + "assignments": [45986, null], "declarations": [ { "constant": false, - "id": 48323, + "id": 45986, "mutability": "mutable", "name": "success", - "nameLocation": "3005:7:44", + "nameLocation": "3338:7:28", "nodeType": "VariableDeclaration", - "scope": 48343, - "src": "3000:12:44", + "scope": 46006, + "src": "3333:12:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4268,10 +4110,10 @@ "typeString": "bool" }, "typeName": { - "id": 48322, + "id": 45985, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "3000:4:44", + "src": "3333:4:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4281,19 +4123,19 @@ }, null ], - "id": 48337, + "id": 46000, "initialValue": { "arguments": [ { "hexValue": "", - "id": 48335, + "id": 45998, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3064:2:44", + "src": "3397:2:28", "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" @@ -4318,12 +4160,12 @@ "expression": { "arguments": [ { - "id": 48326, + "id": 45989, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48292, - "src": "3025:2:44", + "referencedDeclaration": 45953, + "src": "3358:2:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4337,27 +4179,27 @@ "typeString": "address" } ], - "id": 48325, + "id": 45988, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3017:8:44", + "src": "3350:8:28", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_payable_$", "typeString": "type(address payable)" }, "typeName": { - "id": 48324, + "id": 45987, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3017:8:44", + "src": "3350:8:28", "stateMutability": "payable", "typeDescriptions": {} } }, - "id": 48327, + "id": 45990, "isConstant": false, "isLValue": false, "isPure": false, @@ -4366,28 +4208,28 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "3017:11:44", + "src": "3350:11:28", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "id": 48328, + "id": 45991, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "3029:4:44", + "memberLocation": "3362:4:28", "memberName": "call", "nodeType": "MemberAccess", - "src": "3017:16:44", + "src": "3350:16:28", "typeDescriptions": { "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } }, - "id": 48334, + "id": 45997, "isConstant": false, "isLValue": false, "isPure": false, @@ -4399,14 +4241,14 @@ "expression": { "arguments": [ { - "id": 48331, + "id": 45994, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, - "src": "3049:4:44", + "src": "3382:4:28", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48347", + "typeIdentifier": "t_contract$_Currency_$46010", "typeString": "contract Currency" } } @@ -4414,30 +4256,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Currency_$48347", + "typeIdentifier": "t_contract$_Currency_$46010", "typeString": "contract Currency" } ], - "id": 48330, + "id": 45993, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3041:7:44", + "src": "3374:7:28", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 48329, + "id": 45992, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3041:7:44", + "src": "3374:7:28", "typeDescriptions": {} } }, - "id": 48332, + "id": 45995, "isConstant": false, "isLValue": false, "isPure": false, @@ -4446,35 +4288,35 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "3041:13:44", + "src": "3374:13:28", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 48333, + "id": 45996, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "3055:7:44", + "memberLocation": "3388:7:28", "memberName": "balance", "nodeType": "MemberAccess", - "src": "3041:21:44", + "src": "3374:21:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "src": "3017:46:44", + "src": "3350:46:28", "typeDescriptions": { "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } }, - "id": 48336, + "id": 45999, "isConstant": false, "isLValue": false, "isPure": false, @@ -4483,7 +4325,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "3017:50:44", + "src": "3350:50:28", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", @@ -4491,18 +4333,18 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "2999:68:44" + "src": "3332:68:28" }, { "expression": { "arguments": [ { - "id": 48339, + "id": 46002, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48323, - "src": "3089:7:44", + "referencedDeclaration": 45986, + "src": "3422:7:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4510,14 +4352,14 @@ }, { "hexValue": "7769746864726177206661696c6564", - "id": 48340, + "id": 46003, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3098:17:44", + "src": "3431:17:28", "typeDescriptions": { "typeIdentifier": "t_stringliteral_f788322002b8424ed68b8abd50be064ad13f3c130a8b07f2a88c6b5024ee35fe", "typeString": "literal_string \"withdraw failed\"" @@ -4536,18 +4378,18 @@ "typeString": "literal_string \"withdraw failed\"" } ], - "id": 48338, + "id": 46001, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [-18, -18], "referencedDeclaration": -18, - "src": "3081:7:44", + "src": "3414:7:28", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 48341, + "id": 46004, "isConstant": false, "isLValue": false, "isPure": false, @@ -4556,49 +4398,94 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "3081:35:44", + "src": "3414:35:28", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 48342, + "id": 46005, "nodeType": "ExpressionStatement", - "src": "3081:35:44" + "src": "3414:35:28" } ] }, - "id": 48344, + "id": 46007, "nodeType": "IfStatement", - "src": "2855:272:44", + "src": "3173:287:28", "trueBody": { - "id": 48321, + "id": 45984, "nodeType": "Block", - "src": "2889:90:44", + "src": "3207:105:28", "statements": [ { "expression": { "arguments": [ { - "id": 48310, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48290, - "src": "2926:5:44", + "arguments": [ + { + "id": 45972, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45951, + "src": "3258:5:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46406", + "typeString": "contract ERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Token_$46406", + "typeString": "contract ERC20Token" + } + ], + "id": 45971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3250:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 45970, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3250:7:28", + "typeDescriptions": {} + } + }, + "id": 45973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3250:14:28", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_address", + "typeString": "address" } }, { - "id": 48311, + "id": 45974, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48292, - "src": "2933:2:44", + "referencedDeclaration": 45953, + "src": "3266:2:28", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4609,14 +4496,14 @@ { "arguments": [ { - "id": 48316, + "id": 45979, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, - "src": "2961:4:44", + "src": "3294:4:28", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48347", + "typeIdentifier": "t_contract$_Currency_$46010", "typeString": "contract Currency" } } @@ -4624,30 +4511,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Currency_$48347", + "typeIdentifier": "t_contract$_Currency_$46010", "typeString": "contract Currency" } ], - "id": 48315, + "id": 45978, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "2953:7:44", + "src": "3286:7:28", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 48314, + "id": 45977, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2953:7:44", + "src": "3286:7:28", "typeDescriptions": {} } }, - "id": 48317, + "id": 45980, "isConstant": false, "isLValue": false, "isPure": false, @@ -4656,7 +4543,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "2953:13:44", + "src": "3286:13:28", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", @@ -4672,33 +4559,33 @@ } ], "expression": { - "id": 48312, + "id": 45975, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48290, - "src": "2937:5:44", + "referencedDeclaration": 45951, + "src": "3270:5:28", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46406", + "typeString": "contract ERC20Token" } }, - "id": 48313, + "id": 45976, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "2943:9:44", + "memberLocation": "3276:9:28", "memberName": "balanceOf", "nodeType": "MemberAccess", - "referencedDeclaration": 44029, - "src": "2937:15:44", + "referencedDeclaration": 44502, + "src": "3270:15:28", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, - "id": 48318, + "id": 45981, "isConstant": false, "isLValue": false, "isPure": false, @@ -4707,7 +4594,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "2937:30:44", + "src": "3270:30:28", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -4718,8 +4605,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_address", + "typeString": "address" }, { "typeIdentifier": "t_address", @@ -4731,33 +4618,33 @@ } ], "expression": { - "id": 48307, - "name": "SafeERC20", + "id": 45967, + "name": "SafeTransferLib", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 45027, - "src": "2903:9:44", + "referencedDeclaration": 44996, + "src": "3221:15:28", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$45027_$", - "typeString": "type(library SafeERC20)" + "typeIdentifier": "t_type$_t_contract$_SafeTransferLib_$44996_$", + "typeString": "type(library SafeTransferLib)" } }, - "id": 48309, + "id": 45969, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "2913:12:44", + "memberLocation": "3237:12:28", "memberName": "safeTransfer", "nodeType": "MemberAccess", - "referencedDeclaration": 44787, - "src": "2903:22:44", + "referencedDeclaration": 44947, + "src": "3221:28:28", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$44521_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" } }, - "id": 48319, + "id": 45982, "isConstant": false, "isLValue": false, "isPure": false, @@ -4766,16 +4653,16 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "2903:65:44", + "src": "3221:80:28", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 48320, + "id": 45983, "nodeType": "ExpressionStatement", - "src": "2903:65:44" + "src": "3221:80:28" } ] } @@ -4783,9 +4670,9 @@ ] }, "documentation": { - "id": 48287, + "id": 45948, "nodeType": "StructuredDocumentation", - "src": "2550:207:44", + "src": "2882:207:28", "text": " @dev withdraw token. For cases where people mistakenly send other tokens to this address\n @param token address of the token to withdraw\n @param to account to withdraw tokens to" }, "functionSelector": "feaea586", @@ -4793,84 +4680,70 @@ "kind": "function", "modifiers": [ { - "arguments": [ - { - "id": 48295, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "2825:18:44", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 48296, + "id": 45956, "kind": "modifierInvocation", "modifierName": { - "id": 48294, - "name": "onlyRole", - "nameLocations": ["2816:8:44"], + "id": 45955, + "name": "onlyOwner", + "nameLocations": ["3153:9:28"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "2816:8:44" + "referencedDeclaration": 44380, + "src": "3153:9:28" }, "nodeType": "ModifierInvocation", - "src": "2816:28:44" + "src": "3153:9:28" } ], "name": "recoverToken", - "nameLocation": "2771:12:44", + "nameLocation": "3103:12:28", "parameters": { - "id": 48293, + "id": 45954, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 48290, + "id": 45951, "mutability": "mutable", "name": "token", - "nameLocation": "2790:5:44", + "nameLocation": "3127:5:28", "nodeType": "VariableDeclaration", - "scope": 48346, - "src": "2784:11:44", + "scope": 46009, + "src": "3116:16:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46406", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 48289, + "id": 45950, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 48288, - "name": "ERC20", - "nameLocations": ["2784:5:44"], + "id": 45949, + "name": "ERC20Token", + "nameLocations": ["3116:10:28"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "2784:5:44" + "referencedDeclaration": 46406, + "src": "3116:10:28" }, - "referencedDeclaration": 44443, - "src": "2784:5:44", + "referencedDeclaration": 46406, + "src": "3116:10:28", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46406", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 48292, + "id": 45953, "mutability": "mutable", "name": "to", - "nameLocation": "2805:2:44", + "nameLocation": "3142:2:28", "nodeType": "VariableDeclaration", - "scope": 48346, - "src": "2797:10:44", + "scope": 46009, + "src": "3134:10:28", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4878,10 +4751,10 @@ "typeString": "address" }, "typeName": { - "id": 48291, + "id": 45952, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2797:7:44", + "src": "3134:7:28", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4891,15 +4764,15 @@ "visibility": "internal" } ], - "src": "2783:25:44" + "src": "3115:30:28" }, "returnParameters": { - "id": 48297, + "id": 45957, "nodeType": "ParameterList", "parameters": [], - "src": "2845:0:44" + "src": "3163:0:28" }, - "scope": 48347, + "scope": 46010, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -4909,63 +4782,59 @@ "baseContracts": [ { "baseName": { - "id": 48141, - "name": "AccessControl", - "nameLocations": ["446:13:44"], + "id": 45747, + "name": "Ownable", + "nameLocations": ["397:7:28"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43683, - "src": "446:13:44" + "referencedDeclaration": 44381, + "src": "397:7:28" }, - "id": 48142, + "id": 45748, "nodeType": "InheritanceSpecifier", - "src": "446:13:44" + "src": "397:7:28" }, { "baseName": { - "id": 48143, - "name": "ERC20Permit", - "nameLocations": ["461:11:44"], + "id": 45749, + "name": "ERC20", + "nameLocations": ["406:5:28"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44675, - "src": "461:11:44" + "referencedDeclaration": 44800, + "src": "406:5:28" }, - "id": 48144, + "id": 45750, "nodeType": "InheritanceSpecifier", - "src": "461:11:44" + "src": "406:5:28" }, { "baseName": { - "id": 48145, + "id": 45751, "name": "ICurrency", - "nameLocations": ["474:9:44"], + "nameLocations": ["413:9:28"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48595, - "src": "474:9:44" + "referencedDeclaration": 46096, + "src": "413:9:28" }, - "id": 48146, + "id": 45752, "nodeType": "InheritanceSpecifier", - "src": "474:9:44" + "src": "413:9:28" } ], "canonicalName": "Currency", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, - "linearizedBaseContracts": [ - 48347, 48595, 44675, 45370, 46527, 43791, 44737, 44443, 43833, 44701, 44521, 43683, 46625, - 46637, 43766, 45302 - ], + "linearizedBaseContracts": [46010, 46096, 44800, 44381], "name": "Currency", - "nameLocation": "434:8:44", - "scope": 48348, + "nameLocation": "385:8:28", + "scope": 46011, "usedErrors": [ - 43693, 43696, 43803, 43808, 43813, 43822, 43827, 43832, 44552, 44559, 44754, 45035, 45040, - 45043, 45312, 45384, 45386, 45963, 45968, 45973 + 44193, 44196, 44199, 44202, 44387, 44390, 44393, 44396, 44399, 44402, 44405, 45754 ], - "usedEvents": [43705, 43714, 43723, 43771, 44455, 44464, 48576] + "usedEvents": [44209, 44214, 44219, 44414, 44423, 46077] } ], "license": "GPL-3.0" }, - "id": 44 + "id": 28 } diff --git a/src/contracts/abis/Feed.json b/src/contracts/abis/Feed.json index ab7b560..77813bf 100644 --- a/src/contracts/abis/Feed.json +++ b/src/contracts/abis/Feed.json @@ -13,23 +13,27 @@ }, { "inputs": [], - "name": "AccessControlBadConfirmation", + "name": "AlreadyInitialized", "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], - "name": "AccessControlUnauthorizedAccount", + "inputs": [], + "name": "BadPrice", + "type": "error" + }, + { + "inputs": [], + "name": "NewOwnerIsZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "NoHandoverRequest", + "type": "error" + }, + { + "inputs": [], + "name": "NotPaused", "type": "error" }, { @@ -37,23 +41,22 @@ "name": "Paused", "type": "error" }, + { + "inputs": [], + "name": "Unauthorized", + "type": "error" + }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "collateral", + "name": "pendingOwner", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "price", - "type": "uint256" } ], - "name": "Read", + "name": "OwnershipHandoverCanceled", "type": "event" }, { @@ -61,93 +64,63 @@ "inputs": [ { "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" + "internalType": "address", + "name": "pendingOwner", + "type": "address" } ], - "name": "RoleAdminChanged", + "name": "OwnershipHandoverRequested", "type": "event" }, { "anonymous": false, "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "indexed": true, "internalType": "address", - "name": "account", + "name": "oldOwner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "sender", + "name": "newOwner", "type": "address" } ], - "name": "RoleGranted", + "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "account", + "name": "collateral", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "price", + "type": "uint256" } ], - "name": "RoleRevoked", + "name": "Read", "type": "event" }, { "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", + "name": "cancelOwnershipHandover", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { "inputs": [ { - "internalType": "address", + "internalType": "contract ERC20Token", "name": "", "type": "address" } @@ -155,7 +128,7 @@ "name": "collaterals", "outputs": [ { - "internalType": "contract IMedian", + "internalType": "contract IOSM", "name": "", "type": "address" } @@ -166,61 +139,44 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "internalType": "address", + "name": "pendingOwner", + "type": "address" } ], - "stateMutability": "view", + "name": "completeOwnershipHandover", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "contract ERC20Token", + "name": "collateral", + "type": "address" }, { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "price", + "type": "uint256" } ], - "name": "grantRole", + "name": "mockUpdatePrice", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, + "inputs": [], + "name": "owner", + "outputs": [ { "internalType": "address", - "name": "account", + "name": "result", "type": "address" } ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], "stateMutability": "view", "type": "function" }, @@ -228,18 +184,19 @@ "inputs": [ { "internalType": "address", - "name": "collateral", + "name": "pendingOwner", "type": "address" - }, + } + ], + "name": "ownershipHandoverExpiresAt", + "outputs": [ { "internalType": "uint256", - "name": "price", + "name": "result", "type": "uint256" } ], - "name": "mockUpdatePrice", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -250,55 +207,33 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "name": "renounceRole", + "inputs": [], + "name": "renounceOwnership", "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", + "inputs": [], + "name": "requestOwnershipHandover", "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "oracle", + "internalType": "contract ERC20Token", + "name": "collateral", "type": "address" }, { - "internalType": "address", - "name": "collateral", + "internalType": "contract IOSM", + "name": "oracle", "type": "address" } ], - "name": "setPriceOracleContract", + "name": "setCollateralOSM", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -319,20 +254,14 @@ { "inputs": [ { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "stateMutability": "view", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { @@ -345,7 +274,7 @@ { "inputs": [ { - "internalType": "address", + "internalType": "contract ERC20Token", "name": "collateral", "type": "address" } @@ -370,33 +299,33 @@ } ], "bytecode": { - "object": "0x608060405234801561001057600080fd5b50604051610c89380380610c8983398101604081905261002f91610110565b61003a600033610064565b50600180546001600160a01b0319166001600160a01b039290921691909117905560028055610140565b6000828152602081815260408083206001600160a01b038516845290915281205460ff16610106576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556100be3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161010a565b5060005b92915050565b60006020828403121561012257600080fd5b81516001600160a01b038116811461013957600080fd5b9392505050565b610b3a8061014f6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638456cb5911610097578063c7331b0111610066578063c7331b0114610206578063d547741f14610219578063eeb97d3b1461022c578063fbfa77cf1461028757600080fd5b80638456cb591461019f57806391d14854146101a757806396e85ced146101eb578063a217fddf146101fe57600080fd5b80632f2ff15d116100d35780632f2ff15d1461015c57806336568abe146101715780633f4ba83a146101845780635ab68dd81461018c57600080fd5b806301ffc9a7146100fa578063200d2ed214610122578063248a9ca314610139575b600080fd5b61010d6101083660046109f0565b6102a7565b60405190151581526020015b60405180910390f35b61012b60025481565b604051908152602001610119565b61012b610147366004610a39565b60009081526020819052604090206001015490565b61016f61016a366004610a7b565b610340565b005b61016f61017f366004610a7b565b61036b565b61016f6103c9565b61016f61019a366004610aa7565b6103db565b61016f610478565b61010d6101b5366004610a7b565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b61016f6101f9366004610ad1565b61048b565b61012b600081565b61016f610214366004610aec565b610659565b61016f610227366004610a7b565b610779565b61026261023a366004610ad1565b60036020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610119565b6001546102629073ffffffffffffffffffffffffffffffffffffffff1681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061033a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60008281526020819052604090206001015461035b8161079e565b61036583836107ab565b50505050565b73ffffffffffffffffffffffffffffffffffffffff811633146103ba576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103c482826108a7565b505050565b60006103d48161079e565b5060028055565b600160025403610417576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006104228161079e565b5073ffffffffffffffffffffffffffffffffffffffff90811660009081526003602052604090208054919092167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116179055565b60006104838161079e565b506001600255565b6001600254036104c7576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006104d28161079e565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600360205260408082205481517f57de26a40000000000000000000000000000000000000000000000000000000081528251939491909116926357de26a4926004808401939192918290030181865afa158015610550573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105749190610b16565b6001546040517f457972de00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152602482018490529294509116915063457972de90604401600060405180830381600087803b1580156105eb57600080fd5b505af11580156105ff573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff87168152602081018590527feee6047fc5e3ea81b2b940b6b7c0140055ee3f19ba649d78e25718bdf67eae4093500190505b60405180910390a1505050565b600160025403610695576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006106a08161079e565b6001546040517f457972de00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529091169063457972de90604401600060405180830381600087803b15801561071457600080fd5b505af1158015610728573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff87168152602081018690527feee6047fc5e3ea81b2b940b6b7c0140055ee3f19ba649d78e25718bdf67eae40935001905061064c565b6000828152602081905260409020600101546107948161079e565b61036583836108a7565b6107a88133610962565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff1661089f5760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561083d3390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161033a565b50600061033a565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff161561089f5760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161033a565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166109ec576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024810183905260440160405180910390fd5b5050565b600060208284031215610a0257600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a3257600080fd5b9392505050565b600060208284031215610a4b57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610a7657600080fd5b919050565b60008060408385031215610a8e57600080fd5b82359150610a9e60208401610a52565b90509250929050565b60008060408385031215610aba57600080fd5b610ac383610a52565b9150610a9e60208401610a52565b600060208284031215610ae357600080fd5b610a3282610a52565b60008060408385031215610aff57600080fd5b610b0883610a52565b946020939093013593505050565b60008060408385031215610b2957600080fd5b50508051602090910151909290915056", - "sourceMap": "320:1452:45:-:0;;;846:132;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;882:42;2232:4:19;913:10:45;882;:42::i;:::-;-1:-1:-1;934:5:45;:14;;-1:-1:-1;;;;;;934:14:45;-1:-1:-1;;;;;934:14:45;;;;;;;;;;436:1;958:13;;320:1452;;6179:316:19;6256:4;2954:12;;;;;;;;;;;-1:-1:-1;;;;;2954:29:19;;;;;;;;;;;;6272:217;;6315:6;:12;;;;;;;;;;;-1:-1:-1;;;;;6315:29:19;;;;;;;;;:36;;-1:-1:-1;;6315:36:19;6347:4;6315:36;;;6397:12;735:10:30;;656:96;6397:12:19;-1:-1:-1;;;;;6370:40:19;6388:7;-1:-1:-1;;;;;6370:40:19;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:19;6424:11;;6272:217;-1:-1:-1;6473:5:19;6272:217;6179:316;;;;:::o;14:305:60:-;99:6;152:2;140:9;131:7;127:23;123:32;120:52;;;168:1;165;158:12;120:52;194:16;;-1:-1:-1;;;;;239:31:60;;229:42;;219:70;;285:1;282;275:12;219:70;308:5;14:305;-1:-1:-1;;;14:305:60:o;:::-;320:1452:45;;;;;;", + "object": "0x608060405234801561001057600080fd5b5060405161097538038061097583398101604081905261002f916100a3565b600260005561003d33610067565b600180546001600160a01b0319166001600160a01b039290921691909117905560026000556100d3565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6000602082840312156100b557600080fd5b81516001600160a01b03811681146100cc57600080fd5b9392505050565b610893806100e26000396000f3fe6080604052600436106100e85760003560e01c80638da5cb5b1161008a578063f04e283e11610059578063f04e283e14610252578063f2fde38b14610265578063fbfa77cf14610278578063fee81cf4146102a557600080fd5b80638da5cb5b1461017a57806396e85ced146101cf578063c7331b01146101ef578063eeb97d3b1461020f57600080fd5b8063425bddcf116100c6578063425bddcf1461013557806354d1f13d14610155578063715018a61461015d5780638456cb591461016557600080fd5b8063200d2ed2146100ed57806325692962146101165780633f4ba83a14610120575b600080fd5b3480156100f957600080fd5b5061010360005481565b6040519081526020015b60405180910390f35b61011e6102d8565b005b34801561012c57600080fd5b5061011e610328565b34801561014157600080fd5b5061011e6101503660046107f1565b610373565b61011e61040a565b61011e610446565b34801561017157600080fd5b5061011e61045a565b34801561018657600080fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927545b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010d565b3480156101db57600080fd5b5061011e6101ea36600461082a565b6104a5565b3480156101fb57600080fd5b5061011e61020a36600461084e565b61064e565b34801561021b57600080fd5b506101aa61022a36600461082a565b60026020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b61011e61026036600461082a565b6106cc565b61011e61027336600461082a565b61070c565b34801561028457600080fd5b506001546101aa9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156102b157600080fd5b506101036102c036600461082a565b63389a75e1600c908152600091909152602090205490565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b600260005403610364576040517f6cd6020100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61036c610733565b6002600055565b6001600054036103af576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103b7610733565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b61044e610733565b6104586000610769565b565b600160005403610496576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049e610733565b6001600055565b6001600054036104e1576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff80821660009081526002602090815260408083205481517f9fa6a6e3000000000000000000000000000000000000000000000000000000008152915193941692639fa6a6e3926004808401939192918290030181865afa15801561055e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610582919061087a565b9050806000036105be576040517ffd1ee34900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546040517f457972de00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490529091169063457972de90604401600060405180830381600087803b15801561063257600080fd5b505af1158015610646573d6000803e3d6000fd5b505050505050565b60016000540361068a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610692610733565b806000036105be576040517ffd1ee34900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106d4610733565b63389a75e1600c52806000526020600c2080544211156106fc57636f5e88186000526004601cfd5b6000905561070981610769565b50565b610714610733565b8060601b61072a57637448fbae6000526004601cfd5b61070981610769565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610458576382b429006000526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b73ffffffffffffffffffffffffffffffffffffffff8116811461070957600080fd5b6000806040838503121561080457600080fd5b823561080f816107cf565b9150602083013561081f816107cf565b809150509250929050565b60006020828403121561083c57600080fd5b8135610847816107cf565b9392505050565b6000806040838503121561086157600080fd5b823561086c816107cf565b946020939093013593505050565b60006020828403121561088c57600080fd5b505191905056", + "sourceMap": "348:1130:36:-:0;;;664:118;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;203:1:29;280:6;:13;700:28:36;717:10;700:16;:28::i;:::-;738:5;:14;;-1:-1:-1;;;;;;738:14:36;-1:-1:-1;;;;;738:14:36;;;;;;;;;;203:1:29;-1:-1:-1;762:13:36;348:1130;;4883:1190:22;-1:-1:-1;;;;;5793:26:22;-1:-1:-1;;5876:29:22;;;5793:26;6031:1;5991:38;6031:1;;5980:63;4883:1190;:::o;14:305:60:-;99:6;152:2;140:9;131:7;127:23;123:32;120:52;;;168:1;165;158:12;120:52;194:16;;-1:-1:-1;;;;;239:31:60;;229:42;;219:70;;285:1;282;275:12;219:70;308:5;14:305;-1:-1:-1;;;14:305:60:o;:::-;348:1130:36;;;;;;", "linkReferences": {} }, "deployedBytecode": { - "object": "0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80638456cb5911610097578063c7331b0111610066578063c7331b0114610206578063d547741f14610219578063eeb97d3b1461022c578063fbfa77cf1461028757600080fd5b80638456cb591461019f57806391d14854146101a757806396e85ced146101eb578063a217fddf146101fe57600080fd5b80632f2ff15d116100d35780632f2ff15d1461015c57806336568abe146101715780633f4ba83a146101845780635ab68dd81461018c57600080fd5b806301ffc9a7146100fa578063200d2ed214610122578063248a9ca314610139575b600080fd5b61010d6101083660046109f0565b6102a7565b60405190151581526020015b60405180910390f35b61012b60025481565b604051908152602001610119565b61012b610147366004610a39565b60009081526020819052604090206001015490565b61016f61016a366004610a7b565b610340565b005b61016f61017f366004610a7b565b61036b565b61016f6103c9565b61016f61019a366004610aa7565b6103db565b61016f610478565b61010d6101b5366004610a7b565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b61016f6101f9366004610ad1565b61048b565b61012b600081565b61016f610214366004610aec565b610659565b61016f610227366004610a7b565b610779565b61026261023a366004610ad1565b60036020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610119565b6001546102629073ffffffffffffffffffffffffffffffffffffffff1681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061033a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60008281526020819052604090206001015461035b8161079e565b61036583836107ab565b50505050565b73ffffffffffffffffffffffffffffffffffffffff811633146103ba576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103c482826108a7565b505050565b60006103d48161079e565b5060028055565b600160025403610417576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006104228161079e565b5073ffffffffffffffffffffffffffffffffffffffff90811660009081526003602052604090208054919092167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116179055565b60006104838161079e565b506001600255565b6001600254036104c7576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006104d28161079e565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600360205260408082205481517f57de26a40000000000000000000000000000000000000000000000000000000081528251939491909116926357de26a4926004808401939192918290030181865afa158015610550573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105749190610b16565b6001546040517f457972de00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152602482018490529294509116915063457972de90604401600060405180830381600087803b1580156105eb57600080fd5b505af11580156105ff573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff87168152602081018590527feee6047fc5e3ea81b2b940b6b7c0140055ee3f19ba649d78e25718bdf67eae4093500190505b60405180910390a1505050565b600160025403610695576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006106a08161079e565b6001546040517f457972de00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529091169063457972de90604401600060405180830381600087803b15801561071457600080fd5b505af1158015610728573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff87168152602081018690527feee6047fc5e3ea81b2b940b6b7c0140055ee3f19ba649d78e25718bdf67eae40935001905061064c565b6000828152602081905260409020600101546107948161079e565b61036583836108a7565b6107a88133610962565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff1661089f5760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561083d3390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161033a565b50600061033a565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff161561089f5760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161033a565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166109ec576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024810183905260440160405180910390fd5b5050565b600060208284031215610a0257600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a3257600080fd5b9392505050565b600060208284031215610a4b57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610a7657600080fd5b919050565b60008060408385031215610a8e57600080fd5b82359150610a9e60208401610a52565b90509250929050565b60008060408385031215610aba57600080fd5b610ac383610a52565b9150610a9e60208401610a52565b600060208284031215610ae357600080fd5b610a3282610a52565b60008060408385031215610aff57600080fd5b610b0883610a52565b946020939093013593505050565b60008060408385031215610b2957600080fd5b50508051602090910151909290915056", - "sourceMap": "320:1452:45:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2565:202:19;;;;;;:::i;:::-;;:::i;:::-;;;516:14:60;;509:22;491:41;;479:2;464:18;2565:202:19;;;;;;;;468:21:45;;;;;;;;;689:25:60;;;677:2;662:18;468:21:45;543:177:60;3810:120:19;;;;;;:::i;:::-;3875:7;3901:12;;;;;;;;;;:22;;;;3810:120;4226:136;;;;;;:::i;:::-;;:::i;:::-;;5328:245;;;;;;:::i;:::-;;:::i;661:87:45:-;;;:::i;984:206::-;;;;;;:::i;:::-;;:::i;754:86::-;;;:::i;2854:136:19:-;;;;;;:::i;:::-;2931:4;2954:12;;;;;;;;;;;:29;;;;;;;;;;;;;;;;2854:136;1255:246:45;;;;;;:::i;:::-;;:::i;2187:49:19:-;;2232:4;2187:49;;1566:204:45;;;;;;:::i;:::-;;:::i;4642:138:19:-;;;;;;:::i;:::-;;:::i;513:46:45:-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2460:42:60;2448:55;;;2430:74;;2418:2;2403:18;513:46:45;2267:243:60;444:18:45;;;;;;;;;2565:202:19;2650:4;2673:47;;;2688:32;2673:47;;:87;;-1:-1:-1;876:25:38;861:40;;;;2724:36:19;2666:94;2565:202;-1:-1:-1;;2565:202:19:o;4226:136::-;3875:7;3901:12;;;;;;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4330:25:::1;4341:4;4347:7;4330:10;:25::i;:::-;;4226:136:::0;;;:::o;5328:245::-;5421:34;;;735:10:30;5421:34:19;5417:102;;5478:30;;;;;;;;;;;;;;5417:102;5529:37;5541:4;5547:18;5529:11;:37::i;:::-;;5328:245;;:::o;661:87:45:-;2232:4:19;2464:16;2232:4;2464:10;:16::i;:::-;-1:-1:-1;436:1:45::1;728:13:::0;;661:87::o;984:206::-;397:1;605:6;;:15;601:36;;629:8;;;;;;;;;;;;;;601:36;2232:4:19::1;2464:16;2232:4:::0;2464:10:::1;:16::i;:::-;-1:-1:-1::0;1142:23:45::2;::::0;;::::2;;::::0;;;:11:::2;:23;::::0;;;;:41;;;;;::::2;::::0;;;::::2;;::::0;;984:206::o;754:86::-;2232:4:19;2464:16;2232:4;2464:10;:16::i;:::-;-1:-1:-1;397:1:45::1;819:6;:14:::0;754:86::o;1255:246::-;397:1;605:6;;:15;601:36;;629:8;;;;;;;;;;;;;;601:36;2232:4:19::1;2464:16;2232:4:::0;2464:10:::1;:16::i;:::-;1378:23:45::2;::::0;;::::2;1361:13;1378:23:::0;;;:11:::2;:23;::::0;;;;;;:30;;;;;;;1361:13;;1378:23;;;::::2;::::0;:28:::2;::::0;:30:::2;::::0;;::::2;::::0;:23;;:30;;;;;;:23;:30:::2;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1419:5;::::0;:36:::2;::::0;;;;:5:::2;3203:55:60::0;;;1419:36:45::2;::::0;::::2;3185:74:60::0;3275:18;;;3268:34;;;1358:50:45;;-1:-1:-1;1419:5:45;::::2;::::0;-1:-1:-1;1419:17:45::2;::::0;3158:18:60;;1419:36:45::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;1471:23:45::2;::::0;;3215:42:60;3203:55;;3185:74;;3290:2;3275:18;;3268:34;;;1471:23:45::2;::::0;-1:-1:-1;3158:18:60;;-1:-1:-1;1471:23:45::2;;;;;;;;1348:153;647:1:::1;1255:246:::0;:::o;1566:204::-;397:1;605:6;;:15;601:36;;629:8;;;;;;;;;;;;;;601:36;2232:4:19::1;2464:16;2232:4:::0;2464:10:::1;:16::i;:::-;1688:5:45::2;::::0;:36:::2;::::0;;;;:5:::2;3203:55:60::0;;;1688:36:45::2;::::0;::::2;3185:74:60::0;3275:18;;;3268:34;;;1688:5:45;;::::2;::::0;:17:::2;::::0;3158:18:60;;1688:36:45::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;1740:23:45::2;::::0;;3215:42:60;3203:55;;3185:74;;3290:2;3275:18;;3268:34;;;1740:23:45::2;::::0;-1:-1:-1;3158:18:60;;-1:-1:-1;1740:23:45::2;3011:297:60::0;4642:138:19;3875:7;3901:12;;;;;;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4747:26:::1;4759:4;4765:7;4747:11;:26::i;3199:103::-:0;3265:30;3276:4;735:10:30;3265::19;:30::i;:::-;3199:103;:::o;6179:316::-;6256:4;2954:12;;;;;;;;;;;:29;;;;;;;;;;;;;6272:217;;6315:6;:12;;;;;;;;;;;:29;;;;;;;;;;:36;;;;6347:4;6315:36;;;6397:12;735:10:30;;656:96;6397:12:19;6370:40;;6388:7;6370:40;;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:19;6424:11;;6272:217;-1:-1:-1;6473:5:19;6466:12;;6730:317;6808:4;2954:12;;;;;;;;;;;:29;;;;;;;;;;;;;6824:217;;;6898:5;6866:12;;;;;;;;;;;:29;;;;;;;;;;;:37;;;;;;6922:40;735:10:30;;6866:12:19;;6922:40;;6898:5;6922:40;-1:-1:-1;6983:4:19;6976:11;;3432:197;2931:4;2954:12;;;;;;;;;;;:29;;;;;;;;;;;;;3515:108;;3565:47;;;;;3215:42:60;3203:55;;3565:47:19;;;3185:74:60;3275:18;;;3268:34;;;3158:18;;3565:47:19;;;;;;;3515:108;3432:197;;:::o;14:332:60:-;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;180:9;167:23;230:66;223:5;219:78;212:5;209:89;199:117;;312:1;309;302:12;199:117;335:5;14:332;-1:-1:-1;;;14:332:60:o;725:180::-;784:6;837:2;825:9;816:7;812:23;808:32;805:52;;;853:1;850;843:12;805:52;-1:-1:-1;876:23:60;;725:180;-1:-1:-1;725:180:60:o;1092:196::-;1160:20;;1220:42;1209:54;;1199:65;;1189:93;;1278:1;1275;1268:12;1189:93;1092:196;;;:::o;1293:254::-;1361:6;1369;1422:2;1410:9;1401:7;1397:23;1393:32;1390:52;;;1438:1;1435;1428:12;1390:52;1474:9;1461:23;1451:33;;1503:38;1537:2;1526:9;1522:18;1503:38;:::i;:::-;1493:48;;1293:254;;;;;:::o;1552:260::-;1620:6;1628;1681:2;1669:9;1660:7;1656:23;1652:32;1649:52;;;1697:1;1694;1687:12;1649:52;1720:29;1739:9;1720:29;:::i;:::-;1710:39;;1768:38;1802:2;1791:9;1787:18;1768:38;:::i;1817:186::-;1876:6;1929:2;1917:9;1908:7;1904:23;1900:32;1897:52;;;1945:1;1942;1935:12;1897:52;1968:29;1987:9;1968:29;:::i;2008:254::-;2076:6;2084;2137:2;2125:9;2116:7;2112:23;2108:32;2105:52;;;2153:1;2150;2143:12;2105:52;2176:29;2195:9;2176:29;:::i;:::-;2166:39;2252:2;2237:18;;;;2224:32;;-1:-1:-1;;;2008:254:60:o;2761:245::-;2840:6;2848;2901:2;2889:9;2880:7;2876:23;2872:32;2869:52;;;2917:1;2914;2907:12;2869:52;-1:-1:-1;;2940:16:60;;2996:2;2981:18;;;2975:25;2940:16;;2975:25;;-1:-1:-1;2761:245:60:o", + "object": "0x6080604052600436106100e85760003560e01c80638da5cb5b1161008a578063f04e283e11610059578063f04e283e14610252578063f2fde38b14610265578063fbfa77cf14610278578063fee81cf4146102a557600080fd5b80638da5cb5b1461017a57806396e85ced146101cf578063c7331b01146101ef578063eeb97d3b1461020f57600080fd5b8063425bddcf116100c6578063425bddcf1461013557806354d1f13d14610155578063715018a61461015d5780638456cb591461016557600080fd5b8063200d2ed2146100ed57806325692962146101165780633f4ba83a14610120575b600080fd5b3480156100f957600080fd5b5061010360005481565b6040519081526020015b60405180910390f35b61011e6102d8565b005b34801561012c57600080fd5b5061011e610328565b34801561014157600080fd5b5061011e6101503660046107f1565b610373565b61011e61040a565b61011e610446565b34801561017157600080fd5b5061011e61045a565b34801561018657600080fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927545b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010d565b3480156101db57600080fd5b5061011e6101ea36600461082a565b6104a5565b3480156101fb57600080fd5b5061011e61020a36600461084e565b61064e565b34801561021b57600080fd5b506101aa61022a36600461082a565b60026020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b61011e61026036600461082a565b6106cc565b61011e61027336600461082a565b61070c565b34801561028457600080fd5b506001546101aa9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156102b157600080fd5b506101036102c036600461082a565b63389a75e1600c908152600091909152602090205490565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b600260005403610364576040517f6cd6020100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61036c610733565b6002600055565b6001600054036103af576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103b7610733565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b61044e610733565b6104586000610769565b565b600160005403610496576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049e610733565b6001600055565b6001600054036104e1576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff80821660009081526002602090815260408083205481517f9fa6a6e3000000000000000000000000000000000000000000000000000000008152915193941692639fa6a6e3926004808401939192918290030181865afa15801561055e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610582919061087a565b9050806000036105be576040517ffd1ee34900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546040517f457972de00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490529091169063457972de90604401600060405180830381600087803b15801561063257600080fd5b505af1158015610646573d6000803e3d6000fd5b505050505050565b60016000540361068a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610692610733565b806000036105be576040517ffd1ee34900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106d4610733565b63389a75e1600c52806000526020600c2080544211156106fc57636f5e88186000526004601cfd5b6000905561070981610769565b50565b610714610733565b8060601b61072a57637448fbae6000526004601cfd5b61070981610769565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610458576382b429006000526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b73ffffffffffffffffffffffffffffffffffffffff8116811461070957600080fd5b6000806040838503121561080457600080fd5b823561080f816107cf565b9150602083013561081f816107cf565b809150509250929050565b60006020828403121561083c57600080fd5b8135610847816107cf565b9392505050565b6000806040838503121561086157600080fd5b823561086c816107cf565b946020939093013593505050565b60006020828403121561088c57600080fd5b505191905056", + "sourceMap": "348:1130:36:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;211:21:29;;;;;;;;;;;;;;;;;;;160:25:60;;;148:2;133:18;211:21:29;;;;;;;;9021:617:22;;;:::i;:::-;;474:88:36;;;;;;;;;;;;;:::i;788:144::-;;;;;;;;;;-1:-1:-1;788:144:36;;;;;:::i;:::-;;:::i;9720:456:22:-;;;:::i;8762:100::-;;;:::i;568:90:36:-;;;;;;;;;;;;;:::i;11408:182:22:-;;;;;;;;;;-1:-1:-1;11562:11:22;11556:18;11408:182;;;994:42:60;982:55;;;964:74;;952:2;937:18;11408:182:22;818:226:60;997:222:36;;;;;;;;;;-1:-1:-1;997:222:36;;;;;:::i;:::-;;:::i;1284:192::-;;;;;;;;;;-1:-1:-1;1284:192:36;;;;;:::i;:::-;;:::i;421:46::-;;;;;;;;;;-1:-1:-1;421:46:36;;;;;:::i;:::-;;;;;;;;;;;;;;;;10363:708:22;;;;;;:::i;:::-;;:::i;8348:349::-;;;;;;:::i;:::-;;:::i;396:18:36:-;;;;;;;;;;-1:-1:-1;396:18:36;;;;;;;;11693:435:22;;;;;;;;;;-1:-1:-1;11693:435:22;;;;;:::i;:::-;11963:19;11957:4;11950:33;;;11812:14;11996:26;;;;12106:4;12090:21;;12084:28;;11693:435;9021:617;9114:15;7972:9;9132:46;;:15;:46;9114:64;;9346:19;9340:4;9333:33;9396:8;9390:4;9383:22;9452:7;9445:4;9439;9429:21;9422:38;9599:8;9552:45;9549:1;9546;9541:67;9248:374;9021:617::o;474:88:36:-;203:1:29;437:6;;:14;433:38;;460:11;;;;;;;;;;;;;;433:38;12517:13:22::1;:11;:13::i;:::-;203:1:29::2;542:6:36;:13:::0;474:88::o;788:144::-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;12517:13:22::1;:11;:13::i;:::-;893:23:36::2;::::0;;::::2;;::::0;;;:11:::2;:23;::::0;;;;:32;;;::::2;::::0;;;::::2;;::::0;;788:144::o;9720:456:22:-;9922:19;9916:4;9909:33;9968:8;9962:4;9955:22;10020:1;10013:4;10007;9997:21;9990:32;10151:8;10105:44;10102:1;10099;10094:66;9720:456::o;8762:100::-;12517:13;:11;:13::i;:::-;8834:21:::1;8852:1;8834:9;:21::i;:::-;8762:100::o:0;568:90:36:-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;12517:13:22::1;:11;:13::i;:::-;163:1:29::2;637:6:36;:14:::0;568:90::o;997:222::-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;1090:23:36::1;::::0;;::::1;1074:13;1090:23:::0;;;:11:::1;:23;::::0;;;;;;;;:33;;;;;;;1074:13;;1090:23:::1;::::0;:31:::1;::::0;:33:::1;::::0;;::::1;::::0;:23;;:33;;;;;;:23;:33:::1;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1074:49;;1137:5;1146:1;1137:10:::0;1133:33:::1;;1156:10;;;;;;;;;;;;;;1133:33;1176:5;::::0;:36:::1;::::0;;;;:5:::1;2841:55:60::0;;;1176:36:36::1;::::0;::::1;2823:74:60::0;2913:18;;;2906:34;;;1176:5:36;;::::1;::::0;:17:::1;::::0;2796:18:60;;1176:36:36::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;1064:155;997:222:::0;:::o;1284:192::-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;12517:13:22::1;:11;:13::i;:::-;1394:5:36::2;1403:1;1394:10:::0;1390:33:::2;;1413:10;;;;;;;;;;;;;;10363:708:22::0;12517:13;:11;:13::i;:::-;10597:19:::1;10591:4;10584:33;10643:12;10637:4;10630:26;10705:4;10699;10689:21;10811:12;10805:19;10792:11;10789:36;10786:157;;;10857:10;10851:4;10844:24;10924:4;10918;10911:18;10786:157;11020:1;10999:23:::0;;11041::::1;11051:12:::0;11041:9:::1;:23::i;:::-;10363:708:::0;:::o;8348:349::-;12517:13;:11;:13::i;:::-;8520:8:::1;8516:2;8512:17;8502:150;;8562:10;8556:4;8549:24;8633:4;8627;8620:18;8502:150;8671:19;8681:8;8671:9;:19::i;7292:355::-:0;7504:11;7498:18;7488:8;7485:32;7475:156;;7550:10;7544:4;7537:24;7612:4;7606;7599:18;6145:1089;6857:11;7093:16;;6941:26;;;;;;;7053:38;7050:1;;7042:78;7177:27;6145:1089::o;196:166:60:-;294:42;287:5;283:54;276:5;273:65;263:93;;352:1;349;342:12;367:446;469:6;477;530:2;518:9;509:7;505:23;501:32;498:52;;;546:1;543;536:12;498:52;585:9;572:23;604:43;641:5;604:43;:::i;:::-;666:5;-1:-1:-1;723:2:60;708:18;;695:32;736:45;695:32;736:45;:::i;:::-;800:7;790:17;;;367:446;;;;;:::o;1049:279::-;1128:6;1181:2;1169:9;1160:7;1156:23;1152:32;1149:52;;;1197:1;1194;1187:12;1149:52;1236:9;1223:23;1255:43;1292:5;1255:43;:::i;:::-;1317:5;1049:279;-1:-1:-1;;;1049:279:60:o;1333:347::-;1421:6;1429;1482:2;1470:9;1461:7;1457:23;1453:32;1450:52;;;1498:1;1495;1488:12;1450:52;1537:9;1524:23;1556:43;1593:5;1556:43;:::i;:::-;1618:5;1670:2;1655:18;;;;1642:32;;-1:-1:-1;;;1333:347:60:o;2440:184::-;2510:6;2563:2;2551:9;2542:7;2538:23;2534:32;2531:52;;;2579:1;2576;2569:12;2531:52;-1:-1:-1;2602:16:60;;2440:184;-1:-1:-1;2440:184:60:o", "linkReferences": {} }, "methodIdentifiers": { - "DEFAULT_ADMIN_ROLE()": "a217fddf", + "cancelOwnershipHandover()": "54d1f13d", "collaterals(address)": "eeb97d3b", - "getRoleAdmin(bytes32)": "248a9ca3", - "grantRole(bytes32,address)": "2f2ff15d", - "hasRole(bytes32,address)": "91d14854", + "completeOwnershipHandover(address)": "f04e283e", "mockUpdatePrice(address,uint256)": "c7331b01", + "owner()": "8da5cb5b", + "ownershipHandoverExpiresAt(address)": "fee81cf4", "pause()": "8456cb59", - "renounceRole(bytes32,address)": "36568abe", - "revokeRole(bytes32,address)": "d547741f", - "setPriceOracleContract(address,address)": "5ab68dd8", + "renounceOwnership()": "715018a6", + "requestOwnershipHandover()": "25692962", + "setCollateralOSM(address,address)": "425bddcf", "status()": "200d2ed2", - "supportsInterface(bytes4)": "01ffc9a7", + "transferOwnership(address)": "f2fde38b", "unpause()": "3f4ba83a", "updatePrice(address)": "96e85ced", "vault()": "fbfa77cf" }, - "rawMetadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vault\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Paused\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"Read\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"collaterals\",\"outputs\":[{\"internalType\":\"contract IMedian\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"mockUpdatePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"setPriceOracleContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"status\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"updatePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vault\",\"outputs\":[{\"internalType\":\"contract Vault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}]},\"events\":{\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/feed.sol\":\"Feed\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"appendCBOR\":false,\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"keccak256\":\"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80\",\"dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z\"]},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol\":{\"keccak256\":\"0x92aa1df62dc3d33f1656d63bede0923e0df0b706ad4137c8b10b0a8fe549fd92\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5c0f29195ad64cbe556da8e257dac8f05f78c53f90323c0d2accf8e6922d33a\",\"dweb:/ipfs/QmQ61TED8uaCZwcbh8KkgRSsCav7x7HbcGHwHts3U4DmUP\"]},\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229\",\"dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Permit.sol\":{\"keccak256\":\"0xc858a86a35701004d89022a5e98819aac46ccbdc4072fc9dd43928a676b1a2ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://18acebb483c512c0eaafcb437f09c839972c3f0d36f0201ea7baa2926b987dd2\",\"dweb:/ipfs/Qmd9bf2noaDSYDtf6FMSzKu7LPhuf91jsVNmcoCuTCuGic\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f5196ec75139918c6c7bb4251b36395e668f1fa6d206beba7e7520e74913940d\",\"dweb:/ipfs/QmSyqjksXxmm2mCG6qRd1yuwLykypkSVBbnBnGqJRcuJMi\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3036b3a83b7c48f96641f2a9002b9f2dcb6a5958dd670894ada21ae8229b3d0\",\"dweb:/ipfs/QmUNfSBdoVtjhETaUJCYcaC7pTMgbhht926tJ2uXJbiVd3\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7bd24e224f67f65bfadf85dc2929fa965456bb2415478bd0125471b5ce35245\",\"dweb:/ipfs/QmRaydGr8BTHs1kvaZfsNU69pKzUAGFrvABn1KiRSbE51y\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0c4e6cb30d3601e2f7af5af09e265508147cb275a8dcd99d6f7363645cc56867\",\"dweb:/ipfs/QmNgFkoXNWoUbAyw71rr1sKQ95Rj2GfvYiWg79xEYDn2NY\"]},\"lib/openzeppelin-contracts/contracts/utils/Nonces.sol\":{\"keccak256\":\"0x0082767004fca261c332e9ad100868327a863a88ef724e844857128845ab350f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://132dce9686a54e025eb5ba5d2e48208f847a1ec3e60a3e527766d7bf53fb7f9e\",\"dweb:/ipfs/QmXn1a2nUZMpu2z6S88UoTfMVtY2YNh86iGrzJDYmMkKeZ\"]},\"lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol\":{\"keccak256\":\"0x18a7171df639a934592915a520ecb97c5bbc9675a1105607aac8a94e72bf62c6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7478e1f13da69a2867ccd883001d836b75620362e743f196376d63ed0c422a1c\",\"dweb:/ipfs/QmWywcQ9TNfwtoqAxbn25d8C5VrV12PrPS9UjtGe6pL2BA\"]},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0x32ba59b4b7299237c8ba56319110989d7978a039faf754793064e967e5894418\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1ae50c8b562427df610cc4540c9bf104acca7ef8e2dcae567ae7e52272281e9c\",\"dweb:/ipfs/QmTHiadFCSJUPpRjNegc5SahmeU8bAoY8i9Aq6tVscbcKR\"]},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba80ba06c8e6be852847e4c5f4492cef801feb6558ae09ed705ff2e04ea8b13c\",\"dweb:/ipfs/QmXRJDv3xHLVQCVXg1ZvR35QS9sij5y9NDWYzMfUfAdTHF\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol\":{\"keccak256\":\"0x999f705a027ed6dc2d4e0df2cc4a509852c6bfd11de1c8161bf88832d0503fd0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0798def67258d9a3cc20b2b4da7ebf351a5cefe0abfdd665d2d81f8e32f89b21\",\"dweb:/ipfs/QmPEvJosnPfzHNjKvCv2D3891mA2Ww8eUwkqrxBjuYdHCt\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol\":{\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2ceacff44c0fdc81e48e0e0b1db87a2076d3c1fb497341de077bf1da9f6b406c\",\"dweb:/ipfs/QmRUo1muMRAewxrKQ7TkXUtknyRoR57AyEkoPpiuZQ8FzX\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]},\"lib/openzeppelin-contracts/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/currency.sol\":{\"keccak256\":\"0xcff030c4bad135b27acbe405aba19da1184c406c30fe6839b17ffcb8548938d4\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://8ca7791099d9f9851622964e2668477dbe07441c4d687621eaff725c7e25d48b\",\"dweb:/ipfs/QmdsMzD9aVqBym5bS4QnYnGtN8872iBck94NFeyfLirJ8Y\"]},\"src/feed.sol\":{\"keccak256\":\"0x4f52711e9baae968c601bb555cc0d7b543e9ef23f0e4fbe4326a107fe4ea219e\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://3294b7769494af228749e329eba72938778b80ee2fbc326157bf352553fa2061\",\"dweb:/ipfs/QmamsCniX6ZGbYvH7WLHMZLLd8K5obLH49ZZkWzAPEZn3R\"]},\"src/helpers/pausable.sol\":{\"keccak256\":\"0x8acce52dcd450c73da0f77d9539962826da23aca05aa7d0c7568614e89aed997\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://35e2f674e01c0d6107f31d1c32bb2780d442420b7d26636f560a4eb1007f4a8b\",\"dweb:/ipfs/QmWwVLUGiJq6Q3fK6Zhx4pc6kaqC73pkZ1ntfVA3QCHTpd\"]},\"src/interfaces/ICurrency.sol\":{\"keccak256\":\"0x3b7adace3df08c34906612358d435ffff3b90b5eec0eae34b6335cc8dcd0e7ed\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://370c80ec5636bd95342256d4116f703e633e6b0467ee530397e9b5cada37f998\",\"dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz\"]},\"src/interfaces/IFeed.sol\":{\"keccak256\":\"0xa8a771e3d7fb9b87a0cb96577456b781735031c93cb1c15b5dce0cee75a1ef74\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://804a3b25232dcb9ced1765853d937613c58f262fa76e4f7a58c3882fcaf31497\",\"dweb:/ipfs/QmVJLCUsik63CU9MEcso3Y2EVEb9u3XR26A2YdHTQPLFz2\"]},\"src/interfaces/IMedian.sol\":{\"keccak256\":\"0xf04d193d2bef5a6ae3ba23a259d1df94d3943d96f4e25dfbe3448fb49b098654\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://6a3426b3bb7b1d3f204f55b4f4ca6b1ab174f37cf32770b3e44e7a8f84cbdbf2\",\"dweb:/ipfs/QmUAbUfXX35it1PGFVi6KDVKhKzRbUhCbTxS12AjtCwR1n\"]},\"src/interfaces/IVault.sol\":{\"keccak256\":\"0x0b07e90c8de2bb57e62990839bdc52077d067d9e38db6fd2a8c684dbaf74f1b4\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://50a4e4b3745f623e7ea99800c1472b5d2fdbc3332ceecc1e4eb1cb2546d6b7b5\",\"dweb:/ipfs/Qma91VRTUw3bJzxanpErFXze7R3N9gHE9pnmWm3oFwcC6g\"]},\"src/vault.sol\":{\"keccak256\":\"0xb42eb135923431b43ccd78a05d5937dc7faf98717fabd0b3a50a030b15db7977\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://7a1cadec603bec32da036fc3f095454601105ed00b90def95fa0912ac2ea7d6d\",\"dweb:/ipfs/QmYLDswPYNPuG2RguyZbtD7cWumTZXhPmNfvwsJDr3vGyv\"]}},\"version\":1}", + "rawMetadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vault\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BadPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewOwnerIsZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoHandoverRequest\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Paused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"OwnershipHandoverCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"OwnershipHandoverRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"Read\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"cancelOwnershipHandover\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"collaterals\",\"outputs\":[{\"internalType\":\"contract IOSM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"completeOwnershipHandover\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"mockUpdatePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"result\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"ownershipHandoverExpiresAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requestOwnershipHandover\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"contract IOSM\",\"name\":\"oracle\",\"type\":\"address\"}],\"name\":\"setCollateralOSM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"status\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"collateral\",\"type\":\"address\"}],\"name\":\"updatePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vault\",\"outputs\":[{\"internalType\":\"contract Vault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"Cannot double-initialize.\"}],\"NewOwnerIsZeroAddress()\":[{\"details\":\"The `newOwner` cannot be the zero address.\"}],\"NoHandoverRequest()\":[{\"details\":\"The `pendingOwner` does not have a valid handover request.\"}],\"Unauthorized()\":[{\"details\":\"The caller is not authorized to call the function.\"}]},\"events\":{\"OwnershipHandoverCanceled(address)\":{\"details\":\"The ownership handover to `pendingOwner` has been canceled.\"},\"OwnershipHandoverRequested(address)\":{\"details\":\"An ownership handover to `pendingOwner` has been requested.\"},\"OwnershipTransferred(address,address)\":{\"details\":\"The ownership is transferred from `oldOwner` to `newOwner`. This event is intentionally kept the same as OpenZeppelin's Ownable to be compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173), despite it not being as lightweight as a single argument event.\"}},\"kind\":\"dev\",\"methods\":{\"cancelOwnershipHandover()\":{\"details\":\"Cancels the two-step ownership handover to the caller, if any.\"},\"completeOwnershipHandover(address)\":{\"details\":\"Allows the owner to complete the two-step ownership handover to `pendingOwner`. Reverts if there is no existing ownership handover requested by `pendingOwner`.\"},\"owner()\":{\"details\":\"Returns the owner of the contract.\"},\"ownershipHandoverExpiresAt(address)\":{\"details\":\"Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`.\"},\"renounceOwnership()\":{\"details\":\"Allows the owner to renounce their ownership.\"},\"requestOwnershipHandover()\":{\"details\":\"Request a two-step ownership handover to the caller. The request will automatically expire in 48 hours (172800 seconds) by default.\"},\"transferOwnership(address)\":{\"details\":\"Allows the owner to transfer the ownership to `newOwner`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/modules/feed.sol\":\"Feed\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"appendCBOR\":false,\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":descent-collective/oracle-module/=lib/oracle-module/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":oracle-module/=lib/oracle-module/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/solady/src/auth/Ownable.sol\":{\"keccak256\":\"0xc208cdd9de02bbf4b5edad18b88e23a2be7ff56d2287d5649329dc7cda64b9a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e8fba079cc7230c617f7493a2e97873f88e59a53a5018fcb2e2b6ac42d8aa5a3\",\"dweb:/ipfs/QmTXg8GSt8hsK2cZhbPFrund1mrwVdkLQmEPoQaFy4fhjs\"]},\"lib/solady/src/tokens/ERC20.sol\":{\"keccak256\":\"0xb4a3f9ba8a05107f7370de42cff57f3ad26dafd438712c11531a5892de2f59e0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f0a9ca06e3cf6dea1f9a4c5599581573b7d81cd64dc3afb582f325ccf5fdd6dc\",\"dweb:/ipfs/Qmb9r5dDceNF4W8S5u6i85RsNTgE5XG9HbTXkyS25ad3C6\"]},\"lib/solady/src/utils/SafeTransferLib.sol\":{\"keccak256\":\"0xf98506fade18a92e3d8d0a0ca0bdaeaa099d7620aac2a9d76b5f3d0bcd10691c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a3495c9d108bc69951a12c5ce9f05851cc921f0bb69e2505756e79f3ddab4e1a\",\"dweb:/ipfs/QmT3XwbmdbQCxw7iNcF7DoiypDd5vs2ETFWirXqmJ86Meg\"]},\"src/currency.sol\":{\"keccak256\":\"0xc266e97010a71e6ac755dce3e51a5a5844663b355e20ab40bf2020fd9308369b\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://d2660220b8a14c6d06351765dd7accec03e350e7fa9ae960c1505bea1e5d8d2d\",\"dweb:/ipfs/QmdYdPSnQC2nym38Fca4vRLKU4A78AQkgYasdg3TaRLGNY\"]},\"src/helpers/pausable.sol\":{\"keccak256\":\"0x8acce52dcd450c73da0f77d9539962826da23aca05aa7d0c7568614e89aed997\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://35e2f674e01c0d6107f31d1c32bb2780d442420b7d26636f560a4eb1007f4a8b\",\"dweb:/ipfs/QmWwVLUGiJq6Q3fK6Zhx4pc6kaqC73pkZ1ntfVA3QCHTpd\"]},\"src/interfaces/ICurrency.sol\":{\"keccak256\":\"0x3b7adace3df08c34906612358d435ffff3b90b5eec0eae34b6335cc8dcd0e7ed\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://370c80ec5636bd95342256d4116f703e633e6b0467ee530397e9b5cada37f998\",\"dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz\"]},\"src/interfaces/IFeed.sol\":{\"keccak256\":\"0xcb569d8eeab0afb5a2a42772d82b2e213821e7f919c097741b7b2d2440889546\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://01f1ccc183b9567e887e36b2d91c1b6be6dc17cddbfbc31a6768a365b5bebc22\",\"dweb:/ipfs/QmUy25qEjA5QGwtuFRy8fiu3Rcmgn26gpN1tbBUv6hM4gk\"]},\"src/interfaces/IOSM.sol\":{\"keccak256\":\"0x777f22651aedc7c9c528001012a4630bb9a22a6a3a3054dd5a520942aa875cd1\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://913b3fa3a86b89c313d8ffd7bebd78255df4203395b69b987cdecf112dd2567a\",\"dweb:/ipfs/Qma8Y6bWoa3nErqDtnD55NkgQZeWbNDpwjDpYAt37z1wiZ\"]},\"src/interfaces/IRate.sol\":{\"keccak256\":\"0x166dc423b74b60302197a27fb64557ee8ef6bafe416deb08fe7ecf94f0ede1d1\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://123ef521857e33b10b6f92b743831b26dd5100e57271353bf5c1882fc41c6a2e\",\"dweb:/ipfs/QmdK5y8SntLHAVoNRq6isddmNYunrpv1JxAxyEgRiHdAAj\"]},\"src/interfaces/IVault.sol\":{\"keccak256\":\"0x5684f59679e090ebe583d31fda6d8882469436e71670a4873151793675c7c6c4\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b265c21b1ff01a8c5cf9b1120feb6b5419a96a0e2a6d1ff4bdd89934c7869c9c\",\"dweb:/ipfs/QmdbCgiYE763cAHZ6nevhf7EzF8BzEkfwsbw4qWuxBkm8f\"]},\"src/mocks/ERC20Token.sol\":{\"keccak256\":\"0x62b878fb4dde1f455866e0c1290cc50714805d02c2848a4a9bb33c5dfbc8464d\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://7af3f5638d366abfbca3186813449259a33ed43e7c13ec983d389d73df1ad204\",\"dweb:/ipfs/QmeMdoEVTGqdcgSicTTcmycSQjToT7Sn5ZTgZdVFH9E6HA\"]},\"src/modules/feed.sol\":{\"keccak256\":\"0x1578828ae5678db9d1b329e65902702f4a1f55c251af4c26c3ef67d16c3f9e3b\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://8ec29513508ddd74340d57e24bbfd1ce679a6187ad4b9ec7e7546ad7fc333a44\",\"dweb:/ipfs/Qmc5e6Gwfxh9VExbizSDzm4yQpZ1Yoqtkr5xu2LrK8REjc\"]},\"src/vault.sol\":{\"keccak256\":\"0x377a877ac854164da4e6b2491e2dba44d75cb56216e6b2456fa6b815565ac5e5\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://a0a67817c649b3f65de4971c5346ea93b7432ac2f4e0013e5fb681e488aa1b58\",\"dweb:/ipfs/Qmbvcgn3AoTEahq9qgfuiL81zkZKLVQRbMhMeeqTMiiuKv\"]}},\"version\":1}", "metadata": { "compiler": { "version": "0.8.21+commit.d9974bed" @@ -418,140 +347,112 @@ { "inputs": [], "type": "error", - "name": "AccessControlBadConfirmation" + "name": "AlreadyInitialized" }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], + "inputs": [], + "type": "error", + "name": "BadPrice" + }, + { + "inputs": [], + "type": "error", + "name": "NewOwnerIsZeroAddress" + }, + { + "inputs": [], + "type": "error", + "name": "NoHandoverRequest" + }, + { + "inputs": [], "type": "error", - "name": "AccessControlUnauthorizedAccount" + "name": "NotPaused" }, { "inputs": [], "type": "error", "name": "Paused" }, + { + "inputs": [], + "type": "error", + "name": "Unauthorized" + }, { "inputs": [ { "internalType": "address", - "name": "collateral", + "name": "pendingOwner", "type": "address", - "indexed": false - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256", - "indexed": false + "indexed": true } ], "type": "event", - "name": "Read", + "name": "OwnershipHandoverCanceled", "anonymous": false }, { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32", - "indexed": true - }, - { - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32", - "indexed": true - }, - { - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32", + "internalType": "address", + "name": "pendingOwner", + "type": "address", "indexed": true } ], "type": "event", - "name": "RoleAdminChanged", + "name": "OwnershipHandoverRequested", "anonymous": false }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32", - "indexed": true - }, { "internalType": "address", - "name": "account", + "name": "oldOwner", "type": "address", "indexed": true }, { "internalType": "address", - "name": "sender", + "name": "newOwner", "type": "address", "indexed": true } ], "type": "event", - "name": "RoleGranted", + "name": "OwnershipTransferred", "anonymous": false }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32", - "indexed": true - }, { "internalType": "address", - "name": "account", + "name": "collateral", "type": "address", - "indexed": true + "indexed": false }, { - "internalType": "address", - "name": "sender", - "type": "address", - "indexed": true + "internalType": "uint256", + "name": "price", + "type": "uint256", + "indexed": false } ], "type": "event", - "name": "RoleRevoked", + "name": "Read", "anonymous": false }, { "inputs": [], - "stateMutability": "view", + "stateMutability": "payable", "type": "function", - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ] + "name": "cancelOwnershipHandover" }, { "inputs": [ { - "internalType": "address", + "internalType": "contract ERC20Token", "name": "", "type": "address" } @@ -561,7 +462,7 @@ "name": "collaterals", "outputs": [ { - "internalType": "contract IMedian", + "internalType": "contract IOSM", "name": "", "type": "address" } @@ -570,60 +471,42 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "address", + "name": "pendingOwner", + "type": "address" } ], - "stateMutability": "view", + "stateMutability": "payable", "type": "function", - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ] + "name": "completeOwnershipHandover" }, { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "contract ERC20Token", + "name": "collateral", + "type": "address" }, { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "price", + "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function", - "name": "grantRole" + "name": "mockUpdatePrice" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], + "inputs": [], "stateMutability": "view", "type": "function", - "name": "hasRole", + "name": "owner", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "result", + "type": "address" } ] }, @@ -631,18 +514,20 @@ "inputs": [ { "internalType": "address", - "name": "collateral", + "name": "pendingOwner", "type": "address" - }, + } + ], + "stateMutability": "view", + "type": "function", + "name": "ownershipHandoverExpiresAt", + "outputs": [ { "internalType": "uint256", - "name": "price", + "name": "result", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "mockUpdatePrice" + ] }, { "inputs": [], @@ -651,55 +536,33 @@ "name": "pause" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "stateMutability": "nonpayable", + "inputs": [], + "stateMutability": "payable", "type": "function", - "name": "renounceRole" + "name": "renounceOwnership" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "stateMutability": "nonpayable", + "inputs": [], + "stateMutability": "payable", "type": "function", - "name": "revokeRole" + "name": "requestOwnershipHandover" }, { "inputs": [ { - "internalType": "address", - "name": "oracle", + "internalType": "contract ERC20Token", + "name": "collateral", "type": "address" }, { - "internalType": "address", - "name": "collateral", + "internalType": "contract IOSM", + "name": "oracle", "type": "address" } ], "stateMutability": "nonpayable", "type": "function", - "name": "setPriceOracleContract" + "name": "setCollateralOSM" }, { "inputs": [], @@ -717,21 +580,14 @@ { "inputs": [ { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "stateMutability": "view", + "stateMutability": "payable", "type": "function", - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ] + "name": "transferOwnership" }, { "inputs": [], @@ -742,7 +598,7 @@ { "inputs": [ { - "internalType": "address", + "internalType": "contract ERC20Token", "name": "collateral", "type": "address" } @@ -768,23 +624,26 @@ "devdoc": { "kind": "dev", "methods": { - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + "cancelOwnershipHandover()": { + "details": "Cancels the two-step ownership handover to the caller, if any." }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." + "completeOwnershipHandover(address)": { + "details": "Allows the owner to complete the two-step ownership handover to `pendingOwner`. Reverts if there is no existing ownership handover requested by `pendingOwner`." }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." + "owner()": { + "details": "Returns the owner of the contract." }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event." + "ownershipHandoverExpiresAt(address)": { + "details": "Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`." }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." + "renounceOwnership()": { + "details": "Allows the owner to renounce their ownership." }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." + "requestOwnershipHandover()": { + "details": "Request a two-step ownership handover to the caller. The request will automatically expire in 48 hours (172800 seconds) by default." + }, + "transferOwnership(address)": { + "details": "Allows the owner to transfer the ownership to `newOwner`." } }, "version": 1 @@ -798,10 +657,13 @@ "settings": { "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", + "descent-collective/oracle-module/=lib/oracle-module/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", - "openzeppelin-contracts/=lib/openzeppelin-contracts/" + "openzeppelin-contracts/=lib/openzeppelin-contracts/", + "oracle-module/=lib/oracle-module/", + "solady/=lib/solady/src/" ], "optimizer": { "enabled": true, @@ -812,208 +674,40 @@ "appendCBOR": false }, "compilationTarget": { - "src/feed.sol": "Feed" + "src/modules/feed.sol": "Feed" }, "libraries": {} }, "sources": { - "lib/openzeppelin-contracts/contracts/access/AccessControl.sol": { - "keccak256": "0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308", - "urls": [ - "bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80", - "dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/access/IAccessControl.sol": { - "keccak256": "0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41", - "urls": [ - "bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26", - "dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol": { - "keccak256": "0x92aa1df62dc3d33f1656d63bede0923e0df0b706ad4137c8b10b0a8fe549fd92", - "urls": [ - "bzz-raw://c5c0f29195ad64cbe556da8e257dac8f05f78c53f90323c0d2accf8e6922d33a", - "dweb:/ipfs/QmQ61TED8uaCZwcbh8KkgRSsCav7x7HbcGHwHts3U4DmUP" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol": { - "keccak256": "0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7", - "urls": [ - "bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f", - "dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol": { - "keccak256": "0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80", - "urls": [ - "bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229", - "dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol": { - "keccak256": "0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70", - "urls": [ - "bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c", - "dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Permit.sol": { - "keccak256": "0xc858a86a35701004d89022a5e98819aac46ccbdc4072fc9dd43928a676b1a2ee", - "urls": [ - "bzz-raw://18acebb483c512c0eaafcb437f09c839972c3f0d36f0201ea7baa2926b987dd2", - "dweb:/ipfs/Qmd9bf2noaDSYDtf6FMSzKu7LPhuf91jsVNmcoCuTCuGic" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "keccak256": "0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2", - "urls": [ - "bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850", - "dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol": { - "keccak256": "0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff", - "urls": [ - "bzz-raw://f5196ec75139918c6c7bb4251b36395e668f1fa6d206beba7e7520e74913940d", - "dweb:/ipfs/QmSyqjksXxmm2mCG6qRd1yuwLykypkSVBbnBnGqJRcuJMi" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol": { - "keccak256": "0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386", - "urls": [ - "bzz-raw://b3036b3a83b7c48f96641f2a9002b9f2dcb6a5958dd670894ada21ae8229b3d0", - "dweb:/ipfs/QmUNfSBdoVtjhETaUJCYcaC7pTMgbhht926tJ2uXJbiVd3" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/Address.sol": { - "keccak256": "0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721", - "urls": [ - "bzz-raw://b7bd24e224f67f65bfadf85dc2929fa965456bb2415478bd0125471b5ce35245", - "dweb:/ipfs/QmRaydGr8BTHs1kvaZfsNU69pKzUAGFrvABn1KiRSbE51y" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/Context.sol": { - "keccak256": "0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3", - "urls": [ - "bzz-raw://0c4e6cb30d3601e2f7af5af09e265508147cb275a8dcd99d6f7363645cc56867", - "dweb:/ipfs/QmNgFkoXNWoUbAyw71rr1sKQ95Rj2GfvYiWg79xEYDn2NY" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/Nonces.sol": { - "keccak256": "0x0082767004fca261c332e9ad100868327a863a88ef724e844857128845ab350f", - "urls": [ - "bzz-raw://132dce9686a54e025eb5ba5d2e48208f847a1ec3e60a3e527766d7bf53fb7f9e", - "dweb:/ipfs/QmXn1a2nUZMpu2z6S88UoTfMVtY2YNh86iGrzJDYmMkKeZ" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol": { - "keccak256": "0x18a7171df639a934592915a520ecb97c5bbc9675a1105607aac8a94e72bf62c6", - "urls": [ - "bzz-raw://7478e1f13da69a2867ccd883001d836b75620362e743f196376d63ed0c422a1c", - "dweb:/ipfs/QmWywcQ9TNfwtoqAxbn25d8C5VrV12PrPS9UjtGe6pL2BA" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol": { - "keccak256": "0x32ba59b4b7299237c8ba56319110989d7978a039faf754793064e967e5894418", - "urls": [ - "bzz-raw://1ae50c8b562427df610cc4540c9bf104acca7ef8e2dcae567ae7e52272281e9c", - "dweb:/ipfs/QmTHiadFCSJUPpRjNegc5SahmeU8bAoY8i9Aq6tVscbcKR" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/Strings.sol": { - "keccak256": "0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792", - "urls": [ - "bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453", - "dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol": { - "keccak256": "0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf", - "urls": [ - "bzz-raw://ba80ba06c8e6be852847e4c5f4492cef801feb6558ae09ed705ff2e04ea8b13c", - "dweb:/ipfs/QmXRJDv3xHLVQCVXg1ZvR35QS9sij5y9NDWYzMfUfAdTHF" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol": { - "keccak256": "0x999f705a027ed6dc2d4e0df2cc4a509852c6bfd11de1c8161bf88832d0503fd0", - "urls": [ - "bzz-raw://0798def67258d9a3cc20b2b4da7ebf351a5cefe0abfdd665d2d81f8e32f89b21", - "dweb:/ipfs/QmPEvJosnPfzHNjKvCv2D3891mA2Ww8eUwkqrxBjuYdHCt" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol": { - "keccak256": "0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435", - "urls": [ - "bzz-raw://2ceacff44c0fdc81e48e0e0b1db87a2076d3c1fb497341de077bf1da9f6b406c", - "dweb:/ipfs/QmRUo1muMRAewxrKQ7TkXUtknyRoR57AyEkoPpiuZQ8FzX" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol": { - "keccak256": "0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133", - "urls": [ - "bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8", - "dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol": { - "keccak256": "0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b", + "lib/solady/src/auth/Ownable.sol": { + "keccak256": "0xc208cdd9de02bbf4b5edad18b88e23a2be7ff56d2287d5649329dc7cda64b9a3", "urls": [ - "bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df", - "dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL" + "bzz-raw://e8fba079cc7230c617f7493a2e97873f88e59a53a5018fcb2e2b6ac42d8aa5a3", + "dweb:/ipfs/QmTXg8GSt8hsK2cZhbPFrund1mrwVdkLQmEPoQaFy4fhjs" ], "license": "MIT" }, - "lib/openzeppelin-contracts/contracts/utils/math/Math.sol": { - "keccak256": "0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d", + "lib/solady/src/tokens/ERC20.sol": { + "keccak256": "0xb4a3f9ba8a05107f7370de42cff57f3ad26dafd438712c11531a5892de2f59e0", "urls": [ - "bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875", - "dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L" + "bzz-raw://f0a9ca06e3cf6dea1f9a4c5599581573b7d81cd64dc3afb582f325ccf5fdd6dc", + "dweb:/ipfs/Qmb9r5dDceNF4W8S5u6i85RsNTgE5XG9HbTXkyS25ad3C6" ], "license": "MIT" }, - "lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol": { - "keccak256": "0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72", + "lib/solady/src/utils/SafeTransferLib.sol": { + "keccak256": "0xf98506fade18a92e3d8d0a0ca0bdaeaa099d7620aac2a9d76b5f3d0bcd10691c", "urls": [ - "bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc", - "dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT" + "bzz-raw://a3495c9d108bc69951a12c5ce9f05851cc921f0bb69e2505756e79f3ddab4e1a", + "dweb:/ipfs/QmT3XwbmdbQCxw7iNcF7DoiypDd5vs2ETFWirXqmJ86Meg" ], "license": "MIT" }, "src/currency.sol": { - "keccak256": "0xcff030c4bad135b27acbe405aba19da1184c406c30fe6839b17ffcb8548938d4", - "urls": [ - "bzz-raw://8ca7791099d9f9851622964e2668477dbe07441c4d687621eaff725c7e25d48b", - "dweb:/ipfs/QmdsMzD9aVqBym5bS4QnYnGtN8872iBck94NFeyfLirJ8Y" - ], - "license": "GPL-3.0" - }, - "src/feed.sol": { - "keccak256": "0x4f52711e9baae968c601bb555cc0d7b543e9ef23f0e4fbe4326a107fe4ea219e", + "keccak256": "0xc266e97010a71e6ac755dce3e51a5a5844663b355e20ab40bf2020fd9308369b", "urls": [ - "bzz-raw://3294b7769494af228749e329eba72938778b80ee2fbc326157bf352553fa2061", - "dweb:/ipfs/QmamsCniX6ZGbYvH7WLHMZLLd8K5obLH49ZZkWzAPEZn3R" + "bzz-raw://d2660220b8a14c6d06351765dd7accec03e350e7fa9ae960c1505bea1e5d8d2d", + "dweb:/ipfs/QmdYdPSnQC2nym38Fca4vRLKU4A78AQkgYasdg3TaRLGNY" ], "license": "GPL-3.0" }, @@ -1034,34 +728,58 @@ "license": "GPL-3.0" }, "src/interfaces/IFeed.sol": { - "keccak256": "0xa8a771e3d7fb9b87a0cb96577456b781735031c93cb1c15b5dce0cee75a1ef74", + "keccak256": "0xcb569d8eeab0afb5a2a42772d82b2e213821e7f919c097741b7b2d2440889546", + "urls": [ + "bzz-raw://01f1ccc183b9567e887e36b2d91c1b6be6dc17cddbfbc31a6768a365b5bebc22", + "dweb:/ipfs/QmUy25qEjA5QGwtuFRy8fiu3Rcmgn26gpN1tbBUv6hM4gk" + ], + "license": "GPL-3.0" + }, + "src/interfaces/IOSM.sol": { + "keccak256": "0x777f22651aedc7c9c528001012a4630bb9a22a6a3a3054dd5a520942aa875cd1", "urls": [ - "bzz-raw://804a3b25232dcb9ced1765853d937613c58f262fa76e4f7a58c3882fcaf31497", - "dweb:/ipfs/QmVJLCUsik63CU9MEcso3Y2EVEb9u3XR26A2YdHTQPLFz2" + "bzz-raw://913b3fa3a86b89c313d8ffd7bebd78255df4203395b69b987cdecf112dd2567a", + "dweb:/ipfs/Qma8Y6bWoa3nErqDtnD55NkgQZeWbNDpwjDpYAt37z1wiZ" ], "license": "GPL-3.0" }, - "src/interfaces/IMedian.sol": { - "keccak256": "0xf04d193d2bef5a6ae3ba23a259d1df94d3943d96f4e25dfbe3448fb49b098654", + "src/interfaces/IRate.sol": { + "keccak256": "0x166dc423b74b60302197a27fb64557ee8ef6bafe416deb08fe7ecf94f0ede1d1", "urls": [ - "bzz-raw://6a3426b3bb7b1d3f204f55b4f4ca6b1ab174f37cf32770b3e44e7a8f84cbdbf2", - "dweb:/ipfs/QmUAbUfXX35it1PGFVi6KDVKhKzRbUhCbTxS12AjtCwR1n" + "bzz-raw://123ef521857e33b10b6f92b743831b26dd5100e57271353bf5c1882fc41c6a2e", + "dweb:/ipfs/QmdK5y8SntLHAVoNRq6isddmNYunrpv1JxAxyEgRiHdAAj" ], "license": "GPL-3.0" }, "src/interfaces/IVault.sol": { - "keccak256": "0x0b07e90c8de2bb57e62990839bdc52077d067d9e38db6fd2a8c684dbaf74f1b4", + "keccak256": "0x5684f59679e090ebe583d31fda6d8882469436e71670a4873151793675c7c6c4", + "urls": [ + "bzz-raw://b265c21b1ff01a8c5cf9b1120feb6b5419a96a0e2a6d1ff4bdd89934c7869c9c", + "dweb:/ipfs/QmdbCgiYE763cAHZ6nevhf7EzF8BzEkfwsbw4qWuxBkm8f" + ], + "license": "GPL-3.0" + }, + "src/mocks/ERC20Token.sol": { + "keccak256": "0x62b878fb4dde1f455866e0c1290cc50714805d02c2848a4a9bb33c5dfbc8464d", + "urls": [ + "bzz-raw://7af3f5638d366abfbca3186813449259a33ed43e7c13ec983d389d73df1ad204", + "dweb:/ipfs/QmeMdoEVTGqdcgSicTTcmycSQjToT7Sn5ZTgZdVFH9E6HA" + ], + "license": "GPL-3.0" + }, + "src/modules/feed.sol": { + "keccak256": "0x1578828ae5678db9d1b329e65902702f4a1f55c251af4c26c3ef67d16c3f9e3b", "urls": [ - "bzz-raw://50a4e4b3745f623e7ea99800c1472b5d2fdbc3332ceecc1e4eb1cb2546d6b7b5", - "dweb:/ipfs/Qma91VRTUw3bJzxanpErFXze7R3N9gHE9pnmWm3oFwcC6g" + "bzz-raw://8ec29513508ddd74340d57e24bbfd1ce679a6187ad4b9ec7e7546ad7fc333a44", + "dweb:/ipfs/Qmc5e6Gwfxh9VExbizSDzm4yQpZ1Yoqtkr5xu2LrK8REjc" ], "license": "GPL-3.0" }, "src/vault.sol": { - "keccak256": "0xb42eb135923431b43ccd78a05d5937dc7faf98717fabd0b3a50a030b15db7977", + "keccak256": "0x377a877ac854164da4e6b2491e2dba44d75cb56216e6b2456fa6b815565ac5e5", "urls": [ - "bzz-raw://7a1cadec603bec32da036fc3f095454601105ed00b90def95fa0912ac2ea7d6d", - "dweb:/ipfs/QmYLDswPYNPuG2RguyZbtD7cWumTZXhPmNfvwsJDr3vGyv" + "bzz-raw://a0a67817c649b3f65de4971c5346ea93b7432ac2f4e0013e5fb681e488aa1b58", + "dweb:/ipfs/Qmbvcgn3AoTEahq9qgfuiL81zkZKLVQRbMhMeeqTMiiuKv" ], "license": "GPL-3.0" } @@ -1069,44 +787,72 @@ "version": 1 }, "ast": { - "absolutePath": "src/feed.sol", - "id": 48712, + "absolutePath": "src/modules/feed.sol", + "id": 46592, "exportedSymbols": { - "AccessControl": [43683], - "Feed": [48711], - "IFeed": [48820], - "IMedian": [48851], - "Vault": [50616] + "ERC20Token": [46438], + "Feed": [46591], + "IFeed": [46158], + "IOSM": [46166], + "Ownable": [44381], + "Pausable": [46103], + "Vault": [48280] }, "nodeType": "SourceUnit", - "src": "36:1737:45", + "src": "36:1443:36", "nodes": [ { - "id": 48551, + "id": 46440, "nodeType": "PragmaDirective", - "src": "36:23:45", + "src": "36:23:36", "nodes": [], "literals": ["solidity", "0.8", ".21"] }, { - "id": 48553, + "id": 46442, + "nodeType": "ImportDirective", + "src": "108:48:36", + "nodes": [], + "absolutePath": "lib/solady/src/auth/Ownable.sol", + "file": "solady/auth/Ownable.sol", + "nameLocation": "-1:-1:-1", + "scope": 46592, + "sourceUnit": 44382, + "symbolAliases": [ + { + "foreign": { + "id": 46441, + "name": "Ownable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44381, + "src": "116:7:36", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 46444, "nodeType": "ImportDirective", - "src": "108:79:45", + "src": "157:44:36", "nodes": [], - "absolutePath": "lib/openzeppelin-contracts/contracts/access/AccessControl.sol", - "file": "@openzeppelin/contracts/access/AccessControl.sol", + "absolutePath": "src/interfaces/IOSM.sol", + "file": "../interfaces/IOSM.sol", "nameLocation": "-1:-1:-1", - "scope": 48712, - "sourceUnit": 43684, + "scope": 46592, + "sourceUnit": 46167, "symbolAliases": [ { "foreign": { - "id": 48552, - "name": "AccessControl", + "id": 46443, + "name": "IOSM", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 43683, - "src": "116:13:45", + "referencedDeclaration": 46166, + "src": "165:4:36", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -1115,24 +861,24 @@ "unitAlias": "" }, { - "id": 48555, + "id": 46446, "nodeType": "ImportDirective", - "src": "188:49:45", + "src": "202:46:36", "nodes": [], - "absolutePath": "src/interfaces/IMedian.sol", - "file": "./interfaces/IMedian.sol", + "absolutePath": "src/interfaces/IFeed.sol", + "file": "../interfaces/IFeed.sol", "nameLocation": "-1:-1:-1", - "scope": 48712, - "sourceUnit": 48852, + "scope": 46592, + "sourceUnit": 46159, "symbolAliases": [ { "foreign": { - "id": 48554, - "name": "IMedian", + "id": 46445, + "name": "IFeed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48851, - "src": "196:7:45", + "referencedDeclaration": 46158, + "src": "210:5:36", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -1141,24 +887,36 @@ "unitAlias": "" }, { - "id": 48557, + "id": 46449, "nodeType": "ImportDirective", - "src": "238:34:45", + "src": "249:47:36", "nodes": [], "absolutePath": "src/vault.sol", - "file": "./vault.sol", + "file": "../vault.sol", "nameLocation": "-1:-1:-1", - "scope": 48712, - "sourceUnit": 50617, + "scope": 46592, + "sourceUnit": 48281, "symbolAliases": [ { "foreign": { - "id": 48556, + "id": 46447, "name": "Vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50616, - "src": "246:5:45", + "referencedDeclaration": 48280, + "src": "257:5:36", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 46448, + "name": "ERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46438, + "src": "264:10:36", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -1167,24 +925,24 @@ "unitAlias": "" }, { - "id": 48559, + "id": 46451, "nodeType": "ImportDirective", - "src": "273:45:45", + "src": "297:49:36", "nodes": [], - "absolutePath": "src/interfaces/IFeed.sol", - "file": "./interfaces/IFeed.sol", + "absolutePath": "src/helpers/pausable.sol", + "file": "../helpers/pausable.sol", "nameLocation": "-1:-1:-1", - "scope": 48712, - "sourceUnit": 48821, + "scope": 46592, + "sourceUnit": 46104, "symbolAliases": [ { "foreign": { - "id": 48558, - "name": "IFeed", + "id": 46450, + "name": "Pausable", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48820, - "src": "281:5:45", + "referencedDeclaration": 46103, + "src": "305:8:36", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -1193,469 +951,255 @@ "unitAlias": "" }, { - "id": 48711, + "id": 46591, "nodeType": "ContractDefinition", - "src": "320:1452:45", + "src": "348:1130:36", "nodes": [ { - "id": 48566, - "nodeType": "VariableDeclaration", - "src": "364:34:45", - "nodes": [], - "constant": true, - "mutability": "constant", - "name": "FALSE", - "nameLocation": "389:5:45", - "scope": 48711, - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 48564, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "364:7:45", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "31", - "id": 48565, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "397:1:45", - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "visibility": "private" - }, - { - "id": 48569, - "nodeType": "VariableDeclaration", - "src": "404:33:45", - "nodes": [], - "constant": true, - "mutability": "constant", - "name": "TRUE", - "nameLocation": "429:4:45", - "scope": 48711, - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 48567, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "404:7:45", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "hexValue": "32", - "id": 48568, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "436:1:45", - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "visibility": "private" - }, - { - "id": 48572, + "id": 46460, "nodeType": "VariableDeclaration", - "src": "444:18:45", + "src": "396:18:36", "nodes": [], "constant": false, "functionSelector": "fbfa77cf", "mutability": "mutable", "name": "vault", - "nameLocation": "457:5:45", - "scope": 48711, + "nameLocation": "409:5:36", + "scope": 46591, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" }, "typeName": { - "id": 48571, + "id": 46459, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 48570, + "id": 46458, "name": "Vault", - "nameLocations": ["444:5:45"], + "nameLocations": ["396:5:36"], "nodeType": "IdentifierPath", - "referencedDeclaration": 50616, - "src": "444:5:45" + "referencedDeclaration": 48280, + "src": "396:5:36" }, - "referencedDeclaration": 50616, - "src": "444:5:45", + "referencedDeclaration": 48280, + "src": "396:5:36", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } }, "visibility": "public" }, { - "id": 48574, - "nodeType": "VariableDeclaration", - "src": "468:21:45", - "nodes": [], - "constant": false, - "functionSelector": "200d2ed2", - "mutability": "mutable", - "name": "status", - "nameLocation": "483:6:45", - "scope": 48711, - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 48573, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "468:7:45", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "id": 48579, + "id": 46466, "nodeType": "VariableDeclaration", - "src": "513:46:45", + "src": "421:46:36", "nodes": [], "constant": false, "functionSelector": "eeb97d3b", "mutability": "mutable", "name": "collaterals", - "nameLocation": "548:11:45", - "scope": 48711, + "nameLocation": "456:11:36", + "scope": 46591, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_contract$_IMedian_$48851_$", - "typeString": "mapping(address => contract IMedian)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_contract$_IOSM_$46166_$", + "typeString": "mapping(contract ERC20Token => contract IOSM)" }, "typeName": { - "id": 48578, + "id": 46465, "keyName": "", "keyNameLocation": "-1:-1:-1", "keyType": { - "id": 48575, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "521:7:45", + "id": 46462, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 46461, + "name": "ERC20Token", + "nameLocations": ["429:10:36"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46438, + "src": "429:10:36" + }, + "referencedDeclaration": 46438, + "src": "429:10:36", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "nodeType": "Mapping", - "src": "513:27:45", + "src": "421:27:36", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_contract$_IMedian_$48851_$", - "typeString": "mapping(address => contract IMedian)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_contract$_IOSM_$46166_$", + "typeString": "mapping(contract ERC20Token => contract IOSM)" }, "valueName": "", "valueNameLocation": "-1:-1:-1", "valueType": { - "id": 48577, + "id": 46464, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 48576, - "name": "IMedian", - "nameLocations": ["532:7:45"], + "id": 46463, + "name": "IOSM", + "nameLocations": ["443:4:36"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48851, - "src": "532:7:45" + "referencedDeclaration": 46166, + "src": "443:4:36" }, - "referencedDeclaration": 48851, - "src": "532:7:45", + "referencedDeclaration": 46166, + "src": "443:4:36", "typeDescriptions": { - "typeIdentifier": "t_contract$_IMedian_$48851", - "typeString": "contract IMedian" + "typeIdentifier": "t_contract$_IOSM_$46166", + "typeString": "contract IOSM" } } }, "visibility": "public" }, { - "id": 48590, - "nodeType": "ModifierDefinition", - "src": "566:89:45", + "id": 46479, + "nodeType": "FunctionDefinition", + "src": "474:88:36", "nodes": [], "body": { - "id": 48589, + "id": 46478, "nodeType": "Block", - "src": "591:64:45", + "src": "532:30:36", "nodes": [], "statements": [ { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 48583, + "expression": { + "id": 46476, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftExpression": { - "id": 48581, + "leftHandSide": { + "id": 46474, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48574, - "src": "605:6:45", + "referencedDeclaration": 46056, + "src": "542:6:36", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 48582, - "name": "FALSE", + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 46475, + "name": "TRUE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48566, - "src": "615:5:45", + "referencedDeclaration": 46054, + "src": "551:4:36", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "605:15:45", + "src": "542:13:36", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 48587, - "nodeType": "IfStatement", - "src": "601:36:45", - "trueBody": { - "errorCall": { - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 48584, - "name": "Paused", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48801, - "src": "629:6:45", - "typeDescriptions": { - "typeIdentifier": "t_function_error_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 48585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "629:8:45", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 48586, - "nodeType": "RevertStatement", - "src": "622:15:45" - } - }, - { - "id": 48588, - "nodeType": "PlaceholderStatement", - "src": "647:1:45" - } - ] - }, - "name": "whenNotPaused", - "nameLocation": "575:13:45", - "parameters": { - "id": 48580, - "nodeType": "ParameterList", - "parameters": [], - "src": "588:2:45" - }, - "virtual": false, - "visibility": "internal" - }, - { - "id": 48601, - "nodeType": "FunctionDefinition", - "src": "661:87:45", - "nodes": [], - "body": { - "id": 48600, - "nodeType": "Block", - "src": "718:30:45", - "nodes": [], - "statements": [ - { - "expression": { - "id": 48598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 48596, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48574, - "src": "728:6:45", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 48597, - "name": "TRUE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48569, - "src": "737:4:45", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "728:13:45", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 48599, - "nodeType": "ExpressionStatement", - "src": "728:13:45" + "id": 46477, + "nodeType": "ExpressionStatement", + "src": "542:13:36" } ] }, + "baseFunctions": [46094], "functionSelector": "3f4ba83a", "implemented": true, "kind": "function", "modifiers": [ { - "arguments": [ - { - "id": 48593, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "698:18:45", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 48594, + "id": 46470, "kind": "modifierInvocation", "modifierName": { - "id": 48592, - "name": "onlyRole", - "nameLocations": ["689:8:45"], + "id": 46469, + "name": "whenPaused", + "nameLocations": ["511:10:36"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "689:8:45" + "referencedDeclaration": 46086, + "src": "511:10:36" }, "nodeType": "ModifierInvocation", - "src": "689:28:45" + "src": "511:10:36" + }, + { + "id": 46472, + "kind": "modifierInvocation", + "modifierName": { + "id": 46471, + "name": "onlyOwner", + "nameLocations": ["522:9:36"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 44380, + "src": "522:9:36" + }, + "nodeType": "ModifierInvocation", + "src": "522:9:36" } ], "name": "unpause", - "nameLocation": "670:7:45", + "nameLocation": "483:7:36", + "overrides": { + "id": 46468, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "502:8:36" + }, "parameters": { - "id": 48591, + "id": 46467, "nodeType": "ParameterList", "parameters": [], - "src": "677:2:45" + "src": "490:2:36" }, "returnParameters": { - "id": 48595, + "id": 46473, "nodeType": "ParameterList", "parameters": [], - "src": "718:0:45" + "src": "532:0:36" }, - "scope": 48711, + "scope": 46591, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 48612, + "id": 46492, "nodeType": "FunctionDefinition", - "src": "754:86:45", + "src": "568:90:36", "nodes": [], "body": { - "id": 48611, + "id": 46491, "nodeType": "Block", - "src": "809:31:45", + "src": "627:31:36", "nodes": [], "statements": [ { "expression": { - "id": 48609, + "id": 46489, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 48607, + "id": 46487, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48574, - "src": "819:6:45", + "referencedDeclaration": 46056, + "src": "637:6:36", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1664,129 +1208,124 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 48608, + "id": 46488, "name": "FALSE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48566, - "src": "828:5:45", + "referencedDeclaration": 46051, + "src": "646:5:36", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "819:14:45", + "src": "637:14:36", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 48610, + "id": 46490, "nodeType": "ExpressionStatement", - "src": "819:14:45" + "src": "637:14:36" } ] }, + "baseFunctions": [46102], "functionSelector": "8456cb59", "implemented": true, "kind": "function", "modifiers": [ { - "arguments": [ - { - "id": 48604, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "789:18:45", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 48605, + "id": 46483, "kind": "modifierInvocation", "modifierName": { - "id": 48603, - "name": "onlyRole", - "nameLocations": ["780:8:45"], + "id": 46482, + "name": "whenNotPaused", + "nameLocations": ["603:13:36"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "780:8:45" + "referencedDeclaration": 46075, + "src": "603:13:36" }, "nodeType": "ModifierInvocation", - "src": "780:28:45" + "src": "603:13:36" + }, + { + "id": 46485, + "kind": "modifierInvocation", + "modifierName": { + "id": 46484, + "name": "onlyOwner", + "nameLocations": ["617:9:36"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 44380, + "src": "617:9:36" + }, + "nodeType": "ModifierInvocation", + "src": "617:9:36" } ], "name": "pause", - "nameLocation": "763:5:45", + "nameLocation": "577:5:36", + "overrides": { + "id": 46481, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "594:8:36" + }, "parameters": { - "id": 48602, + "id": 46480, "nodeType": "ParameterList", "parameters": [], - "src": "768:2:45" + "src": "582:2:36" }, "returnParameters": { - "id": 48606, + "id": 46486, "nodeType": "ParameterList", "parameters": [], - "src": "809:0:45" + "src": "627:0:36" }, - "scope": 48711, + "scope": 46591, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 48633, + "id": 46512, "nodeType": "FunctionDefinition", - "src": "846:132:45", + "src": "664:118:36", "nodes": [], "body": { - "id": 48632, + "id": 46511, "nodeType": "Block", - "src": "872:106:45", + "src": "690:92:36", "nodes": [], "statements": [ { "expression": { "arguments": [ - { - "id": 48619, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "893:18:45", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, { "expression": { - "id": 48620, + "id": 46499, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "913:3:45", + "src": "717:3:36", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 48621, + "id": 46500, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "917:6:45", + "memberLocation": "721:6:36", "memberName": "sender", "nodeType": "MemberAccess", - "src": "913:10:45", + "src": "717:10:36", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1795,27 +1334,23 @@ ], "expression": { "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, { "typeIdentifier": "t_address", "typeString": "address" } ], - "id": 48618, - "name": "_grantRole", + "id": 46498, + "name": "_initializeOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 43644, - "src": "882:10:45", + "referencedDeclaration": 44260, + "src": "700:16:36", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) returns (bool)" + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" } }, - "id": 48622, + "id": 46501, "isConstant": false, "isLValue": false, "isPure": false, @@ -1824,74 +1359,74 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "882:42:45", + "src": "700:28:36", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 48623, + "id": 46502, "nodeType": "ExpressionStatement", - "src": "882:42:45" + "src": "700:28:36" }, { "expression": { - "id": 48626, + "id": 46505, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 48624, + "id": 46503, "name": "vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48572, - "src": "934:5:45", + "referencedDeclaration": 46460, + "src": "738:5:36", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 48625, + "id": 46504, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48615, - "src": "942:6:45", + "referencedDeclaration": 46495, + "src": "746:6:36", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } }, - "src": "934:14:45", + "src": "738:14:36", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } }, - "id": 48627, + "id": 46506, "nodeType": "ExpressionStatement", - "src": "934:14:45" + "src": "738:14:36" }, { "expression": { - "id": 48630, + "id": 46509, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 48628, + "id": 46507, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48574, - "src": "958:6:45", + "referencedDeclaration": 46056, + "src": "762:6:36", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1900,26 +1435,26 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 48629, + "id": 46508, "name": "TRUE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48569, - "src": "967:4:45", + "referencedDeclaration": 46054, + "src": "771:4:36", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "958:13:45", + "src": "762:13:36", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 48631, + "id": 46510, "nodeType": "ExpressionStatement", - "src": "958:13:45" + "src": "762:13:36" } ] }, @@ -1929,100 +1464,100 @@ "name": "", "nameLocation": "-1:-1:-1", "parameters": { - "id": 48616, + "id": 46496, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 48615, + "id": 46495, "mutability": "mutable", "name": "_vault", - "nameLocation": "864:6:45", + "nameLocation": "682:6:36", "nodeType": "VariableDeclaration", - "scope": 48633, - "src": "858:12:45", + "scope": 46512, + "src": "676:12:36", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" }, "typeName": { - "id": 48614, + "id": 46494, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 48613, + "id": 46493, "name": "Vault", - "nameLocations": ["858:5:45"], + "nameLocations": ["676:5:36"], "nodeType": "IdentifierPath", - "referencedDeclaration": 50616, - "src": "858:5:45" + "referencedDeclaration": 48280, + "src": "676:5:36" }, - "referencedDeclaration": 50616, - "src": "858:5:45", + "referencedDeclaration": 48280, + "src": "676:5:36", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } }, "visibility": "internal" } ], - "src": "857:14:45" + "src": "675:14:36" }, "returnParameters": { - "id": 48617, + "id": 46497, "nodeType": "ParameterList", "parameters": [], - "src": "872:0:45" + "src": "690:0:36" }, - "scope": 48711, + "scope": 46591, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { - "id": 48654, + "id": 46532, "nodeType": "FunctionDefinition", - "src": "984:206:45", + "src": "788:144:36", "nodes": [], "body": { - "id": 48653, + "id": 46531, "nodeType": "Block", - "src": "1132:58:45", + "src": "883:49:36", "nodes": [], "statements": [ { "expression": { - "id": 48651, + "id": 46529, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "baseExpression": { - "id": 48645, + "id": 46525, "name": "collaterals", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48579, - "src": "1142:11:45", + "referencedDeclaration": 46466, + "src": "893:11:36", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_contract$_IMedian_$48851_$", - "typeString": "mapping(address => contract IMedian)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_contract$_IOSM_$46166_$", + "typeString": "mapping(contract ERC20Token => contract IOSM)" } }, - "id": 48647, + "id": 46527, "indexExpression": { - "id": 48646, + "id": 46526, "name": "collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48637, - "src": "1154:10:45", + "referencedDeclaration": 46515, + "src": "905:10:36", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -2030,223 +1565,185 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1142:23:45", + "src": "893:23:36", "typeDescriptions": { - "typeIdentifier": "t_contract$_IMedian_$48851", - "typeString": "contract IMedian" + "typeIdentifier": "t_contract$_IOSM_$46166", + "typeString": "contract IOSM" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "arguments": [ - { - "id": 48649, - "name": "oracle", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48635, - "src": "1176:6:45", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 48648, - "name": "IMedian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48851, - "src": "1168:7:45", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IMedian_$48851_$", - "typeString": "type(contract IMedian)" - } - }, - "id": 48650, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1168:15:45", - "tryCall": false, + "id": 46528, + "name": "oracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46518, + "src": "919:6:36", "typeDescriptions": { - "typeIdentifier": "t_contract$_IMedian_$48851", - "typeString": "contract IMedian" + "typeIdentifier": "t_contract$_IOSM_$46166", + "typeString": "contract IOSM" } }, - "src": "1142:41:45", + "src": "893:32:36", "typeDescriptions": { - "typeIdentifier": "t_contract$_IMedian_$48851", - "typeString": "contract IMedian" + "typeIdentifier": "t_contract$_IOSM_$46166", + "typeString": "contract IOSM" } }, - "id": 48652, + "id": 46530, "nodeType": "ExpressionStatement", - "src": "1142:41:45" + "src": "893:32:36" } ] }, - "baseFunctions": [48819], - "functionSelector": "5ab68dd8", + "baseFunctions": [46157], + "functionSelector": "425bddcf", "implemented": true, "kind": "function", "modifiers": [ { - "id": 48640, + "id": 46521, "kind": "modifierInvocation", "modifierName": { - "id": 48639, + "id": 46520, "name": "whenNotPaused", - "nameLocations": ["1077:13:45"], + "nameLocations": ["859:13:36"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48590, - "src": "1077:13:45" + "referencedDeclaration": 46075, + "src": "859:13:36" }, "nodeType": "ModifierInvocation", - "src": "1077:13:45" + "src": "859:13:36" }, { - "arguments": [ - { - "id": 48642, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "1108:18:45", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 48643, + "id": 46523, "kind": "modifierInvocation", "modifierName": { - "id": 48641, - "name": "onlyRole", - "nameLocations": ["1099:8:45"], + "id": 46522, + "name": "onlyOwner", + "nameLocations": ["873:9:36"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "1099:8:45" + "referencedDeclaration": 44380, + "src": "873:9:36" }, "nodeType": "ModifierInvocation", - "src": "1099:28:45" + "src": "873:9:36" } ], - "name": "setPriceOracleContract", - "nameLocation": "993:22:45", + "name": "setCollateralOSM", + "nameLocation": "797:16:36", "parameters": { - "id": 48638, + "id": 46519, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 48635, + "id": 46515, "mutability": "mutable", - "name": "oracle", - "nameLocation": "1024:6:45", + "name": "collateral", + "nameLocation": "825:10:36", "nodeType": "VariableDeclaration", - "scope": 48654, - "src": "1016:14:45", + "scope": 46532, + "src": "814:21:36", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 48634, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1016:7:45", - "stateMutability": "nonpayable", + "id": 46514, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 46513, + "name": "ERC20Token", + "nameLocations": ["814:10:36"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46438, + "src": "814:10:36" + }, + "referencedDeclaration": 46438, + "src": "814:10:36", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 48637, + "id": 46518, "mutability": "mutable", - "name": "collateral", - "nameLocation": "1040:10:45", + "name": "oracle", + "nameLocation": "842:6:36", "nodeType": "VariableDeclaration", - "scope": 48654, - "src": "1032:18:45", + "scope": 46532, + "src": "837:11:36", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_IOSM_$46166", + "typeString": "contract IOSM" }, "typeName": { - "id": 48636, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1032:7:45", - "stateMutability": "nonpayable", + "id": 46517, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 46516, + "name": "IOSM", + "nameLocations": ["837:4:36"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46166, + "src": "837:4:36" + }, + "referencedDeclaration": 46166, + "src": "837:4:36", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_IOSM_$46166", + "typeString": "contract IOSM" } }, "visibility": "internal" } ], - "src": "1015:36:45" + "src": "813:36:36" }, "returnParameters": { - "id": 48644, + "id": 46524, "nodeType": "ParameterList", "parameters": [], - "src": "1132:0:45" + "src": "883:0:36" }, - "scope": 48711, + "scope": 46591, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 48685, + "id": 46563, "nodeType": "FunctionDefinition", - "src": "1255:246:45", + "src": "997:222:36", "nodes": [], "body": { - "id": 48684, + "id": 46562, "nodeType": "Block", - "src": "1348:153:45", + "src": "1064:155:36", "nodes": [], "statements": [ { - "assignments": [null, 48665], + "assignments": [46541], "declarations": [ - null, { "constant": false, - "id": 48665, + "id": 46541, "mutability": "mutable", "name": "price", - "nameLocation": "1369:5:45", + "nameLocation": "1082:5:36", "nodeType": "VariableDeclaration", - "scope": 48684, - "src": "1361:13:45", + "scope": 46562, + "src": "1074:13:36", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2254,10 +1751,10 @@ "typeString": "uint256" }, "typeName": { - "id": 48664, + "id": 46540, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1361:7:45", + "src": "1074:7:36", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2266,35 +1763,35 @@ "visibility": "internal" } ], - "id": 48671, + "id": 46547, "initialValue": { "arguments": [], "expression": { "argumentTypes": [], "expression": { "baseExpression": { - "id": 48666, + "id": 46542, "name": "collaterals", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48579, - "src": "1378:11:45", + "referencedDeclaration": 46466, + "src": "1090:11:36", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_contract$_IMedian_$48851_$", - "typeString": "mapping(address => contract IMedian)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_contract$_IOSM_$46166_$", + "typeString": "mapping(contract ERC20Token => contract IOSM)" } }, - "id": 48668, + "id": 46544, "indexExpression": { - "id": 48667, + "id": 46543, "name": "collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48656, - "src": "1390:10:45", + "referencedDeclaration": 46535, + "src": "1102:10:36", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -2302,28 +1799,28 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1378:23:45", + "src": "1090:23:36", "typeDescriptions": { - "typeIdentifier": "t_contract$_IMedian_$48851", - "typeString": "contract IMedian" + "typeIdentifier": "t_contract$_IOSM_$46166", + "typeString": "contract IOSM" } }, - "id": 48669, + "id": 46545, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "1402:4:45", - "memberName": "read", + "memberLocation": "1114:7:36", + "memberName": "current", "nodeType": "MemberAccess", - "referencedDeclaration": 48841, - "src": "1378:28:45", + "referencedDeclaration": 46165, + "src": "1090:31:36", "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$_t_uint256_$", - "typeString": "function () view external returns (uint256,uint256)" + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" } }, - "id": 48670, + "id": 46546, "isConstant": false, "isLValue": false, "isPure": false, @@ -2332,124 +1829,125 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "1378:30:45", + "src": "1090:33:36", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", - "typeString": "tuple(uint256,uint256)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "1358:50:45" + "src": "1074:49:36" }, { - "expression": { - "arguments": [ - { - "id": 48675, - "name": "collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48656, - "src": "1437:10:45", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 48676, - "name": "price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48665, - "src": "1449:5:45", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 46550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 46548, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46541, + "src": "1137:5:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 46549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1146:1:36", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1137:10:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 46554, + "nodeType": "IfStatement", + "src": "1133:33:36", + "trueBody": { + "errorCall": { + "arguments": [], "expression": { - "id": 48672, - "name": "vault", + "argumentTypes": [], + "id": 46551, + "name": "BadPrice", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48572, - "src": "1419:5:45", + "referencedDeclaration": 46136, + "src": "1156:8:36", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", - "typeString": "contract Vault" + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" } }, - "id": 48674, + "id": 46552, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "memberLocation": "1425:11:45", - "memberName": "updatePrice", - "nodeType": "MemberAccess", - "referencedDeclaration": 49480, - "src": "1419:17:45", + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1156:10:36", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 48677, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1419:36:45", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 48678, - "nodeType": "ExpressionStatement", - "src": "1419:36:45" + "id": 46553, + "nodeType": "RevertStatement", + "src": "1149:17:36" + } }, { - "eventCall": { + "expression": { "arguments": [ { - "id": 48680, + "id": 46558, "name": "collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48656, - "src": "1476:10:45", + "referencedDeclaration": 46535, + "src": "1194:10:36", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, { - "id": 48681, + "id": 46559, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48665, - "src": "1488:5:45", + "referencedDeclaration": 46541, + "src": "1206:5:36", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2459,26 +1957,42 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], - "id": 48679, - "name": "Read", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48807, - "src": "1471:4:45", + "expression": { + "id": 46555, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46460, + "src": "1176:5:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48280", + "typeString": "contract Vault" + } + }, + "id": 46557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1182:11:36", + "memberName": "updatePrice", + "nodeType": "MemberAccess", + "referencedDeclaration": 47232, + "src": "1176:17:36", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ERC20Token_$46438_$_t_uint256_$returns$__$", + "typeString": "function (contract ERC20Token,uint256) external" } }, - "id": 48682, + "id": 46560, "isConstant": false, "isLValue": false, "isPure": false, @@ -2487,234 +2001,214 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "1471:23:45", + "src": "1176:36:36", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 48683, - "nodeType": "EmitStatement", - "src": "1466:28:45" + "id": 46561, + "nodeType": "ExpressionStatement", + "src": "1176:36:36" } ] }, - "baseFunctions": [48812], + "baseFunctions": [46148], "functionSelector": "96e85ced", "implemented": true, "kind": "function", "modifiers": [ { - "id": 48659, + "id": 46538, "kind": "modifierInvocation", "modifierName": { - "id": 48658, + "id": 46537, "name": "whenNotPaused", - "nameLocations": ["1305:13:45"], + "nameLocations": ["1050:13:36"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48590, - "src": "1305:13:45" + "referencedDeclaration": 46075, + "src": "1050:13:36" }, "nodeType": "ModifierInvocation", - "src": "1305:13:45" - }, - { - "arguments": [ - { - "id": 48661, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "1328:18:45", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 48662, - "kind": "modifierInvocation", - "modifierName": { - "id": 48660, - "name": "onlyRole", - "nameLocations": ["1319:8:45"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "1319:8:45" - }, - "nodeType": "ModifierInvocation", - "src": "1319:28:45" + "src": "1050:13:36" } ], "name": "updatePrice", - "nameLocation": "1264:11:45", + "nameLocation": "1006:11:36", "parameters": { - "id": 48657, + "id": 46536, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 48656, + "id": 46535, "mutability": "mutable", "name": "collateral", - "nameLocation": "1284:10:45", + "nameLocation": "1029:10:36", "nodeType": "VariableDeclaration", - "scope": 48685, - "src": "1276:18:45", + "scope": 46563, + "src": "1018:21:36", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 48655, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1276:7:45", - "stateMutability": "nonpayable", + "id": 46534, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 46533, + "name": "ERC20Token", + "nameLocations": ["1018:10:36"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46438, + "src": "1018:10:36" + }, + "referencedDeclaration": 46438, + "src": "1018:10:36", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "visibility": "internal" } ], - "src": "1275:20:45" + "src": "1017:23:36" }, "returnParameters": { - "id": 48663, + "id": 46539, "nodeType": "ParameterList", "parameters": [], - "src": "1348:0:45" + "src": "1064:0:36" }, - "scope": 48711, + "scope": 46591, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 48710, + "id": 46590, "nodeType": "FunctionDefinition", - "src": "1566:204:45", + "src": "1284:192:36", "nodes": [], "body": { - "id": 48709, + "id": 46589, "nodeType": "Block", - "src": "1678:92:45", + "src": "1380:96:36", "nodes": [], "statements": [ { - "expression": { - "arguments": [ - { - "id": 48700, - "name": "collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48687, - "src": "1706:10:45", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 48701, - "name": "price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48689, - "src": "1718:5:45", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 46577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 46575, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46568, + "src": "1394:5:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 46576, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1403:1:36", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1394:10:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 46581, + "nodeType": "IfStatement", + "src": "1390:33:36", + "trueBody": { + "errorCall": { + "arguments": [], "expression": { - "id": 48697, - "name": "vault", + "argumentTypes": [], + "id": 46578, + "name": "BadPrice", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48572, - "src": "1688:5:45", + "referencedDeclaration": 46136, + "src": "1413:8:36", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", - "typeString": "contract Vault" + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" } }, - "id": 48699, + "id": 46579, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "memberLocation": "1694:11:45", - "memberName": "updatePrice", - "nodeType": "MemberAccess", - "referencedDeclaration": 49480, - "src": "1688:17:45", + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1413:10:36", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256) external" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 48702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1688:36:45", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 48703, - "nodeType": "ExpressionStatement", - "src": "1688:36:45" + "id": 46580, + "nodeType": "RevertStatement", + "src": "1406:17:36" + } }, { - "eventCall": { + "expression": { "arguments": [ { - "id": 48705, + "id": 46585, "name": "collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48687, - "src": "1745:10:45", + "referencedDeclaration": 46566, + "src": "1451:10:36", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, { - "id": 48706, + "id": 46586, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48689, - "src": "1757:5:45", + "referencedDeclaration": 46568, + "src": "1463:5:36", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2724,26 +2218,42 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], - "id": 48704, - "name": "Read", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48807, - "src": "1740:4:45", + "expression": { + "id": 46582, + "name": "vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46460, + "src": "1433:5:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48280", + "typeString": "contract Vault" + } + }, + "id": 46584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1439:11:36", + "memberName": "updatePrice", + "nodeType": "MemberAccess", + "referencedDeclaration": 47232, + "src": "1433:17:36", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ERC20Token_$46438_$_t_uint256_$returns$__$", + "typeString": "function (contract ERC20Token,uint256) external" } }, - "id": 48707, + "id": 46587, "isConstant": false, "isLValue": false, "isPure": false, @@ -2752,16 +2262,16 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "1740:23:45", + "src": "1433:36:36", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 48708, - "nodeType": "EmitStatement", - "src": "1735:28:45" + "id": 46588, + "nodeType": "ExpressionStatement", + "src": "1433:36:36" } ] }, @@ -2770,91 +2280,84 @@ "kind": "function", "modifiers": [ { - "id": 48692, + "id": 46571, "kind": "modifierInvocation", "modifierName": { - "id": 48691, + "id": 46570, "name": "whenNotPaused", - "nameLocations": ["1635:13:45"], + "nameLocations": ["1356:13:36"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48590, - "src": "1635:13:45" + "referencedDeclaration": 46075, + "src": "1356:13:36" }, "nodeType": "ModifierInvocation", - "src": "1635:13:45" + "src": "1356:13:36" }, { - "arguments": [ - { - "id": 48694, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "1658:18:45", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 48695, + "id": 46573, "kind": "modifierInvocation", "modifierName": { - "id": 48693, - "name": "onlyRole", - "nameLocations": ["1649:8:45"], + "id": 46572, + "name": "onlyOwner", + "nameLocations": ["1370:9:36"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "1649:8:45" + "referencedDeclaration": 44380, + "src": "1370:9:36" }, "nodeType": "ModifierInvocation", - "src": "1649:28:45" + "src": "1370:9:36" } ], "name": "mockUpdatePrice", - "nameLocation": "1575:15:45", + "nameLocation": "1293:15:36", "parameters": { - "id": 48690, + "id": 46569, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 48687, + "id": 46566, "mutability": "mutable", "name": "collateral", - "nameLocation": "1599:10:45", + "nameLocation": "1320:10:36", "nodeType": "VariableDeclaration", - "scope": 48710, - "src": "1591:18:45", + "scope": 46590, + "src": "1309:21:36", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 48686, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1591:7:45", - "stateMutability": "nonpayable", + "id": 46565, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 46564, + "name": "ERC20Token", + "nameLocations": ["1309:10:36"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46438, + "src": "1309:10:36" + }, + "referencedDeclaration": 46438, + "src": "1309:10:36", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 48689, + "id": 46568, "mutability": "mutable", "name": "price", - "nameLocation": "1619:5:45", + "nameLocation": "1340:5:36", "nodeType": "VariableDeclaration", - "scope": 48710, - "src": "1611:13:45", + "scope": 46590, + "src": "1332:13:36", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2862,10 +2365,10 @@ "typeString": "uint256" }, "typeName": { - "id": 48688, + "id": 46567, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1611:7:45", + "src": "1332:7:36", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2874,15 +2377,15 @@ "visibility": "internal" } ], - "src": "1590:35:45" + "src": "1308:38:36" }, "returnParameters": { - "id": 48696, + "id": 46574, "nodeType": "ParameterList", "parameters": [], - "src": "1678:0:45" + "src": "1380:0:36" }, - "scope": 48711, + "scope": 46591, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" @@ -2892,44 +2395,57 @@ "baseContracts": [ { "baseName": { - "id": 48560, + "id": 46452, "name": "IFeed", - "nameLocations": ["337:5:45"], + "nameLocations": ["365:5:36"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46158, + "src": "365:5:36" + }, + "id": 46453, + "nodeType": "InheritanceSpecifier", + "src": "365:5:36" + }, + { + "baseName": { + "id": 46454, + "name": "Ownable", + "nameLocations": ["372:7:36"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48820, - "src": "337:5:45" + "referencedDeclaration": 44381, + "src": "372:7:36" }, - "id": 48561, + "id": 46455, "nodeType": "InheritanceSpecifier", - "src": "337:5:45" + "src": "372:7:36" }, { "baseName": { - "id": 48562, - "name": "AccessControl", - "nameLocations": ["344:13:45"], + "id": 46456, + "name": "Pausable", + "nameLocations": ["381:8:36"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43683, - "src": "344:13:45" + "referencedDeclaration": 46103, + "src": "381:8:36" }, - "id": 48563, + "id": 46457, "nodeType": "InheritanceSpecifier", - "src": "344:13:45" + "src": "381:8:36" } ], "canonicalName": "Feed", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, - "linearizedBaseContracts": [48711, 43683, 46625, 46637, 43766, 45302, 48820], + "linearizedBaseContracts": [46591, 46103, 44381, 46158], "name": "Feed", - "nameLocation": "329:4:45", - "scope": 48712, - "usedErrors": [43693, 43696, 48801], - "usedEvents": [43705, 43714, 43723, 48807] + "nameLocation": "357:4:36", + "scope": 46592, + "usedErrors": [44193, 44196, 44199, 44202, 46046, 46048, 46136], + "usedEvents": [44209, 44214, 44219, 46142] } ], "license": "GPL-3.0" }, - "id": 45 + "id": 36 } diff --git a/src/contracts/abis/Rate.json b/src/contracts/abis/Rate.json new file mode 100644 index 0000000..e77cf83 --- /dev/null +++ b/src/contracts/abis/Rate.json @@ -0,0 +1,1068 @@ +{ + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accumulatedRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUpdateTime", + "type": "uint256" + } + ], + "internalType": "struct IVault.RateInfo", + "name": "_rateInfo", + "type": "tuple" + } + ], + "name": "calculateCurrentAccumulatedRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accumulatedRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUpdateTime", + "type": "uint256" + } + ], + "internalType": "struct IVault.RateInfo", + "name": "_baseRateInfo", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accumulatedRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUpdateTime", + "type": "uint256" + } + ], + "internalType": "struct IVault.RateInfo", + "name": "_collateralRateInfo", + "type": "tuple" + } + ], + "name": "calculateCurrentTotalAccumulatedRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": { + "object": "0x608060405234801561001057600080fd5b506101a0806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063cf5696cb1461003b578063d14a27fd14610060575b600080fd5b61004e6100493660046100e3565b610073565b60405190815260200160405180910390f35b61004e61006e366004610118565b61009a565b600061007e8361009a565b6100878361009a565b6100919190610163565b90505b92915050565b6000806100ab604084013542610176565b6100b6908435610189565b6100c4906020850135610163565b9392505050565b6000606082840312156100dd57600080fd5b50919050565b60008060c083850312156100f657600080fd5b61010084846100cb565b915061010f84606085016100cb565b90509250929050565b60006060828403121561012a57600080fd5b61009183836100cb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561009457610094610134565b8181038181111561009457610094610134565b80820281158282048414176100945761009461013456", + "sourceMap": "192:1050:37:-:0;;;;;;;;;;;;;;;;;;;", + "linkReferences": {} + }, + "deployedBytecode": { + "object": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063cf5696cb1461003b578063d14a27fd14610060575b600080fd5b61004e6100493660046100e3565b610073565b60405190815260200160405180910390f35b61004e61006e366004610118565b61009a565b600061007e8361009a565b6100878361009a565b6100919190610163565b90505b92915050565b6000806100ab604084013542610176565b6100b6908435610189565b6100c4906020850135610163565b9392505050565b6000606082840312156100dd57600080fd5b50919050565b60008060c083850312156100f657600080fd5b61010084846100cb565b915061010f84606085016100cb565b90509250929050565b60006060828403121561012a57600080fd5b61009183836100cb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561009457610094610134565b8181038181111561009457610094610134565b80820281158282048414176100945761009461013456", + "sourceMap": "192:1050:37:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;435:368;;;;;;:::i;:::-;;:::i;:::-;;;697:25:60;;;685:2;670:18;435:368:37;;;;;;;809:431;;;;;;:::i;:::-;;:::i;435:368::-;610:7;750:46;782:13;750:31;:46::i;:::-;695:52;727:19;695:31;:52::i;:::-;:101;;;;:::i;:::-;688:108;;435:368;;;;;:::o;809:431::-;906:7;;1089:42;1107:24;;;;1089:15;:42;:::i;:::-;1071:61;;:14;;:61;:::i;:::-;1042:91;;:25;;;;:91;:::i;:::-;996:137;809:431;-1:-1:-1;;;809:431:37:o;14:156:60:-;75:5;120:2;111:6;106:3;102:16;98:25;95:45;;;136:1;133;126:12;95:45;-1:-1:-1;158:6:60;14:156;-1:-1:-1;14:156:60:o;175:371::-;301:6;309;362:3;350:9;341:7;337:23;333:33;330:53;;;379:1;376;369:12;330:53;402:55;449:7;438:9;402:55;:::i;:::-;392:65;;476:64;532:7;527:2;516:9;512:18;476:64;:::i;:::-;466:74;;175:371;;;;;:::o;733:241::-;821:6;874:2;862:9;853:7;849:23;845:32;842:52;;;890:1;887;880:12;842:52;913:55;960:7;949:9;913:55;:::i;979:184::-;1031:77;1028:1;1021:88;1128:4;1125:1;1118:15;1152:4;1149:1;1142:15;1168:125;1233:9;;;1254:10;;;1251:36;;;1267:18;;:::i;1298:128::-;1365:9;;;1386:11;;;1383:37;;;1400:18;;:::i;1431:168::-;1504:9;;;1535;;1552:15;;;1546:22;;1532:37;1522:71;;1573:18;;:::i", + "linkReferences": {} + }, + "methodIdentifiers": { + "calculateCurrentAccumulatedRate((uint256,uint256,uint256))": "d14a27fd", + "calculateCurrentTotalAccumulatedRate((uint256,uint256,uint256),(uint256,uint256,uint256))": "cf5696cb" + }, + "rawMetadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accumulatedRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastUpdateTime\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.RateInfo\",\"name\":\"_rateInfo\",\"type\":\"tuple\"}],\"name\":\"calculateCurrentAccumulatedRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accumulatedRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastUpdateTime\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.RateInfo\",\"name\":\"_baseRateInfo\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accumulatedRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastUpdateTime\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.RateInfo\",\"name\":\"_collateralRateInfo\",\"type\":\"tuple\"}],\"name\":\"calculateCurrentTotalAccumulatedRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"calculateCurrentTotalAccumulatedRate((uint256,uint256,uint256),(uint256,uint256,uint256))\":{\"details\":\"returns the current total accumulated rate i.e current accumulated base rate + current accumulated collateral rate of the given collateralshould never revert!\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/modules/rate.sol\":\"SimpleInterestRate\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"appendCBOR\":false,\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":descent-collective/oracle-module/=lib/oracle-module/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":oracle-module/=lib/oracle-module/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/solady/src/auth/Ownable.sol\":{\"keccak256\":\"0xc208cdd9de02bbf4b5edad18b88e23a2be7ff56d2287d5649329dc7cda64b9a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e8fba079cc7230c617f7493a2e97873f88e59a53a5018fcb2e2b6ac42d8aa5a3\",\"dweb:/ipfs/QmTXg8GSt8hsK2cZhbPFrund1mrwVdkLQmEPoQaFy4fhjs\"]},\"lib/solady/src/tokens/ERC20.sol\":{\"keccak256\":\"0xb4a3f9ba8a05107f7370de42cff57f3ad26dafd438712c11531a5892de2f59e0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f0a9ca06e3cf6dea1f9a4c5599581573b7d81cd64dc3afb582f325ccf5fdd6dc\",\"dweb:/ipfs/Qmb9r5dDceNF4W8S5u6i85RsNTgE5XG9HbTXkyS25ad3C6\"]},\"lib/solady/src/utils/SafeTransferLib.sol\":{\"keccak256\":\"0xf98506fade18a92e3d8d0a0ca0bdaeaa099d7620aac2a9d76b5f3d0bcd10691c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a3495c9d108bc69951a12c5ce9f05851cc921f0bb69e2505756e79f3ddab4e1a\",\"dweb:/ipfs/QmT3XwbmdbQCxw7iNcF7DoiypDd5vs2ETFWirXqmJ86Meg\"]},\"src/currency.sol\":{\"keccak256\":\"0xc266e97010a71e6ac755dce3e51a5a5844663b355e20ab40bf2020fd9308369b\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://d2660220b8a14c6d06351765dd7accec03e350e7fa9ae960c1505bea1e5d8d2d\",\"dweb:/ipfs/QmdYdPSnQC2nym38Fca4vRLKU4A78AQkgYasdg3TaRLGNY\"]},\"src/helpers/pausable.sol\":{\"keccak256\":\"0x8acce52dcd450c73da0f77d9539962826da23aca05aa7d0c7568614e89aed997\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://35e2f674e01c0d6107f31d1c32bb2780d442420b7d26636f560a4eb1007f4a8b\",\"dweb:/ipfs/QmWwVLUGiJq6Q3fK6Zhx4pc6kaqC73pkZ1ntfVA3QCHTpd\"]},\"src/interfaces/ICurrency.sol\":{\"keccak256\":\"0x3b7adace3df08c34906612358d435ffff3b90b5eec0eae34b6335cc8dcd0e7ed\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://370c80ec5636bd95342256d4116f703e633e6b0467ee530397e9b5cada37f998\",\"dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz\"]},\"src/interfaces/IRate.sol\":{\"keccak256\":\"0x166dc423b74b60302197a27fb64557ee8ef6bafe416deb08fe7ecf94f0ede1d1\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://123ef521857e33b10b6f92b743831b26dd5100e57271353bf5c1882fc41c6a2e\",\"dweb:/ipfs/QmdK5y8SntLHAVoNRq6isddmNYunrpv1JxAxyEgRiHdAAj\"]},\"src/interfaces/IVault.sol\":{\"keccak256\":\"0x5684f59679e090ebe583d31fda6d8882469436e71670a4873151793675c7c6c4\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b265c21b1ff01a8c5cf9b1120feb6b5419a96a0e2a6d1ff4bdd89934c7869c9c\",\"dweb:/ipfs/QmdbCgiYE763cAHZ6nevhf7EzF8BzEkfwsbw4qWuxBkm8f\"]},\"src/mocks/ERC20Token.sol\":{\"keccak256\":\"0x62b878fb4dde1f455866e0c1290cc50714805d02c2848a4a9bb33c5dfbc8464d\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://7af3f5638d366abfbca3186813449259a33ed43e7c13ec983d389d73df1ad204\",\"dweb:/ipfs/QmeMdoEVTGqdcgSicTTcmycSQjToT7Sn5ZTgZdVFH9E6HA\"]},\"src/modules/rate.sol\":{\"keccak256\":\"0x7f69dc8f51e49e7db89919bd89696244c23e0e04130463af3aac2f65130f4165\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://45158c44dae0ab6cee1e96a3c77118ea2f66088aa40dd13cb01f384805dd1c0f\",\"dweb:/ipfs/QmZAy4PEfgSFf4EgdX2hVXA9KcuUHrqefdttziZyeNtfnC\"]},\"src/vault.sol\":{\"keccak256\":\"0x377a877ac854164da4e6b2491e2dba44d75cb56216e6b2456fa6b815565ac5e5\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://a0a67817c649b3f65de4971c5346ea93b7432ac2f4e0013e5fb681e488aa1b58\",\"dweb:/ipfs/Qmbvcgn3AoTEahq9qgfuiL81zkZKLVQRbMhMeeqTMiiuKv\"]}},\"version\":1}", + "metadata": { + "compiler": { + "version": "0.8.21+commit.d9974bed" + }, + "language": "Solidity", + "output": { + "abi": [ + { + "inputs": [ + { + "internalType": "struct IVault.RateInfo", + "name": "_rateInfo", + "type": "tuple", + "components": [ + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accumulatedRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUpdateTime", + "type": "uint256" + } + ] + } + ], + "stateMutability": "view", + "type": "function", + "name": "calculateCurrentAccumulatedRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ] + }, + { + "inputs": [ + { + "internalType": "struct IVault.RateInfo", + "name": "_baseRateInfo", + "type": "tuple", + "components": [ + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accumulatedRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUpdateTime", + "type": "uint256" + } + ] + }, + { + "internalType": "struct IVault.RateInfo", + "name": "_collateralRateInfo", + "type": "tuple", + "components": [ + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accumulatedRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastUpdateTime", + "type": "uint256" + } + ] + } + ], + "stateMutability": "view", + "type": "function", + "name": "calculateCurrentTotalAccumulatedRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ] + } + ], + "devdoc": { + "kind": "dev", + "methods": { + "calculateCurrentTotalAccumulatedRate((uint256,uint256,uint256),(uint256,uint256,uint256))": { + "details": "returns the current total accumulated rate i.e current accumulated base rate + current accumulated collateral rate of the given collateralshould never revert!" + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } + }, + "settings": { + "remappings": [ + "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", + "descent-collective/oracle-module/=lib/oracle-module/src/", + "ds-test/=lib/forge-std/lib/ds-test/src/", + "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", + "forge-std/=lib/forge-std/src/", + "openzeppelin-contracts/=lib/openzeppelin-contracts/", + "oracle-module/=lib/oracle-module/", + "solady/=lib/solady/src/" + ], + "optimizer": { + "enabled": true, + "runs": 1000000 + }, + "metadata": { + "bytecodeHash": "none", + "appendCBOR": false + }, + "compilationTarget": { + "src/modules/rate.sol": "SimpleInterestRate" + }, + "libraries": {} + }, + "sources": { + "lib/solady/src/auth/Ownable.sol": { + "keccak256": "0xc208cdd9de02bbf4b5edad18b88e23a2be7ff56d2287d5649329dc7cda64b9a3", + "urls": [ + "bzz-raw://e8fba079cc7230c617f7493a2e97873f88e59a53a5018fcb2e2b6ac42d8aa5a3", + "dweb:/ipfs/QmTXg8GSt8hsK2cZhbPFrund1mrwVdkLQmEPoQaFy4fhjs" + ], + "license": "MIT" + }, + "lib/solady/src/tokens/ERC20.sol": { + "keccak256": "0xb4a3f9ba8a05107f7370de42cff57f3ad26dafd438712c11531a5892de2f59e0", + "urls": [ + "bzz-raw://f0a9ca06e3cf6dea1f9a4c5599581573b7d81cd64dc3afb582f325ccf5fdd6dc", + "dweb:/ipfs/Qmb9r5dDceNF4W8S5u6i85RsNTgE5XG9HbTXkyS25ad3C6" + ], + "license": "MIT" + }, + "lib/solady/src/utils/SafeTransferLib.sol": { + "keccak256": "0xf98506fade18a92e3d8d0a0ca0bdaeaa099d7620aac2a9d76b5f3d0bcd10691c", + "urls": [ + "bzz-raw://a3495c9d108bc69951a12c5ce9f05851cc921f0bb69e2505756e79f3ddab4e1a", + "dweb:/ipfs/QmT3XwbmdbQCxw7iNcF7DoiypDd5vs2ETFWirXqmJ86Meg" + ], + "license": "MIT" + }, + "src/currency.sol": { + "keccak256": "0xc266e97010a71e6ac755dce3e51a5a5844663b355e20ab40bf2020fd9308369b", + "urls": [ + "bzz-raw://d2660220b8a14c6d06351765dd7accec03e350e7fa9ae960c1505bea1e5d8d2d", + "dweb:/ipfs/QmdYdPSnQC2nym38Fca4vRLKU4A78AQkgYasdg3TaRLGNY" + ], + "license": "GPL-3.0" + }, + "src/helpers/pausable.sol": { + "keccak256": "0x8acce52dcd450c73da0f77d9539962826da23aca05aa7d0c7568614e89aed997", + "urls": [ + "bzz-raw://35e2f674e01c0d6107f31d1c32bb2780d442420b7d26636f560a4eb1007f4a8b", + "dweb:/ipfs/QmWwVLUGiJq6Q3fK6Zhx4pc6kaqC73pkZ1ntfVA3QCHTpd" + ], + "license": "GPL-3.0" + }, + "src/interfaces/ICurrency.sol": { + "keccak256": "0x3b7adace3df08c34906612358d435ffff3b90b5eec0eae34b6335cc8dcd0e7ed", + "urls": [ + "bzz-raw://370c80ec5636bd95342256d4116f703e633e6b0467ee530397e9b5cada37f998", + "dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz" + ], + "license": "GPL-3.0" + }, + "src/interfaces/IRate.sol": { + "keccak256": "0x166dc423b74b60302197a27fb64557ee8ef6bafe416deb08fe7ecf94f0ede1d1", + "urls": [ + "bzz-raw://123ef521857e33b10b6f92b743831b26dd5100e57271353bf5c1882fc41c6a2e", + "dweb:/ipfs/QmdK5y8SntLHAVoNRq6isddmNYunrpv1JxAxyEgRiHdAAj" + ], + "license": "GPL-3.0" + }, + "src/interfaces/IVault.sol": { + "keccak256": "0x5684f59679e090ebe583d31fda6d8882469436e71670a4873151793675c7c6c4", + "urls": [ + "bzz-raw://b265c21b1ff01a8c5cf9b1120feb6b5419a96a0e2a6d1ff4bdd89934c7869c9c", + "dweb:/ipfs/QmdbCgiYE763cAHZ6nevhf7EzF8BzEkfwsbw4qWuxBkm8f" + ], + "license": "GPL-3.0" + }, + "src/mocks/ERC20Token.sol": { + "keccak256": "0x62b878fb4dde1f455866e0c1290cc50714805d02c2848a4a9bb33c5dfbc8464d", + "urls": [ + "bzz-raw://7af3f5638d366abfbca3186813449259a33ed43e7c13ec983d389d73df1ad204", + "dweb:/ipfs/QmeMdoEVTGqdcgSicTTcmycSQjToT7Sn5ZTgZdVFH9E6HA" + ], + "license": "GPL-3.0" + }, + "src/modules/rate.sol": { + "keccak256": "0x7f69dc8f51e49e7db89919bd89696244c23e0e04130463af3aac2f65130f4165", + "urls": [ + "bzz-raw://45158c44dae0ab6cee1e96a3c77118ea2f66088aa40dd13cb01f384805dd1c0f", + "dweb:/ipfs/QmZAy4PEfgSFf4EgdX2hVXA9KcuUHrqefdttziZyeNtfnC" + ], + "license": "GPL-3.0" + }, + "src/vault.sol": { + "keccak256": "0x377a877ac854164da4e6b2491e2dba44d75cb56216e6b2456fa6b815565ac5e5", + "urls": [ + "bzz-raw://a0a67817c649b3f65de4971c5346ea93b7432ac2f4e0013e5fb681e488aa1b58", + "dweb:/ipfs/Qmbvcgn3AoTEahq9qgfuiL81zkZKLVQRbMhMeeqTMiiuKv" + ], + "license": "GPL-3.0" + } + }, + "version": 1 + }, + "ast": { + "absolutePath": "src/modules/rate.sol", + "id": 46649, + "exportedSymbols": { + "IRate": [46191], + "SimpleInterestRate": [46648], + "Vault": [48280] + }, + "nodeType": "SourceUnit", + "src": "36:1207:37", + "nodes": [ + { + "id": 46593, + "nodeType": "PragmaDirective", + "src": "36:23:37", + "nodes": [], + "literals": ["solidity", "0.8", ".21"] + }, + { + "id": 46595, + "nodeType": "ImportDirective", + "src": "108:35:37", + "nodes": [], + "absolutePath": "src/vault.sol", + "file": "../vault.sol", + "nameLocation": "-1:-1:-1", + "scope": 46649, + "sourceUnit": 48281, + "symbolAliases": [ + { + "foreign": { + "id": 46594, + "name": "Vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48280, + "src": "116:5:37", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 46597, + "nodeType": "ImportDirective", + "src": "144:46:37", + "nodes": [], + "absolutePath": "src/interfaces/IRate.sol", + "file": "../interfaces/IRate.sol", + "nameLocation": "-1:-1:-1", + "scope": 46649, + "sourceUnit": 46192, + "symbolAliases": [ + { + "foreign": { + "id": 46596, + "name": "IRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46191, + "src": "152:5:37", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 46648, + "nodeType": "ContractDefinition", + "src": "192:1050:37", + "nodes": [ + { + "id": 46620, + "nodeType": "FunctionDefinition", + "src": "435:368:37", + "nodes": [], + "body": { + "id": 46619, + "nodeType": "Block", + "src": "619:184:37", + "nodes": [], + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 46617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 46612, + "name": "_collateralRateInfo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46606, + "src": "727:19:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_calldata_ptr", + "typeString": "struct IVault.RateInfo calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_RateInfo_$46280_calldata_ptr", + "typeString": "struct IVault.RateInfo calldata" + } + ], + "id": 46611, + "name": "calculateCurrentAccumulatedRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46647, + "src": "695:31:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_RateInfo_$46280_calldata_ptr_$returns$_t_uint256_$", + "typeString": "function (struct IVault.RateInfo calldata) view returns (uint256)" + } + }, + "id": 46613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "695:52:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "id": 46615, + "name": "_baseRateInfo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46603, + "src": "782:13:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_calldata_ptr", + "typeString": "struct IVault.RateInfo calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_RateInfo_$46280_calldata_ptr", + "typeString": "struct IVault.RateInfo calldata" + } + ], + "id": 46614, + "name": "calculateCurrentAccumulatedRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46647, + "src": "750:31:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_RateInfo_$46280_calldata_ptr_$returns$_t_uint256_$", + "typeString": "function (struct IVault.RateInfo calldata) view returns (uint256)" + } + }, + "id": 46616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "750:46:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "695:101:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 46610, + "id": 46618, + "nodeType": "Return", + "src": "688:108:37" + } + ] + }, + "baseFunctions": [46182], + "documentation": { + "id": 46600, + "nodeType": "StructuredDocumentation", + "src": "235:195:37", + "text": " @dev returns the current total accumulated rate i.e current accumulated base rate + current accumulated collateral rate of the given collateral\n @dev should never revert!" + }, + "functionSelector": "cf5696cb", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateCurrentTotalAccumulatedRate", + "nameLocation": "444:36:37", + "parameters": { + "id": 46607, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 46603, + "mutability": "mutable", + "name": "_baseRateInfo", + "nameLocation": "514:13:37", + "nodeType": "VariableDeclaration", + "scope": 46620, + "src": "490:37:37", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_calldata_ptr", + "typeString": "struct IVault.RateInfo" + }, + "typeName": { + "id": 46602, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 46601, + "name": "Vault.RateInfo", + "nameLocations": ["490:5:37", "496:8:37"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46280, + "src": "490:14:37" + }, + "referencedDeclaration": 46280, + "src": "490:14:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage_ptr", + "typeString": "struct IVault.RateInfo" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 46606, + "mutability": "mutable", + "name": "_collateralRateInfo", + "nameLocation": "561:19:37", + "nodeType": "VariableDeclaration", + "scope": 46620, + "src": "537:43:37", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_calldata_ptr", + "typeString": "struct IVault.RateInfo" + }, + "typeName": { + "id": 46605, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 46604, + "name": "Vault.RateInfo", + "nameLocations": ["537:5:37", "543:8:37"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46280, + "src": "537:14:37" + }, + "referencedDeclaration": 46280, + "src": "537:14:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage_ptr", + "typeString": "struct IVault.RateInfo" + } + }, + "visibility": "internal" + } + ], + "src": "480:106:37" + }, + "returnParameters": { + "id": 46610, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 46609, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 46620, + "src": "610:7:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 46608, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "610:7:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "609:9:37" + }, + "scope": 46648, + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "id": 46647, + "nodeType": "FunctionDefinition", + "src": "809:431:37", + "nodes": [], + "body": { + "id": 46646, + "nodeType": "Block", + "src": "915:325:37", + "nodes": [], + "statements": [ + { + "assignments": [46629], + "declarations": [ + { + "constant": false, + "id": 46629, + "mutability": "mutable", + "name": "_currentAccumulatedRate", + "nameLocation": "1004:23:37", + "nodeType": "VariableDeclaration", + "scope": 46646, + "src": "996:31:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 46628, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "996:7:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 46643, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 46642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 46630, + "name": "_rateInfo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46623, + "src": "1042:9:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_calldata_ptr", + "typeString": "struct IVault.RateInfo calldata" + } + }, + "id": 46631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1052:15:37", + "memberName": "accumulatedRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 46277, + "src": "1042:25:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 46640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 46632, + "name": "_rateInfo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46623, + "src": "1071:9:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_calldata_ptr", + "typeString": "struct IVault.RateInfo calldata" + } + }, + "id": 46633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1081:4:37", + "memberName": "rate", + "nodeType": "MemberAccess", + "referencedDeclaration": 46275, + "src": "1071:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 46638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 46634, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "1089:5:37", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 46635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1095:9:37", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "1089:15:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "expression": { + "id": 46636, + "name": "_rateInfo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46623, + "src": "1107:9:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_calldata_ptr", + "typeString": "struct IVault.RateInfo calldata" + } + }, + "id": 46637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1117:14:37", + "memberName": "lastUpdateTime", + "nodeType": "MemberAccess", + "referencedDeclaration": 46279, + "src": "1107:24:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1089:42:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 46639, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1088:44:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1071:61:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 46641, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1070:63:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1042:91:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "996:137:37" + }, + { + "expression": { + "id": 46644, + "name": "_currentAccumulatedRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46629, + "src": "1210:23:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 46627, + "id": 46645, + "nodeType": "Return", + "src": "1203:30:37" + } + ] + }, + "baseFunctions": [46190], + "functionSelector": "d14a27fd", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateCurrentAccumulatedRate", + "nameLocation": "818:31:37", + "parameters": { + "id": 46624, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 46623, + "mutability": "mutable", + "name": "_rateInfo", + "nameLocation": "874:9:37", + "nodeType": "VariableDeclaration", + "scope": 46647, + "src": "850:33:37", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_calldata_ptr", + "typeString": "struct IVault.RateInfo" + }, + "typeName": { + "id": 46622, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 46621, + "name": "Vault.RateInfo", + "nameLocations": ["850:5:37", "856:8:37"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46280, + "src": "850:14:37" + }, + "referencedDeclaration": 46280, + "src": "850:14:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage_ptr", + "typeString": "struct IVault.RateInfo" + } + }, + "visibility": "internal" + } + ], + "src": "849:35:37" + }, + "returnParameters": { + "id": 46627, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 46626, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 46647, + "src": "906:7:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 46625, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "906:7:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "905:9:37" + }, + "scope": 46648, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + } + ], + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 46598, + "name": "IRate", + "nameLocations": ["223:5:37"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46191, + "src": "223:5:37" + }, + "id": 46599, + "nodeType": "InheritanceSpecifier", + "src": "223:5:37" + } + ], + "canonicalName": "SimpleInterestRate", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "linearizedBaseContracts": [46648, 46191], + "name": "SimpleInterestRate", + "nameLocation": "201:18:37", + "scope": 46649, + "usedErrors": [], + "usedEvents": [] + } + ], + "license": "GPL-3.0" + }, + "id": 37 +} diff --git a/src/contracts/abis/Vault.json b/src/contracts/abis/Vault.json index 00c4882..780e747 100644 --- a/src/contracts/abis/Vault.json +++ b/src/contracts/abis/Vault.json @@ -11,6 +11,11 @@ "internalType": "uint256", "name": "_baseRate", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_debtCeiling", + "type": "uint256" } ], "stateMutability": "nonpayable", @@ -18,75 +23,62 @@ }, { "inputs": [], - "name": "AccessControlBadConfirmation", + "name": "AlreadyInitialized", "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], - "name": "AccessControlUnauthorizedAccount", + "inputs": [], + "name": "BadCollateralRatio", "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "AddressEmptyCode", + "inputs": [], + "name": "CollateralAlreadyExists", "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "AddressInsufficientBalance", + "inputs": [], + "name": "CollateralDebtCeilingExceeded", "type": "error" }, { "inputs": [], - "name": "BadCollateralRatio", + "name": "CollateralDoesNotExist", "type": "error" }, { "inputs": [], - "name": "CollateralAlreadyExists", + "name": "CollateralRatioNotImproved", "type": "error" }, { "inputs": [], - "name": "CollateralDoesNotExist", + "name": "EthTransferFailed", "type": "error" }, { "inputs": [], - "name": "CollateralRatioNotImproved", + "name": "GlobalDebtCeilingExceeded", "type": "error" }, { "inputs": [], - "name": "EthTransferFailed", + "name": "InsufficientCurrencyAmountToPay", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidStabilityModule", + "type": "error" + }, + { + "inputs": [], + "name": "NewOwnerIsZeroAddress", "type": "error" }, { "inputs": [], - "name": "FailedInnerCall", + "name": "NoHandoverRequest", "type": "error" }, { @@ -94,6 +86,11 @@ "name": "NotEnoughCollateralToPay", "type": "error" }, + { + "inputs": [], + "name": "NotFeedContract", + "type": "error" + }, { "inputs": [], "name": "NotOwnerOrReliedUpon", @@ -115,19 +112,13 @@ "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "SafeERC20FailedOperation", + "inputs": [], + "name": "TotalUserCollateralBelowFloor", "type": "error" }, { "inputs": [], - "name": "TotalUserCollateralBelowFloor", + "name": "Unauthorized", "type": "error" }, { @@ -295,74 +286,44 @@ "inputs": [ { "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" + "internalType": "address", + "name": "pendingOwner", + "type": "address" } ], - "name": "RoleAdminChanged", + "name": "OwnershipHandoverCanceled", "type": "event" }, { "anonymous": false, "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, { "indexed": true, "internalType": "address", - "name": "sender", + "name": "pendingOwner", "type": "address" } ], - "name": "RoleGranted", + "name": "OwnershipHandoverRequested", "type": "event" }, { "anonymous": false, "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "indexed": true, "internalType": "address", - "name": "account", + "name": "oldOwner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "sender", + "name": "newOwner", "type": "address" } ], - "name": "RoleRevoked", + "name": "OwnershipTransferred", "type": "event" }, { @@ -378,32 +339,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "accruedFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "baseRateInfo", @@ -430,7 +365,7 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -450,10 +385,17 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "cancelOwnershipHandover", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "", "type": "address" } @@ -502,11 +444,6 @@ "name": "rateInfo", "type": "tuple" }, - { - "internalType": "uint256", - "name": "paidFees", - "type": "uint256" - }, { "internalType": "uint256", "name": "price", @@ -526,11 +463,6 @@ "internalType": "uint256", "name": "additionalCollateralPrecision", "type": "uint256" - }, - { - "internalType": "bool", - "name": "exists", - "type": "bool" } ], "stateMutability": "view", @@ -539,7 +471,20 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "address", + "name": "pendingOwner", + "type": "address" + } + ], + "name": "completeOwnershipHandover", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -587,6 +532,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "debtCeiling", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -603,7 +561,7 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -624,61 +582,13 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", + "inputs": [], + "name": "feedModule", "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", "name": "", - "type": "bool" + "type": "address" } ], "stateMutability": "view", @@ -687,7 +597,7 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -715,7 +625,7 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -740,6 +650,38 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "result", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pendingOwner", + "type": "address" + } + ], + "name": "ownershipHandoverExpiresAt", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "paidFees", @@ -760,6 +702,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "rateModule", + "outputs": [ + { + "internalType": "contract IRate", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -816,39 +771,30 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "name": "renounceRole", + "inputs": [], + "name": "renounceOwnership", "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, + "inputs": [], + "name": "requestOwnershipHandover", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "stabilityModule", + "outputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -867,20 +813,14 @@ { "inputs": [ { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "stateMutability": "view", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { @@ -906,7 +846,7 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -928,18 +868,13 @@ }, { "inputs": [ - { - "internalType": "contract ERC20", - "name": "_collateralToken", - "type": "address" - }, { "internalType": "uint256", - "name": "_rate", + "name": "_debtCeiling", "type": "uint256" } ], - "name": "updateCollateralRate", + "name": "updateDebtCeiling", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -948,11 +883,11 @@ "inputs": [ { "internalType": "address", - "name": "_feedContract", + "name": "_feedModule", "type": "address" } ], - "name": "updateFeedContract", + "name": "updateFeedModule", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -960,7 +895,7 @@ { "inputs": [ { - "internalType": "address", + "internalType": "contract ERC20Token", "name": "_collateralAddress", "type": "address" }, @@ -978,12 +913,12 @@ { "inputs": [ { - "internalType": "address", - "name": "_stabilityModule", + "internalType": "contract IRate", + "name": "_rateModule", "type": "address" } ], - "name": "updateStabilityModule", + "name": "updateRateModule", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -991,7 +926,20 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "address", + "name": "_stabilityModule", + "type": "address" + } + ], + "name": "updateStabilityModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ERC20Token", "name": "", "type": "address" }, @@ -1030,7 +978,7 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -1056,18 +1004,7 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "contract ERC20", - "name": "_collateralToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], + "inputs": [], "name": "withdrawFees", "outputs": [], "stateMutability": "nonpayable", @@ -1075,46 +1012,46 @@ } ], "bytecode": { - "object": "0x60a06040523480156200001157600080fd5b506040516200352f3803806200352f833981016040819052620000349162000111565b60026001556200004660003362000062565b506001600160a01b03909116608052426004556002556200014d565b6000828152602081815260408083206001600160a01b038516845290915281205460ff1662000107576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620000be3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016200010b565b5060005b92915050565b600080604083850312156200012557600080fd5b82516001600160a01b03811681146200013d57600080fd5b6020939093015192949293505050565b6080516133956200019a6000396000818161060a015281816118d401528181611c6c01528181611d03015281816122b30152818161241c015281816125640152612b7201526133956000f3fe608060405234801561001057600080fd5b50600436106102265760003560e01c8063645ba4251161012a578063ad3b1b47116100bd578063da3b77031161008c578063e72531c811610071578063e72531c814610605578063f970c3b714610651578063feaea5861461066457600080fd5b8063da3b770314610592578063e2c7283f146105a557600080fd5b8063ad3b1b4714610462578063b80a0a7714610475578063c665471f1461047e578063d547741f1461057f57600080fd5b806391d14854116100f957806391d14854146103f05780639c52a7f114610434578063a217fddf14610447578063aab3f8681461044f57600080fd5b8063645ba425146103b957806365fae35e146103cc578063682c2058146103df5780638456cb59146103e857600080fd5b806336568abe116101bd57806349a66ca31161018c57806357b35a781161017157806357b35a78146103655780635820ba63146103785780635881fc331461038b57600080fd5b806349a66ca31461033f5780634fa739191461035257600080fd5b806336568abe146102fe5780633f4ba83a146103115780634522fa8514610319578063457972de1461032c57600080fd5b8063200d2ed2116101f9578063200d2ed2146102ac578063248a9ca3146102b55780632f2ff15d146102d8578063330283aa146102eb57600080fd5b806301ffc9a71461022b5780630408ccd6146102535780630dca59c11461026857806313f60c9a1461027f575b600080fd5b61023e610239366004612ed0565b610677565b60405190151581526020015b60405180910390f35b610266610261366004612f34565b610710565b005b61027160055481565b60405190815260200161024a565b60025460035460045461029192919083565b6040805193845260208401929092529082015260600161024a565b61027160015481565b6102716102c3366004612f51565b60009081526020819052604090206001015490565b6102666102e6366004612f6a565b610785565b6102666102f9366004612f51565b6107b0565b61026661030c366004612f6a565b610831565b61026661088a565b610266610327366004612f34565b6108d9565b61026661033a366004612f9a565b610949565b61026661034d366004612fc6565b610a41565b610266610360366004613017565b610c85565b610266610373366004613058565b610e12565b610266610386366004612fc6565b610fae565b61023e61039936600461308c565b600a60209081526000928352604080842090915290825290205460ff1681565b6102666103c73660046130ba565b611184565b6102666103da366004612f34565b611378565b61027160065481565b61026661140f565b61023e6103fe366004612f6a565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b610266610442366004612f34565b61145c565b610271600081565b61026661045d366004612fc6565b6114f0565b610266610470366004612f9a565b611780565b61027160075481565b61050c61048c366004612f34565b60086020818152600092835260409283902080546001820154600283015460038401548751606081018952600486015481526005860154968101969096526006850154978601979097526007840154958401546009850154600a860154600b870154600c9097015495999498939794969495939492939192909160ff168b565b604080519b8c526020808d019b909b528b81019990995260608b0197909752855160808b01529785015160a08a0152939095015160c088015260e087019190915261010086015261012085019290925261014084019190915261016083019190915215156101808201526101a00161024a565b61026661058d366004612f6a565b61195e565b6102666105a0366004612f9a565b611983565b6105e56105b336600461308c565b600960209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b60408051948552602085019390935291830152606082015260800161024a565b61062c7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161024a565b61026661065f366004613017565b611a9b565b61026661067236600461308c565b611c24565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061070a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b600180540361074b576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061075681611f83565b6107807fa05d8775623c9cb9a7c26c4d686f58ed0f717cdbd1543265197fc098bd63969683611f90565b505050565b6000828152602081905260409020600101546107a081611f83565b6107aa8383611f90565b50505050565b60018054036107eb576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006107f681611f83565b6002546004546108069042613135565b6108109190613148565b6003805460009061082290849061315f565b90915550504260045550600255565b73ffffffffffffffffffffffffffffffffffffffff81163314610880576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610780828261208c565b6002600154036108c6576040517f6cd6020100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006108d181611f83565b506002600155565b6001805403610914576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061091f81611f83565b6107807fd30e44b6367b3271655a8fdafcfc17a83191efab29a626ed0c76e1f42d65e33283611f90565b6001805403610984576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fd30e44b6367b3271655a8fdafcfc17a83191efab29a626ed0c76e1f42d65e3326109ae81611f83565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16610a12576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505073ffffffffffffffffffffffffffffffffffffffff90911660009081526008602081905260409091200155565b6001805403610a7c576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600860205260409020600c0154849060ff16610ae0576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff81163314801590610b38575073ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020908152604080832033845290915290205460ff16155b15610b6f576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600960209081526040808320948a16835293815283822092825260089052919091208154600a8201541115610bed576040517f8464610300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015415610c0657610c018183612147565b610c15565b610c0f816121a7565b60038301555b8673ffffffffffffffffffffffffffffffffffffffff167f2794e993350ecd3e426a1d6ba9554613ee597988342e95658e5e97a12156585286604051610c5d91815260200190565b60405180910390a2610c718183888861221a565b610c7b81836122e2565b5050505050505050565b6001805403610cc0576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16610d24576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff81163314801590610d7c575073ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020908152604080832033845290915290205460ff16155b15610db3576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808616600081815260096020908152604080832094891683529381528382209282526008905291909120610dfc8183612147565b610e09818388898961232d565b50505050505050565b6001805403610e4d576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610e5881611f83565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600860205260409020600c0154849060ff16610ebc576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020526040812090856003811115610ef457610ef4613172565b03610f055760098101849055610fa6565b6001856003811115610f1957610f19613172565b03610f2a57600a8101849055610fa6565b6002856003811115610f3e57610f3e613172565b03610f4f5760038101849055610fa6565b6003856003811115610f6357610f63613172565b03610f745760028101849055610fa6565b6040517f9d2ff48000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b6001805403610fe9576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600860205260409020600c0154849060ff1661104d576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff811633148015906110a5575073ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020908152604080832033845290915290205460ff16155b156110dc576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600960209081526040808320948a16835293815283822092825260089052919091206111258183612147565b6040805173ffffffffffffffffffffffffffffffffffffffff8881168252602082018890528916917f45892a46e6cef329bb642da6d69846d324db43d19008edc141ed82382eda1bee910160405180910390a2610c71888888886125e8565b60018054036111bf576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006111ca81611f83565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600860205260409020600c81015460ff161561122e576040517fbf508dc400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004808201889055426006830155600282018790556003820186905560098201859055600a8201849055604080517f313ce567000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff8b169263313ce567928082019260209290918290030181865afa1580156112c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e591906131a1565b6112f39060ff166012613135565b600b820155600c810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905560405173ffffffffffffffffffffffffffffffffffffffff891681527f8abd6b05a86c62b0ddaec80e50ab0326ee89a599589d4b4126cf8f94ff3d0a879060200160405180910390a15050505050505050565b60018054036113b3576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600180540361144a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061145581611f83565b5060018055565b6001805403611497576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600180540361152b576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600860205260409020600c0154849060ff1661158f576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8086166000818152600960209081526040808320948916835293815283822092825260089052919091206115d88183612147565b60006115e48284612677565b905081600201548111611623576040517f819a066c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8503611661578260020154836001015461165e919061315f565b94505b600061166d83876126e3565b9050600061167d6012600a6132e4565b611688906001613148565b60038501546116979084613148565b6116a191906132f0565b905060006116af828461315f565b86549091508111156116bf575084545b60408051338152602081018a905290810182905273ffffffffffffffffffffffffffffffffffffffff8b16907f1f0c6615429d1cdae0dfa233abf91d3b31cdbdd82c8081389832a61e1072f1ea9060600160405180910390a26117248b8b8b846125e8565b61173185878c338c61232d565b61173b8587612677565b8411611773576040517f07af690800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050565b60018054036117bb576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa05d8775623c9cb9a7c26c4d686f58ed0f717cdbd1543265197fc098bd6396966117e581611f83565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16611849576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff841660009081526008602052604081206007018054859290611881908490613135565b92505081905550826007600082825461189a9190613135565b90915550506040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044015b6020604051808303816000875af1158015611933573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611957919061332b565b5050505050565b60008281526020819052604090206001015461197981611f83565b6107aa838361208c565b60018054036119be576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006119c981611f83565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16611a2d576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020526040902060048101546006820154611a669042613135565b611a709190613148565b600582018054600090611a8490849061315f565b909155505042600682015560040192909255505050565b6001805403611ad6576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16611b3a576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff81163314801590611b92575073ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020908152604080832033845290915290205460ff16155b15611bc9576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff167fd7243f6f8212d5188fd054141cf6ea89cfc0d91facb8c3afe2f88a135848014284604051611c1191815260200190565b60405180910390a261195785858561273b565b6001805403611c5f576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c6a81611f83565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611e17576007546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb9185919084906370a0823190602401602060405180830381865afa158015611d55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d79919061334d565b611d839190613135565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015611df3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa919061332b565b73ffffffffffffffffffffffffffffffffffffffff8316611ecc5760008273ffffffffffffffffffffffffffffffffffffffff164760405160006040518083038185875af1925050503d8060008114611e8c576040519150601f19603f3d011682016040523d82523d6000602084013e611e91565b606091505b50509050806107aa576040517f6d963f8800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316600081815260086020526040908190205490517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015285926107aa9284928792906370a0823190602401602060405180830381865afa158015611f50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f74919061334d565b611f7e9190613135565b612906565b611f8d8133612987565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff166120845760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556120223390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161070a565b50600061070a565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff16156120845760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161070a565b6000806121548484612a12565b915091508083600301819055508160000361216f5750505050565b81836002016000828254612183919061315f565b92505081905550816006600082825461219c919061315f565b909155505050505050565b600681015460009081906121bb9042613135565b60048401546121ca9190613148565b60058401546121d9919061315f565b6004549091506000906121ec9042613135565b6002546121f99190613148565b600354612206919061315f565b9050612212818361315f565b949350505050565b8083600101600082825461222e919061315f565b9250508190555080846001016000828254612249919061315f565b925050819055508060056000828254612262919061315f565b90915550506040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401611914565b81600201546122f18383612677565b1115612329576040517f963c7ede00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b8360010154811161248f578084600101600082825461234c9190613135565b92505081905550808560010160008282546123679190613135565b9250508190555080600560008282546123809190613135565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8416907fcb55e9f35638c4fdb4390d3a385ac1d72a8f72e4dcf0eb1f3c79d144b1023f859060200160405180910390a26040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906044016020604051808303816000875af1158015612465573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612489919061332b565b50611957565b6001808501805460009182905591870180548392906124af908490613135565b9250508190555080600560008282546124c89190613135565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8516907fcb55e9f35638c4fdb4390d3a385ac1d72a8f72e4dcf0eb1f3c79d144b1023f859060200160405180910390a26040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906044016020604051808303816000875af11580156125ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d1919061332b565b50610fa6868686866125e38688613135565b612a6f565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526009602090815260408083209387168352929052908120805483929061262c908490613135565b909155505073ffffffffffffffffffffffffffffffffffffffff841660009081526008602052604081208054839290612666908490613135565b909155506107aa9050848383612906565b6000808260020154836001015461268e919061315f565b9050806000036126a257600091505061070a565b60006126ae8585612bdf565b90506126da6126bf6012600a6132e4565b6126ca906001613148565b6126d49084613148565b82612c30565b95945050505050565b6000806127246126f56012600a6132e4565b612700906001613148565b61270a9085613148565b64e8d4a51000866008015461271f9190613148565b612c30565b90506122128185600b0154600a61271f91906132e4565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401602060405180830381865afa1580156127a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127cc919061334d565b90506127da84843085612c77565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090829073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa158015612849573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286d919061334d565b6128779190613135565b73ffffffffffffffffffffffffffffffffffffffff80871660009081526009602090815260408083209389168352929052908120805492935083929091906128c090849061315f565b909155505073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020526040812080548392906128fa90849061315f565b90915550505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261078091859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612cbd565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16612329576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602481018390526044015b60405180910390fd5b6000806000612a20856121a7565b90506000612a306012600a6132e4565b612a3b906001613148565b60018601546003870154612a4f9085613135565b612a599190613148565b612a6391906132f0565b96919550909350505050565b80846002016000828254612a839190613135565b925050819055508060066000828254612a9c9190613135565b9250508190555080856007016000828254612ab7919061315f565b925050819055508060076000828254612ad0919061315f565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8416907f6a41f86b2a18fe00e10a9bd078e790ae82c2627a6f940166bddc2db475194a5f9060200160405180910390a26040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152306024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af1158015612bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa6919061332b565b600080612bee6012600a6132e4565b612bf9906001613148565b64e8d4a510008560080154612c12878760000154612d53565b612c1c9190613148565b612c269190613148565b61221291906132f0565b600081600003612c3f57600080fd5b82600003612c4f5750600061070a565b81612c5b600185613135565b612c6591906132f0565b612c7090600161315f565b9392505050565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526107aa9186918216906323b872dd90608401612940565b6000612cdf73ffffffffffffffffffffffffffffffffffffffff841683612d70565b90508051600014158015612d04575080806020019051810190612d02919061332b565b155b15610780576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401612a09565b600082600b0154600a612d6691906132e4565b612c709083613148565b6060612c7083836000846000808573ffffffffffffffffffffffffffffffffffffffff168486604051612da39190613366565b60006040518083038185875af1925050503d8060008114612de0576040519150601f19603f3d011682016040523d82523d6000602084013e612de5565b606091505b5091509150612df5868383612dff565b9695505050505050565b606082612e1457612e0f82612e8e565b612c70565b8151158015612e38575073ffffffffffffffffffffffffffffffffffffffff84163b155b15612e87576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401612a09565b5080612c70565b805115612e9e5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060208284031215612ee257600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612c7057600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114611f8d57600080fd5b600060208284031215612f4657600080fd5b8135612c7081612f12565b600060208284031215612f6357600080fd5b5035919050565b60008060408385031215612f7d57600080fd5b823591506020830135612f8f81612f12565b809150509250929050565b60008060408385031215612fad57600080fd5b8235612fb881612f12565b946020939093013593505050565b60008060008060808587031215612fdc57600080fd5b8435612fe781612f12565b93506020850135612ff781612f12565b9250604085013561300781612f12565b9396929550929360600135925050565b60008060006060848603121561302c57600080fd5b833561303781612f12565b9250602084013561304781612f12565b929592945050506040919091013590565b60008060006060848603121561306d57600080fd5b833561307881612f12565b925060208401356004811061304757600080fd5b6000806040838503121561309f57600080fd5b82356130aa81612f12565b91506020830135612f8f81612f12565b60008060008060008060c087890312156130d357600080fd5b86356130de81612f12565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561070a5761070a613106565b808202811582820484141761070a5761070a613106565b8082018082111561070a5761070a613106565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000602082840312156131b357600080fd5b815160ff81168114612c7057600080fd5b600181815b8085111561321d57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561320357613203613106565b8085161561321057918102915b93841c93908002906131c9565b509250929050565b6000826132345750600161070a565b816132415750600061070a565b816001811461325757600281146132615761327d565b600191505061070a565b60ff84111561327257613272613106565b50506001821b61070a565b5060208310610133831016604e8410600b84101617156132a0575081810a61070a565b6132aa83836131c4565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156132dc576132dc613106565b029392505050565b6000612c708383613225565b600082613326577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561333d57600080fd5b81518015158114612c7057600080fd5b60006020828403121561335f57600080fd5b5051919050565b6000825160005b81811015613387576020818601810151858301520161336d565b50600092019182525091905056", - "sourceMap": "479:35399:51:-:0;;;1634:251;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;203:1:46;280:6;:13;1700:42:51;2232:4:19;1731:10:51;1700;:42::i;:::-;-1:-1:-1;;;;;;1752:31:51;;;;;1824:15;1794:27;:45;:12;1849:29;479:35399;;6179:316:19;6256:4;2954:12;;;;;;;;;;;-1:-1:-1;;;;;2954:29:19;;;;;;;;;;;;6272:217;;6315:6;:12;;;;;;;;;;;-1:-1:-1;;;;;6315:29:19;;;;;;;;;:36;;-1:-1:-1;;6315:36:19;6347:4;6315:36;;;6397:12;735:10:30;;656:96;6397:12:19;-1:-1:-1;;;;;6370:40:19;6388:7;-1:-1:-1;;;;;6370:40:19;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:19;6424:11;;6272:217;-1:-1:-1;6473:5:19;6272:217;6179:316;;;;:::o;14:369:60:-;111:6;119;172:2;160:9;151:7;147:23;143:32;140:52;;;188:1;185;178:12;140:52;214:16;;-1:-1:-1;;;;;259:31:60;;249:42;;239:70;;305:1;302;295:12;239:70;373:2;358:18;;;;352:25;328:5;;352:25;;-1:-1:-1;;;14:369:60:o;:::-;479:35399:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", + "object": "0x60a06040523480156200001157600080fd5b50604051620031bc380380620031bc83398101604081905262000034916200009e565b6002600055620000443362000062565b6001600160a01b0390921660805242600655600455600755620000e3565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b600080600060608486031215620000b457600080fd5b83516001600160a01b0381168114620000cc57600080fd5b602085015160409095015190969495509392505050565b60805161308c62000130600039600081816107b801528181610d4201528181611d4c01528181611de30152818161215b015281816122ff015281816124470152612abe015261308c6000f3fe6080604052600436106102855760003560e01c806365fae35e11610153578063d707eed5116100cb578063f04e283e1161007f578063f970c3b711610064578063f970c3b71461082d578063feaea5861461084d578063fee81cf41461086d57600080fd5b8063f04e283e14610807578063f2fde38b1461081a57600080fd5b8063e2c7283f116100b0578063e2c7283f14610739578063e72531c8146107a6578063ea061ad4146107da57600080fd5b8063d707eed514610703578063e1c84ea41461072357600080fd5b80639c52a7f111610122578063aab3f86811610107578063aab3f868146105da578063b80a0a77146105fa578063c665471f1461061057600080fd5b80639c52a7f11461058d578063a12ad552146105ad57600080fd5b806365fae35e1461051c578063715018a61461053c5780638456cb59146105445780638da5cb5b1461055957600080fd5b80633f4ba83a1161020157806354d1f13d116101b55780635820ba631161019a5780635820ba63146104915780635881fc33146104b1578063645ba425146104fc57600080fd5b806354d1f13d1461046957806357b35a781461047157600080fd5b8063476343ee116101e6578063476343ee1461041457806349a66ca3146104295780634fa739191461044957600080fd5b80633f4ba83a146103df578063457972de146103f457600080fd5b806313f60c9a11610258578063256929621161023d5780632569296214610365578063330283aa1461036d578063336d391e1461038d57600080fd5b806313f60c9a14610315578063200d2ed21461034f57600080fd5b80630408ccd61461028a5780630ae5ccab146102ac5780630dca59c1146102cc5780631218c5fd146102f5575b600080fd5b34801561029657600080fd5b506102aa6102a5366004612c22565b6108a0565b005b3480156102b857600080fd5b506102aa6102c7366004612c22565b61092b565b3480156102d857600080fd5b506102e260085481565b6040519081526020015b60405180910390f35b34801561030157600080fd5b506102aa610310366004612c3f565b6109b6565b34801561032157600080fd5b5060045460055460065461033492919083565b604080519384526020840192909252908201526060016102ec565b34801561035b57600080fd5b506102e260005481565b6102aa6109ff565b34801561037957600080fd5b506102aa610388366004612c3f565b610a4f565b34801561039957600080fd5b506003546103ba9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102ec565b3480156103eb57600080fd5b506102aa610b36565b34801561040057600080fd5b506102aa61040f366004612c58565b610b45565b34801561042057600080fd5b506102aa610c61565b34801561043557600080fd5b506102aa610444366004612c84565b610db4565b34801561045557600080fd5b506102aa610464366004612cd5565b61111f565b6102aa6111df565b34801561047d57600080fd5b506102aa61048c366004612d16565b61121b565b34801561049d57600080fd5b506102aa6104ac366004612c84565b61142c565b3480156104bd57600080fd5b506104ec6104cc366004612d4a565b600c60209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016102ec565b34801561050857600080fd5b506102aa610517366004612d83565b6115c5565b34801561052857600080fd5b506102aa610537366004612c22565b611786565b6102aa61181e565b34801561055057600080fd5b506102aa611826565b34801561056557600080fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927546103ba565b34801561059957600080fd5b506102aa6105a8366004612c22565b611835565b3480156105b957600080fd5b506002546103ba9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105e657600080fd5b506102aa6105f5366004612c84565b6118ca565b34801561060657600080fd5b506102e260095481565b34801561061c57600080fd5b506106a161062b366004612c22565b600a6020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040160405180606001604052908160008201548152602001600182015481526020016002820154815250509080600701549080600801549080600901549080600a0154905089565b60408051998a526020808b0199909952898101979097526060890195909552835160808901529583015160a0880152919093015160c086015260e0850192909252610100840191909152610120830191909152610140820152610160016102ec565b34801561070f57600080fd5b506102aa61071e366004612c22565b611b1d565b34801561072f57600080fd5b506102e260075481565b34801561074557600080fd5b50610786610754366004612d4a565b600b60209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016102ec565b3480156107b257600080fd5b506103ba7f000000000000000000000000000000000000000000000000000000000000000081565b3480156107e657600080fd5b506001546103ba9073ffffffffffffffffffffffffffffffffffffffff1681565b6102aa610815366004612c22565b611ba8565b6102aa610828366004612c22565b611be8565b34801561083957600080fd5b506102aa610848366004612cd5565b611c0f565b34801561085957600080fd5b506102aa610868366004612d4a565b611d0e565b34801561087957600080fd5b506102e2610888366004612c22565b63389a75e1600c908152600091909152602090205490565b6001600054036108dc576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108e4612043565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600160005403610967576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61096f612043565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6001600054036109f2576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109fa612043565b600755565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b600160005403610a8b576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a93612043565b6003546040517fd14a27fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063d14a27fd90610ae9906004908101612dcf565b602060405180830381865afa158015610b06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2a9190612df0565b60055542600655600455565b610b3e612043565b6002600055565b600160005403610b81576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a6020526040812060040154839103610be3576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025473ffffffffffffffffffffffffffffffffffffffff163314610c34576040517f16ee083800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff9091166000908152600a6020526040902060070155565b600160005403610c9d576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015473ffffffffffffffffffffffffffffffffffffffff1680610ced576040517fd389b01000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6009805460009091556040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015610d8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610daf9190612e09565b505050565b600160005403610df0576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600a6020526040812060040154859103610e52576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff81163314801590610eaa575073ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832033845290915290205460ff16155b15610ee1576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600b60209081526040808320948a168352938152838220928252600a905291909120815460098201541115610f5f576040517f8464610300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60075485600854610f709190612e5a565b1115610fa8576040517fdd0b23bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060080154858260010154610fbd9190612e5a565b1115610ff5576040517fa99870f800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018201541561100e57611009818361207b565b6110af565b6003546040517fcf5696cb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063cf5696cb9061106890600490858201908201612e6d565b602060405180830381865afa158015611085573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a99190612df0565b60038301555b8673ffffffffffffffffffffffffffffffffffffffff167f2794e993350ecd3e426a1d6ba9554613ee597988342e95658e5e97a121565852866040516110f791815260200190565b60405180910390a261110b818388886120c2565b61111581836121c9565b5050505050505050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600a6020526040812060040154849103611181576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8085166000818152600b602090815260408083209488168352938152838220928252600a9052919091206111ca818361207b565b6111d78183873388612210565b505050505050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b600160005403611257576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61125f612043565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600a60205260408120600401548491036112c1576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600a60205260408120908460048111156112f9576112f9612ea9565b036113ae576003546040517fd14a27fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063d14a27fd906113569060048086019101612dcf565b602060405180830381865afa158015611373573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113979190612df0565b600582015542600682015560048101839055611425565b60018460048111156113c2576113c2612ea9565b036113d35760088101839055611425565b60028460048111156113e7576113e7612ea9565b036113f85760098101839055611425565b600384600481111561140c5761140c612ea9565b0361141d5760038101839055611425565b600281018390555b5050505050565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600a602052604081206004015485910361148e576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff811633148015906114e6575073ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832033845290915290205460ff16155b1561151d576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600b60209081526040808320948a168352938152838220928252600a905291909120611566818361207b565b6040805173ffffffffffffffffffffffffffffffffffffffff8881168252602082018890528916917f45892a46e6cef329bb642da6d69846d324db43d19008edc141ed82382eda1bee910160405180910390a261110b888888886124ca565b600160005403611601576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611609612043565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600a6020526040902060048101541561166a576040517fbf508dc400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600480820187905542600683015560028201869055600382018590556008820184905560098201839055604080517f313ce567000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff8a169263313ce567928082019260209290918290030181865afa1580156116fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117219190612ed8565b61172f9060ff166012612efb565b600a82015560405173ffffffffffffffffffffffffffffffffffffffff881681527f8abd6b05a86c62b0ddaec80e50ab0326ee89a599589d4b4126cf8f94ff3d0a879060200160405180910390a150505050505050565b6001600054036117c2576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600c6020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b610285612043565b61182e612043565b6001600055565b600160005403611871576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600c6020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600a602052604081206004015485910361192c576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8086166000818152600b602090815260408083209489168352938152838220928252600a905291909120611975818361207b565b6000611981828461257c565b9050816002015481116119c0576040517f819a066c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85036119fe57826002015483600101546119fb9190612e5a565b94505b6000611a0a838761261c565b90506000611a1a6012600a61302e565b611a2590606461303a565b6003850154611a34908461303a565b611a3e9190613051565b90506000611a4c8284612e5a565b8654909150811115611a5c575084545b60408051338152602081018a905290810182905273ffffffffffffffffffffffffffffffffffffffff8b16907f1f0c6615429d1cdae0dfa233abf91d3b31cdbdd82c8081389832a61e1072f1ea9060600160405180910390a2611ac18b8b8b846124ca565b611ace85878c338c612210565b611ad8858761257c565b8411611b10576040517f07af690800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050565b600160005403611b59576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b61612043565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611bb0612043565b63389a75e1600c52806000526020600c208054421115611bd857636f5e88186000526004601cfd5b60009055611be581612680565b50565b611bf0612043565b8060601b611c0657637448fbae6000526004601cfd5b611be581612680565b600160005403611c4b576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600a6020526040812060040154849103611cad576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff167fd7243f6f8212d5188fd054141cf6ea89cfc0d91facb8c3afe2f88a135848014283604051611cf591815260200190565b60405180910390a2611d088484846126e6565b50505050565b600160005403611d4a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611ed3576009546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb9184919084906370a0823190602401602060405180830381865afa158015611e35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e599190612df0565b611e639190612efb565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015610d8b573d6000803e3d6000fd5b73ffffffffffffffffffffffffffffffffffffffff8216611f885760008173ffffffffffffffffffffffffffffffffffffffff164760405160006040518083038185875af1925050503d8060008114611f48576040519150601f19603f3d011682016040523d82523d6000602084013e611f4d565b606091505b5050905080610daf576040517f6d963f8800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000818152600a6020526040908190205490517f70a082310000000000000000000000000000000000000000000000000000000081523060048201528492610daf9284928692906370a0823190602401602060405180830381865afa15801561200c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120309190612df0565b61203a9190612efb565b6128b1565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314612079576382b429006000526004601cfd5b565b6000806120888484612900565b91509150808360030181905550816000036120a35750505050565b818360020160008282546120b79190612e5a565b909155505050505050565b808360010160008282546120d69190612e5a565b92505081905550808460010160008282546120f19190612e5a565b92505081905550806008600082825461210a9190612e5a565b90915550506040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f19906044015b6020604051808303816000875af11580156121a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114259190612e09565b81600201546121d8838361257c565b111561203f576040517f963c7ede00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83600101548111612372578084600101600082825461222f9190612efb565b925050819055508085600101600082825461224a9190612efb565b9250508190555080600860008282546122639190612efb565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8416907fcb55e9f35638c4fdb4390d3a385ac1d72a8f72e4dcf0eb1f3c79d144b1023f859060200160405180910390a26040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906044016020604051808303816000875af1158015612348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061236c9190612e09565b50611425565b600180850180546000918290559187018054839290612392908490612efb565b9250508190555080600860008282546123ab9190612efb565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8516907fcb55e9f35638c4fdb4390d3a385ac1d72a8f72e4dcf0eb1f3c79d144b1023f859060200160405180910390a26040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906044016020604051808303816000875af1158015612490573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b49190612e09565b506111d78585856124c58587612efb565b6129ef565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600b602090815260408083209387168352929052908120805483929061250e908490612efb565b909155505073ffffffffffffffffffffffffffffffffffffffff84166000908152600a602052604081208054839290612548908490612efb565b909155505073ffffffffffffffffffffffffffffffffffffffff84163b60000361257157600080fd5b611d088483836128b1565b600080826002015483600101546125939190612e5a565b9050806000036125a7576000915050612616565b82546000036125d9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff915050612616565b60006125e58585612aed565b90506126116125f66012600a61302e565b61260190606461303a565b61260b908461303a565b82612b46565b925050505b92915050565b600082600a0154600a61262f919061302e565b64e8d4a510008460070154612644919061303a565b61264e919061303a565b61265a6012600a61302e565b61266590600161303a565b61266f908461303a565b6126799190613051565b9392505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401602060405180830381865afa158015612753573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127779190612df0565b905061278584333085612b86565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090829073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa1580156127f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128189190612df0565b6128229190612efb565b73ffffffffffffffffffffffffffffffffffffffff8087166000908152600b6020908152604080832093891683529290529081208054929350839290919061286b908490612e5a565b909155505073ffffffffffffffffffffffffffffffffffffffff85166000908152600a6020526040812080548392906128a5908490612e5a565b90915550505050505050565b81601452806034526fa9059cbb00000000000000000000000060005260206000604460106000875af13d1560016000511417166128f6576390b8ec186000526004601cfd5b6000603452505050565b6003546040517fcf5696cb0000000000000000000000000000000000000000000000000000000081526000918291829173ffffffffffffffffffffffffffffffffffffffff169063cf5696cb9061295f90600490898201908201612e6d565b602060405180830381865afa15801561297c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129a09190612df0565b905060006129b06012600a61302e565b6129bb90606461303a565b600186015460038701546129cf9085612efb565b6129d9919061303a565b6129e39190613051565b96919550909350505050565b80846002016000828254612a039190612efb565b925050819055508060096000828254612a1c9190612e5a565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8416907f6a41f86b2a18fe00e10a9bd078e790ae82c2627a6f940166bddc2db475194a5f9060200160405180910390a26040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152306024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90606401612186565b600080612afc6012600a61302e565b612b0790600161303a565b64e8d4a510008560070154612b20878760000154612be3565b612b2a919061303a565b612b34919061303a565b612b3e9190613051565b949350505050565b600081600003612b5557600080fd5b82600003612b6557506000612616565b81612b71600185612efb565b612b7b9190613051565b612679906001612e5a565b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c52602060006064601c6000895af13d156001600051141716612bd557637939f4246000526004601cfd5b600060605260405250505050565b600082600a0154600a612bf6919061302e565b612679908361303a565b73ffffffffffffffffffffffffffffffffffffffff81168114611be557600080fd5b600060208284031215612c3457600080fd5b813561267981612c00565b600060208284031215612c5157600080fd5b5035919050565b60008060408385031215612c6b57600080fd5b8235612c7681612c00565b946020939093013593505050565b60008060008060808587031215612c9a57600080fd5b8435612ca581612c00565b93506020850135612cb581612c00565b92506040850135612cc581612c00565b9396929550929360600135925050565b600080600060608486031215612cea57600080fd5b8335612cf581612c00565b92506020840135612d0581612c00565b929592945050506040919091013590565b600080600060608486031215612d2b57600080fd5b8335612d3681612c00565b9250602084013560058110612d0557600080fd5b60008060408385031215612d5d57600080fd5b8235612d6881612c00565b91506020830135612d7881612c00565b809150509250929050565b60008060008060008060c08789031215612d9c57600080fd5b8635612da781612c00565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b81548152600182015460208201526002820154604082015260608101612616565b600060208284031215612e0257600080fd5b5051919050565b600060208284031215612e1b57600080fd5b8151801515811461267957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561261657612616612e2b565b82548152600183015460208201526002830154604082015260c081018254606083015260018301546080830152600283015460a0830152612679565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060208284031215612eea57600080fd5b815160ff8116811461267957600080fd5b8181038181111561261657612616612e2b565b600181815b80851115612f6757817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115612f4d57612f4d612e2b565b80851615612f5a57918102915b93841c9390800290612f13565b509250929050565b600082612f7e57506001612616565b81612f8b57506000612616565b8160018114612fa15760028114612fab57612fc7565b6001915050612616565b60ff841115612fbc57612fbc612e2b565b50506001821b612616565b5060208310610133831016604e8410600b8410161715612fea575081810a612616565b612ff48383612f0e565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561302657613026612e2b565b029392505050565b60006126798383612f6f565b808202811582820484141761261657612616612e2b565b600082613087577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056", + "sourceMap": "506:35048:38:-:0;;;1859:296;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;203:1:29;280:6;:13;1947:28:38;1964:10;1947:16;:28::i;:::-;-1:-1:-1;;;;;1985:31:38;;;;;2057:15;2027:27;:45;:12;2082:29;2122:11;:26;506:35048;;4883:1190:22;-1:-1:-1;;;;;5793:26:22;-1:-1:-1;;5876:29:22;;;5793:26;6031:1;5991:38;6031:1;;5980:63;4883:1190;:::o;14:430:60:-;120:6;128;136;189:2;177:9;168:7;164:23;160:32;157:52;;;205:1;202;195:12;157:52;231:16;;-1:-1:-1;;;;;276:31:60;;266:42;;256:70;;322:1;319;312:12;256:70;390:2;375:18;;369:25;434:2;419:18;;;413:25;345:5;;369:25;;-1:-1:-1;413:25:60;14:430;-1:-1:-1;;;14:430:60:o;:::-;506:35048:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "linkReferences": {} }, "deployedBytecode": { - "object": "0x608060405234801561001057600080fd5b50600436106102265760003560e01c8063645ba4251161012a578063ad3b1b47116100bd578063da3b77031161008c578063e72531c811610071578063e72531c814610605578063f970c3b714610651578063feaea5861461066457600080fd5b8063da3b770314610592578063e2c7283f146105a557600080fd5b8063ad3b1b4714610462578063b80a0a7714610475578063c665471f1461047e578063d547741f1461057f57600080fd5b806391d14854116100f957806391d14854146103f05780639c52a7f114610434578063a217fddf14610447578063aab3f8681461044f57600080fd5b8063645ba425146103b957806365fae35e146103cc578063682c2058146103df5780638456cb59146103e857600080fd5b806336568abe116101bd57806349a66ca31161018c57806357b35a781161017157806357b35a78146103655780635820ba63146103785780635881fc331461038b57600080fd5b806349a66ca31461033f5780634fa739191461035257600080fd5b806336568abe146102fe5780633f4ba83a146103115780634522fa8514610319578063457972de1461032c57600080fd5b8063200d2ed2116101f9578063200d2ed2146102ac578063248a9ca3146102b55780632f2ff15d146102d8578063330283aa146102eb57600080fd5b806301ffc9a71461022b5780630408ccd6146102535780630dca59c11461026857806313f60c9a1461027f575b600080fd5b61023e610239366004612ed0565b610677565b60405190151581526020015b60405180910390f35b610266610261366004612f34565b610710565b005b61027160055481565b60405190815260200161024a565b60025460035460045461029192919083565b6040805193845260208401929092529082015260600161024a565b61027160015481565b6102716102c3366004612f51565b60009081526020819052604090206001015490565b6102666102e6366004612f6a565b610785565b6102666102f9366004612f51565b6107b0565b61026661030c366004612f6a565b610831565b61026661088a565b610266610327366004612f34565b6108d9565b61026661033a366004612f9a565b610949565b61026661034d366004612fc6565b610a41565b610266610360366004613017565b610c85565b610266610373366004613058565b610e12565b610266610386366004612fc6565b610fae565b61023e61039936600461308c565b600a60209081526000928352604080842090915290825290205460ff1681565b6102666103c73660046130ba565b611184565b6102666103da366004612f34565b611378565b61027160065481565b61026661140f565b61023e6103fe366004612f6a565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b610266610442366004612f34565b61145c565b610271600081565b61026661045d366004612fc6565b6114f0565b610266610470366004612f9a565b611780565b61027160075481565b61050c61048c366004612f34565b60086020818152600092835260409283902080546001820154600283015460038401548751606081018952600486015481526005860154968101969096526006850154978601979097526007840154958401546009850154600a860154600b870154600c9097015495999498939794969495939492939192909160ff168b565b604080519b8c526020808d019b909b528b81019990995260608b0197909752855160808b01529785015160a08a0152939095015160c088015260e087019190915261010086015261012085019290925261014084019190915261016083019190915215156101808201526101a00161024a565b61026661058d366004612f6a565b61195e565b6102666105a0366004612f9a565b611983565b6105e56105b336600461308c565b600960209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b60408051948552602085019390935291830152606082015260800161024a565b61062c7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161024a565b61026661065f366004613017565b611a9b565b61026661067236600461308c565b611c24565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061070a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b600180540361074b576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061075681611f83565b6107807fa05d8775623c9cb9a7c26c4d686f58ed0f717cdbd1543265197fc098bd63969683611f90565b505050565b6000828152602081905260409020600101546107a081611f83565b6107aa8383611f90565b50505050565b60018054036107eb576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006107f681611f83565b6002546004546108069042613135565b6108109190613148565b6003805460009061082290849061315f565b90915550504260045550600255565b73ffffffffffffffffffffffffffffffffffffffff81163314610880576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610780828261208c565b6002600154036108c6576040517f6cd6020100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006108d181611f83565b506002600155565b6001805403610914576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061091f81611f83565b6107807fd30e44b6367b3271655a8fdafcfc17a83191efab29a626ed0c76e1f42d65e33283611f90565b6001805403610984576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fd30e44b6367b3271655a8fdafcfc17a83191efab29a626ed0c76e1f42d65e3326109ae81611f83565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16610a12576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505073ffffffffffffffffffffffffffffffffffffffff90911660009081526008602081905260409091200155565b6001805403610a7c576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600860205260409020600c0154849060ff16610ae0576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff81163314801590610b38575073ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020908152604080832033845290915290205460ff16155b15610b6f576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600960209081526040808320948a16835293815283822092825260089052919091208154600a8201541115610bed576040517f8464610300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015415610c0657610c018183612147565b610c15565b610c0f816121a7565b60038301555b8673ffffffffffffffffffffffffffffffffffffffff167f2794e993350ecd3e426a1d6ba9554613ee597988342e95658e5e97a12156585286604051610c5d91815260200190565b60405180910390a2610c718183888861221a565b610c7b81836122e2565b5050505050505050565b6001805403610cc0576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16610d24576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff81163314801590610d7c575073ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020908152604080832033845290915290205460ff16155b15610db3576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808616600081815260096020908152604080832094891683529381528382209282526008905291909120610dfc8183612147565b610e09818388898961232d565b50505050505050565b6001805403610e4d576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610e5881611f83565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600860205260409020600c0154849060ff16610ebc576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020526040812090856003811115610ef457610ef4613172565b03610f055760098101849055610fa6565b6001856003811115610f1957610f19613172565b03610f2a57600a8101849055610fa6565b6002856003811115610f3e57610f3e613172565b03610f4f5760038101849055610fa6565b6003856003811115610f6357610f63613172565b03610f745760028101849055610fa6565b6040517f9d2ff48000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b6001805403610fe9576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600860205260409020600c0154849060ff1661104d576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff811633148015906110a5575073ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020908152604080832033845290915290205460ff16155b156110dc576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600960209081526040808320948a16835293815283822092825260089052919091206111258183612147565b6040805173ffffffffffffffffffffffffffffffffffffffff8881168252602082018890528916917f45892a46e6cef329bb642da6d69846d324db43d19008edc141ed82382eda1bee910160405180910390a2610c71888888886125e8565b60018054036111bf576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006111ca81611f83565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600860205260409020600c81015460ff161561122e576040517fbf508dc400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004808201889055426006830155600282018790556003820186905560098201859055600a8201849055604080517f313ce567000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff8b169263313ce567928082019260209290918290030181865afa1580156112c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e591906131a1565b6112f39060ff166012613135565b600b820155600c810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905560405173ffffffffffffffffffffffffffffffffffffffff891681527f8abd6b05a86c62b0ddaec80e50ab0326ee89a599589d4b4126cf8f94ff3d0a879060200160405180910390a15050505050505050565b60018054036113b3576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600180540361144a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061145581611f83565b5060018055565b6001805403611497576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600180540361152b576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600860205260409020600c0154849060ff1661158f576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8086166000818152600960209081526040808320948916835293815283822092825260089052919091206115d88183612147565b60006115e48284612677565b905081600201548111611623576040517f819a066c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8503611661578260020154836001015461165e919061315f565b94505b600061166d83876126e3565b9050600061167d6012600a6132e4565b611688906001613148565b60038501546116979084613148565b6116a191906132f0565b905060006116af828461315f565b86549091508111156116bf575084545b60408051338152602081018a905290810182905273ffffffffffffffffffffffffffffffffffffffff8b16907f1f0c6615429d1cdae0dfa233abf91d3b31cdbdd82c8081389832a61e1072f1ea9060600160405180910390a26117248b8b8b846125e8565b61173185878c338c61232d565b61173b8587612677565b8411611773576040517f07af690800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050565b60018054036117bb576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa05d8775623c9cb9a7c26c4d686f58ed0f717cdbd1543265197fc098bd6396966117e581611f83565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16611849576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff841660009081526008602052604081206007018054859290611881908490613135565b92505081905550826007600082825461189a9190613135565b90915550506040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044015b6020604051808303816000875af1158015611933573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611957919061332b565b5050505050565b60008281526020819052604090206001015461197981611f83565b6107aa838361208c565b60018054036119be576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006119c981611f83565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16611a2d576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020526040902060048101546006820154611a669042613135565b611a709190613148565b600582018054600090611a8490849061315f565b909155505042600682015560040192909255505050565b6001805403611ad6576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16611b3a576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff81163314801590611b92575073ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020908152604080832033845290915290205460ff16155b15611bc9576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff167fd7243f6f8212d5188fd054141cf6ea89cfc0d91facb8c3afe2f88a135848014284604051611c1191815260200190565b60405180910390a261195785858561273b565b6001805403611c5f576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c6a81611f83565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611e17576007546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb9185919084906370a0823190602401602060405180830381865afa158015611d55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d79919061334d565b611d839190613135565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015611df3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa919061332b565b73ffffffffffffffffffffffffffffffffffffffff8316611ecc5760008273ffffffffffffffffffffffffffffffffffffffff164760405160006040518083038185875af1925050503d8060008114611e8c576040519150601f19603f3d011682016040523d82523d6000602084013e611e91565b606091505b50509050806107aa576040517f6d963f8800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316600081815260086020526040908190205490517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015285926107aa9284928792906370a0823190602401602060405180830381865afa158015611f50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f74919061334d565b611f7e9190613135565b612906565b611f8d8133612987565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff166120845760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556120223390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161070a565b50600061070a565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff16156120845760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161070a565b6000806121548484612a12565b915091508083600301819055508160000361216f5750505050565b81836002016000828254612183919061315f565b92505081905550816006600082825461219c919061315f565b909155505050505050565b600681015460009081906121bb9042613135565b60048401546121ca9190613148565b60058401546121d9919061315f565b6004549091506000906121ec9042613135565b6002546121f99190613148565b600354612206919061315f565b9050612212818361315f565b949350505050565b8083600101600082825461222e919061315f565b9250508190555080846001016000828254612249919061315f565b925050819055508060056000828254612262919061315f565b90915550506040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401611914565b81600201546122f18383612677565b1115612329576040517f963c7ede00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b8360010154811161248f578084600101600082825461234c9190613135565b92505081905550808560010160008282546123679190613135565b9250508190555080600560008282546123809190613135565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8416907fcb55e9f35638c4fdb4390d3a385ac1d72a8f72e4dcf0eb1f3c79d144b1023f859060200160405180910390a26040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906044016020604051808303816000875af1158015612465573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612489919061332b565b50611957565b6001808501805460009182905591870180548392906124af908490613135565b9250508190555080600560008282546124c89190613135565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8516907fcb55e9f35638c4fdb4390d3a385ac1d72a8f72e4dcf0eb1f3c79d144b1023f859060200160405180910390a26040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906044016020604051808303816000875af11580156125ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d1919061332b565b50610fa6868686866125e38688613135565b612a6f565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526009602090815260408083209387168352929052908120805483929061262c908490613135565b909155505073ffffffffffffffffffffffffffffffffffffffff841660009081526008602052604081208054839290612666908490613135565b909155506107aa9050848383612906565b6000808260020154836001015461268e919061315f565b9050806000036126a257600091505061070a565b60006126ae8585612bdf565b90506126da6126bf6012600a6132e4565b6126ca906001613148565b6126d49084613148565b82612c30565b95945050505050565b6000806127246126f56012600a6132e4565b612700906001613148565b61270a9085613148565b64e8d4a51000866008015461271f9190613148565b612c30565b90506122128185600b0154600a61271f91906132e4565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401602060405180830381865afa1580156127a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127cc919061334d565b90506127da84843085612c77565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090829073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa158015612849573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286d919061334d565b6128779190613135565b73ffffffffffffffffffffffffffffffffffffffff80871660009081526009602090815260408083209389168352929052908120805492935083929091906128c090849061315f565b909155505073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020526040812080548392906128fa90849061315f565b90915550505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261078091859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612cbd565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16612329576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602481018390526044015b60405180910390fd5b6000806000612a20856121a7565b90506000612a306012600a6132e4565b612a3b906001613148565b60018601546003870154612a4f9085613135565b612a599190613148565b612a6391906132f0565b96919550909350505050565b80846002016000828254612a839190613135565b925050819055508060066000828254612a9c9190613135565b9250508190555080856007016000828254612ab7919061315f565b925050819055508060076000828254612ad0919061315f565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8416907f6a41f86b2a18fe00e10a9bd078e790ae82c2627a6f940166bddc2db475194a5f9060200160405180910390a26040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152306024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af1158015612bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa6919061332b565b600080612bee6012600a6132e4565b612bf9906001613148565b64e8d4a510008560080154612c12878760000154612d53565b612c1c9190613148565b612c269190613148565b61221291906132f0565b600081600003612c3f57600080fd5b82600003612c4f5750600061070a565b81612c5b600185613135565b612c6591906132f0565b612c7090600161315f565b9392505050565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526107aa9186918216906323b872dd90608401612940565b6000612cdf73ffffffffffffffffffffffffffffffffffffffff841683612d70565b90508051600014158015612d04575080806020019051810190612d02919061332b565b155b15610780576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401612a09565b600082600b0154600a612d6691906132e4565b612c709083613148565b6060612c7083836000846000808573ffffffffffffffffffffffffffffffffffffffff168486604051612da39190613366565b60006040518083038185875af1925050503d8060008114612de0576040519150601f19603f3d011682016040523d82523d6000602084013e612de5565b606091505b5091509150612df5868383612dff565b9695505050505050565b606082612e1457612e0f82612e8e565b612c70565b8151158015612e38575073ffffffffffffffffffffffffffffffffffffffff84163b155b15612e87576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401612a09565b5080612c70565b805115612e9e5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060208284031215612ee257600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612c7057600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114611f8d57600080fd5b600060208284031215612f4657600080fd5b8135612c7081612f12565b600060208284031215612f6357600080fd5b5035919050565b60008060408385031215612f7d57600080fd5b823591506020830135612f8f81612f12565b809150509250929050565b60008060408385031215612fad57600080fd5b8235612fb881612f12565b946020939093013593505050565b60008060008060808587031215612fdc57600080fd5b8435612fe781612f12565b93506020850135612ff781612f12565b9250604085013561300781612f12565b9396929550929360600135925050565b60008060006060848603121561302c57600080fd5b833561303781612f12565b9250602084013561304781612f12565b929592945050506040919091013590565b60008060006060848603121561306d57600080fd5b833561307881612f12565b925060208401356004811061304757600080fd5b6000806040838503121561309f57600080fd5b82356130aa81612f12565b91506020830135612f8f81612f12565b60008060008060008060c087890312156130d357600080fd5b86356130de81612f12565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561070a5761070a613106565b808202811582820484141761070a5761070a613106565b8082018082111561070a5761070a613106565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000602082840312156131b357600080fd5b815160ff81168114612c7057600080fd5b600181815b8085111561321d57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561320357613203613106565b8085161561321057918102915b93841c93908002906131c9565b509250929050565b6000826132345750600161070a565b816132415750600061070a565b816001811461325757600281146132615761327d565b600191505061070a565b60ff84111561327257613272613106565b50506001821b61070a565b5060208310610133831016604e8410600b84101617156132a0575081810a61070a565b6132aa83836131c4565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156132dc576132dc613106565b029392505050565b6000612c708383613225565b600082613326577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561333d57600080fd5b81518015158114612c7057600080fd5b60006020828403121561335f57600080fd5b5051919050565b6000825160005b81811015613387576020818601810151858301520161336d565b50600092019182525091905056", - "sourceMap": "479:35399:51:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2565:202:19;;;;;;:::i;:::-;;:::i;:::-;;;516:14:60;;509:22;491:41;;479:2;464:18;2565:202:19;;;;;;;;4044:177:51;;;;;;:::i;:::-;;:::i;:::-;;1073:19;;;;;;;;;1100:25:60;;;1088:2;1073:18;:19:51;954:177:60;1021:28:51;;;;;;;;;;;;;;;;;1338:25:60;;;1394:2;1379:18;;1372:34;;;;1422:18;;;1415:34;1326:2;1311:18;1021:28:51;1136:319:60;211:21:46;;;;;;3810:120:19;;;;;;:::i;:::-;3875:7;3901:12;;;;;;;;;;:22;;;;3810:120;4226:136;;;;;;:::i;:::-;;:::i;11026:306:51:-;;;;;;:::i;:::-;;:::i;5328:245:19:-;;;;;;:::i;:::-;;:::i;2802:107:51:-;;;:::i;3606:165::-;;;;;;:::i;:::-;;:::i;10043:273::-;;;;;;:::i;:::-;;:::i;19401:1193::-;;;;;;:::i;:::-;;:::i;21418:586::-;;;;;;:::i;:::-;;:::i;8729:875::-;;;;;;:::i;:::-;;:::i;16828:744::-;;;;;;:::i;:::-;;:::i;1474:63::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;7100:1001;;;;;;:::i;:::-;;:::i;13958:114::-;;;;;;:::i;:::-;;:::i;1128:26::-;;;;;;3227:109;;;:::i;2854:136:19:-;;;;;;:::i;:::-;2931:4;2954:12;;;;;;;;;;;:29;;;;;;;;;;;;;;;;2854:136;14332:119:51;;;;;;:::i;:::-;;:::i;2187:49:19:-;;2232:4;2187:49;;23170:2414:51;;;;;;:::i;:::-;;:::i;13364:345::-;;;;;;:::i;:::-;;:::i;1179:23::-;;;;;;1245:57;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6338:25:60;;;6394:2;6379:18;;;6372:34;;;;6422:18;;;6415:34;;;;6480:2;6465:18;;6458:34;;;;6529:13;;6523:3;6508:19;;6501:42;6586:15;;;6580:22;6574:3;6559:19;;6552:51;6646:15;;;;6640:22;6634:3;6619:19;;6612:51;6694:3;6679:19;;6672:35;;;;6738:3;6723:19;;6716:35;6782:3;6767:19;;6760:35;;;;6826:3;6811:19;;6804:35;;;;6870:3;6855:19;;6848:35;;;;6927:15;6920:23;6914:3;6899:19;;6892:52;6325:3;6310:19;1245:57:51;5862:1088:60;4642:138:19;;;;;;:::i;:::-;;:::i;12243:533:51:-;;;;;;:::i;:::-;;:::i;1349:67::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7594:25:60;;;7650:2;7635:18;;7628:34;;;;7678:18;;;7671:34;7736:2;7721:18;;7714:34;7581:3;7566:19;1349:67:51;7363:391:60;952:40:51;;;;;;;;7953:42:60;7941:55;;;7923:74;;7911:2;7896:18;952:40:51;7759:244:60;15153:330:51;;;;;;:::i;:::-;;:::i;5190:750::-;;;;;;:::i;:::-;;:::i;2565:202:19:-;2650:4;2673:47;;;2688:32;2673:47;;:87;;-1:-1:-1;876:25:38;861:40;;;;2724:36:19;2666:94;2565:202;-1:-1:-1;;2565:202:19:o;4044:177:51:-;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2232:4:19::1;2464:16;2232:4:::0;2464:10:::1;:16::i;:::-;4163:51:51::2;667:34;4197:16;4163:10;:51::i;:::-;;387:1:46::1;4044:177:51::0;:::o;4226:136:19:-;3875:7;3901:12;;;;;;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4330:25:::1;4341:4;4347:7;4330:10;:25::i;:::-;;4226:136:::0;;;:::o;11026:306:51:-;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2232:4:19::1;2464:16;2232:4:::0;2464:10:::1;:16::i;:::-;11213:12:51::2;:17:::0;11182:27;;11164:45:::2;::::0;:15:::2;:45;:::i;:::-;11163:67;;;;:::i;:::-;11131:28:::0;:99;;:28:::2;::::0;:99:::2;::::0;;;::::2;:::i;:::-;::::0;;;-1:-1:-1;;11270:15:51::2;11240:27:::0;:45;-1:-1:-1;11240:12:51::2;11296:29:::0;11026:306::o;5328:245:19:-;5421:34;;;735:10:30;5421:34:19;5417:102;;5478:30;;;;;;;;;;;;;;5417:102;5529:37;5541:4;5547:18;5529:11;:37::i;2802:107:51:-;203:1:46;437:6;;:14;433:38;;460:11;;;;;;;;;;;;;;433:38;2232:4:19::1;2464:16;2232:4:::0;2464:10:::1;:16::i;:::-;-1:-1:-1::0;203:1:46::2;2889:6:51;:13:::0;2802:107::o;3606:165::-;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2232:4:19::1;2464:16;2232:4:::0;2464:10:::1;:16::i;:::-;3719:45:51::2;581:31;3750:13;3719:10;:45::i;10043:273::-:0;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;581:31:51::1;2464:16:19;2475:4;2464:10;:16::i;:::-;2025:35:51::2;::::0;::::2;;::::0;;;:17:::2;:35;::::0;;;;:42:::2;;::::0;10215:18;;2025:42:::2;;2020:80;;2076:24;;;;;;;;;;;;;;2020:80;-1:-1:-1::0;;10250:44:51::3;::::0;;::::3;;::::0;;;:17:::3;:44;::::0;;;;;;;:50:::3;:59:::0;10043:273::o;19401:1193::-;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2025:35:51::1;::::0;::::1;;::::0;;;:17:::1;:35;::::0;;;;:42:::1;;::::0;19557:16;;2025:42:::1;;2020:80;;2076:24;;;;;;;;;;;;;;2020:80;19605:6:::0;2379:20:::2;::::0;::::2;2389:10;2379:20;::::0;::::2;::::0;:56:::2;;-1:-1:-1::0;2404:19:51::2;::::0;::::2;;::::0;;;:11:::2;:19;::::0;;;;;;;2424:10:::2;2404:31:::0;;;;;;;;::::2;;2403:32;2379:56;2375:91;;;2444:22;;;;;;;;;;;;;;2375:91;19654:30:::3;::::0;;::::3;19627:24;19654:30:::0;;;:12:::3;:30;::::0;;;;;;;:38;;::::3;::::0;;;;;;;;19739:35;;;:17:::3;:35:::0;;;;;;19967:26;;19926:38:::3;::::0;::::3;::::0;:67:::3;19922:111;;;20002:31;;;;;;;;;;;;;;19922:111;20240:21;::::0;::::3;::::0;:26;20236:163:::3;;20268:32;20280:11;20293:6;20268:11;:32::i;:::-;20236:163;;;20349:50;20387:11;20349:37;:50::i;:::-;20315:31;::::0;::::3;:84:::0;20236:163:::3;20430:6;20415:31;;;20438:7;20415:31;;;;1100:25:60::0;;1088:2;1073:18;;954:177;20415:31:51::3;;;;;;;;20456:48;20470:11;20483:6;20491:3;20496:7;20456:13;:48::i;:::-;20515:72;20567:11;20580:6;20515:51;:72::i;:::-;19617:977;;2110:1:::2;387::46::1;19401:1193:51::0;;;;:::o;21418:586::-;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2025:35:51::1;::::0;::::1;;::::0;;;:17:::1;:35;::::0;;;;:42:::1;;::::0;21561:16;;2025:42:::1;;2020:80;;2076:24;;;;;;;;;;;;;;2020:80;21609:6:::0;2379:20:::2;::::0;::::2;2389:10;2379:20;::::0;::::2;::::0;:56:::2;;-1:-1:-1::0;2404:19:51::2;::::0;::::2;;::::0;;;:11:::2;:19;::::0;;;;;;;2424:10:::2;2404:31:::0;;;;;;;;::::2;;2403:32;2379:56;2375:91;;;2444:22;;;;;;;;;;;;;;2375:91;21658:30:::3;::::0;;::::3;21631:24;21658:30:::0;;;:12:::3;:30;::::0;;;;;;;:38;;::::3;::::0;;;;;;;;21743:35;;;:17:::3;:35:::0;;;;;;21895:32:::3;21743:35:::0;21658:38;21895:11:::3;:32::i;:::-;21938:59;21952:11;21965:6;21973;21981;21989:7;21938:13;:59::i;:::-;21621:383;;2110:1:::2;387::46::1;21418:586:51::0;;;:::o;8729:875::-;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2232:4:19::1;2464:16;2232:4:::0;2464:10:::1;:16::i;:::-;2025:35:51::2;::::0;::::2;;::::0;;;:17:::2;:35;::::0;;;;:42:::2;;::::0;8928:16;;2025:42:::2;;2020:80;;2076:24;;;;;;;;;;;;;;2020:80;8997:35:::3;::::0;::::3;8960:34;8997:35:::0;;;:17:::3;:35;::::0;;;;;9047:6:::3;:43;;;;;;;;:::i;:::-;::::0;9043:555:::3;;9106:23;::::0;::::3;:31:::0;;;9043:555:::3;;;9168:50;9158:6;:60;;;;;;;;:::i;:::-;::::0;9154:444:::3;;9234:38;::::0;::::3;:46:::0;;;9154:444:::3;;;9311:38;9301:6;:48;;;;;;;;:::i;:::-;::::0;9297:301:::3;;9365:28;::::0;::::3;:36:::0;;;9297:301:::3;;;9432:42;9422:6;:52;;;;;;;;:::i;:::-;::::0;9418:180:::3;;9490:32;::::0;::::3;:40:::0;;;9418:180:::3;;;9568:19;;;;;;;;;;;;;;9418:180;8950:654;2490:1:19::2;387::46::1;8729:875:51::0;;;:::o;16828:744::-;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2025:35:51::1;::::0;::::1;;::::0;;;:17:::1;:35;::::0;;;;:42:::1;;::::0;16990:16;;2025:42:::1;;2020:80;;2076:24;;;;;;;;;;;;;;2020:80;17038:6:::0;2379:20:::2;::::0;::::2;2389:10;2379:20;::::0;::::2;::::0;:56:::2;;-1:-1:-1::0;2404:19:51::2;::::0;::::2;;::::0;;;:11:::2;:19;::::0;;;;;;;2424:10:::2;2404:31:::0;;;;;;;;::::2;;2403:32;2379:56;2375:91;;;2444:22;;;;;;;;;;;;;;2375:91;17087:30:::3;::::0;;::::3;17060:24;17087:30:::0;;;:12:::3;:30;::::0;;;;;;;:38;;::::3;::::0;;;;;;;;17172:35;;;:17:::3;:35:::0;;;;;;17323:32:::3;17172:35:::0;17087:38;17323:11:::3;:32::i;:::-;17371:41;::::0;;::::3;9014:55:60::0;;;8996:74;;9101:2;9086:18;;9079:34;;;17371:41:51;::::3;::::0;::::3;::::0;8969:18:60;17371:41:51::3;;;;;;;17423:59;17443:16;17461:6;17469:3;17474:7;17423:19;:59::i;7100:1001::-:0;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2232:4:19::1;2464:16;2232:4:::0;2464:10:::1;:16::i;:::-;7439:35:51::2;::::0;::::2;7402:34;7439:35:::0;;;:17:::2;:35;::::0;;;;7488:18:::2;::::0;::::2;::::0;::::2;;7484:56;;;7515:25;;;;;;;;;;;;;;7484:56;7551:20;::::0;;::::2;:33:::0;;;7632:15:::2;7594:35:::0;;;:53;:35:::2;7657:32:::0;::::2;:56:::0;;;7723:28:::2;::::0;::::2;:48:::0;;;7781:23:::2;::::0;::::2;:38:::0;;;7829::::2;::::0;::::2;:68:::0;;;7970:27:::2;::::0;;;;;;;:25:::2;::::0;::::2;::::0;::::2;::::0;:27;;::::2;::::0;::::2;::::0;;;;;;;;:25;:27:::2;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7951:46;::::0;::::2;;751:2;7951:46;:::i;:::-;7907:41;::::0;::::2;:90:::0;8007:18:::2;::::0;::::2;:25:::0;;;::::2;8028:4;8007:25;::::0;;8048:46:::2;::::0;7953:42:60;7941:55;;7923:74;;8048:46:51::2;::::0;7911:2:60;7896:18;8048:46:51::2;;;;;;;7392:709;387:1:46::1;7100:1001:51::0;;;;;;:::o;13958:114::-;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;14036:10:51::1;14024:23;::::0;;;:11:::1;:23;::::0;;;;;;;::::1;:34:::0;;;::::1;::::0;;;;;;:41;;;::::1;14061:4;14024:41;::::0;;13958:114::o;3227:109::-;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2232:4:19::1;2464:16;2232:4:::0;2464:10:::1;:16::i;:::-;-1:-1:-1::0;163:1:46::2;3315:14:51::0;;3227:109::o;14332:119::-;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;14412:10:51::1;14439:5;14400:23:::0;;;:11:::1;:23;::::0;;;;;;;::::1;:36:::0;;;::::1;::::0;;;;;;:44;;;::::1;::::0;;14332:119::o;23170:2414::-;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2025:35:51::1;::::0;::::1;;::::0;;;:17:::1;:35;::::0;;;;:42:::1;;::::0;23336:16;;2025:42:::1;;2020:80;;2076:24;;;;;;;;;;;;;;2020:80;23556:30:::2;::::0;;::::2;23529:24;23556:30:::0;;;:12:::2;:30;::::0;;;;;;;:38;;::::2;::::0;;;;;;;;23641:35;;;:17:::2;:35:::0;;;;;;23792:32:::2;23641:35:::0;23556:38;23792:11:::2;:32::i;:::-;23835:27;23865:40;23885:11;23898:6;23865:19;:40::i;:::-;23835:70;;23942:11;:32;;;23919:19;:55;23915:84;;23983:16;;;;;;;;;;;;;;23915:84;24038:17;24014:20;:41:::0;24010:614:::2;;24595:6;:18;;;24571:6;:21;;;:42;;;;:::i;:::-;24548:65;;24010:614;24634:32;24669:72;24707:11;24720:20;24669:37;:72::i;:::-;24634:107:::0;-1:-1:-1;24751:14:51::2;801:22;751:2;801;:22;:::i;:::-;796:28;::::0;:1:::2;:28;:::i;:::-;24796;::::0;::::2;::::0;24769:55:::2;::::0;:24;:55:::2;:::i;:::-;24768:69;;;;:::i;:::-;24751:86:::0;-1:-1:-1;24847:14:51::2;24864:33;24751:86:::0;24864:24;:33:::2;:::i;:::-;25057:26:::0;;24847:50;;-1:-1:-1;25048:35:51;::::2;25044:101;;;-1:-1:-1::0;25108:26:51;;25044:101:::2;25160:60;::::0;;25179:10:::2;11608:74:60::0;;11713:2;11698:18;;11691:34;;;11741:18;;;11734:34;;;25160:60:51::2;::::0;::::2;::::0;::::2;::::0;11596:2:60;11581:18;25160:60:51::2;;;;;;;25231:58;25251:16;25269:6;25277:3;25282:6;25231:19;:58::i;:::-;25299:76;25313:11;25326:6;25334;25342:10;25354:20;25299:13;:76::i;:::-;25500:40;25520:11;25533:6;25500:19;:40::i;:::-;25477:19;:63;25473:104;;25549:28;;;;;;;;;;;;;;25473:104;23358:2226;;;;;;387:1:46::1;23170:2414:51::0;;;;:::o;13364:345::-;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;667:34:51::1;2464:16:19;2475:4;2464:10;:16::i;:::-;2025:35:51::2;::::0;::::2;;::::0;;;:17:::2;:35;::::0;;;;:42:::2;;::::0;13531:16;;2025:42:::2;;2020:80;;2076:24;;;;;;;;;;;;;;2020:80;13563:35:::3;::::0;::::3;;::::0;;;:17:::3;:35;::::0;;;;:44:::3;;:55:::0;;13611:7;;13563:35;:55:::3;::::0;13611:7;;13563:55:::3;:::i;:::-;;;;;;;;13640:7;13628:8;;:19;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;13658:44:51::3;::::0;;;;13682:10:::3;13658:44;::::0;::::3;8996:74:60::0;9086:18;;;9079:34;;;13658:14:51::3;:23;;::::0;::::3;::::0;8969:18:60;;13658:44:51::3;;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2490:1:19::2;387::46::1;13364:345:51::0;;:::o;4642:138:19:-;3875:7;3901:12;;;;;;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4747:26:::1;4759:4;4765:7;4747:11;:26::i;12243:533:51:-:0;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2232:4:19::1;2464:16;2232:4:::0;2464:10:::1;:16::i;:::-;2025:35:51::2;::::0;::::2;;::::0;;;:17:::2;:35;::::0;;;;:42:::2;;::::0;12413:16;;2025:42:::2;;2020:80;;2076:24;;;;;;;;;;;;;;2020:80;12482:35:::3;::::0;::::3;12445:34;12482:35:::0;;;:17:::3;:35;::::0;;;;12637:20:::3;::::0;::::3;:25:::0;12598:35;;;;12580:53:::3;::::0;:15:::3;:53;:::i;:::-;12579:83;;;;:::i;:::-;12527:36:::0;;;:135;;:36:::3;::::0;:135:::3;::::0;;;::::3;:::i;:::-;::::0;;;-1:-1:-1;;12710:15:51::3;12672:35:::0;;;:53;:20:::3;;12736:33:::0;;;;-1:-1:-1;;;12243:533:51:o;15153:330::-;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2025:35:51::1;::::0;::::1;;::::0;;;:17:::1;:35;::::0;;;;:42:::1;;::::0;15301:16;;2025:42:::1;;2020:80;;2076:24;;;;;;;;;;;;;;2020:80;15349:6:::0;2379:20:::2;::::0;::::2;2389:10;2379:20;::::0;::::2;::::0;:56:::2;;-1:-1:-1::0;2404:19:51::2;::::0;::::2;;::::0;;;:11:::2;:19;::::0;;;;;;;2424:10:::2;2404:31:::0;;;;;;;;::::2;;2403:32;2379:56;2375:91;;;2444:22;;;;;;;;;;;;;;2375:91;15396:6:::3;15376:36;;;15404:7;15376:36;;;;1100:25:60::0;;1088:2;1073:18;;954:177;15376:36:51::3;;;;;;;;15423:53;15442:16;15460:6;15468:7;15423:18;:53::i;5190:750::-:0;163:1:46;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2232:4:19::1;2464:16;2232:4:::0;2464:10:::1;:16::i;:::-;5339:14:51::2;5314:40;;:13;:40;;::::0;5310:624:::2;;5441:8;::::0;5399:39:::2;::::0;;;;5432:4:::2;5399:39;::::0;::::2;7923:74:60::0;5370:23:51::2;:14;:23;::::0;::::2;::::0;5394:3;;5441:8;5370:23;;5399:24:::2;::::0;7896:18:60;;5399:39:51::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:50;;;;:::i;:::-;5370:80;::::0;;::::2;::::0;;;;;;9026:42:60;9014:55;;;5370:80:51::2;::::0;::::2;8996:74:60::0;9086:18;;;9079:34;8969:18;;5370:80:51::2;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;5310:624::-;5471:27;::::0;::::2;5467:467;;5515:12;5532:3;:8;;5548:21;5532:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5514:60;;;5593:7;5588:40;;5609:19;;;;;;;;;;;;;;5467:467;5851:33;::::0;::::2;5659:20;5851:33:::0;;;:17:::2;:33;::::0;;;;;;:58;5809:39;;;;;5842:4:::2;5809:39;::::0;::::2;7923:74:60::0;5851:33:51;;5716:207:::2;::::0;5851:33;;5788:3;;5851:33;5809:24:::2;::::0;7896:18:60;;5809:39:51::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:100;;;;:::i;:::-;5716:22;:207::i;3199:103:19:-:0;3265:30;3276:4;735:10:30;3265::19;:30::i;:::-;3199:103;:::o;6179:316::-;6256:4;2954:12;;;;;;;;;;;:29;;;;;;;;;;;;;6272:217;;6315:6;:12;;;;;;;;;;;:29;;;;;;;;;;:36;;;;6347:4;6315:36;;;6397:12;735:10:30;;656:96;6397:12:19;6370:40;;6388:7;6370:40;;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:19;6424:11;;6272:217;-1:-1:-1;6473:5:19;6466:12;;6730:317;6808:4;2954:12;;;;;;;;;;;:29;;;;;;;;;;;;;6824:217;;;6898:5;6866:12;;;;;;;;;;;:29;;;;;;;;;;;:37;;;;;;6922:40;735:10:30;;6866:12:19;;6922:40;;6898:5;6922:40;-1:-1:-1;6983:4:19;6976:11;;30311:487:51;30414:20;30436:36;30476:42;30498:11;30511:6;30476:21;:42::i;:::-;30413:105;;;;30562:28;30528:6;:31;;:62;;;;30684:12;30700:1;30684:17;30680:30;;30703:7;;30311:487;;:::o;30680:30::-;30742:12;30720:6;:18;;;:34;;;;;;;:::i;:::-;;;;;;;;30779:12;30764:11;;:27;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;30311:487:51:o;33881:815::-;34270:35;;;;34011:7;;;;34252:53;;:15;:53;:::i;:::-;34223:20;;;:25;:83;;;;:::i;:::-;34171:36;;;;:136;;;;:::i;:::-;34520:27;;34127:180;;-1:-1:-1;34399:35:51;;34502:45;;:15;:45;:::i;:::-;34481:12;:17;:67;;;;:::i;:::-;34449:28;;:100;;;;:::i;:::-;34399:150;-1:-1:-1;34626:63:51;34399:150;34626:33;:63;:::i;:::-;34619:70;33881:815;-1:-1:-1;;;;33881:815:51:o;27439:306::-;27610:7;27585:6;:21;;;:32;;;;;;;:::i;:::-;;;;;;;;27662:7;27627:11;:31;;;:42;;;;;;;:::i;:::-;;;;;;;;27687:7;27679:4;;:15;;;;;;;:::i;:::-;;;;-1:-1:-1;;27705:33:51;;;;;:19;9014:55:60;;;27705:33:51;;;8996:74:60;9086:18;;;9079:34;;;27705:14:51;:19;;;;8969:18:60;;27705:33:51;8822:297:60;35155:284:51;35371:11;:32;;;35328:40;35348:11;35361:6;35328:19;:40::i;:::-;:75;35324:108;;;35412:20;;;;;;;;;;;;;;35324:108;35155:284;;:::o;28245:1102::-;28618:6;:21;;;28607:7;:32;28603:738;;28680:7;28655:6;:21;;;:32;;;;;;;:::i;:::-;;;;;;;;28736:7;28701:11;:31;;;:42;;;;;;;:::i;:::-;;;;;;;;28765:7;28757:4;;:15;;;;;;;:::i;:::-;;;;-1:-1:-1;;28792:31:51;;1100:25:60;;;28792:31:51;;;;;;1088:2:60;1073:18;28792:31:51;;;;;;;28837:35;;;;;:19;9014:55:60;;;28837:35:51;;;8996:74:60;9086:18;;;9079:34;;;28837:14:51;:19;;;;8969:18:60;;28837:35:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;28603:738;;;28934:21;;;;;;28903:28;28970:25;;;;29009:31;;;:55;;28934:21;;28903:28;29009:55;;28934:21;;29009:55;:::i;:::-;;;;;;;;29086:20;29078:4;;:28;;;;;;;:::i;:::-;;;;-1:-1:-1;;29126:44:51;;1100:25:60;;;29126:44:51;;;;;;1088:2:60;1073:18;29126:44:51;;;;;;;29184:48;;;;;:19;9014:55:60;;;29184:48:51;;;8996:74:60;9086:18;;;9079:34;;;29184:14:51;:19;;;;8969:18:60;;29184:48:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;29247:83:51;29263:11;29276:6;29284;29292:5;29299:30;29309:20;29299:7;:30;:::i;:::-;29247:15;:83::i;26915:340::-;27033:30;;;;;;;;:12;:30;;;;;;;;:38;;;;;;;;;;;:69;;27095:7;;27033:30;:69;;27095:7;;27033:69;:::i;:::-;;;;-1:-1:-1;;27112:35:51;;;;;;;:17;:35;;;;;:71;;27176:7;;27112:35;:71;;27176:7;;27112:71;:::i;:::-;;;;-1:-1:-1;27194:54:51;;-1:-1:-1;27217:16:51;27235:3;27240:7;27194:22;:54::i;30947:965::-;31085:7;31454:22;31503:6;:18;;;31479:6;:21;;;:42;;;;:::i;:::-;31454:67;;31535:14;31553:1;31535:19;31531:33;;31563:1;31556:8;;;;;31531:33;31689:34;31726:50;31756:11;31769:6;31726:29;:50::i;:::-;31689:87;-1:-1:-1;31841:64:51;801:22;751:2;801;:22;:::i;:::-;796:28;;:1;:28;:::i;:::-;31849:26;;:14;:26;:::i;:::-;31878;31841:6;:64::i;:::-;31834:71;30947:965;-1:-1:-1;;;;;30947:965:51:o;32640:417::-;32787:7;;32865:78;801:22;751:2;801;:22;:::i;:::-;796:28;;:1;:28;:::i;:::-;32873:19;;:7;:19;:::i;:::-;883:4;32896:11;:17;;;:45;;;;:::i;:::-;32865:6;:78::i;:::-;32810:133;;32961:89;32968:32;33008:11;:41;;;33002:2;:47;;;;:::i;25939:703::-;26256:41;;;;;26291:4;26256:41;;;7923:74:60;26235:18:51;;26256:26;;;;;;7896:18:60;;26256:41:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;26235:62;;26307:76;26334:16;26352:6;26368:4;26375:7;26307:26;:76::i;:::-;26414:41;;;;;26449:4;26414:41;;;7923:74:60;26393:18:51;;26458:10;;26414:26;;;;;;7896:18:60;;26414:41:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:54;;;;:::i;:::-;26479:30;;;;;;;;:12;:30;;;;;;;;:38;;;;;;;;;;;:72;;26393:75;;-1:-1:-1;26393:75:51;;26479:38;;:30;:72;;26393:75;;26479:72;:::i;:::-;;;;-1:-1:-1;;26561:35:51;;;;;;;:17;:35;;;;;:74;;26625:10;;26561:35;:74;;26625:10;;26561:74;:::i;:::-;;;;-1:-1:-1;;;;;;;25939:703:51:o;1303:160:28:-;1412:43;;1427:14;9014:55:60;;;1412:43:28;;;8996:74:60;9086:18;;;9079:34;;;1385:71:28;;1405:5;;1427:14;;;;;8969:18:60;;1412:43:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1385:19;:71::i;3432:197:19:-;2931:4;2954:12;;;;;;;;;;;:29;;;;;;;;;;;;;3515:108;;3565:47;;;;;9026:42:60;9014:55;;3565:47:19;;;8996:74:60;9086:18;;;9079:34;;;8969:18;;3565:47:19;;;;;;;;33197:478:51;33337:7;33346;33369:36;33408:50;33446:11;33408:37;:50::i;:::-;33369:89;-1:-1:-1;33469:20:51;801:22;751:2;801;:22;:::i;:::-;796:28;;:1;:28;:::i;:::-;33572:21;;;;33537:31;;;;33506:62;;:28;:62;:::i;:::-;33505:88;;;;:::i;:::-;33504:102;;;;:::i;:::-;33469:137;33639:28;;-1:-1:-1;33197:478:51;;-1:-1:-1;;;;33197:478:51:o;29704:449::-;29926:7;29904:6;:18;;;:29;;;;;;;:::i;:::-;;;;;;;;29958:7;29943:11;;:22;;;;;;;:::i;:::-;;;;;;;;30000:7;29976:11;:20;;;:31;;;;;;;:::i;:::-;;;;;;;;30029:7;30017:8;;:19;;;;;;;:::i;:::-;;;;-1:-1:-1;;30052:25:51;;1100::60;;;30052::51;;;;;;1088:2:60;1073:18;30052:25:51;;;;;;;30088:58;;;;;:27;13043:15:60;;;30088:58:51;;;13025:34:60;30131:4:51;13075:18:60;;;13068:43;13127:18;;;13120:34;;;30088:14:51;:27;;;;12937:18:60;;30088:58:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;32059:434::-;32207:7;;801:22;751:2;801;:22;:::i;:::-;796:28;;:1;:28;:::i;:::-;883:4;32360:11;:17;;;32281:76;32317:11;32330:6;:26;;;32281:35;:76::i;:::-;:96;;;;:::i;:::-;:140;;;;:::i;:::-;32267:176;;;;:::i;35698:178::-;35760:10;35786:2;35792:1;35786:7;35782:21;;35795:8;;;35782:21;35817:2;35823:1;35817:7;35813:21;;-1:-1:-1;35833:1:51;35826:8;;35813:21;35866:2;35856:6;35861:1;35856:2;:6;:::i;:::-;35855:13;;;;:::i;:::-;35850:19;;:1;:19;:::i;:::-;35845:24;35698:178;-1:-1:-1;;;35698:178:51:o;1702:188:28:-;1829:53;;1844:18;13043:15:60;;;1829:53:28;;;13025:34:60;13095:15;;;13075:18;;;13068:43;13127:18;;;13120:34;;;1802:81:28;;1822:5;;1844:18;;;;;12937::60;;1829:53:28;12762:398:60;4059:629:28;4478:23;4504:33;:27;;;4532:4;4504:27;:33::i;:::-;4478:59;;4551:10;:17;4572:1;4551:22;;:57;;;;;4589:10;4578:30;;;;;;;;;;;;:::i;:::-;4577:31;4551:57;4547:135;;;4631:40;;;;;7953:42:60;7941:55;;4631:40:28;;;7923:74:60;7896:18;;4631:40:28;7759:244:60;34815:239:51;34959:7;35005:11;:41;;;34999:2;:47;;;;:::i;:::-;34989:58;;:6;:58;:::i;2705:151:29:-;2780:12;2811:38;2833:6;2841:4;2847:1;2780:12;3421;3435:23;3462:6;:11;;3481:5;3488:4;3462:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3420:73;;;;3510:55;3537:6;3545:7;3554:10;3510:26;:55::i;:::-;3503:62;3180:392;-1:-1:-1;;;;;;3180:392:29:o;4625:582::-;4769:12;4798:7;4793:408;;4821:19;4829:10;4821:7;:19::i;:::-;4793:408;;;5045:17;;:22;:49;;;;-1:-1:-1;5071:18:29;;;;:23;5045:49;5041:119;;;5121:24;;;;;7953:42:60;7941:55;;5121:24:29;;;7923:74:60;7896:18;;5121:24:29;7759:244:60;5041:119:29;-1:-1:-1;5180:10:29;5173:17;;5743:516;5874:17;;:21;5870:383;;6102:10;6096:17;6158:15;6145:10;6141:2;6137:19;6130:44;5870:383;6225:17;;;;;;;;;;;;;;14:332:60;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;180:9;167:23;230:66;223:5;219:78;212:5;209:89;199:117;;312:1;309;302:12;543:154;629:42;622:5;618:54;611:5;608:65;598:93;;687:1;684;677:12;702:247;761:6;814:2;802:9;793:7;789:23;785:32;782:52;;;830:1;827;820:12;782:52;869:9;856:23;888:31;913:5;888:31;:::i;1460:180::-;1519:6;1572:2;1560:9;1551:7;1547:23;1543:32;1540:52;;;1588:1;1585;1578:12;1540:52;-1:-1:-1;1611:23:60;;1460:180;-1:-1:-1;1460:180:60:o;1827:315::-;1895:6;1903;1956:2;1944:9;1935:7;1931:23;1927:32;1924:52;;;1972:1;1969;1962:12;1924:52;2008:9;1995:23;1985:33;;2068:2;2057:9;2053:18;2040:32;2081:31;2106:5;2081:31;:::i;:::-;2131:5;2121:15;;;1827:315;;;;;:::o;2332:::-;2400:6;2408;2461:2;2449:9;2440:7;2436:23;2432:32;2429:52;;;2477:1;2474;2467:12;2429:52;2516:9;2503:23;2535:31;2560:5;2535:31;:::i;:::-;2585:5;2637:2;2622:18;;;;2609:32;;-1:-1:-1;;;2332:315:60:o;2652:613::-;2753:6;2761;2769;2777;2830:3;2818:9;2809:7;2805:23;2801:33;2798:53;;;2847:1;2844;2837:12;2798:53;2886:9;2873:23;2905:31;2930:5;2905:31;:::i;:::-;2955:5;-1:-1:-1;3012:2:60;2997:18;;2984:32;3025:33;2984:32;3025:33;:::i;:::-;3077:7;-1:-1:-1;3136:2:60;3121:18;;3108:32;3149:33;3108:32;3149:33;:::i;:::-;2652:613;;;;-1:-1:-1;3201:7:60;;3255:2;3240:18;3227:32;;-1:-1:-1;;2652:613:60:o;3270:471::-;3362:6;3370;3378;3431:2;3419:9;3410:7;3406:23;3402:32;3399:52;;;3447:1;3444;3437:12;3399:52;3486:9;3473:23;3505:31;3530:5;3505:31;:::i;:::-;3555:5;-1:-1:-1;3612:2:60;3597:18;;3584:32;3625:33;3584:32;3625:33;:::i;:::-;3270:471;;3677:7;;-1:-1:-1;;;3731:2:60;3716:18;;;;3703:32;;3270:471::o;3746:506::-;3864:6;3872;3880;3933:2;3921:9;3912:7;3908:23;3904:32;3901:52;;;3949:1;3946;3939:12;3901:52;3988:9;3975:23;4007:31;4032:5;4007:31;:::i;:::-;4057:5;-1:-1:-1;4114:2:60;4099:18;;4086:32;4149:1;4137:14;;4127:42;;4165:1;4162;4155:12;4257:388;4325:6;4333;4386:2;4374:9;4365:7;4361:23;4357:32;4354:52;;;4402:1;4399;4392:12;4354:52;4441:9;4428:23;4460:31;4485:5;4460:31;:::i;:::-;4510:5;-1:-1:-1;4567:2:60;4552:18;;4539:32;4580:33;4539:32;4580:33;:::i;4650:605::-;4769:6;4777;4785;4793;4801;4809;4862:3;4850:9;4841:7;4837:23;4833:33;4830:53;;;4879:1;4876;4869:12;4830:53;4918:9;4905:23;4937:31;4962:5;4937:31;:::i;:::-;4987:5;5039:2;5024:18;;5011:32;;-1:-1:-1;5090:2:60;5075:18;;5062:32;;5141:2;5126:18;;5113:32;;-1:-1:-1;5192:3:60;5177:19;;5164:33;;-1:-1:-1;5244:3:60;5229:19;5216:33;;-1:-1:-1;4650:605:60;-1:-1:-1;;;4650:605:60:o;8008:184::-;8060:77;8057:1;8050:88;8157:4;8154:1;8147:15;8181:4;8178:1;8171:15;8197:128;8264:9;;;8285:11;;;8282:37;;;8299:18;;:::i;8330:168::-;8403:9;;;8434;;8451:15;;;8445:22;;8431:37;8421:71;;8472:18;;:::i;8503:125::-;8568:9;;;8589:10;;;8586:36;;;8602:18;;:::i;8633:184::-;8685:77;8682:1;8675:88;8782:4;8779:1;8772:15;8806:4;8803:1;8796:15;9124:273;9192:6;9245:2;9233:9;9224:7;9220:23;9216:32;9213:52;;;9261:1;9258;9251:12;9213:52;9293:9;9287:16;9343:4;9336:5;9332:16;9325:5;9322:27;9312:55;;9363:1;9360;9353:12;9633:482;9722:1;9765:5;9722:1;9779:330;9800:7;9790:8;9787:21;9779:330;;;9919:4;9851:66;9847:77;9841:4;9838:87;9835:113;;;9928:18;;:::i;:::-;9978:7;9968:8;9964:22;9961:55;;;9998:16;;;;9961:55;10077:22;;;;10037:15;;;;9779:330;;;9783:3;9633:482;;;;;:::o;10120:866::-;10169:5;10199:8;10189:80;;-1:-1:-1;10240:1:60;10254:5;;10189:80;10288:4;10278:76;;-1:-1:-1;10325:1:60;10339:5;;10278:76;10370:4;10388:1;10383:59;;;;10456:1;10451:130;;;;10363:218;;10383:59;10413:1;10404:10;;10427:5;;;10451:130;10488:3;10478:8;10475:17;10472:43;;;10495:18;;:::i;:::-;-1:-1:-1;;10551:1:60;10537:16;;10566:5;;10363:218;;10665:2;10655:8;10652:16;10646:3;10640:4;10637:13;10633:36;10627:2;10617:8;10614:16;10609:2;10603:4;10600:12;10596:35;10593:77;10590:159;;;-1:-1:-1;10702:19:60;;;10734:5;;10590:159;10781:34;10806:8;10800:4;10781:34;:::i;:::-;10911:6;10843:66;10839:79;10830:7;10827:92;10824:118;;;10922:18;;:::i;:::-;10960:20;;10120:866;-1:-1:-1;;;10120:866:60:o;10991:131::-;11051:5;11080:36;11107:8;11101:4;11080:36;:::i;11127:274::-;11167:1;11193;11183:189;;11228:77;11225:1;11218:88;11329:4;11326:1;11319:15;11357:4;11354:1;11347:15;11183:189;-1:-1:-1;11386:9:60;;11127:274::o;11779:277::-;11846:6;11899:2;11887:9;11878:7;11874:23;11870:32;11867:52;;;11915:1;11912;11905:12;11867:52;11947:9;11941:16;12000:5;11993:13;11986:21;11979:5;11976:32;11966:60;;12022:1;12019;12012:12;12061:184;12131:6;12184:2;12172:9;12163:7;12159:23;12155:32;12152:52;;;12200:1;12197;12190:12;12152:52;-1:-1:-1;12223:16:60;;12061:184;-1:-1:-1;12061:184:60:o;13165:412::-;13294:3;13332:6;13326:13;13357:1;13367:129;13381:6;13378:1;13375:13;13367:129;;;13479:4;13463:14;;;13459:25;;13453:32;13440:11;;;13433:53;13396:12;13367:129;;;-1:-1:-1;13551:1:60;13515:16;;13540:13;;;-1:-1:-1;13515:16:60;13165:412;-1:-1:-1;13165:412:60:o", + "object": "0x6080604052600436106102855760003560e01c806365fae35e11610153578063d707eed5116100cb578063f04e283e1161007f578063f970c3b711610064578063f970c3b71461082d578063feaea5861461084d578063fee81cf41461086d57600080fd5b8063f04e283e14610807578063f2fde38b1461081a57600080fd5b8063e2c7283f116100b0578063e2c7283f14610739578063e72531c8146107a6578063ea061ad4146107da57600080fd5b8063d707eed514610703578063e1c84ea41461072357600080fd5b80639c52a7f111610122578063aab3f86811610107578063aab3f868146105da578063b80a0a77146105fa578063c665471f1461061057600080fd5b80639c52a7f11461058d578063a12ad552146105ad57600080fd5b806365fae35e1461051c578063715018a61461053c5780638456cb59146105445780638da5cb5b1461055957600080fd5b80633f4ba83a1161020157806354d1f13d116101b55780635820ba631161019a5780635820ba63146104915780635881fc33146104b1578063645ba425146104fc57600080fd5b806354d1f13d1461046957806357b35a781461047157600080fd5b8063476343ee116101e6578063476343ee1461041457806349a66ca3146104295780634fa739191461044957600080fd5b80633f4ba83a146103df578063457972de146103f457600080fd5b806313f60c9a11610258578063256929621161023d5780632569296214610365578063330283aa1461036d578063336d391e1461038d57600080fd5b806313f60c9a14610315578063200d2ed21461034f57600080fd5b80630408ccd61461028a5780630ae5ccab146102ac5780630dca59c1146102cc5780631218c5fd146102f5575b600080fd5b34801561029657600080fd5b506102aa6102a5366004612c22565b6108a0565b005b3480156102b857600080fd5b506102aa6102c7366004612c22565b61092b565b3480156102d857600080fd5b506102e260085481565b6040519081526020015b60405180910390f35b34801561030157600080fd5b506102aa610310366004612c3f565b6109b6565b34801561032157600080fd5b5060045460055460065461033492919083565b604080519384526020840192909252908201526060016102ec565b34801561035b57600080fd5b506102e260005481565b6102aa6109ff565b34801561037957600080fd5b506102aa610388366004612c3f565b610a4f565b34801561039957600080fd5b506003546103ba9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102ec565b3480156103eb57600080fd5b506102aa610b36565b34801561040057600080fd5b506102aa61040f366004612c58565b610b45565b34801561042057600080fd5b506102aa610c61565b34801561043557600080fd5b506102aa610444366004612c84565b610db4565b34801561045557600080fd5b506102aa610464366004612cd5565b61111f565b6102aa6111df565b34801561047d57600080fd5b506102aa61048c366004612d16565b61121b565b34801561049d57600080fd5b506102aa6104ac366004612c84565b61142c565b3480156104bd57600080fd5b506104ec6104cc366004612d4a565b600c60209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016102ec565b34801561050857600080fd5b506102aa610517366004612d83565b6115c5565b34801561052857600080fd5b506102aa610537366004612c22565b611786565b6102aa61181e565b34801561055057600080fd5b506102aa611826565b34801561056557600080fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927546103ba565b34801561059957600080fd5b506102aa6105a8366004612c22565b611835565b3480156105b957600080fd5b506002546103ba9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105e657600080fd5b506102aa6105f5366004612c84565b6118ca565b34801561060657600080fd5b506102e260095481565b34801561061c57600080fd5b506106a161062b366004612c22565b600a6020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040160405180606001604052908160008201548152602001600182015481526020016002820154815250509080600701549080600801549080600901549080600a0154905089565b60408051998a526020808b0199909952898101979097526060890195909552835160808901529583015160a0880152919093015160c086015260e0850192909252610100840191909152610120830191909152610140820152610160016102ec565b34801561070f57600080fd5b506102aa61071e366004612c22565b611b1d565b34801561072f57600080fd5b506102e260075481565b34801561074557600080fd5b50610786610754366004612d4a565b600b60209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016102ec565b3480156107b257600080fd5b506103ba7f000000000000000000000000000000000000000000000000000000000000000081565b3480156107e657600080fd5b506001546103ba9073ffffffffffffffffffffffffffffffffffffffff1681565b6102aa610815366004612c22565b611ba8565b6102aa610828366004612c22565b611be8565b34801561083957600080fd5b506102aa610848366004612cd5565b611c0f565b34801561085957600080fd5b506102aa610868366004612d4a565b611d0e565b34801561087957600080fd5b506102e2610888366004612c22565b63389a75e1600c908152600091909152602090205490565b6001600054036108dc576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108e4612043565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600160005403610967576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61096f612043565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6001600054036109f2576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109fa612043565b600755565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b600160005403610a8b576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a93612043565b6003546040517fd14a27fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063d14a27fd90610ae9906004908101612dcf565b602060405180830381865afa158015610b06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2a9190612df0565b60055542600655600455565b610b3e612043565b6002600055565b600160005403610b81576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a6020526040812060040154839103610be3576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025473ffffffffffffffffffffffffffffffffffffffff163314610c34576040517f16ee083800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff9091166000908152600a6020526040902060070155565b600160005403610c9d576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015473ffffffffffffffffffffffffffffffffffffffff1680610ced576040517fd389b01000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6009805460009091556040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015610d8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610daf9190612e09565b505050565b600160005403610df0576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600a6020526040812060040154859103610e52576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff81163314801590610eaa575073ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832033845290915290205460ff16155b15610ee1576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600b60209081526040808320948a168352938152838220928252600a905291909120815460098201541115610f5f576040517f8464610300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60075485600854610f709190612e5a565b1115610fa8576040517fdd0b23bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060080154858260010154610fbd9190612e5a565b1115610ff5576040517fa99870f800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018201541561100e57611009818361207b565b6110af565b6003546040517fcf5696cb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063cf5696cb9061106890600490858201908201612e6d565b602060405180830381865afa158015611085573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a99190612df0565b60038301555b8673ffffffffffffffffffffffffffffffffffffffff167f2794e993350ecd3e426a1d6ba9554613ee597988342e95658e5e97a121565852866040516110f791815260200190565b60405180910390a261110b818388886120c2565b61111581836121c9565b5050505050505050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600a6020526040812060040154849103611181576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8085166000818152600b602090815260408083209488168352938152838220928252600a9052919091206111ca818361207b565b6111d78183873388612210565b505050505050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b600160005403611257576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61125f612043565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600a60205260408120600401548491036112c1576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600a60205260408120908460048111156112f9576112f9612ea9565b036113ae576003546040517fd14a27fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063d14a27fd906113569060048086019101612dcf565b602060405180830381865afa158015611373573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113979190612df0565b600582015542600682015560048101839055611425565b60018460048111156113c2576113c2612ea9565b036113d35760088101839055611425565b60028460048111156113e7576113e7612ea9565b036113f85760098101839055611425565b600384600481111561140c5761140c612ea9565b0361141d5760038101839055611425565b600281018390555b5050505050565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600a602052604081206004015485910361148e576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff811633148015906114e6575073ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832033845290915290205460ff16155b1561151d576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600b60209081526040808320948a168352938152838220928252600a905291909120611566818361207b565b6040805173ffffffffffffffffffffffffffffffffffffffff8881168252602082018890528916917f45892a46e6cef329bb642da6d69846d324db43d19008edc141ed82382eda1bee910160405180910390a261110b888888886124ca565b600160005403611601576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611609612043565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600a6020526040902060048101541561166a576040517fbf508dc400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600480820187905542600683015560028201869055600382018590556008820184905560098201839055604080517f313ce567000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff8a169263313ce567928082019260209290918290030181865afa1580156116fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117219190612ed8565b61172f9060ff166012612efb565b600a82015560405173ffffffffffffffffffffffffffffffffffffffff881681527f8abd6b05a86c62b0ddaec80e50ab0326ee89a599589d4b4126cf8f94ff3d0a879060200160405180910390a150505050505050565b6001600054036117c2576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600c6020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b610285612043565b61182e612043565b6001600055565b600160005403611871576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600c6020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600a602052604081206004015485910361192c576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8086166000818152600b602090815260408083209489168352938152838220928252600a905291909120611975818361207b565b6000611981828461257c565b9050816002015481116119c0576040517f819a066c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85036119fe57826002015483600101546119fb9190612e5a565b94505b6000611a0a838761261c565b90506000611a1a6012600a61302e565b611a2590606461303a565b6003850154611a34908461303a565b611a3e9190613051565b90506000611a4c8284612e5a565b8654909150811115611a5c575084545b60408051338152602081018a905290810182905273ffffffffffffffffffffffffffffffffffffffff8b16907f1f0c6615429d1cdae0dfa233abf91d3b31cdbdd82c8081389832a61e1072f1ea9060600160405180910390a2611ac18b8b8b846124ca565b611ace85878c338c612210565b611ad8858761257c565b8411611b10576040517f07af690800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050565b600160005403611b59576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b61612043565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611bb0612043565b63389a75e1600c52806000526020600c208054421115611bd857636f5e88186000526004601cfd5b60009055611be581612680565b50565b611bf0612043565b8060601b611c0657637448fbae6000526004601cfd5b611be581612680565b600160005403611c4b576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600a6020526040812060040154849103611cad576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff167fd7243f6f8212d5188fd054141cf6ea89cfc0d91facb8c3afe2f88a135848014283604051611cf591815260200190565b60405180910390a2611d088484846126e6565b50505050565b600160005403611d4a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611ed3576009546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb9184919084906370a0823190602401602060405180830381865afa158015611e35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e599190612df0565b611e639190612efb565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015610d8b573d6000803e3d6000fd5b73ffffffffffffffffffffffffffffffffffffffff8216611f885760008173ffffffffffffffffffffffffffffffffffffffff164760405160006040518083038185875af1925050503d8060008114611f48576040519150601f19603f3d011682016040523d82523d6000602084013e611f4d565b606091505b5050905080610daf576040517f6d963f8800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000818152600a6020526040908190205490517f70a082310000000000000000000000000000000000000000000000000000000081523060048201528492610daf9284928692906370a0823190602401602060405180830381865afa15801561200c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120309190612df0565b61203a9190612efb565b6128b1565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314612079576382b429006000526004601cfd5b565b6000806120888484612900565b91509150808360030181905550816000036120a35750505050565b818360020160008282546120b79190612e5a565b909155505050505050565b808360010160008282546120d69190612e5a565b92505081905550808460010160008282546120f19190612e5a565b92505081905550806008600082825461210a9190612e5a565b90915550506040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f19906044015b6020604051808303816000875af11580156121a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114259190612e09565b81600201546121d8838361257c565b111561203f576040517f963c7ede00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83600101548111612372578084600101600082825461222f9190612efb565b925050819055508085600101600082825461224a9190612efb565b9250508190555080600860008282546122639190612efb565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8416907fcb55e9f35638c4fdb4390d3a385ac1d72a8f72e4dcf0eb1f3c79d144b1023f859060200160405180910390a26040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906044016020604051808303816000875af1158015612348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061236c9190612e09565b50611425565b600180850180546000918290559187018054839290612392908490612efb565b9250508190555080600860008282546123ab9190612efb565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8516907fcb55e9f35638c4fdb4390d3a385ac1d72a8f72e4dcf0eb1f3c79d144b1023f859060200160405180910390a26040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906044016020604051808303816000875af1158015612490573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b49190612e09565b506111d78585856124c58587612efb565b6129ef565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600b602090815260408083209387168352929052908120805483929061250e908490612efb565b909155505073ffffffffffffffffffffffffffffffffffffffff84166000908152600a602052604081208054839290612548908490612efb565b909155505073ffffffffffffffffffffffffffffffffffffffff84163b60000361257157600080fd5b611d088483836128b1565b600080826002015483600101546125939190612e5a565b9050806000036125a7576000915050612616565b82546000036125d9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff915050612616565b60006125e58585612aed565b90506126116125f66012600a61302e565b61260190606461303a565b61260b908461303a565b82612b46565b925050505b92915050565b600082600a0154600a61262f919061302e565b64e8d4a510008460070154612644919061303a565b61264e919061303a565b61265a6012600a61302e565b61266590600161303a565b61266f908461303a565b6126799190613051565b9392505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401602060405180830381865afa158015612753573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127779190612df0565b905061278584333085612b86565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090829073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa1580156127f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128189190612df0565b6128229190612efb565b73ffffffffffffffffffffffffffffffffffffffff8087166000908152600b6020908152604080832093891683529290529081208054929350839290919061286b908490612e5a565b909155505073ffffffffffffffffffffffffffffffffffffffff85166000908152600a6020526040812080548392906128a5908490612e5a565b90915550505050505050565b81601452806034526fa9059cbb00000000000000000000000060005260206000604460106000875af13d1560016000511417166128f6576390b8ec186000526004601cfd5b6000603452505050565b6003546040517fcf5696cb0000000000000000000000000000000000000000000000000000000081526000918291829173ffffffffffffffffffffffffffffffffffffffff169063cf5696cb9061295f90600490898201908201612e6d565b602060405180830381865afa15801561297c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129a09190612df0565b905060006129b06012600a61302e565b6129bb90606461303a565b600186015460038701546129cf9085612efb565b6129d9919061303a565b6129e39190613051565b96919550909350505050565b80846002016000828254612a039190612efb565b925050819055508060096000828254612a1c9190612e5a565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8416907f6a41f86b2a18fe00e10a9bd078e790ae82c2627a6f940166bddc2db475194a5f9060200160405180910390a26040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152306024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90606401612186565b600080612afc6012600a61302e565b612b0790600161303a565b64e8d4a510008560070154612b20878760000154612be3565b612b2a919061303a565b612b34919061303a565b612b3e9190613051565b949350505050565b600081600003612b5557600080fd5b82600003612b6557506000612616565b81612b71600185612efb565b612b7b9190613051565b612679906001612e5a565b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c52602060006064601c6000895af13d156001600051141716612bd557637939f4246000526004601cfd5b600060605260405250505050565b600082600a0154600a612bf6919061302e565b612679908361303a565b73ffffffffffffffffffffffffffffffffffffffff81168114611be557600080fd5b600060208284031215612c3457600080fd5b813561267981612c00565b600060208284031215612c5157600080fd5b5035919050565b60008060408385031215612c6b57600080fd5b8235612c7681612c00565b946020939093013593505050565b60008060008060808587031215612c9a57600080fd5b8435612ca581612c00565b93506020850135612cb581612c00565b92506040850135612cc581612c00565b9396929550929360600135925050565b600080600060608486031215612cea57600080fd5b8335612cf581612c00565b92506020840135612d0581612c00565b929592945050506040919091013590565b600080600060608486031215612d2b57600080fd5b8335612d3681612c00565b9250602084013560058110612d0557600080fd5b60008060408385031215612d5d57600080fd5b8235612d6881612c00565b91506020830135612d7881612c00565b809150509250929050565b60008060008060008060c08789031215612d9c57600080fd5b8635612da781612c00565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b81548152600182015460208201526002820154604082015260608101612616565b600060208284031215612e0257600080fd5b5051919050565b600060208284031215612e1b57600080fd5b8151801515811461267957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561261657612616612e2b565b82548152600183015460208201526002830154604082015260c081018254606083015260018301546080830152600283015460a0830152612679565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060208284031215612eea57600080fd5b815160ff8116811461267957600080fd5b8181038181111561261657612616612e2b565b600181815b80851115612f6757817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115612f4d57612f4d612e2b565b80851615612f5a57918102915b93841c9390800290612f13565b509250929050565b600082612f7e57506001612616565b81612f8b57506000612616565b8160018114612fa15760028114612fab57612fc7565b6001915050612616565b60ff841115612fbc57612fbc612e2b565b50506001821b612616565b5060208310610133831016604e8410600b8410161715612fea575081810a612616565b612ff48383612f0e565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561302657613026612e2b565b029392505050565b60006126798383612f6f565b808202811582820484141761261657612616612e2b565b600082613087577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056", + "sourceMap": "506:35048:38:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4617:141;;;;;;;;;;-1:-1:-1;4617:141:38;;;;;:::i;:::-;;:::i;:::-;;3973:121;;;;;;;;;;-1:-1:-1;3973:121:38;;;;;:::i;:::-;;:::i;1339:19::-;;;;;;;;;;;;;;;;;;;571:25:60;;;559:2;544:18;1339:19:38;;;;;;;;4958:125;;;;;;;;;;-1:-1:-1;4958:125:38;;;;;:::i;:::-;;:::i;1215:28::-;;;;;;;;;;-1:-1:-1;1215:28:38;;;;;;;;;;;;;;;;994:25:60;;;1050:2;1035:18;;1028:34;;;;1078:18;;;1071:34;982:2;967:18;1215:28:38;792:319:60;211:21:29;;;;;;;;;;;;;;;;9021:617:22;;;:::i;13001:274:38:-;;;;;;;;;;-1:-1:-1;13001:274:38;;;;;:::i;:::-;;:::i;1133:23::-;;;;;;;;;;-1:-1:-1;1133:23:38;;;;;;;;;;;1307:42:60;1295:55;;;1277:74;;1265:2;1250:18;1133:23:38;1116:241:60;3303:77:38;;;;;;;;;;;;;:::i;12002:289::-;;;;;;;;;;-1:-1:-1;12002:289:38;;;;;:::i;:::-;;:::i;13628:307::-;;;;;;;;;;;;;:::i;19470:1611::-;;;;;;;;;;-1:-1:-1;19470:1611:38;;;;;:::i;:::-;;:::i;21853:535::-;;;;;;;;;;-1:-1:-1;21853:535:38;;;;;:::i;:::-;;:::i;9720:456:22:-;;;:::i;10035:1528:38:-;;;;;;;;;;-1:-1:-1;10035:1528:38;;;;;:::i;:::-;;:::i;16914:727::-;;;;;;;;;;-1:-1:-1;16914:727:38;;;;;:::i;:::-;;:::i;1699:63::-;;;;;;;;;;-1:-1:-1;1699:63:38;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3880:14:60;;3873:22;3855:41;;3843:2;3828:18;1699:63:38;3715:187:60;8441:966:38;;;;;;;;;;-1:-1:-1;8441:966:38;;;;;:::i;:::-;;:::i;14184:114::-;;;;;;;;;;-1:-1:-1;14184:114:38;;;;;:::i;:::-;;:::i;2234:88::-;;;:::i;3698:76::-;;;;;;;;;;;;;:::i;11408:182:22:-;;;;;;;;;;-1:-1:-1;11562:11:22;11556:18;11408:182;;14558:119:38;;;;;;;;;;-1:-1:-1;14558:119:38;;;;;:::i;:::-;;:::i;1077:25::-;;;;;;;;;;-1:-1:-1;1077:25:38;;;;;;;;23502:2620;;;;;;;;;;-1:-1:-1;23502:2620:38;;;;;:::i;:::-;;:::i;1394:23::-;;;;;;;;;;;;;;;;1460:62;;;;;;;;;;-1:-1:-1;1460:62:38;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5450:25:60;;;5506:2;5491:18;;;5484:34;;;;5534:18;;;5527:34;;;;5592:2;5577:18;;5570:34;;;;5641:13;;5635:3;5620:19;;5613:42;5698:15;;;5692:22;5686:3;5671:19;;5664:51;5758:15;;;;5752:22;5746:3;5731:19;;5724:51;5806:3;5791:19;;5784:35;;;;5850:3;5835:19;;5828:35;;;;5894:3;5879:19;;5872:35;;;;5938:3;5923:19;;5916:35;5437:3;5422:19;1460:62:38;5025:932:60;4293:119:38;;;;;;;;;;-1:-1:-1;4293:119:38;;;;;:::i;:::-;;:::i;1267:26::-;;;;;;;;;;;;;;;;1569:72;;;;;;;;;;-1:-1:-1;1569:72:38;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6873:25:60;;;6929:2;6914:18;;6907:34;;;;6957:18;;;6950:34;7015:2;7000:18;;6993:34;6860:3;6845:19;1569:72:38;6642:391:60;937:40:38;;;;;;;;;;;;;;;1021:30;;;;;;;;;;-1:-1:-1;1021:30:38;;;;;;;;10363:708:22;;;;;;:::i;:::-;;:::i;8348:349::-;;;;;;:::i;:::-;;:::i;15290:331:38:-;;;;;;;;;;-1:-1:-1;15290:331:38;;;;;:::i;:::-;;:::i;6052:1230::-;;;;;;;;;;-1:-1:-1;6052:1230:38;;;;;:::i;:::-;;:::i;11693:435:22:-;;;;;;;;;;-1:-1:-1;11693:435:22;;;;;:::i;:::-;11963:19;11957:4;11950:33;;;11812:14;11996:26;;;;12106:4;12090:21;;12084:28;;11693:435;4617:141:38;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;12517:13:22::1;:11;:13::i;:::-;4717:15:38::2;:34:::0;;;::::2;;::::0;;;::::2;::::0;;;::::2;::::0;;4617:141::o;3973:121::-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;12517:13:22::1;:11;:13::i;:::-;4063:10:38::2;:24:::0;;;::::2;;::::0;;;::::2;::::0;;;::::2;::::0;;3973:121::o;4958:125::-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;12517:13:22::1;:11;:13::i;:::-;5050:11:38::2;:26:::0;4958:125::o;9021:617:22:-;9114:15;7972:9;9132:46;;:15;:46;9114:64;;9346:19;9340:4;9333:33;9396:8;9390:4;9383:22;9452:7;9445:4;9439;9429:21;9422:38;9599:8;9552:45;9549:1;9546;9541:67;9248:374;9021:617::o;13001:274:38:-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;12517:13:22::1;:11;:13::i;:::-;13118:10:38::2;::::0;:56:::2;::::0;;;;:10:::2;::::0;;::::2;::::0;:42:::2;::::0;:56:::2;::::0;13161:12:::2;::::0;13118:56;::::2;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;13087:28:::0;:87;13214:15:::2;13184:27:::0;:45;13087:12:::2;13239:29:::0;13001:274::o;3303:77::-;12517:13:22;:11;:13::i;:::-;203:1:29::1;3360:6:38;:13:::0;3303:77::o;12002:289::-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2466:35:38::1;::::0;::::1;;::::0;;;:17:::1;:35;::::0;;;;:44:::1;;:49:::0;12134:18;;2466:54;2462:116:::1;;2543:24;;;;;;;;;;;;;;2462:116;12186:10:::2;::::0;::::2;;12172;:24;12168:54;;12205:17;;;;;;;;;;;;;;12168:54;-1:-1:-1::0;12232:37:38::2;::::0;;::::2;;::::0;;;:17:::2;:37;::::0;;;;:43:::2;;:52:::0;12002:289::o;13628:307::-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;13712:15:38::1;::::0;::::1;;::::0;13737:67:::1;;13780:24;;;;;;;;;;;;;;13737:67;13835:8;::::0;;13815:17:::1;13853:12:::0;;;13876:52:::1;::::0;;;;:23:::1;8147:55:60::0;;;13876:52:38::1;::::0;::::1;8129:74:60::0;8219:18;;;8212:34;;;13876:14:38::1;:23;::::0;::::1;::::0;8102:18:60;;13876:52:38::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;13675:260;;13628:307::o:0;19470:1611::-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2466:35:38::1;::::0;::::1;;::::0;;;:17:::1;:35;::::0;;;;:44:::1;;:49:::0;19631:16;;2466:54;2462:116:::1;;2543:24;;;;;;;;;;;;;;2462:116;19679:6:::0;2856:20:::2;::::0;::::2;2866:10;2856:20;::::0;::::2;::::0;:56:::2;;-1:-1:-1::0;2881:19:38::2;::::0;::::2;;::::0;;;:11:::2;:19;::::0;;;;;;;2901:10:::2;2881:31:::0;;;;;;;;::::2;;2880:32;2856:56;2852:116;;;2935:22;;;;;;;;;;;;;;2852:116;19728:30:::3;::::0;;::::3;19701:24;19728:30:::0;;;:12:::3;:30;::::0;;;;;;;:38;;::::3;::::0;;;;;;;;19813:35;;;:17:::3;:35:::0;;;;;;20041:26;;20000:38:::3;::::0;::::3;::::0;:67:::3;19996:136;;;20090:31;;;;;;;;;;;;;;19996:136;20239:11;;20229:7;20222:4;;:14;;;;:::i;:::-;:28;20218:68;;;20259:27;;;;;;;;;;;;;;20218:68;20344:11;:23;;;20334:7;20300:11;:31;;;:41;;;;:::i;:::-;:67;20296:136;;;20390:31;;;;;;;;;;;;;;20296:136;20638:21;::::0;::::3;::::0;:26;20634:253:::3;;20680:32;20692:11;20705:6;20680:11;:32::i;:::-;20634:253;;;20793:10;::::0;:83:::3;::::0;;;;:10:::3;::::0;;::::3;::::0;:47:::3;::::0;:83:::3;::::0;20841:12:::3;::::0;20855:20;;::::3;::::0;20793:83;::::3;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;20743:31;::::0;::::3;:133:::0;20634:253:::3;20917:6;20902:31;;;20925:7;20902:31;;;;571:25:60::0;;559:2;544:18;;425:177;20902:31:38::3;;;;;;;;20943:48;20957:11;20970:6;20978:3;20983:7;20943:13;:48::i;:::-;21002:72;21054:11;21067:6;21002:51;:72::i;:::-;19691:1390;;2587:1:::2;387::29::1;19470:1611:38::0;;;;:::o;21853:535::-;2466:35;;;;;;;:17;:35;;;;;:44;;:49;21979:16;;2466:54;2462:116;;2543:24;;;;;;;;;;;;;;2462:116;22038:30:::1;::::0;;::::1;22011:24;22038:30:::0;;;:12:::1;:30;::::0;;;;;;;:38;;::::1;::::0;;;;;;;;22123:35;;;:17:::1;:35:::0;;;;;;22275:32:::1;22123:35:::0;22038:38;22275:11:::1;:32::i;:::-;22318:63;22332:11;22345:6;22353;22361:10;22373:7;22318:13;:63::i;:::-;22001:387;;21853:535:::0;;;;:::o;9720:456:22:-;9922:19;9916:4;9909:33;9968:8;9962:4;9955:22;10020:1;10013:4;10007;9997:21;9990:32;10151:8;10105:44;10102:1;10099;10094:66;9720:456::o;10035:1528:38:-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;12517:13:22::1;:11;:13::i;:::-;2466:35:38::2;::::0;::::2;;::::0;;;:17:::2;:35;::::0;;;;:44:::2;;:49:::0;10220:16;;2466:54;2462:116:::2;;2543:24;;;;;;;;;;;;;;2462:116;10289:35:::3;::::0;::::3;10252:34;10289:35:::0;;;:17:::3;:35;::::0;;;;;10339:6:::3;:35;;;;;;;;:::i;:::-;::::0;10335:1222:::3;;10849:10;::::0;:64:::3;::::0;;;;:10:::3;::::0;;::::3;::::0;:42:::3;::::0;:64:::3;::::0;10892:20:::3;::::0;;::::3;::::0;10849:64:::3;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10810:36:::0;;;:103;10965:15:::3;10927:35:::0;;;:53;10810:20:::3;::::0;::::3;10994:33:::0;;;10335:1222:::3;;;11058:33;11048:6;:43;;;;;;;;:::i;:::-;::::0;11044:513:::3;;11107:23;::::0;::::3;:31:::0;;;11044:513:::3;;;11169:50;11159:6;:60;;;;;;;;:::i;:::-;::::0;11155:402:::3;;11235:38;::::0;::::3;:46:::0;;;11155:402:::3;;;11312:38;11302:6;:48;;;;;;;;:::i;:::-;::::0;11298:259:::3;;11366:28;::::0;::::3;:36:::0;;;11298:259:::3;;;11506:32;::::0;::::3;:40:::0;;;11298:259:::3;10242:1321;12540:1:22::2;10035:1528:38::0;;;:::o;16914:727::-;2466:35;;;;;;;:17;:35;;;;;:44;;:49;17059:16;;2466:54;2462:116;;2543:24;;;;;;;;;;;;;;2462:116;17107:6;2856:20:::1;::::0;::::1;2866:10;2856:20;::::0;::::1;::::0;:56:::1;;-1:-1:-1::0;2881:19:38::1;::::0;::::1;;::::0;;;:11:::1;:19;::::0;;;;;;;2901:10:::1;2881:31:::0;;;;;;;;::::1;;2880:32;2856:56;2852:116;;;2935:22;;;;;;;;;;;;;;2852:116;17156:30:::2;::::0;;::::2;17129:24;17156:30:::0;;;:12:::2;:30;::::0;;;;;;;:38;;::::2;::::0;;;;;;;;17241:35;;;:17:::2;:35:::0;;;;;;17392:32:::2;17241:35:::0;17156:38;17392:11:::2;:32::i;:::-;17440:41;::::0;;::::2;8147:55:60::0;;;8129:74;;8234:2;8219:18;;8212:34;;;17440:41:38;::::2;::::0;::::2;::::0;8102:18:60;17440:41:38::2;;;;;;;17492:59;17512:16;17530:6;17538:3;17543:7;17492:19;:59::i;8441:966::-:0;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;12517:13:22::1;:11;:13::i;:::-;8766:35:38::2;::::0;::::2;8729:34;8766:35:::0;;;:17:::2;:35;::::0;;;;8815:20:::2;::::0;::::2;:25:::0;:30;8811:68:::2;;8854:25;;;;;;;;;;;;;;8811:68;8890:20;::::0;;::::2;:33:::0;;;8971:15:::2;8933:35:::0;;;:53;:35:::2;8996:32:::0;::::2;:56:::0;;;9062:28:::2;::::0;::::2;:48:::0;;;9120:23:::2;::::0;::::2;:38:::0;;;9168::::2;::::0;::::2;:68:::0;;;9311:27:::2;::::0;;;;;;;:25:::2;::::0;::::2;::::0;::::2;::::0;:27;;::::2;::::0;::::2;::::0;;;;;;;;:25;:27:::2;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9290:48;::::0;::::2;;654:2;9290:48;:::i;:::-;9246:41;::::0;::::2;:92:::0;9354:46:::2;::::0;1307:42:60;1295:55;;1277:74;;9354:46:38::2;::::0;1265:2:60;1250:18;9354:46:38::2;;;;;;;8719:688;8441:966:::0;;;;;;:::o;14184:114::-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;14262:10:38::1;14250:23;::::0;;;:11:::1;:23;::::0;;;;;;;::::1;:34:::0;;;::::1;::::0;;;;;;:41;;;::::1;14287:4;14250:41;::::0;;14184:114::o;2234:88::-;12517:13:22;:11;:13::i;3698:76:38:-;12517:13:22;:11;:13::i;:::-;163:1:29::1;3753:6:38;:14:::0;3698:76::o;14558:119::-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;14638:10:38::1;14665:5;14626:23:::0;;;:11:::1;:23;::::0;;;;;;;::::1;:36:::0;;;::::1;::::0;;;;;;:44;;;::::1;::::0;;14558:119::o;23502:2620::-;2466:35;;;;;;;:17;:35;;;;;:44;;:49;23651:16;;2466:54;2462:116;;2543:24;;;;;;;;;;;;;;2462:116;23871:30:::1;::::0;;::::1;23844:24;23871:30:::0;;;:12:::1;:30;::::0;;;;;;;:38;;::::1;::::0;;;;;;;;23956:35;;;:17:::1;:35:::0;;;;;;24107:32:::1;23956:35:::0;23871:38;24107:11:::1;:32::i;:::-;24150:27;24180:40;24200:11;24213:6;24180:19;:40::i;:::-;24150:70;;24257:11;:32;;;24234:19;:55;24230:109;;24312:16;;;;;;;;;;;;;;24230:109;24377:17;24353:20;:41:::0;24349:614:::1;;24934:6;:18;;;24910:6;:21;;;:42;;;;:::i;:::-;24887:65;;24349:614;24973:32;25008:72;25046:11;25059:20;25008:37;:72::i;:::-;24973:107:::0;-1:-1:-1;25090:14:38::1;786:22;600:2;786;:22;:::i;:::-;779:30;::::0;:3:::1;:30;:::i;:::-;25135:28;::::0;::::1;::::0;25108:55:::1;::::0;:24;:55:::1;:::i;:::-;25107:78;;;;:::i;:::-;25090:95:::0;-1:-1:-1;25195:14:38::1;25212:33;25090:95:::0;25212:24;:33:::1;:::i;:::-;25571:26:::0;;25195:50;;-1:-1:-1;25562:35:38;::::1;25558:101;;;-1:-1:-1::0;25622:26:38;;25558:101:::1;25674:60;::::0;;25693:10:::1;12018:74:60::0;;12123:2;12108:18;;12101:34;;;12151:18;;;12144:34;;;25674:60:38::1;::::0;::::1;::::0;::::1;::::0;12006:2:60;11991:18;25674:60:38::1;;;;;;;25745:58;25765:16;25783:6;25791:3;25796:6;25745:19;:58::i;:::-;25813:76;25827:11;25840:6;25848;25856:10;25868:20;25813:13;:76::i;:::-;26014:40;26034:11;26047:6;26014:19;:40::i;:::-;25991:19;:63;25987:129;;26077:28;;;;;;;;;;;;;;25987:129;23673:2449;;;;;;23502:2620:::0;;;;;:::o;4293:119::-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;12517:13:22::1;:11;:13::i;:::-;4381:10:38::2;:24:::0;;;::::2;;::::0;;;::::2;::::0;;;::::2;::::0;;4293:119::o;10363:708:22:-;12517:13;:11;:13::i;:::-;10597:19:::1;10591:4;10584:33;10643:12;10637:4;10630:26;10705:4;10699;10689:21;10811:12;10805:19;10792:11;10789:36;10786:157;;;10857:10;10851:4;10844:24;10924:4;10918;10911:18;10786:157;11020:1;10999:23:::0;;11041::::1;11051:12:::0;11041:9:::1;:23::i;:::-;10363:708:::0;:::o;8348:349::-;12517:13;:11;:13::i;:::-;8520:8:::1;8516:2;8512:17;8502:150;;8562:10;8556:4;8549:24;8633:4;8627;8620:18;8502:150;8671:19;8681:8;8671:9;:19::i;15290:331:38:-:0;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;2466:35:38::1;::::0;::::1;;::::0;;;:17:::1;:35;::::0;;;;:44:::1;;:49:::0;15443:16;;2466:54;2462:116:::1;;2543:24;;;;;;;;;;;;;;2462:116;15500:6:::2;15480:36;;;15508:7;15480:36;;;;571:25:60::0;;559:2;544:18;;425:177;15480:36:38::2;;;;;;;;15561:53;15580:16;15598:6;15606:7;15561:18;:53::i;:::-;387:1:29::1;15290:331:38::0;;;:::o;6052:1230::-;163:1:29;345:6;;:15;341:36;;369:8;;;;;;;;;;;;;;341:36;6172:14:38::1;6147:40;;:13;:40;;::::0;6143:1133:::1;;6387:8;::::0;6345:39:::1;::::0;;;;6378:4:::1;6345:39;::::0;::::1;1277:74:60::0;6316:23:38::1;:14;:23;::::0;::::1;::::0;6340:3;;6387:8;6316:23;;6345:24:::1;::::0;1250:18:60;;6345:39:38::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:50;;;;:::i;:::-;6316:80;::::0;;::::1;::::0;;;;;;8159:42:60;8147:55;;;6316:80:38::1;::::0;::::1;8129:74:60::0;8219:18;;;8212:34;8102:18;;6316:80:38::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;6143:1133;6417:27;::::0;::::1;6413:863;;6591:12;6608:3;:8;;6624:21;6608:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6590:60;;;6669:7;6664:40;;6685:19;;;;;;;;;;;;;;6413:863;7193:33;::::0;::::1;6874:25;7193:33:::0;;;:17:::1;:33;::::0;;;;;;:58;7151:39;;;;;7184:4:::1;7151:39;::::0;::::1;1277:74:60::0;7193:33:38;;7053:212:::1;::::0;7193:33;;7130:3;;7193:33;7151:24:::1;::::0;1250:18:60;;7151:39:38::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:100;;;;:::i;:::-;7053:28;:212::i;6413:863::-;6052:1230:::0;;:::o;7292:355:22:-;7504:11;7498:18;7488:8;7485:32;7475:156;;7550:10;7544:4;7537:24;7612:4;7606;7599:18;7475:156;7292:355::o;30857:449:38:-;30959:20;30981:36;31021:42;31043:11;31056:6;31021:21;:42::i;:::-;30958:105;;;;31107:28;31073:6;:31;;:62;;;;31229:12;31245:1;31229:17;31225:30;;31248:7;;30857:449;;:::o;31225:30::-;31287:12;31265:6;:18;;;:34;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;30857:449:38:o;28155:306::-;28326:7;28301:6;:21;;;:32;;;;;;;:::i;:::-;;;;;;;;28378:7;28343:11;:31;;;:42;;;;;;;:::i;:::-;;;;;;;;28403:7;28395:4;;:15;;;;;;;:::i;:::-;;;;-1:-1:-1;;28421:33:38;;;;;:19;8147:55:60;;;28421:33:38;;;8129:74:60;8219:18;;;8212:34;;;28421:14:38;:19;;;;8102:18:60;;28421:33:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;34832:283::-;35047:11;:32;;;35004:40;35024:11;35037:6;35004:19;:40::i;:::-;:75;35000:108;;;35088:20;;;;;;;;;;;;;;28961:1089;29334:6;:21;;;29323:7;:32;29319:725;;29396:7;29371:6;:21;;;:32;;;;;;;:::i;:::-;;;;;;;;29452:7;29417:11;:31;;;:42;;;;;;;:::i;:::-;;;;;;;;29481:7;29473:4;;:15;;;;;;;:::i;:::-;;;;-1:-1:-1;;29508:31:38;;571:25:60;;;29508:31:38;;;;;;559:2:60;544:18;29508:31:38;;;;;;;29553:35;;;;;:19;8147:55:60;;;29553:35:38;;;8129:74:60;8219:18;;;8212:34;;;29553:14:38;:19;;;;8102:18:60;;29553:35:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;29319:725;;;29650:21;;;;;;29619:28;29686:25;;;;29725:31;;;:55;;29650:21;;29619:28;29725:55;;29650:21;;29725:55;:::i;:::-;;;;;;;;29802:20;29794:4;;:28;;;;;;;:::i;:::-;;;;-1:-1:-1;;29842:44:38;;571:25:60;;;29842:44:38;;;;;;559:2:60;544:18;29842:44:38;;;;;;;29900:48;;;;;:19;8147:55:60;;;29900:48:38;;;8129:74:60;8219:18;;;8212:34;;;29900:14:38;:19;;;;8102:18:60;;29900:48:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;29963:70:38;29979:6;29987;29995:5;30002:30;30012:20;30002:7;:30;:::i;:::-;29963:15;:70::i;27545:426::-;27668:30;;;;;;;;:12;:30;;;;;;;;:38;;;;;;;;;;;:69;;27730:7;;27668:30;:69;;27730:7;;27668:69;:::i;:::-;;;;-1:-1:-1;;27747:35:38;;;;;;;:17;:35;;;;;:71;;27811:7;;27747:35;:71;;27811:7;;27747:71;:::i;:::-;;;;-1:-1:-1;;27833:37:38;;;;27874:1;27833:42;27829:56;;27877:8;;;27829:56;27895:69;27932:16;27951:3;27956:7;27895:28;:69::i;31455:1193::-;31592:7;31915:22;31964:6;:18;;;31940:6;:21;;;:42;;;;:::i;:::-;31915:67;;32036:14;32054:1;32036:19;32032:33;;32064:1;32057:8;;;;;32032:33;32234:26;;;:31;32230:61;;32274:17;32267:24;;;;;32230:61;32416:34;32453:50;32483:11;32496:6;32453:29;:50::i;:::-;32416:87;-1:-1:-1;32568:73:38;786:22;600:2;786;:22;:::i;:::-;779:30;;:3;:30;:::i;:::-;32576:35;;:14;:35;:::i;:::-;32614:26;32568:6;:73::i;:::-;32561:80;;;;31455:1193;;;;;:::o;33375:318::-;33521:7;33643:11;:41;;;33637:2;:47;;;;:::i;:::-;868:4;33588:11;:17;;;:45;;;;:::i;:::-;:97;;;;:::i;:::-;704:22;600:2;704;:22;:::i;:::-;699:28;;:1;:28;:::i;:::-;33552:19;;:7;:19;:::i;:::-;33551:135;;;;:::i;:::-;33544:142;33375:318;-1:-1:-1;;;33375:318:38:o;6145:1089:22:-;6857:11;7093:16;;6941:26;;;;;;;7053:38;7050:1;;7042:78;7177:27;6145:1089::o;26477:795:38:-;26771:41;;;;;26806:4;26771:41;;;1277:74:60;26750:18:38;;26771:26;;;;;;1250:18:60;;26771:41:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;26750:62;;26918:95;26959:16;26978:10;26998:4;27005:7;26918:32;:95::i;:::-;27044:41;;;;;27079:4;27044:41;;;1277:74:60;27023:18:38;;27088:10;;27044:26;;;;;;1250:18:60;;27044:41:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:54;;;;:::i;:::-;27109:30;;;;;;;;:12;:30;;;;;;;;:38;;;;;;;;;;;:72;;27023:75;;-1:-1:-1;27023:75:38;;27109:38;;:30;:72;;27023:75;;27109:72;:::i;:::-;;;;-1:-1:-1;;27191:35:38;;;;;;;:17;:35;;;;;:74;;27255:10;;27191:35;:74;;27255:10;;27191:74;:::i;:::-;;;;-1:-1:-1;;;;;;;26477:795:38:o;11375:939:24:-;11538:2;11532:4;11525:16;11595:6;11589:4;11582:20;11660:34;11654:4;11647:48;12049:4;12043;12037;12031;12028:1;12021:5;12014;12009:45;11943:16;11936:24;11932:1;11925:4;11919:11;11916:18;11913:48;11828:244;11801:400;;12118:10;12112:4;12105:24;12182:4;12176;12169:18;11801:400;12227:1;12221:4;12214:15;11375:939;;;:::o;33833:541:38:-;34055:10;;:83;;;;;33972:7;;;;;;34055:10;;;:47;;:83;;34103:12;;34117:20;;;;34055:83;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;34004:134;-1:-1:-1;34149:20:38;786:22;600:2;786;:22;:::i;:::-;779:30;;:3;:30;:::i;:::-;34253:21;;;;34218:31;;;;34187:62;;:28;:62;:::i;:::-;34186:88;;;;:::i;:::-;34172:133;;;;:::i;:::-;34149:156;34338:28;;-1:-1:-1;33833:541:38;;-1:-1:-1;;;;33833:541:38:o;30407:292::-;30547:7;30525:6;:18;;;:29;;;;;;;:::i;:::-;;;;;;;;30576:7;30564:8;;:19;;;;;;;:::i;:::-;;;;-1:-1:-1;;30599:25:38;;571::60;;;30599::38;;;;;;559:2:60;544:18;30599:25:38;;;;;;;30634:58;;;;;:27;12680:15:60;;;30634:58:38;;;12662:34:60;30677:4:38;12712:18:60;;;12705:43;12764:18;;;12757:34;;;30634:14:38;:27;;;;12574:18:60;;30634:58:38;12399:398:60;32795:433:38;32942:7;;704:22;600:2;704;:22;:::i;:::-;699:28;;:1;:28;:::i;:::-;868:4;33095:11;:17;;;33016:76;33052:11;33065:6;:26;;;33016:35;:76::i;:::-;:96;;;;:::i;:::-;:140;;;;:::i;:::-;33002:176;;;;:::i;:::-;32965:213;32795:433;-1:-1:-1;;;;32795:433:38:o;35374:178::-;35436:10;35462:2;35468:1;35462:7;35458:21;;35471:8;;;35458:21;35493:2;35499:1;35493:7;35489:21;;-1:-1:-1;35509:1:38;35502:8;;35489:21;35542:2;35532:6;35537:1;35532:2;:6;:::i;:::-;35531:13;;;;:::i;:::-;35526:19;;:1;:19;:::i;8181:1139:24:-;8364:4;8358:11;8429:6;8423:4;8416:20;8494:2;8488:4;8481:16;8559:4;8555:2;8551:13;8545:4;8538:27;8621:34;8615:4;8608:48;9022:4;9016;9010;9004;9001:1;8994:5;8987;8982:45;8916:16;8909:24;8905:1;8898:4;8892:11;8889:18;8886:48;8801:244;8774:404;;9091:10;9085:4;9078:24;9159:4;9153;9146:18;8774:404;9204:1;9198:4;9191:15;9260:4;9253:15;-1:-1:-1;;;;8181:1139:24:o;34493:238:38:-;34636:7;34682:11;:41;;;34676:2;:47;;;;:::i;:::-;34666:58;;:6;:58;:::i;14:154:60:-;100:42;93:5;89:54;82:5;79:65;69:93;;158:1;155;148:12;173:247;232:6;285:2;273:9;264:7;260:23;256:32;253:52;;;301:1;298;291:12;253:52;340:9;327:23;359:31;384:5;359:31;:::i;607:180::-;666:6;719:2;707:9;698:7;694:23;690:32;687:52;;;735:1;732;725:12;687:52;-1:-1:-1;758:23:60;;607:180;-1:-1:-1;607:180:60:o;1362:335::-;1450:6;1458;1511:2;1499:9;1490:7;1486:23;1482:32;1479:52;;;1527:1;1524;1517:12;1479:52;1566:9;1553:23;1585:31;1610:5;1585:31;:::i;:::-;1635:5;1687:2;1672:18;;;;1659:32;;-1:-1:-1;;;1362:335:60:o;1702:618::-;1808:6;1816;1824;1832;1885:3;1873:9;1864:7;1860:23;1856:33;1853:53;;;1902:1;1899;1892:12;1853:53;1941:9;1928:23;1960:31;1985:5;1960:31;:::i;:::-;2010:5;-1:-1:-1;2067:2:60;2052:18;;2039:32;2080:33;2039:32;2080:33;:::i;:::-;2132:7;-1:-1:-1;2191:2:60;2176:18;;2163:32;2204:33;2163:32;2204:33;:::i;:::-;1702:618;;;;-1:-1:-1;2256:7:60;;2310:2;2295:18;2282:32;;-1:-1:-1;;1702:618:60:o;2325:476::-;2422:6;2430;2438;2491:2;2479:9;2470:7;2466:23;2462:32;2459:52;;;2507:1;2504;2497:12;2459:52;2546:9;2533:23;2565:31;2590:5;2565:31;:::i;:::-;2615:5;-1:-1:-1;2672:2:60;2657:18;;2644:32;2685:33;2644:32;2685:33;:::i;:::-;2325:476;;2737:7;;-1:-1:-1;;;2791:2:60;2776:18;;;;2763:32;;2325:476::o;2806:511::-;2929:6;2937;2945;2998:2;2986:9;2977:7;2973:23;2969:32;2966:52;;;3014:1;3011;3004:12;2966:52;3053:9;3040:23;3072:31;3097:5;3072:31;:::i;:::-;3122:5;-1:-1:-1;3179:2:60;3164:18;;3151:32;3214:1;3202:14;;3192:42;;3230:1;3227;3220:12;3322:388;3390:6;3398;3451:2;3439:9;3430:7;3426:23;3422:32;3419:52;;;3467:1;3464;3457:12;3419:52;3506:9;3493:23;3525:31;3550:5;3525:31;:::i;:::-;3575:5;-1:-1:-1;3632:2:60;3617:18;;3604:32;3645:33;3604:32;3645:33;:::i;:::-;3697:7;3687:17;;;3322:388;;;;;:::o;3907:610::-;4031:6;4039;4047;4055;4063;4071;4124:3;4112:9;4103:7;4099:23;4095:33;4092:53;;;4141:1;4138;4131:12;4092:53;4180:9;4167:23;4199:31;4224:5;4199:31;:::i;:::-;4249:5;4301:2;4286:18;;4273:32;;-1:-1:-1;4352:2:60;4337:18;;4324:32;;4403:2;4388:18;;4375:32;;-1:-1:-1;4454:3:60;4439:19;;4426:33;;-1:-1:-1;4506:3:60;4491:19;4478:33;;-1:-1:-1;3907:610:60;-1:-1:-1;;;3907:610:60:o;7505:256::-;7369:12;;7357:25;;7431:4;7420:16;;7414:23;7407:4;7398:14;;7391:47;7487:4;7476:16;;7470:23;7463:4;7454:14;;7447:47;7690:2;7675:18;;7702:53;7287:213;7766:184;7836:6;7889:2;7877:9;7868:7;7864:23;7860:32;7857:52;;;7905:1;7902;7895:12;7857:52;-1:-1:-1;7928:16:60;;7766:184;-1:-1:-1;7766:184:60:o;8257:277::-;8324:6;8377:2;8365:9;8356:7;8352:23;8348:32;8345:52;;;8393:1;8390;8383:12;8345:52;8425:9;8419:16;8478:5;8471:13;8464:21;8457:5;8454:32;8444:60;;8500:1;8497;8490:12;8539:184;8591:77;8588:1;8581:88;8688:4;8685:1;8678:15;8712:4;8709:1;8702:15;8728:125;8793:9;;;8814:10;;;8811:36;;;8827:18;;:::i;8858:407::-;7369:12;;7357:25;;7431:4;7420:16;;7414:23;7407:4;7398:14;;7391:47;7487:4;7476:16;;7470:23;7463:4;7454:14;;7447:47;9122:3;9107:19;;7369:12;;9255:2;9240:18;;7357:25;7431:4;7420:16;;7414:23;7398:14;;;7391:47;7487:4;7476:16;;7470:23;7454:14;;;7447:47;9197:62;7287:213;9270:184;9322:77;9319:1;9312:88;9419:4;9416:1;9409:15;9443:4;9440:1;9433:15;9459:273;9527:6;9580:2;9568:9;9559:7;9555:23;9551:32;9548:52;;;9596:1;9593;9586:12;9548:52;9628:9;9622:16;9678:4;9671:5;9667:16;9660:5;9657:27;9647:55;;9698:1;9695;9688:12;9737:128;9804:9;;;9825:11;;;9822:37;;;9839:18;;:::i;9870:482::-;9959:1;10002:5;9959:1;10016:330;10037:7;10027:8;10024:21;10016:330;;;10156:4;10088:66;10084:77;10078:4;10075:87;10072:113;;;10165:18;;:::i;:::-;10215:7;10205:8;10201:22;10198:55;;;10235:16;;;;10198:55;10314:22;;;;10274:15;;;;10016:330;;;10020:3;9870:482;;;;;:::o;10357:866::-;10406:5;10436:8;10426:80;;-1:-1:-1;10477:1:60;10491:5;;10426:80;10525:4;10515:76;;-1:-1:-1;10562:1:60;10576:5;;10515:76;10607:4;10625:1;10620:59;;;;10693:1;10688:130;;;;10600:218;;10620:59;10650:1;10641:10;;10664:5;;;10688:130;10725:3;10715:8;10712:17;10709:43;;;10732:18;;:::i;:::-;-1:-1:-1;;10788:1:60;10774:16;;10803:5;;10600:218;;10902:2;10892:8;10889:16;10883:3;10877:4;10874:13;10870:36;10864:2;10854:8;10851:16;10846:2;10840:4;10837:12;10833:35;10830:77;10827:159;;;-1:-1:-1;10939:19:60;;;10971:5;;10827:159;11018:34;11043:8;11037:4;11018:34;:::i;:::-;11148:6;11080:66;11076:79;11067:7;11064:92;11061:118;;;11159:18;;:::i;:::-;11197:20;;10357:866;-1:-1:-1;;;10357:866:60:o;11228:131::-;11288:5;11317:36;11344:8;11338:4;11317:36;:::i;11364:168::-;11437:9;;;11468;;11485:15;;;11479:22;;11465:37;11455:71;;11506:18;;:::i;11537:274::-;11577:1;11603;11593:189;;11638:77;11635:1;11628:88;11739:4;11736:1;11729:15;11767:4;11764:1;11757:15;11593:189;-1:-1:-1;11796:9:60;;11537:274::o", "linkReferences": {}, "immutableReferences": { - "49016": [ + "46700": [ { - "start": 1546, + "start": 1976, "length": 32 }, { - "start": 6356, + "start": 3394, "length": 32 }, { - "start": 7276, + "start": 7500, "length": 32 }, { - "start": 7427, + "start": 7651, "length": 32 }, { - "start": 8883, + "start": 8539, "length": 32 }, { - "start": 9244, + "start": 8959, "length": 32 }, { - "start": 9572, + "start": 9287, "length": 32 }, { - "start": 11122, + "start": 10942, "length": 32 } ] @@ -1122,41 +1059,45 @@ }, "methodIdentifiers": { "CURRENCY_TOKEN()": "e72531c8", - "DEFAULT_ADMIN_ROLE()": "a217fddf", - "accruedFees()": "682c2058", "baseRateInfo()": "13f60c9a", "burnCurrency(address,address,uint256)": "4fa73919", + "cancelOwnershipHandover()": "54d1f13d", "collateralMapping(address)": "c665471f", + "completeOwnershipHandover(address)": "f04e283e", "createCollateralType(address,uint256,uint256,uint256,uint256,uint256)": "645ba425", "debt()": "0dca59c1", + "debtCeiling()": "e1c84ea4", "deny(address)": "9c52a7f1", "depositCollateral(address,address,uint256)": "f970c3b7", - "getRoleAdmin(bytes32)": "248a9ca3", - "grantRole(bytes32,address)": "2f2ff15d", - "hasRole(bytes32,address)": "91d14854", + "feedModule()": "a12ad552", "liquidate(address,address,address,uint256)": "aab3f868", "mintCurrency(address,address,address,uint256)": "49a66ca3", + "owner()": "8da5cb5b", + "ownershipHandoverExpiresAt(address)": "fee81cf4", "paidFees()": "b80a0a77", "pause()": "8456cb59", + "rateModule()": "336d391e", "recoverToken(address,address)": "feaea586", "rely(address)": "65fae35e", "relyMapping(address,address)": "5881fc33", - "renounceRole(bytes32,address)": "36568abe", - "revokeRole(bytes32,address)": "d547741f", + "renounceOwnership()": "715018a6", + "requestOwnershipHandover()": "25692962", + "stabilityModule()": "ea061ad4", "status()": "200d2ed2", - "supportsInterface(bytes4)": "01ffc9a7", + "transferOwnership(address)": "f2fde38b", "unpause()": "3f4ba83a", "updateBaseRate(uint256)": "330283aa", "updateCollateralData(address,uint8,uint256)": "57b35a78", - "updateCollateralRate(address,uint256)": "da3b7703", - "updateFeedContract(address)": "4522fa85", + "updateDebtCeiling(uint256)": "1218c5fd", + "updateFeedModule(address)": "0ae5ccab", "updatePrice(address,uint256)": "457972de", + "updateRateModule(address)": "d707eed5", "updateStabilityModule(address)": "0408ccd6", "vaultMapping(address,address)": "e2c7283f", "withdrawCollateral(address,address,address,uint256)": "5820ba63", - "withdrawFees(address,uint256)": "ad3b1b47" + "withdrawFees()": "476343ee" }, - "rawMetadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract Currency\",\"name\":\"_currencyToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_baseRate\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BadCollateralRatio\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralRatioNotImproved\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EthTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEnoughCollateralToPay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotOwnerOrReliedUpon\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Paused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PositionIsSafe\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TotalUserCollateralBelowFloor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnrecognizedParam\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroCollateral\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CollateralDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"collateralAddress\",\"type\":\"address\"}],\"name\":\"CollateralTypeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CollateralWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CurrencyBurned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CurrencyMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FeesPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"currencyAmountPaid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"collateralAmountCovered\",\"type\":\"uint256\"}],\"name\":\"Liquidated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"CURRENCY_TOKEN\",\"outputs\":[{\"internalType\":\"contract Currency\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accruedFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseRateInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accumulatedRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastUpdateTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burnCurrency\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"collateralMapping\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalDepositedCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalBorrowedAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidationThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidationBonus\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accumulatedRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastUpdateTime\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.RateInfo\",\"name\":\"rateInfo\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"paidFees\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"debtCeiling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateralFloorPerPosition\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"additionalCollateralPrecision\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"exists\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_liquidationThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_liquidationBonus\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_debtCeiling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_collateralFloorPerPosition\",\"type\":\"uint256\"}],\"name\":\"createCollateralType\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"debt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reliedUpon\",\"type\":\"address\"}],\"name\":\"deny\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"depositCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_currencyAmountToPay\",\"type\":\"uint256\"}],\"name\":\"liquidate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mintCurrency\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paidFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"recoverToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_relyUpon\",\"type\":\"address\"}],\"name\":\"rely\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"relyMapping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"status\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_baseRate\",\"type\":\"uint256\"}],\"name\":\"updateBaseRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"enum IVault.ModifiableParameters\",\"name\":\"_param\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_data\",\"type\":\"uint256\"}],\"name\":\"updateCollateralData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rate\",\"type\":\"uint256\"}],\"name\":\"updateCollateralRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feedContract\",\"type\":\"address\"}],\"name\":\"updateFeedContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_collateralAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_price\",\"type\":\"uint256\"}],\"name\":\"updatePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_stabilityModule\",\"type\":\"address\"}],\"name\":\"updateStabilityModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"vaultMapping\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"depositedCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowedAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accruedFees\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastTotalAccumulatedRate\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}],\"AddressEmptyCode(address)\":[{\"details\":\"There's no code at `target` (it is not a contract).\"}],\"AddressInsufficientBalance(address)\":[{\"details\":\"The ETH balance of the account is not enough to perform the operation.\"}],\"FailedInnerCall()\":[{\"details\":\"A call to an address target failed. The target may have reverted.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC20 token failed.\"}]},\"events\":{\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"burnCurrency(address,address,uint256)\":{\"details\":\"we accrue fees here to enable full payment of both borrowed amount and fees in one function. This way unupdated accrued fees are accounted for too and can be paid backshould revert if the contract is paused should revert if the collateral does not exist should revert if the caller is not the `_owner` and not also not relied upon should revert if the amount of currency to burn / pay back is more than `borrowed amount + total accrued fees`\",\"params\":{\"_amount\":\"amount of currency to pay back / burn\",\"_collateralToken\":\"contract address of collateral to burn/pay back the vault's currency for,\",\"_owner\":\"owner of the vault to pay back it's loan\"}},\"createCollateralType(address,uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"should revert if contract is paused should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role should revert if the collateral already exists, i.e if _collateral.exists returns true\",\"params\":{\"_collateralFloorPerPosition\":\"value to set as the minimum amount of this collateral that can be borrowed against\",\"_collateralToken\":\"contract address of the token to add\",\"_debtCeiling\":\"value to set as the debt ceiling of the collateral, used to limit risk by capping borrowable amount of currency backed by the given collateral\",\"_liquidationBonus\":\"value to set as the liquidation bonus of the collateral, used to incentivize liquidators, should be denominated in 1e18 where 1e18 is 100%\",\"_liquidationThreshold\":\"value to set as the liquidation threshold of the collateral, should be denominated in 1e18 where 1e18 is 100%\",\"_rate\":\"value to set as the collateral rate (per second) for the collateral, should be denominated in 1e18 where 1e18 is 100%\"}},\"deny(address)\":{\"details\":\"should revert if the contract is paused\",\"params\":{\"_reliedUpon\":\"address to rely upon\"}},\"depositCollateral(address,address,uint256)\":{\"details\":\"should revert if the contract is paused should revert if the collateral does not exist should revert if the caller is not the `_owner` and not also not relied upon should revert if transfer from `_owner` to this contract fails based on SafeERC20.safeTransferFrom()'s expectations of a successful erc20 transferFrom call\",\"params\":{\"_amount\":\"amount of `_collateralToken` to deposit into `_owner`'s vault\",\"_collateralToken\":\"contract address of the collateral to deposit\",\"_owner\":\"owner of the vault to deposit into\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"liquidate(address,address,address,uint256)\":{\"details\":\"updates fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the start and end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratioshould revert if the contract is paused should revert if the collateral does not exist should revert if the vault is not under-water should revert if liqudiation did not strictly imporve the collateral ratio of the vault\",\"params\":{\"_collateralToken\":\"contract address of collateral used by vault that is to be liquidate, also the token to recieved by the `_to` address after liquidation\",\"_currencyAmountToPay\":\"the amount of currency tokens to pay back for `_owner`\",\"_owner\":\"owner of the vault to liquidate\",\"_to\":\"address to send the liquidated collateral (collateral covered) to\"}},\"mintCurrency(address,address,address,uint256)\":{\"details\":\"if the users currencly minted/borrwed amount if greater than 0, it should update fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratio else i.e when currenctly minted/borrwed amount is 0 (this means that no past fees to accrue), it should set the `lastTotalAccumulatedRate` of the vault to be the current totalAccumulatedRate (i.e current accumulated base rate + current accumulated collateral rate, emphaisis on current as these values are recalculated for both rates to their current values)should revert if the contract is paused should revert if the collateral does not exist should revert if the caller is not the `_owner` and not also not relied upon should revert if `_owner`'s deposited collateral amount is less than the collateralFloorPerPosition for the given collateral should revert if mint to the `_to` address fails should revert if the collateral ratio of `_owner` is below the liquidation threshold at the end of the function. This can happen if the position was already under-water (liquidatable) prior to the function call or if the withdrawal of `_amount` make it under-water\",\"params\":{\"_amount\":\"amount of currency to mint\",\"_collateralToken\":\"contract address of collateral to mint/borrow the vault's currency against\",\"_owner\":\"owner of the vault to use it's collateral balance\",\"_to\":\"address to send the minted/borrowed currency to\"}},\"pause()\":{\"details\":\"interactions with functions without a `whenNotPaused` or `whenPaused` modifier are unaffectedreverts if not paused\"},\"recoverToken(address,address)\":{\"details\":\"if `_tokenAddress` is address(0), send all eth in this contract to `_to` else if `_tokenAddress` is this vaults `CURRENCY_TOKEN`, send balance of this address of that token minus the paidFees (i.e unwithdrawn paid fees) else (this means this token can/might be a collateral), send the balance of this address of that token minus the `totalDepositedCollateral` of it as a collateralreverts if `_tokenAddress` is address(0) i.e eth, and `_to` is a contract that has no non reverting way to accept eth reverts if `_tokenAddress` is not `CURRENCY_TOKEN` and not `address(0) but is a contract\",\"params\":{\"_to\":\"address to send the recovered tokens to\",\"_tokenAddress\":\"address of token to recover. if it is eth, address(0) is expected\"}},\"rely(address)\":{\"details\":\"should revert if the contract is paused\",\"params\":{\"_relyUpon\":\"address to rely upon\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"unpause()\":{\"details\":\"interactions with functions without a `whenNotPaused` or `whenPaused` modifier are unaffectedreverts if not paused\"},\"updateBaseRate(uint256)\":{\"details\":\"updates the last stored accumulated rate by adding accumulated rate (since baseRateInfo.lastUpdateTime) to it before updating the rate, this way borrowers are charged the previous rate up until block.timestamp before being charged the new rate.updates the last update time too for correct future updates to accumulate past rates correctlyshould revert if the contract is paused should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role\",\"params\":{\"_baseRate\":\"new base rate (per second), should be denominated in 1e18 where 1e18 is 100%\"}},\"updateCollateralData(address,uint8,uint256)\":{\"details\":\"updates the value of the chosen parameter with `_data`should revert if the contract is paused should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role should revert if the collateral does not exist should revert if `_param` is not a variant of ModifiableParameters enum\",\"params\":{\"_collateralToken\":\"contract address of the token to modify it's parameters\",\"_param\":\"contract address of the token to modify it's parameters\"}},\"updateCollateralRate(address,uint256)\":{\"details\":\"updates the last stored accumulated rate by adding accumulated rate (since _collateral.rateInfo.lastUpdateTime) to it before updating the rate, this way borrowers are charged the previous rate up until block.timestamp before being charged the new rate.updates the last update time too for correct future updates to accumulate past rates correctlyshould revert if the contract is paused should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role should revert if the collateral does not exist\",\"params\":{\"_collateralToken\":\"contract address of collateral token to update it's collateral rate\",\"_rate\":\"new collateral rate (per second), should be denominated in 1e18 where 1e18 is 100%\"}},\"updateFeedContract(address)\":{\"details\":\"reverts if the contract is pausedreverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role\"},\"updatePrice(address,uint256)\":{\"details\":\"should revert if the contract is paused should revert if the caller does not have the `FEED_CONTRACT_ROLE` role should revert if the collateral does not exist\",\"params\":{\"_collateralAddress\":\"contract address of the collateral token to update it's price\",\"_price\":\"new price\"}},\"updateStabilityModule(address)\":{\"details\":\"reverts if the contract is pausedreverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role\"},\"withdrawCollateral(address,address,address,uint256)\":{\"details\":\"should update fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratioshould revert if the contract is paused should revert if the collateral does not exist should revert if the caller is not the `_owner` and not also not relied upon should revert if transfer from this contract to the `_to` address fails based on SafeERC20.safeTransfer()'s expectations of a successful erc20 transfer call should revert if the collateral ratio of `_owner` is below the liquidation threshold at the end of the function. This can happen if the position was already under-water (liquidatable) prior to the function call or if the withdrawal of `_amount` make it under-water\",\"params\":{\"_amount\":\"amount of `_collateralToken` to withdraw from `_owner`'s vault to `_to`'s address\",\"_collateralToken\":\"contract address of the collateral to withdraw\",\"_owner\":\"owner of the vault to withdraw from\",\"_to\":\"address to send the withdrawn collateral to\"}},\"withdrawFees(address,uint256)\":{\"details\":\"updates the paidFees for the collateral and globally then transfers the token to the callershould revert if the contract is paused should revert if the caller does not have the `STABILITY_MODULE_ROLE` role should revert if the collateral does not exist\",\"params\":{\"_amount\":\"amount of fees to withdraw\",\"_collateralToken\":\"contract address of collateral token to withdraw from it's paid fees\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"burnCurrency(address,address,uint256)\":{\"notice\":\"burns/pays back a borrowed/minted currency\"},\"createCollateralType(address,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Creates a collateral type that'll be accepted by the system\"},\"deny(address)\":{\"notice\":\"lets an address (the caller) remove access of another address to perform actions on it's (the caller's) vault\"},\"depositCollateral(address,address,uint256)\":{\"notice\":\"deposits collateral into `_owner`'s vault from `_owner`'s address\"},\"liquidate(address,address,address,uint256)\":{\"notice\":\"liquidates a vault making sure the liquidation strictly improves the collateral ratio i.e doesn't leave it the same as before or decreases it (if that's possible)\"},\"mintCurrency(address,address,address,uint256)\":{\"notice\":\"mints/borrows `_amount` of currency to `_to`, backed by `_owner`'s deposited collateral\"},\"pause()\":{\"notice\":\"prevents interactions with functions having `whenNotPaused` modifier and allows interactions with ones with the `whenPaused` modifier\"},\"recoverToken(address,address)\":{\"notice\":\"Used to recover `all` tokens and eth `possible` without affecting collateral reserves or unwithdrawn interest\"},\"rely(address)\":{\"notice\":\"lets an address (the caller) approve another address to perform actions on it's (the caller's) vault\"},\"unpause()\":{\"notice\":\"allows interactions with functions having `whenNotPaused` modifier and prevents interactions with ones with the `whenPaused` modifier\"},\"updateBaseRate(uint256)\":{\"notice\":\"updates the base rate charged for borrowing this currency\"},\"updateCollateralData(address,uint8,uint256)\":{\"notice\":\"updates `manually updateable` parameters of an existing collateral\"},\"updateCollateralRate(address,uint256)\":{\"notice\":\"updates the collateral rate charged for borrowing this currency against a given collateral\"},\"updateFeedContract(address)\":{\"notice\":\"updates the address allowed to perform actions requiring caller to have the `FEED_CONTRACT_ROLE` role\"},\"updatePrice(address,uint256)\":{\"notice\":\"feed contract calls this to update the price with the oracle value\"},\"updateStabilityModule(address)\":{\"notice\":\"updates the address allowed to perform actions requiring caller to have the `STABILITY_MODULE_ROLE` role\"},\"withdrawCollateral(address,address,address,uint256)\":{\"notice\":\"withdraws collateral from `_owner`'s vault to `_to`'s address\"},\"withdrawFees(address,uint256)\":{\"notice\":\"allows the stability module to withdraw fees that have been paid on borrowed currency\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/vault.sol\":\"Vault\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"appendCBOR\":false,\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"keccak256\":\"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80\",\"dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z\"]},\"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol\":{\"keccak256\":\"0x92aa1df62dc3d33f1656d63bede0923e0df0b706ad4137c8b10b0a8fe549fd92\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5c0f29195ad64cbe556da8e257dac8f05f78c53f90323c0d2accf8e6922d33a\",\"dweb:/ipfs/QmQ61TED8uaCZwcbh8KkgRSsCav7x7HbcGHwHts3U4DmUP\"]},\"lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229\",\"dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Permit.sol\":{\"keccak256\":\"0xc858a86a35701004d89022a5e98819aac46ccbdc4072fc9dd43928a676b1a2ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://18acebb483c512c0eaafcb437f09c839972c3f0d36f0201ea7baa2926b987dd2\",\"dweb:/ipfs/Qmd9bf2noaDSYDtf6FMSzKu7LPhuf91jsVNmcoCuTCuGic\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f5196ec75139918c6c7bb4251b36395e668f1fa6d206beba7e7520e74913940d\",\"dweb:/ipfs/QmSyqjksXxmm2mCG6qRd1yuwLykypkSVBbnBnGqJRcuJMi\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3036b3a83b7c48f96641f2a9002b9f2dcb6a5958dd670894ada21ae8229b3d0\",\"dweb:/ipfs/QmUNfSBdoVtjhETaUJCYcaC7pTMgbhht926tJ2uXJbiVd3\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7bd24e224f67f65bfadf85dc2929fa965456bb2415478bd0125471b5ce35245\",\"dweb:/ipfs/QmRaydGr8BTHs1kvaZfsNU69pKzUAGFrvABn1KiRSbE51y\"]},\"lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0c4e6cb30d3601e2f7af5af09e265508147cb275a8dcd99d6f7363645cc56867\",\"dweb:/ipfs/QmNgFkoXNWoUbAyw71rr1sKQ95Rj2GfvYiWg79xEYDn2NY\"]},\"lib/openzeppelin-contracts/contracts/utils/Nonces.sol\":{\"keccak256\":\"0x0082767004fca261c332e9ad100868327a863a88ef724e844857128845ab350f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://132dce9686a54e025eb5ba5d2e48208f847a1ec3e60a3e527766d7bf53fb7f9e\",\"dweb:/ipfs/QmXn1a2nUZMpu2z6S88UoTfMVtY2YNh86iGrzJDYmMkKeZ\"]},\"lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol\":{\"keccak256\":\"0x18a7171df639a934592915a520ecb97c5bbc9675a1105607aac8a94e72bf62c6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7478e1f13da69a2867ccd883001d836b75620362e743f196376d63ed0c422a1c\",\"dweb:/ipfs/QmWywcQ9TNfwtoqAxbn25d8C5VrV12PrPS9UjtGe6pL2BA\"]},\"lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0x32ba59b4b7299237c8ba56319110989d7978a039faf754793064e967e5894418\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1ae50c8b562427df610cc4540c9bf104acca7ef8e2dcae567ae7e52272281e9c\",\"dweb:/ipfs/QmTHiadFCSJUPpRjNegc5SahmeU8bAoY8i9Aq6tVscbcKR\"]},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba80ba06c8e6be852847e4c5f4492cef801feb6558ae09ed705ff2e04ea8b13c\",\"dweb:/ipfs/QmXRJDv3xHLVQCVXg1ZvR35QS9sij5y9NDWYzMfUfAdTHF\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol\":{\"keccak256\":\"0x999f705a027ed6dc2d4e0df2cc4a509852c6bfd11de1c8161bf88832d0503fd0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0798def67258d9a3cc20b2b4da7ebf351a5cefe0abfdd665d2d81f8e32f89b21\",\"dweb:/ipfs/QmPEvJosnPfzHNjKvCv2D3891mA2Ww8eUwkqrxBjuYdHCt\"]},\"lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol\":{\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2ceacff44c0fdc81e48e0e0b1db87a2076d3c1fb497341de077bf1da9f6b406c\",\"dweb:/ipfs/QmRUo1muMRAewxrKQ7TkXUtknyRoR57AyEkoPpiuZQ8FzX\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]},\"lib/openzeppelin-contracts/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/currency.sol\":{\"keccak256\":\"0xcff030c4bad135b27acbe405aba19da1184c406c30fe6839b17ffcb8548938d4\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://8ca7791099d9f9851622964e2668477dbe07441c4d687621eaff725c7e25d48b\",\"dweb:/ipfs/QmdsMzD9aVqBym5bS4QnYnGtN8872iBck94NFeyfLirJ8Y\"]},\"src/helpers/pausable.sol\":{\"keccak256\":\"0x8acce52dcd450c73da0f77d9539962826da23aca05aa7d0c7568614e89aed997\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://35e2f674e01c0d6107f31d1c32bb2780d442420b7d26636f560a4eb1007f4a8b\",\"dweb:/ipfs/QmWwVLUGiJq6Q3fK6Zhx4pc6kaqC73pkZ1ntfVA3QCHTpd\"]},\"src/interfaces/ICurrency.sol\":{\"keccak256\":\"0x3b7adace3df08c34906612358d435ffff3b90b5eec0eae34b6335cc8dcd0e7ed\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://370c80ec5636bd95342256d4116f703e633e6b0467ee530397e9b5cada37f998\",\"dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz\"]},\"src/interfaces/IVault.sol\":{\"keccak256\":\"0x0b07e90c8de2bb57e62990839bdc52077d067d9e38db6fd2a8c684dbaf74f1b4\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://50a4e4b3745f623e7ea99800c1472b5d2fdbc3332ceecc1e4eb1cb2546d6b7b5\",\"dweb:/ipfs/Qma91VRTUw3bJzxanpErFXze7R3N9gHE9pnmWm3oFwcC6g\"]},\"src/vault.sol\":{\"keccak256\":\"0xb42eb135923431b43ccd78a05d5937dc7faf98717fabd0b3a50a030b15db7977\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://7a1cadec603bec32da036fc3f095454601105ed00b90def95fa0912ac2ea7d6d\",\"dweb:/ipfs/QmYLDswPYNPuG2RguyZbtD7cWumTZXhPmNfvwsJDr3vGyv\"]}},\"version\":1}", + "rawMetadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract Currency\",\"name\":\"_currencyToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_baseRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_debtCeiling\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BadCollateralRatio\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralDebtCeilingExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralRatioNotImproved\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EthTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GlobalDebtCeilingExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientCurrencyAmountToPay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidStabilityModule\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewOwnerIsZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoHandoverRequest\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEnoughCollateralToPay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotFeedContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotOwnerOrReliedUpon\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Paused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PositionIsSafe\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TotalUserCollateralBelowFloor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnrecognizedParam\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroCollateral\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CollateralDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"collateralAddress\",\"type\":\"address\"}],\"name\":\"CollateralTypeAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CollateralWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CurrencyBurned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CurrencyMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FeesPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"currencyAmountPaid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"collateralAmountCovered\",\"type\":\"uint256\"}],\"name\":\"Liquidated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"OwnershipHandoverCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"OwnershipHandoverRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"CURRENCY_TOKEN\",\"outputs\":[{\"internalType\":\"contract Currency\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseRateInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accumulatedRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastUpdateTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burnCurrency\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cancelOwnershipHandover\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"collateralMapping\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalDepositedCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalBorrowedAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidationThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidationBonus\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accumulatedRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastUpdateTime\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.RateInfo\",\"name\":\"rateInfo\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"debtCeiling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateralFloorPerPosition\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"additionalCollateralPrecision\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"completeOwnershipHandover\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_liquidationThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_liquidationBonus\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_debtCeiling\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_collateralFloorPerPosition\",\"type\":\"uint256\"}],\"name\":\"createCollateralType\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"debt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"debtCeiling\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reliedUpon\",\"type\":\"address\"}],\"name\":\"deny\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"depositCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feedModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_currencyAmountToPay\",\"type\":\"uint256\"}],\"name\":\"liquidate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mintCurrency\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"result\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"ownershipHandoverExpiresAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paidFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rateModule\",\"outputs\":[{\"internalType\":\"contract IRate\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"recoverToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_relyUpon\",\"type\":\"address\"}],\"name\":\"rely\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"relyMapping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requestOwnershipHandover\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stabilityModule\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"status\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_baseRate\",\"type\":\"uint256\"}],\"name\":\"updateBaseRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"enum IVault.ModifiableParameters\",\"name\":\"_param\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_data\",\"type\":\"uint256\"}],\"name\":\"updateCollateralData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_debtCeiling\",\"type\":\"uint256\"}],\"name\":\"updateDebtCeiling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feedModule\",\"type\":\"address\"}],\"name\":\"updateFeedModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"_collateralAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_price\",\"type\":\"uint256\"}],\"name\":\"updatePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IRate\",\"name\":\"_rateModule\",\"type\":\"address\"}],\"name\":\"updateRateModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_stabilityModule\",\"type\":\"address\"}],\"name\":\"updateStabilityModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"vaultMapping\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"depositedCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowedAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accruedFees\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastTotalAccumulatedRate\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ERC20Token\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"Cannot double-initialize.\"}],\"NewOwnerIsZeroAddress()\":[{\"details\":\"The `newOwner` cannot be the zero address.\"}],\"NoHandoverRequest()\":[{\"details\":\"The `pendingOwner` does not have a valid handover request.\"}],\"Unauthorized()\":[{\"details\":\"The caller is not authorized to call the function.\"}]},\"events\":{\"OwnershipHandoverCanceled(address)\":{\"details\":\"The ownership handover to `pendingOwner` has been canceled.\"},\"OwnershipHandoverRequested(address)\":{\"details\":\"An ownership handover to `pendingOwner` has been requested.\"},\"OwnershipTransferred(address,address)\":{\"details\":\"The ownership is transferred from `oldOwner` to `newOwner`. This event is intentionally kept the same as OpenZeppelin's Ownable to be compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173), despite it not being as lightweight as a single argument event.\"}},\"kind\":\"dev\",\"methods\":{\"burnCurrency(address,address,uint256)\":{\"details\":\"we accrue fees here to enable full payment of both borrowed amount and fees in one function. This way unupdated accrued fees are accounted for too and can be paid backshould revert if the collateral does not exist should revert if the caller is not the `_owner` and not also not relied upon should revert if the amount of currency to burn / pay back is more than `borrowed amount + total accrued fees`\",\"params\":{\"_amount\":\"amount of currency to pay back / burn\",\"_collateralToken\":\"contract address of collateral to burn/pay back the vault's currency for,\",\"_owner\":\"owner of the vault to pay back it's loan\"}},\"cancelOwnershipHandover()\":{\"details\":\"Cancels the two-step ownership handover to the caller, if any.\"},\"completeOwnershipHandover(address)\":{\"details\":\"Allows the owner to complete the two-step ownership handover to `pendingOwner`. Reverts if there is no existing ownership handover requested by `pendingOwner`.\"},\"createCollateralType(address,uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"should revert if contract is paused should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role should revert if the collateral already exists, i.e if _collateral.rateInfo.rate == 0\",\"params\":{\"_collateralFloorPerPosition\":\"value to set as the minimum amount of this collateral that can be borrowed against\",\"_collateralToken\":\"contract address of the token to add\",\"_debtCeiling\":\"value to set as the debt ceiling of the collateral, used to limit risk by capping borrowable amount of currency backed by the given collateral\",\"_liquidationBonus\":\"value to set as the liquidation bonus of the collateral, used to incentivize liquidators, should be denominated in 1e18 where 1e18 is 100%\",\"_liquidationThreshold\":\"value to set as the liquidation threshold of the collateral, should be denominated in 1e18 where 1e18 is 100%\",\"_rate\":\"value to set as the collateral rate (per second) for the collateral, should be denominated in 1e18 where 1e18 is 100%\"}},\"deny(address)\":{\"details\":\"should revert if the contract is paused\",\"params\":{\"_reliedUpon\":\"address to rely upon\"}},\"depositCollateral(address,address,uint256)\":{\"details\":\"should revert if the contract is paused should revert if the collateral does not exist should revert if transfer from `_owner` to this contract fails based on SafeERC20.safeTransferFrom()'s expectations of a successful erc20 transferFrom call\",\"params\":{\"_amount\":\"amount of `_collateralToken` to deposit into `_owner`'s vault\",\"_collateralToken\":\"contract address of the collateral to deposit\",\"_owner\":\"owner of the vault to deposit into\"}},\"liquidate(address,address,address,uint256)\":{\"details\":\"updates fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the start and end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratioshould revert if the collateral does not exist should revert if the vault is not under-water should revert if liqudiation did not strictly imporve the collateral ratio of the vault\",\"params\":{\"_collateralToken\":\"contract address of collateral used by vault that is to be liquidate, also the token to recieved by the `_to` address after liquidation\",\"_currencyAmountToPay\":\"the amount of currency tokens to pay back for `_owner`\",\"_owner\":\"owner of the vault to liquidate\",\"_to\":\"address to send the liquidated collateral (collateral covered) to\"}},\"mintCurrency(address,address,address,uint256)\":{\"details\":\"if the users currencly minted/borrwed amount if greater than 0, it should update fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratio else i.e when currenctly minted/borrwed amount is 0 (this means that no past fees to accrue), it should set the `lastTotalAccumulatedRate` of the vault to be the current totalAccumulatedRate (i.e current accumulated base rate + current accumulated collateral rate, emphaisis on current as these values are recalculated for both rates to their current values)should revert if the contract is paused should revert if the collateral does not exist should revert if the caller is not the `_owner` and not also not relied upon should revert if `_owner`'s deposited collateral amount is less than the collateralFloorPerPosition for the given collateral should revert if mint to the `_to` address fails should revert if the collateral ratio of `_owner` is below the liquidation threshold at the end of the function. This can happen if the position was already under-water (liquidatable) prior to the function call or if the withdrawal of `_amount` make it under-water\",\"params\":{\"_amount\":\"amount of currency to mint\",\"_collateralToken\":\"contract address of collateral to mint/borrow the vault's currency against\",\"_owner\":\"owner of the vault to use it's collateral balance\",\"_to\":\"address to send the minted/borrowed currency to\"}},\"owner()\":{\"details\":\"Returns the owner of the contract.\"},\"ownershipHandoverExpiresAt(address)\":{\"details\":\"Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`.\"},\"pause()\":{\"details\":\"interactions with functions without a `whenNotPaused` or `whenPaused` modifier are unaffectedreverts if not paused\"},\"recoverToken(address,address)\":{\"details\":\"if `_tokenAddress` is address(0), send all eth in this contract to `_to` else if `_tokenAddress` is this vaults `CURRENCY_TOKEN`, send balance of this address of that token minus the paidFees (i.e unwithdrawn paid fees) else (this means this token can/might be a collateral), send the balance of this address of that token minus the `totalDepositedCollateral` of it as a collateralreverts if `_tokenAddress` is address(0) i.e eth, and `_to` is a contract that has no non reverting way to accept eth reverts if `_tokenAddress` is not `CURRENCY_TOKEN` and not `address(0) but is a contract\",\"params\":{\"_to\":\"address to send the recovered tokens to\",\"_tokenAddress\":\"address of token to recover. if it is eth, address(0) is expected\"}},\"rely(address)\":{\"details\":\"should revert if the contract is paused\",\"params\":{\"_relyUpon\":\"address to rely upon\"}},\"renounceOwnership()\":{\"details\":\"override renounce ownership to be impossible\"},\"requestOwnershipHandover()\":{\"details\":\"Request a two-step ownership handover to the caller. The request will automatically expire in 48 hours (172800 seconds) by default.\"},\"transferOwnership(address)\":{\"details\":\"Allows the owner to transfer the ownership to `newOwner`.\"},\"unpause()\":{\"details\":\"interactions with functions without a `whenNotPaused` or `whenPaused` modifier are unaffectedreverts if not paused\"},\"updateBaseRate(uint256)\":{\"details\":\"updates the last stored accumulated rate by adding accumulated rate (since baseRateInfo.lastUpdateTime) to it before updating the rate, this way borrowers are charged the previous rate up until block.timestamp before being charged the new rate.updates the last update time too for correct future updates to accumulate past rates correctlyshould revert if the contract is paused should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role\",\"params\":{\"_baseRate\":\"new base rate (per second), should be denominated in 1e18 where 1e18 is 100%\"}},\"updateCollateralData(address,uint8,uint256)\":{\"details\":\"updates the value of the chosen parameter with `_data`should revert if the contract is paused should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role should revert if the collateral does not exist should revert if `_param` is not a variant of ModifiableParameters enum\",\"params\":{\"_collateralToken\":\"contract address of the token to modify it's parameters\",\"_param\":\"contract address of the token to modify it's parameters\"}},\"updateDebtCeiling(uint256)\":{\"details\":\"reverts if the contract is pausedreverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role\"},\"updateFeedModule(address)\":{\"details\":\"reverts if the contract is pausedreverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role\"},\"updatePrice(address,uint256)\":{\"details\":\"should revert if the contract is paused should revert if the caller does not have the `FEED_CONTRACT_ROLE` role should revert if the collateral does not exist\",\"params\":{\"_collateralAddress\":\"contract address of the collateral token to update it's price\",\"_price\":\"new price\"}},\"updateRateModule(address)\":{\"details\":\"reverts if the contract is pausedreverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role\"},\"updateStabilityModule(address)\":{\"details\":\"reverts if the contract is pausedreverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role\"},\"withdrawCollateral(address,address,address,uint256)\":{\"details\":\"should update fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratioshould revert if the collateral does not exist should revert if the caller is not the `_owner` and not also not relied upon should revert if transfer from this contract to the `_to` address fails based on SafeERC20.safeTransfer()'s expectations of a successful erc20 transfer call should revert if the collateral ratio of `_owner` is below the liquidation threshold at the end of the function. This can happen if the position was already under-water (liquidatable) prior to the function call or if the withdrawal of `_amount` make it under-water\",\"params\":{\"_amount\":\"amount of `_collateralToken` to withdraw from `_owner`'s vault to `_to`'s address\",\"_collateralToken\":\"contract address of the collateral to withdraw\",\"_owner\":\"owner of the vault to withdraw from\",\"_to\":\"address to send the withdrawn collateral to\"}},\"withdrawFees()\":{\"details\":\"updates the paidFees for the collateral and globally then transfers the token to the callershould revert if the contract is pausedshould revert if the stabilityModule is address(0)\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"burnCurrency(address,address,uint256)\":{\"notice\":\"burns/pays back a borrowed/minted currency\"},\"createCollateralType(address,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Creates a collateral type that'll be accepted by the system\"},\"deny(address)\":{\"notice\":\"lets an address (the caller) remove access of another address to perform actions on it's (the caller's) vault\"},\"depositCollateral(address,address,uint256)\":{\"notice\":\"deposits collateral into `_owner`'s vault from `_owner`'s address\"},\"liquidate(address,address,address,uint256)\":{\"notice\":\"liquidates a vault making sure the liquidation strictly improves the collateral ratio i.e doesn't leave it the same as before or decreases it (if that's possible)\"},\"mintCurrency(address,address,address,uint256)\":{\"notice\":\"mints/borrows `_amount` of currency to `_to`, backed by `_owner`'s deposited collateral\"},\"pause()\":{\"notice\":\"prevents interactions with functions having `whenNotPaused` modifier and allows interactions with ones with the `whenPaused` modifier\"},\"recoverToken(address,address)\":{\"notice\":\"Used to recover `all` tokens and eth `possible` without affecting collateral reserves or unwithdrawn interest\"},\"rely(address)\":{\"notice\":\"lets an address (the caller) approve another address to perform actions on it's (the caller's) vault\"},\"unpause()\":{\"notice\":\"allows interactions with functions having `whenNotPaused` modifier and prevents interactions with ones with the `whenPaused` modifier\"},\"updateBaseRate(uint256)\":{\"notice\":\"updates the base rate charged for borrowing this currency\"},\"updateCollateralData(address,uint8,uint256)\":{\"notice\":\"updates `manually updateable` parameters of an existing collateral\"},\"updateDebtCeiling(uint256)\":{\"notice\":\"updates the global debt ceiling\"},\"updateFeedModule(address)\":{\"notice\":\"updates the feedModule address\"},\"updatePrice(address,uint256)\":{\"notice\":\"feed contract calls this to update the price with the oracle value\"},\"updateRateModule(address)\":{\"notice\":\"updates the rateModule address\"},\"updateStabilityModule(address)\":{\"notice\":\"updates the address fees are sent to\"},\"withdrawCollateral(address,address,address,uint256)\":{\"notice\":\"withdraws collateral from `_owner`'s vault to `_to`'s address\"},\"withdrawFees()\":{\"notice\":\"allows the stability module to withdraw all fees that have been paid on borrowed currency\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/vault.sol\":\"Vault\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"appendCBOR\":false,\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":descent-collective/oracle-module/=lib/oracle-module/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":oracle-module/=lib/oracle-module/\",\":solady/=lib/solady/src/\"]},\"sources\":{\"lib/solady/src/auth/Ownable.sol\":{\"keccak256\":\"0xc208cdd9de02bbf4b5edad18b88e23a2be7ff56d2287d5649329dc7cda64b9a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e8fba079cc7230c617f7493a2e97873f88e59a53a5018fcb2e2b6ac42d8aa5a3\",\"dweb:/ipfs/QmTXg8GSt8hsK2cZhbPFrund1mrwVdkLQmEPoQaFy4fhjs\"]},\"lib/solady/src/tokens/ERC20.sol\":{\"keccak256\":\"0xb4a3f9ba8a05107f7370de42cff57f3ad26dafd438712c11531a5892de2f59e0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f0a9ca06e3cf6dea1f9a4c5599581573b7d81cd64dc3afb582f325ccf5fdd6dc\",\"dweb:/ipfs/Qmb9r5dDceNF4W8S5u6i85RsNTgE5XG9HbTXkyS25ad3C6\"]},\"lib/solady/src/utils/SafeTransferLib.sol\":{\"keccak256\":\"0xf98506fade18a92e3d8d0a0ca0bdaeaa099d7620aac2a9d76b5f3d0bcd10691c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a3495c9d108bc69951a12c5ce9f05851cc921f0bb69e2505756e79f3ddab4e1a\",\"dweb:/ipfs/QmT3XwbmdbQCxw7iNcF7DoiypDd5vs2ETFWirXqmJ86Meg\"]},\"src/currency.sol\":{\"keccak256\":\"0xc266e97010a71e6ac755dce3e51a5a5844663b355e20ab40bf2020fd9308369b\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://d2660220b8a14c6d06351765dd7accec03e350e7fa9ae960c1505bea1e5d8d2d\",\"dweb:/ipfs/QmdYdPSnQC2nym38Fca4vRLKU4A78AQkgYasdg3TaRLGNY\"]},\"src/helpers/pausable.sol\":{\"keccak256\":\"0x8acce52dcd450c73da0f77d9539962826da23aca05aa7d0c7568614e89aed997\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://35e2f674e01c0d6107f31d1c32bb2780d442420b7d26636f560a4eb1007f4a8b\",\"dweb:/ipfs/QmWwVLUGiJq6Q3fK6Zhx4pc6kaqC73pkZ1ntfVA3QCHTpd\"]},\"src/interfaces/ICurrency.sol\":{\"keccak256\":\"0x3b7adace3df08c34906612358d435ffff3b90b5eec0eae34b6335cc8dcd0e7ed\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://370c80ec5636bd95342256d4116f703e633e6b0467ee530397e9b5cada37f998\",\"dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz\"]},\"src/interfaces/IRate.sol\":{\"keccak256\":\"0x166dc423b74b60302197a27fb64557ee8ef6bafe416deb08fe7ecf94f0ede1d1\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://123ef521857e33b10b6f92b743831b26dd5100e57271353bf5c1882fc41c6a2e\",\"dweb:/ipfs/QmdK5y8SntLHAVoNRq6isddmNYunrpv1JxAxyEgRiHdAAj\"]},\"src/interfaces/IVault.sol\":{\"keccak256\":\"0x5684f59679e090ebe583d31fda6d8882469436e71670a4873151793675c7c6c4\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b265c21b1ff01a8c5cf9b1120feb6b5419a96a0e2a6d1ff4bdd89934c7869c9c\",\"dweb:/ipfs/QmdbCgiYE763cAHZ6nevhf7EzF8BzEkfwsbw4qWuxBkm8f\"]},\"src/mocks/ERC20Token.sol\":{\"keccak256\":\"0x62b878fb4dde1f455866e0c1290cc50714805d02c2848a4a9bb33c5dfbc8464d\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://7af3f5638d366abfbca3186813449259a33ed43e7c13ec983d389d73df1ad204\",\"dweb:/ipfs/QmeMdoEVTGqdcgSicTTcmycSQjToT7Sn5ZTgZdVFH9E6HA\"]},\"src/vault.sol\":{\"keccak256\":\"0x377a877ac854164da4e6b2491e2dba44d75cb56216e6b2456fa6b815565ac5e5\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://a0a67817c649b3f65de4971c5346ea93b7432ac2f4e0013e5fb681e488aa1b58\",\"dweb:/ipfs/Qmbvcgn3AoTEahq9qgfuiL81zkZKLVQRbMhMeeqTMiiuKv\"]}},\"version\":1}", "metadata": { "compiler": { "version": "0.8.21+commit.d9974bed" @@ -1175,6 +1116,11 @@ "internalType": "uint256", "name": "_baseRate", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_debtCeiling", + "type": "uint256" } ], "stateMutability": "nonpayable", @@ -1183,81 +1129,73 @@ { "inputs": [], "type": "error", - "name": "AccessControlBadConfirmation" + "name": "AlreadyInitialized" }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], + "inputs": [], "type": "error", - "name": "AccessControlUnauthorizedAccount" + "name": "BadCollateralRatio" }, { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], + "inputs": [], "type": "error", - "name": "AddressEmptyCode" + "name": "CollateralAlreadyExists" }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], + "inputs": [], "type": "error", - "name": "AddressInsufficientBalance" + "name": "CollateralDebtCeilingExceeded" }, { "inputs": [], "type": "error", - "name": "BadCollateralRatio" + "name": "CollateralDoesNotExist" }, { "inputs": [], "type": "error", - "name": "CollateralAlreadyExists" + "name": "CollateralRatioNotImproved" }, { "inputs": [], "type": "error", - "name": "CollateralDoesNotExist" + "name": "EthTransferFailed" }, { "inputs": [], "type": "error", - "name": "CollateralRatioNotImproved" + "name": "GlobalDebtCeilingExceeded" }, { "inputs": [], "type": "error", - "name": "EthTransferFailed" + "name": "InsufficientCurrencyAmountToPay" + }, + { + "inputs": [], + "type": "error", + "name": "InvalidStabilityModule" + }, + { + "inputs": [], + "type": "error", + "name": "NewOwnerIsZeroAddress" }, { "inputs": [], "type": "error", - "name": "FailedInnerCall" + "name": "NoHandoverRequest" }, { "inputs": [], "type": "error", "name": "NotEnoughCollateralToPay" }, + { + "inputs": [], + "type": "error", + "name": "NotFeedContract" + }, { "inputs": [], "type": "error", @@ -1279,20 +1217,14 @@ "name": "PositionIsSafe" }, { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], + "inputs": [], "type": "error", - "name": "SafeERC20FailedOperation" + "name": "TotalUserCollateralBelowFloor" }, { "inputs": [], "type": "error", - "name": "TotalUserCollateralBelowFloor" + "name": "Unauthorized" }, { "inputs": [], @@ -1457,76 +1389,46 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32", - "indexed": true - }, - { - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32", - "indexed": true - }, - { - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32", + "internalType": "address", + "name": "pendingOwner", + "type": "address", "indexed": true } ], "type": "event", - "name": "RoleAdminChanged", + "name": "OwnershipHandoverCanceled", "anonymous": false }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32", - "indexed": true - }, - { - "internalType": "address", - "name": "account", - "type": "address", - "indexed": true - }, { "internalType": "address", - "name": "sender", + "name": "pendingOwner", "type": "address", "indexed": true } ], "type": "event", - "name": "RoleGranted", + "name": "OwnershipHandoverRequested", "anonymous": false }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32", - "indexed": true - }, { "internalType": "address", - "name": "account", + "name": "oldOwner", "type": "address", "indexed": true }, { "internalType": "address", - "name": "sender", + "name": "newOwner", "type": "address", "indexed": true } ], "type": "event", - "name": "RoleRevoked", + "name": "OwnershipTransferred", "anonymous": false }, { @@ -1542,32 +1444,6 @@ } ] }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ] - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "accruedFees", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] - }, { "inputs": [], "stateMutability": "view", @@ -1594,7 +1470,7 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -1613,10 +1489,16 @@ "type": "function", "name": "burnCurrency" }, + { + "inputs": [], + "stateMutability": "payable", + "type": "function", + "name": "cancelOwnershipHandover" + }, { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "", "type": "address" } @@ -1667,11 +1549,6 @@ } ] }, - { - "internalType": "uint256", - "name": "paidFees", - "type": "uint256" - }, { "internalType": "uint256", "name": "price", @@ -1691,18 +1568,25 @@ "internalType": "uint256", "name": "additionalCollateralPrecision", "type": "uint256" - }, - { - "internalType": "bool", - "name": "exists", - "type": "bool" } ] }, { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "address", + "name": "pendingOwner", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function", + "name": "completeOwnershipHandover" + }, + { + "inputs": [ + { + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -1749,6 +1633,19 @@ } ] }, + { + "inputs": [], + "stateMutability": "view", + "type": "function", + "name": "debtCeiling", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ] + }, { "inputs": [ { @@ -1764,7 +1661,7 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -1784,69 +1681,22 @@ "name": "depositCollateral" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], + "inputs": [], "stateMutability": "view", "type": "function", - "name": "getRoleAdmin", + "name": "feedModule", "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ] - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "grantRole" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "internalType": "address", - "name": "account", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function", - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", "name": "", - "type": "bool" + "type": "address" } ] }, { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -1873,7 +1723,7 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -1897,6 +1747,38 @@ "type": "function", "name": "mintCurrency" }, + { + "inputs": [], + "stateMutability": "view", + "type": "function", + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "result", + "type": "address" + } + ] + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pendingOwner", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "name": "ownershipHandoverExpiresAt", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ] + }, { "inputs": [], "stateMutability": "view", @@ -1916,6 +1798,19 @@ "type": "function", "name": "pause" }, + { + "inputs": [], + "stateMutability": "view", + "type": "function", + "name": "rateModule", + "outputs": [ + { + "internalType": "contract IRate", + "name": "", + "type": "address" + } + ] + }, { "inputs": [ { @@ -1970,71 +1865,55 @@ ] }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "stateMutability": "nonpayable", + "inputs": [], + "stateMutability": "payable", "type": "function", - "name": "renounceRole" + "name": "renounceOwnership" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "stateMutability": "nonpayable", + "inputs": [], + "stateMutability": "payable", "type": "function", - "name": "revokeRole" + "name": "requestOwnershipHandover" }, { "inputs": [], "stateMutability": "view", "type": "function", - "name": "status", + "name": "stabilityModule", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ] }, { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], + "inputs": [], "stateMutability": "view", "type": "function", - "name": "supportsInterface", + "name": "status", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ] }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function", + "name": "transferOwnership" + }, { "inputs": [], "stateMutability": "nonpayable", @@ -2056,7 +1935,7 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -2077,37 +1956,32 @@ }, { "inputs": [ - { - "internalType": "contract ERC20", - "name": "_collateralToken", - "type": "address" - }, { "internalType": "uint256", - "name": "_rate", + "name": "_debtCeiling", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function", - "name": "updateCollateralRate" + "name": "updateDebtCeiling" }, { "inputs": [ { "internalType": "address", - "name": "_feedContract", + "name": "_feedModule", "type": "address" } ], "stateMutability": "nonpayable", "type": "function", - "name": "updateFeedContract" + "name": "updateFeedModule" }, { "inputs": [ { - "internalType": "address", + "internalType": "contract ERC20Token", "name": "_collateralAddress", "type": "address" }, @@ -2121,6 +1995,18 @@ "type": "function", "name": "updatePrice" }, + { + "inputs": [ + { + "internalType": "contract IRate", + "name": "_rateModule", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "updateRateModule" + }, { "inputs": [ { @@ -2136,7 +2022,7 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "", "type": "address" }, @@ -2175,7 +2061,7 @@ { "inputs": [ { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -2200,18 +2086,7 @@ "name": "withdrawCollateral" }, { - "inputs": [ - { - "internalType": "contract ERC20", - "name": "_collateralToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], + "inputs": [], "stateMutability": "nonpayable", "type": "function", "name": "withdrawFees" @@ -2221,15 +2096,21 @@ "kind": "dev", "methods": { "burnCurrency(address,address,uint256)": { - "details": "we accrue fees here to enable full payment of both borrowed amount and fees in one function. This way unupdated accrued fees are accounted for too and can be paid backshould revert if the contract is paused should revert if the collateral does not exist should revert if the caller is not the `_owner` and not also not relied upon should revert if the amount of currency to burn / pay back is more than `borrowed amount + total accrued fees`", + "details": "we accrue fees here to enable full payment of both borrowed amount and fees in one function. This way unupdated accrued fees are accounted for too and can be paid backshould revert if the collateral does not exist should revert if the caller is not the `_owner` and not also not relied upon should revert if the amount of currency to burn / pay back is more than `borrowed amount + total accrued fees`", "params": { "_amount": "amount of currency to pay back / burn", "_collateralToken": "contract address of collateral to burn/pay back the vault's currency for,", "_owner": "owner of the vault to pay back it's loan" } }, + "cancelOwnershipHandover()": { + "details": "Cancels the two-step ownership handover to the caller, if any." + }, + "completeOwnershipHandover(address)": { + "details": "Allows the owner to complete the two-step ownership handover to `pendingOwner`. Reverts if there is no existing ownership handover requested by `pendingOwner`." + }, "createCollateralType(address,uint256,uint256,uint256,uint256,uint256)": { - "details": "should revert if contract is paused should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role should revert if the collateral already exists, i.e if _collateral.exists returns true", + "details": "should revert if contract is paused should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role should revert if the collateral already exists, i.e if _collateral.rateInfo.rate == 0", "params": { "_collateralFloorPerPosition": "value to set as the minimum amount of this collateral that can be borrowed against", "_collateralToken": "contract address of the token to add", @@ -2246,24 +2127,15 @@ } }, "depositCollateral(address,address,uint256)": { - "details": "should revert if the contract is paused should revert if the collateral does not exist should revert if the caller is not the `_owner` and not also not relied upon should revert if transfer from `_owner` to this contract fails based on SafeERC20.safeTransferFrom()'s expectations of a successful erc20 transferFrom call", + "details": "should revert if the contract is paused should revert if the collateral does not exist should revert if transfer from `_owner` to this contract fails based on SafeERC20.safeTransferFrom()'s expectations of a successful erc20 transferFrom call", "params": { "_amount": "amount of `_collateralToken` to deposit into `_owner`'s vault", "_collateralToken": "contract address of the collateral to deposit", "_owner": "owner of the vault to deposit into" } }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, "liquidate(address,address,address,uint256)": { - "details": "updates fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the start and end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratioshould revert if the contract is paused should revert if the collateral does not exist should revert if the vault is not under-water should revert if liqudiation did not strictly imporve the collateral ratio of the vault", + "details": "updates fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the start and end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratioshould revert if the collateral does not exist should revert if the vault is not under-water should revert if liqudiation did not strictly imporve the collateral ratio of the vault", "params": { "_collateralToken": "contract address of collateral used by vault that is to be liquidate, also the token to recieved by the `_to` address after liquidation", "_currencyAmountToPay": "the amount of currency tokens to pay back for `_owner`", @@ -2280,6 +2152,12 @@ "_to": "address to send the minted/borrowed currency to" } }, + "owner()": { + "details": "Returns the owner of the contract." + }, + "ownershipHandoverExpiresAt(address)": { + "details": "Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`." + }, "pause()": { "details": "interactions with functions without a `whenNotPaused` or `whenPaused` modifier are unaffectedreverts if not paused" }, @@ -2296,14 +2174,14 @@ "_relyUpon": "address to rely upon" } }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event." + "renounceOwnership()": { + "details": "override renounce ownership to be impossible" }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." + "requestOwnershipHandover()": { + "details": "Request a two-step ownership handover to the caller. The request will automatically expire in 48 hours (172800 seconds) by default." }, - "supportsInterface(bytes4)": { - "details": "See {IERC165-supportsInterface}." + "transferOwnership(address)": { + "details": "Allows the owner to transfer the ownership to `newOwner`." }, "unpause()": { "details": "interactions with functions without a `whenNotPaused` or `whenPaused` modifier are unaffectedreverts if not paused" @@ -2321,14 +2199,10 @@ "_param": "contract address of the token to modify it's parameters" } }, - "updateCollateralRate(address,uint256)": { - "details": "updates the last stored accumulated rate by adding accumulated rate (since _collateral.rateInfo.lastUpdateTime) to it before updating the rate, this way borrowers are charged the previous rate up until block.timestamp before being charged the new rate.updates the last update time too for correct future updates to accumulate past rates correctlyshould revert if the contract is paused should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role should revert if the collateral does not exist", - "params": { - "_collateralToken": "contract address of collateral token to update it's collateral rate", - "_rate": "new collateral rate (per second), should be denominated in 1e18 where 1e18 is 100%" - } + "updateDebtCeiling(uint256)": { + "details": "reverts if the contract is pausedreverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role" }, - "updateFeedContract(address)": { + "updateFeedModule(address)": { "details": "reverts if the contract is pausedreverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role" }, "updatePrice(address,uint256)": { @@ -2338,11 +2212,14 @@ "_price": "new price" } }, + "updateRateModule(address)": { + "details": "reverts if the contract is pausedreverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role" + }, "updateStabilityModule(address)": { "details": "reverts if the contract is pausedreverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role" }, "withdrawCollateral(address,address,address,uint256)": { - "details": "should update fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratioshould revert if the contract is paused should revert if the collateral does not exist should revert if the caller is not the `_owner` and not also not relied upon should revert if transfer from this contract to the `_to` address fails based on SafeERC20.safeTransfer()'s expectations of a successful erc20 transfer call should revert if the collateral ratio of `_owner` is below the liquidation threshold at the end of the function. This can happen if the position was already under-water (liquidatable) prior to the function call or if the withdrawal of `_amount` make it under-water", + "details": "should update fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratioshould revert if the collateral does not exist should revert if the caller is not the `_owner` and not also not relied upon should revert if transfer from this contract to the `_to` address fails based on SafeERC20.safeTransfer()'s expectations of a successful erc20 transfer call should revert if the collateral ratio of `_owner` is below the liquidation threshold at the end of the function. This can happen if the position was already under-water (liquidatable) prior to the function call or if the withdrawal of `_amount` make it under-water", "params": { "_amount": "amount of `_collateralToken` to withdraw from `_owner`'s vault to `_to`'s address", "_collateralToken": "contract address of the collateral to withdraw", @@ -2350,12 +2227,8 @@ "_to": "address to send the withdrawn collateral to" } }, - "withdrawFees(address,uint256)": { - "details": "updates the paidFees for the collateral and globally then transfers the token to the callershould revert if the contract is paused should revert if the caller does not have the `STABILITY_MODULE_ROLE` role should revert if the collateral does not exist", - "params": { - "_amount": "amount of fees to withdraw", - "_collateralToken": "contract address of collateral token to withdraw from it's paid fees" - } + "withdrawFees()": { + "details": "updates the paidFees for the collateral and globally then transfers the token to the callershould revert if the contract is pausedshould revert if the stabilityModule is address(0)" } }, "version": 1 @@ -2399,23 +2272,26 @@ "updateCollateralData(address,uint8,uint256)": { "notice": "updates `manually updateable` parameters of an existing collateral" }, - "updateCollateralRate(address,uint256)": { - "notice": "updates the collateral rate charged for borrowing this currency against a given collateral" + "updateDebtCeiling(uint256)": { + "notice": "updates the global debt ceiling" }, - "updateFeedContract(address)": { - "notice": "updates the address allowed to perform actions requiring caller to have the `FEED_CONTRACT_ROLE` role" + "updateFeedModule(address)": { + "notice": "updates the feedModule address" }, "updatePrice(address,uint256)": { "notice": "feed contract calls this to update the price with the oracle value" }, + "updateRateModule(address)": { + "notice": "updates the rateModule address" + }, "updateStabilityModule(address)": { - "notice": "updates the address allowed to perform actions requiring caller to have the `STABILITY_MODULE_ROLE` role" + "notice": "updates the address fees are sent to" }, "withdrawCollateral(address,address,address,uint256)": { "notice": "withdraws collateral from `_owner`'s vault to `_to`'s address" }, - "withdrawFees(address,uint256)": { - "notice": "allows the stability module to withdraw fees that have been paid on borrowed currency" + "withdrawFees()": { + "notice": "allows the stability module to withdraw all fees that have been paid on borrowed currency" } }, "version": 1 @@ -2424,10 +2300,13 @@ "settings": { "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", + "descent-collective/oracle-module/=lib/oracle-module/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", - "openzeppelin-contracts/=lib/openzeppelin-contracts/" + "openzeppelin-contracts/=lib/openzeppelin-contracts/", + "oracle-module/=lib/oracle-module/", + "solady/=lib/solady/src/" ], "optimizer": { "enabled": true, @@ -2443,195 +2322,35 @@ "libraries": {} }, "sources": { - "lib/openzeppelin-contracts/contracts/access/AccessControl.sol": { - "keccak256": "0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308", - "urls": [ - "bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80", - "dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/access/IAccessControl.sol": { - "keccak256": "0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41", - "urls": [ - "bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26", - "dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol": { - "keccak256": "0x92aa1df62dc3d33f1656d63bede0923e0df0b706ad4137c8b10b0a8fe549fd92", - "urls": [ - "bzz-raw://c5c0f29195ad64cbe556da8e257dac8f05f78c53f90323c0d2accf8e6922d33a", - "dweb:/ipfs/QmQ61TED8uaCZwcbh8KkgRSsCav7x7HbcGHwHts3U4DmUP" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol": { - "keccak256": "0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7", - "urls": [ - "bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f", - "dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol": { - "keccak256": "0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80", - "urls": [ - "bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229", - "dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol": { - "keccak256": "0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70", - "urls": [ - "bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c", - "dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Permit.sol": { - "keccak256": "0xc858a86a35701004d89022a5e98819aac46ccbdc4072fc9dd43928a676b1a2ee", - "urls": [ - "bzz-raw://18acebb483c512c0eaafcb437f09c839972c3f0d36f0201ea7baa2926b987dd2", - "dweb:/ipfs/Qmd9bf2noaDSYDtf6FMSzKu7LPhuf91jsVNmcoCuTCuGic" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "keccak256": "0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2", - "urls": [ - "bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850", - "dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol": { - "keccak256": "0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff", - "urls": [ - "bzz-raw://f5196ec75139918c6c7bb4251b36395e668f1fa6d206beba7e7520e74913940d", - "dweb:/ipfs/QmSyqjksXxmm2mCG6qRd1yuwLykypkSVBbnBnGqJRcuJMi" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol": { - "keccak256": "0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386", - "urls": [ - "bzz-raw://b3036b3a83b7c48f96641f2a9002b9f2dcb6a5958dd670894ada21ae8229b3d0", - "dweb:/ipfs/QmUNfSBdoVtjhETaUJCYcaC7pTMgbhht926tJ2uXJbiVd3" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/Address.sol": { - "keccak256": "0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721", - "urls": [ - "bzz-raw://b7bd24e224f67f65bfadf85dc2929fa965456bb2415478bd0125471b5ce35245", - "dweb:/ipfs/QmRaydGr8BTHs1kvaZfsNU69pKzUAGFrvABn1KiRSbE51y" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/Context.sol": { - "keccak256": "0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3", - "urls": [ - "bzz-raw://0c4e6cb30d3601e2f7af5af09e265508147cb275a8dcd99d6f7363645cc56867", - "dweb:/ipfs/QmNgFkoXNWoUbAyw71rr1sKQ95Rj2GfvYiWg79xEYDn2NY" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/Nonces.sol": { - "keccak256": "0x0082767004fca261c332e9ad100868327a863a88ef724e844857128845ab350f", - "urls": [ - "bzz-raw://132dce9686a54e025eb5ba5d2e48208f847a1ec3e60a3e527766d7bf53fb7f9e", - "dweb:/ipfs/QmXn1a2nUZMpu2z6S88UoTfMVtY2YNh86iGrzJDYmMkKeZ" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol": { - "keccak256": "0x18a7171df639a934592915a520ecb97c5bbc9675a1105607aac8a94e72bf62c6", - "urls": [ - "bzz-raw://7478e1f13da69a2867ccd883001d836b75620362e743f196376d63ed0c422a1c", - "dweb:/ipfs/QmWywcQ9TNfwtoqAxbn25d8C5VrV12PrPS9UjtGe6pL2BA" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol": { - "keccak256": "0x32ba59b4b7299237c8ba56319110989d7978a039faf754793064e967e5894418", - "urls": [ - "bzz-raw://1ae50c8b562427df610cc4540c9bf104acca7ef8e2dcae567ae7e52272281e9c", - "dweb:/ipfs/QmTHiadFCSJUPpRjNegc5SahmeU8bAoY8i9Aq6tVscbcKR" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/Strings.sol": { - "keccak256": "0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792", - "urls": [ - "bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453", - "dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol": { - "keccak256": "0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf", - "urls": [ - "bzz-raw://ba80ba06c8e6be852847e4c5f4492cef801feb6558ae09ed705ff2e04ea8b13c", - "dweb:/ipfs/QmXRJDv3xHLVQCVXg1ZvR35QS9sij5y9NDWYzMfUfAdTHF" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol": { - "keccak256": "0x999f705a027ed6dc2d4e0df2cc4a509852c6bfd11de1c8161bf88832d0503fd0", - "urls": [ - "bzz-raw://0798def67258d9a3cc20b2b4da7ebf351a5cefe0abfdd665d2d81f8e32f89b21", - "dweb:/ipfs/QmPEvJosnPfzHNjKvCv2D3891mA2Ww8eUwkqrxBjuYdHCt" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol": { - "keccak256": "0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435", - "urls": [ - "bzz-raw://2ceacff44c0fdc81e48e0e0b1db87a2076d3c1fb497341de077bf1da9f6b406c", - "dweb:/ipfs/QmRUo1muMRAewxrKQ7TkXUtknyRoR57AyEkoPpiuZQ8FzX" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol": { - "keccak256": "0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133", - "urls": [ - "bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8", - "dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol": { - "keccak256": "0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b", + "lib/solady/src/auth/Ownable.sol": { + "keccak256": "0xc208cdd9de02bbf4b5edad18b88e23a2be7ff56d2287d5649329dc7cda64b9a3", "urls": [ - "bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df", - "dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL" + "bzz-raw://e8fba079cc7230c617f7493a2e97873f88e59a53a5018fcb2e2b6ac42d8aa5a3", + "dweb:/ipfs/QmTXg8GSt8hsK2cZhbPFrund1mrwVdkLQmEPoQaFy4fhjs" ], "license": "MIT" }, - "lib/openzeppelin-contracts/contracts/utils/math/Math.sol": { - "keccak256": "0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d", + "lib/solady/src/tokens/ERC20.sol": { + "keccak256": "0xb4a3f9ba8a05107f7370de42cff57f3ad26dafd438712c11531a5892de2f59e0", "urls": [ - "bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875", - "dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L" + "bzz-raw://f0a9ca06e3cf6dea1f9a4c5599581573b7d81cd64dc3afb582f325ccf5fdd6dc", + "dweb:/ipfs/Qmb9r5dDceNF4W8S5u6i85RsNTgE5XG9HbTXkyS25ad3C6" ], "license": "MIT" }, - "lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol": { - "keccak256": "0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72", + "lib/solady/src/utils/SafeTransferLib.sol": { + "keccak256": "0xf98506fade18a92e3d8d0a0ca0bdaeaa099d7620aac2a9d76b5f3d0bcd10691c", "urls": [ - "bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc", - "dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT" + "bzz-raw://a3495c9d108bc69951a12c5ce9f05851cc921f0bb69e2505756e79f3ddab4e1a", + "dweb:/ipfs/QmT3XwbmdbQCxw7iNcF7DoiypDd5vs2ETFWirXqmJ86Meg" ], "license": "MIT" }, "src/currency.sol": { - "keccak256": "0xcff030c4bad135b27acbe405aba19da1184c406c30fe6839b17ffcb8548938d4", + "keccak256": "0xc266e97010a71e6ac755dce3e51a5a5844663b355e20ab40bf2020fd9308369b", "urls": [ - "bzz-raw://8ca7791099d9f9851622964e2668477dbe07441c4d687621eaff725c7e25d48b", - "dweb:/ipfs/QmdsMzD9aVqBym5bS4QnYnGtN8872iBck94NFeyfLirJ8Y" + "bzz-raw://d2660220b8a14c6d06351765dd7accec03e350e7fa9ae960c1505bea1e5d8d2d", + "dweb:/ipfs/QmdYdPSnQC2nym38Fca4vRLKU4A78AQkgYasdg3TaRLGNY" ], "license": "GPL-3.0" }, @@ -2651,19 +2370,35 @@ ], "license": "GPL-3.0" }, + "src/interfaces/IRate.sol": { + "keccak256": "0x166dc423b74b60302197a27fb64557ee8ef6bafe416deb08fe7ecf94f0ede1d1", + "urls": [ + "bzz-raw://123ef521857e33b10b6f92b743831b26dd5100e57271353bf5c1882fc41c6a2e", + "dweb:/ipfs/QmdK5y8SntLHAVoNRq6isddmNYunrpv1JxAxyEgRiHdAAj" + ], + "license": "GPL-3.0" + }, "src/interfaces/IVault.sol": { - "keccak256": "0x0b07e90c8de2bb57e62990839bdc52077d067d9e38db6fd2a8c684dbaf74f1b4", + "keccak256": "0x5684f59679e090ebe583d31fda6d8882469436e71670a4873151793675c7c6c4", + "urls": [ + "bzz-raw://b265c21b1ff01a8c5cf9b1120feb6b5419a96a0e2a6d1ff4bdd89934c7869c9c", + "dweb:/ipfs/QmdbCgiYE763cAHZ6nevhf7EzF8BzEkfwsbw4qWuxBkm8f" + ], + "license": "GPL-3.0" + }, + "src/mocks/ERC20Token.sol": { + "keccak256": "0x62b878fb4dde1f455866e0c1290cc50714805d02c2848a4a9bb33c5dfbc8464d", "urls": [ - "bzz-raw://50a4e4b3745f623e7ea99800c1472b5d2fdbc3332ceecc1e4eb1cb2546d6b7b5", - "dweb:/ipfs/Qma91VRTUw3bJzxanpErFXze7R3N9gHE9pnmWm3oFwcC6g" + "bzz-raw://7af3f5638d366abfbca3186813449259a33ed43e7c13ec983d389d73df1ad204", + "dweb:/ipfs/QmeMdoEVTGqdcgSicTTcmycSQjToT7Sn5ZTgZdVFH9E6HA" ], "license": "GPL-3.0" }, "src/vault.sol": { - "keccak256": "0xb42eb135923431b43ccd78a05d5937dc7faf98717fabd0b3a50a030b15db7977", + "keccak256": "0x377a877ac854164da4e6b2491e2dba44d75cb56216e6b2456fa6b815565ac5e5", "urls": [ - "bzz-raw://7a1cadec603bec32da036fc3f095454601105ed00b90def95fa0912ac2ea7d6d", - "dweb:/ipfs/QmYLDswPYNPuG2RguyZbtD7cWumTZXhPmNfvwsJDr3vGyv" + "bzz-raw://a0a67817c649b3f65de4971c5346ea93b7432ac2f4e0013e5fb681e488aa1b58", + "dweb:/ipfs/Qmbvcgn3AoTEahq9qgfuiL81zkZKLVQRbMhMeeqTMiiuKv" ], "license": "GPL-3.0" } @@ -2672,45 +2407,47 @@ }, "ast": { "absolutePath": "src/vault.sol", - "id": 50617, + "id": 48281, "exportedSymbols": { - "AccessControl": [43683], - "Currency": [48549], - "ERC20": [44443], - "IVault": [48969], - "Pausable": [48772], - "SafeERC20": [45027], - "Vault": [50616] + "Currency": [46042], + "ERC20": [44800], + "ERC20Token": [46438], + "IRate": [46191], + "IVault": [46316], + "Ownable": [44381], + "Pausable": [46103], + "SafeTransferLib": [44996], + "Vault": [48280] }, "nodeType": "SourceUnit", - "src": "36:35843:51", + "src": "36:35519:38", "nodes": [ { - "id": 48971, + "id": 46650, "nodeType": "PragmaDirective", - "src": "36:23:51", + "src": "36:23:38", "nodes": [], "literals": ["solidity", "0.8", ".21"] }, { - "id": 48973, + "id": 46652, "nodeType": "ImportDirective", - "src": "108:79:51", + "src": "108:48:38", "nodes": [], - "absolutePath": "lib/openzeppelin-contracts/contracts/access/AccessControl.sol", - "file": "@openzeppelin/contracts/access/AccessControl.sol", + "absolutePath": "lib/solady/src/auth/Ownable.sol", + "file": "solady/auth/Ownable.sol", "nameLocation": "-1:-1:-1", - "scope": 50617, - "sourceUnit": 43684, + "scope": 48281, + "sourceUnit": 44382, "symbolAliases": [ { "foreign": { - "id": 48972, - "name": "AccessControl", + "id": 46651, + "name": "Ownable", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 43683, - "src": "116:13:51", + "referencedDeclaration": 44381, + "src": "116:7:38", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -2719,24 +2456,24 @@ "unitAlias": "" }, { - "id": 48975, + "id": 46654, "nodeType": "ImportDirective", - "src": "188:68:51", + "src": "157:46:38", "nodes": [], - "absolutePath": "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "absolutePath": "lib/solady/src/tokens/ERC20.sol", + "file": "solady/tokens/ERC20.sol", "nameLocation": "-1:-1:-1", - "scope": 50617, - "sourceUnit": 44444, + "scope": 48281, + "sourceUnit": 44801, "symbolAliases": [ { "foreign": { - "id": 48974, + "id": 46653, "name": "ERC20", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44443, - "src": "196:5:51", + "referencedDeclaration": 44800, + "src": "165:5:38", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -2745,24 +2482,24 @@ "unitAlias": "" }, { - "id": 48977, + "id": 46656, "nodeType": "ImportDirective", - "src": "257:82:51", + "src": "204:65:38", "nodes": [], - "absolutePath": "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "absolutePath": "lib/solady/src/utils/SafeTransferLib.sol", + "file": "solady/utils/SafeTransferLib.sol", "nameLocation": "-1:-1:-1", - "scope": 50617, - "sourceUnit": 45028, + "scope": 48281, + "sourceUnit": 44997, "symbolAliases": [ { "foreign": { - "id": 48976, - "name": "SafeERC20", + "id": 46655, + "name": "SafeTransferLib", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 45027, - "src": "265:9:51", + "referencedDeclaration": 44996, + "src": "212:15:38", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -2771,24 +2508,24 @@ "unitAlias": "" }, { - "id": 48979, + "id": 46658, "nodeType": "ImportDirective", - "src": "340:47:51", + "src": "270:47:38", "nodes": [], "absolutePath": "src/interfaces/IVault.sol", "file": "./interfaces/IVault.sol", "nameLocation": "-1:-1:-1", - "scope": 50617, - "sourceUnit": 48970, + "scope": 48281, + "sourceUnit": 46317, "symbolAliases": [ { "foreign": { - "id": 48978, + "id": 46657, "name": "IVault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48969, - "src": "348:6:51", + "referencedDeclaration": 46316, + "src": "278:6:38", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -2797,24 +2534,24 @@ "unitAlias": "" }, { - "id": 48981, + "id": 46660, "nodeType": "ImportDirective", - "src": "388:40:51", + "src": "318:40:38", "nodes": [], "absolutePath": "src/currency.sol", "file": "./currency.sol", "nameLocation": "-1:-1:-1", - "scope": 50617, - "sourceUnit": 48550, + "scope": 48281, + "sourceUnit": 46043, "symbolAliases": [ { "foreign": { - "id": 48980, + "id": 46659, "name": "Currency", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48549, - "src": "396:8:51", + "referencedDeclaration": 46042, + "src": "326:8:38", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -2823,24 +2560,24 @@ "unitAlias": "" }, { - "id": 48983, + "id": 46662, "nodeType": "ImportDirective", - "src": "429:48:51", + "src": "359:48:38", "nodes": [], "absolutePath": "src/helpers/pausable.sol", "file": "./helpers/pausable.sol", "nameLocation": "-1:-1:-1", - "scope": 50617, - "sourceUnit": 48773, + "scope": 48281, + "sourceUnit": 46104, "symbolAliases": [ { "foreign": { - "id": 48982, + "id": 46661, "name": "Pausable", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48772, - "src": "437:8:51", + "referencedDeclaration": 46103, + "src": "367:8:38", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -2849,182 +2586,116 @@ "unitAlias": "" }, { - "id": 50616, - "nodeType": "ContractDefinition", - "src": "479:35399:51", - "nodes": [ + "id": 46664, + "nodeType": "ImportDirective", + "src": "408:50:38", + "nodes": [], + "absolutePath": "src/mocks/ERC20Token.sol", + "file": "./mocks/ERC20Token.sol", + "nameLocation": "-1:-1:-1", + "scope": 48281, + "sourceUnit": 46439, + "symbolAliases": [ { - "id": 48994, - "nodeType": "VariableDeclaration", - "src": "535:77:51", - "nodes": [], - "constant": true, - "mutability": "constant", - "name": "FEED_CONTRACT_ROLE", - "nameLocation": "560:18:51", - "scope": 50616, - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 48990, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "535:7:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } + "foreign": { + "id": 46663, + "name": "ERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46438, + "src": "416:10:38", + "typeDescriptions": {} }, - "value": { - "arguments": [ - { - "hexValue": "464545445f434f4e54524143545f524f4c45", - "id": 48992, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "591:20:51", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d30e44b6367b3271655a8fdafcfc17a83191efab29a626ed0c76e1f42d65e332", - "typeString": "literal_string \"FEED_CONTRACT_ROLE\"" - }, - "value": "FEED_CONTRACT_ROLE" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d30e44b6367b3271655a8fdafcfc17a83191efab29a626ed0c76e1f42d65e332", - "typeString": "literal_string \"FEED_CONTRACT_ROLE\"" - } - ], - "id": 48991, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "581:9:51", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 48993, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "581:31:51", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 46666, + "nodeType": "ImportDirective", + "src": "459:45:38", + "nodes": [], + "absolutePath": "src/interfaces/IRate.sol", + "file": "./interfaces/IRate.sol", + "nameLocation": "-1:-1:-1", + "scope": 48281, + "sourceUnit": 46192, + "symbolAliases": [ + { + "foreign": { + "id": 46665, + "name": "IRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46191, + "src": "467:5:38", + "typeDescriptions": {} }, - "visibility": "private" - }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 48280, + "nodeType": "ContractDefinition", + "src": "506:35048:38", + "nodes": [ { - "id": 48999, + "id": 46675, "nodeType": "VariableDeclaration", - "src": "618:83:51", + "src": "556:46:38", "nodes": [], "constant": true, "mutability": "constant", - "name": "STABILITY_MODULE_ROLE", - "nameLocation": "643:21:51", - "scope": 50616, + "name": "PRECISION_DEGREE", + "nameLocation": "581:16:38", + "scope": 48280, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 48995, - "name": "bytes32", + "id": 46673, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "618:7:51", + "src": "556:7:38", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "value": { - "arguments": [ - { - "hexValue": "53544142494c4954595f4d4f44554c455f524f4c45", - "id": 48997, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "677:23:51", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a05d8775623c9cb9a7c26c4d686f58ed0f717cdbd1543265197fc098bd639696", - "typeString": "literal_string \"STABILITY_MODULE_ROLE\"" - }, - "value": "STABILITY_MODULE_ROLE" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_a05d8775623c9cb9a7c26c4d686f58ed0f717cdbd1543265197fc098bd639696", - "typeString": "literal_string \"STABILITY_MODULE_ROLE\"" - } - ], - "id": 48996, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "667:9:51", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 48998, + "hexValue": "3138", + "id": 46674, "isConstant": false, "isLValue": false, "isPure": true, - "kind": "functionCall", + "kind": "number", "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "667:34:51", - "tryCall": false, + "nodeType": "Literal", + "src": "600:2:38", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" }, "visibility": "private" }, { - "id": 49002, + "id": 46678, "nodeType": "VariableDeclaration", - "src": "707:46:51", + "src": "608:48:38", "nodes": [], "constant": true, "mutability": "constant", - "name": "PRECISION_DEGREE", - "nameLocation": "732:16:51", - "scope": 50616, + "name": "MAX_TOKEN_DECIMALS", + "nameLocation": "633:18:38", + "scope": 48280, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -3032,10 +2703,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49000, + "id": 46676, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "707:7:51", + "src": "608:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3043,14 +2714,14 @@ }, "value": { "hexValue": "3138", - "id": 49001, + "id": 46677, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "751:2:51", + "src": "654:2:38", "typeDescriptions": { "typeIdentifier": "t_rational_18_by_1", "typeString": "int_const 18" @@ -3060,15 +2731,15 @@ "visibility": "private" }, { - "id": 49010, + "id": 46686, "nodeType": "VariableDeclaration", - "src": "759:65:51", + "src": "662:65:38", "nodes": [], "constant": true, "mutability": "constant", "name": "PRECISION", - "nameLocation": "784:9:51", - "scope": 50616, + "nameLocation": "687:9:38", + "scope": 48280, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -3076,10 +2747,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49003, + "id": 46679, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "759:7:51", + "src": "662:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3090,21 +2761,21 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 49009, + "id": 46685, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "hexValue": "31", - "id": 49004, + "id": 46680, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "796:1:51", + "src": "699:1:38", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" @@ -3120,21 +2791,21 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 49007, + "id": 46683, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "hexValue": "3130", - "id": 49005, + "id": 46681, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "801:2:51", + "src": "704:2:38", "typeDescriptions": { "typeIdentifier": "t_rational_10_by_1", "typeString": "int_const 10" @@ -3144,38 +2815,38 @@ "nodeType": "BinaryOperation", "operator": "**", "rightExpression": { - "id": 49006, + "id": 46682, "name": "PRECISION_DEGREE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49002, - "src": "807:16:51", + "referencedDeclaration": 46675, + "src": "710:16:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "801:22:51", + "src": "704:22:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 49008, + "id": 46684, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "800:24:51", + "src": "703:24:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "796:28:51", + "src": "699:28:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3184,15 +2855,15 @@ "visibility": "private" }, { - "id": 49013, + "id": 46694, "nodeType": "VariableDeclaration", - "src": "830:57:51", + "src": "733:76:38", "nodes": [], "constant": true, "mutability": "constant", - "name": "ADDITIONAL_FEED_PRECISION", - "nameLocation": "855:25:51", - "scope": 50616, + "name": "HUNDRED_PERCENTAGE", + "nameLocation": "758:18:38", + "scope": 48280, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -3200,118 +2871,339 @@ "typeString": "uint256" }, "typeName": { - "id": 49011, + "id": 46687, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "830:7:51", + "src": "733:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { - "hexValue": "31653132", - "id": 49012, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 46693, "isConstant": false, "isLValue": false, "isPure": true, - "kind": "number", "lValueRequested": false, - "nodeType": "Literal", - "src": "883:4:51", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000000000000_by_1", - "typeString": "int_const 1000000000000" + "leftExpression": { + "hexValue": "313030", + "id": 46688, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "779:3:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "value": "100" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 46691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 46689, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "786:2:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "id": 46690, + "name": "PRECISION_DEGREE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46675, + "src": "792:16:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "786:22:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 46692, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "785:24:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "779:30:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "id": 46697, + "nodeType": "VariableDeclaration", + "src": "815:57:38", + "nodes": [], + "constant": true, + "mutability": "constant", + "name": "ADDITIONAL_FEED_PRECISION", + "nameLocation": "840:25:38", + "scope": 48280, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 46695, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "815:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "31653132", + "id": 46696, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "868:4:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000000_by_1", + "typeString": "int_const 1000000000000" }, "value": "1e12" }, "visibility": "private" }, { - "id": 49016, + "id": 46700, "nodeType": "VariableDeclaration", - "src": "952:40:51", + "src": "937:40:38", "nodes": [], "constant": false, "functionSelector": "e72531c8", "mutability": "immutable", "name": "CURRENCY_TOKEN", - "nameLocation": "978:14:51", - "scope": 50616, + "nameLocation": "963:14:38", + "scope": 48280, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", + "typeIdentifier": "t_contract$_Currency_$46042", "typeString": "contract Currency" }, "typeName": { - "id": 49015, + "id": 46699, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49014, + "id": 46698, "name": "Currency", - "nameLocations": ["952:8:51"], + "nameLocations": ["937:8:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48549, - "src": "952:8:51" + "referencedDeclaration": 46042, + "src": "937:8:38" }, - "referencedDeclaration": 48549, - "src": "952:8:51", + "referencedDeclaration": 46042, + "src": "937:8:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", + "typeIdentifier": "t_contract$_Currency_$46042", "typeString": "contract Currency" } }, "visibility": "public" }, { - "id": 49019, + "id": 46702, + "nodeType": "VariableDeclaration", + "src": "1021:30:38", + "nodes": [], + "constant": false, + "functionSelector": "ea061ad4", + "mutability": "mutable", + "name": "stabilityModule", + "nameLocation": "1036:15:38", + "scope": 48280, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 46701, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1021:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "public" + }, + { + "id": 46704, + "nodeType": "VariableDeclaration", + "src": "1077:25:38", + "nodes": [], + "constant": false, + "functionSelector": "a12ad552", + "mutability": "mutable", + "name": "feedModule", + "nameLocation": "1092:10:38", + "scope": 48280, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 46703, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1077:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "public" + }, + { + "id": 46707, + "nodeType": "VariableDeclaration", + "src": "1133:23:38", + "nodes": [], + "constant": false, + "functionSelector": "336d391e", + "mutability": "mutable", + "name": "rateModule", + "nameLocation": "1146:10:38", + "scope": 48280, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IRate_$46191", + "typeString": "contract IRate" + }, + "typeName": { + "id": 46706, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 46705, + "name": "IRate", + "nameLocations": ["1133:5:38"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46191, + "src": "1133:5:38" + }, + "referencedDeclaration": 46191, + "src": "1133:5:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IRate_$46191", + "typeString": "contract IRate" + } + }, + "visibility": "public" + }, + { + "id": 46710, "nodeType": "VariableDeclaration", - "src": "1021:28:51", + "src": "1215:28:38", "nodes": [], "constant": false, "functionSelector": "13f60c9a", "mutability": "mutable", "name": "baseRateInfo", - "nameLocation": "1037:12:51", - "scope": 50616, + "nameLocation": "1231:12:38", + "scope": 48280, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", "typeString": "struct IVault.RateInfo" }, "typeName": { - "id": 49018, + "id": 46709, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49017, + "id": 46708, "name": "RateInfo", - "nameLocations": ["1021:8:51"], + "nameLocations": ["1215:8:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48930, - "src": "1021:8:51" + "referencedDeclaration": 46280, + "src": "1215:8:38" }, - "referencedDeclaration": 48930, - "src": "1021:8:51", + "referencedDeclaration": 46280, + "src": "1215:8:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46280_storage_ptr", "typeString": "struct IVault.RateInfo" } }, "visibility": "public" }, { - "id": 49021, + "id": 46712, "nodeType": "VariableDeclaration", - "src": "1073:19:51", + "src": "1267:26:38", "nodes": [], "constant": false, - "functionSelector": "0dca59c1", + "functionSelector": "e1c84ea4", "mutability": "mutable", - "name": "debt", - "nameLocation": "1088:4:51", - "scope": 50616, + "name": "debtCeiling", + "nameLocation": "1282:11:38", + "scope": 48280, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -3319,10 +3211,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49020, + "id": 46711, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1073:7:51", + "src": "1267:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3331,16 +3223,16 @@ "visibility": "public" }, { - "id": 49023, + "id": 46714, "nodeType": "VariableDeclaration", - "src": "1128:26:51", + "src": "1339:19:38", "nodes": [], "constant": false, - "functionSelector": "682c2058", + "functionSelector": "0dca59c1", "mutability": "mutable", - "name": "accruedFees", - "nameLocation": "1143:11:51", - "scope": 50616, + "name": "debt", + "nameLocation": "1354:4:38", + "scope": 48280, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -3348,10 +3240,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49022, + "id": 46713, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1128:7:51", + "src": "1339:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3360,16 +3252,16 @@ "visibility": "public" }, { - "id": 49025, + "id": 46716, "nodeType": "VariableDeclaration", - "src": "1179:23:51", + "src": "1394:23:38", "nodes": [], "constant": false, "functionSelector": "b80a0a77", "mutability": "mutable", "name": "paidFees", - "nameLocation": "1194:8:51", - "scope": 50616, + "nameLocation": "1409:8:38", + "scope": 48280, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -3377,10 +3269,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49024, + "id": 46715, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1179:7:51", + "src": "1394:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3389,67 +3281,67 @@ "visibility": "public" }, { - "id": 49031, + "id": 46722, "nodeType": "VariableDeclaration", - "src": "1245:57:51", + "src": "1460:62:38", "nodes": [], "constant": false, "functionSelector": "c665471f", "mutability": "mutable", "name": "collateralMapping", - "nameLocation": "1285:17:51", - "scope": 50616, + "nameLocation": "1505:17:38", + "scope": 48280, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_struct$_CollateralInfo_$46300_storage_$", + "typeString": "mapping(contract ERC20Token => struct IVault.CollateralInfo)" }, "typeName": { - "id": 49030, + "id": 46721, "keyName": "", "keyNameLocation": "-1:-1:-1", "keyType": { - "id": 49027, + "id": 46718, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49026, - "name": "ERC20", - "nameLocations": ["1253:5:51"], + "id": 46717, + "name": "ERC20Token", + "nameLocations": ["1468:10:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "1253:5:51" + "referencedDeclaration": 46438, + "src": "1468:10:38" }, - "referencedDeclaration": 44443, - "src": "1253:5:51", + "referencedDeclaration": 46438, + "src": "1468:10:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "nodeType": "Mapping", - "src": "1245:32:51", + "src": "1460:37:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_struct$_CollateralInfo_$46300_storage_$", + "typeString": "mapping(contract ERC20Token => struct IVault.CollateralInfo)" }, "valueName": "", "valueNameLocation": "-1:-1:-1", "valueType": { - "id": 49029, + "id": 46720, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49028, + "id": 46719, "name": "CollateralInfo", - "nameLocations": ["1262:14:51"], + "nameLocations": ["1482:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "1262:14:51" + "referencedDeclaration": 46300, + "src": "1482:14:38" }, - "referencedDeclaration": 48954, - "src": "1262:14:51", + "referencedDeclaration": 46300, + "src": "1482:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } } @@ -3457,89 +3349,89 @@ "visibility": "public" }, { - "id": 49039, + "id": 46730, "nodeType": "VariableDeclaration", - "src": "1349:67:51", + "src": "1569:72:38", "nodes": [], "constant": false, "functionSelector": "e2c7283f", "mutability": "mutable", "name": "vaultMapping", - "nameLocation": "1404:12:51", - "scope": 50616, + "nameLocation": "1629:12:38", + "scope": 48280, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$_$", - "typeString": "mapping(contract ERC20 => mapping(address => struct IVault.VaultInfo))" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$_$", + "typeString": "mapping(contract ERC20Token => mapping(address => struct IVault.VaultInfo))" }, "typeName": { - "id": 49038, + "id": 46729, "keyName": "", "keyNameLocation": "-1:-1:-1", "keyType": { - "id": 49033, + "id": 46724, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49032, - "name": "ERC20", - "nameLocations": ["1357:5:51"], + "id": 46723, + "name": "ERC20Token", + "nameLocations": ["1577:10:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "1357:5:51" + "referencedDeclaration": 46438, + "src": "1577:10:38" }, - "referencedDeclaration": 44443, - "src": "1357:5:51", + "referencedDeclaration": 46438, + "src": "1577:10:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "nodeType": "Mapping", - "src": "1349:47:51", + "src": "1569:52:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$_$", - "typeString": "mapping(contract ERC20 => mapping(address => struct IVault.VaultInfo))" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$_$", + "typeString": "mapping(contract ERC20Token => mapping(address => struct IVault.VaultInfo))" }, "valueName": "", "valueNameLocation": "-1:-1:-1", "valueType": { - "id": 49037, + "id": 46728, "keyName": "", "keyNameLocation": "-1:-1:-1", "keyType": { - "id": 49034, + "id": 46725, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1374:7:51", + "src": "1599:7:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "1366:29:51", + "src": "1591:29:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$", + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$", "typeString": "mapping(address => struct IVault.VaultInfo)" }, "valueName": "", "valueNameLocation": "-1:-1:-1", "valueType": { - "id": 49036, + "id": 46727, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49035, + "id": 46726, "name": "VaultInfo", - "nameLocations": ["1385:9:51"], + "nameLocations": ["1610:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48963, - "src": "1385:9:51" + "referencedDeclaration": 46309, + "src": "1610:9:38" }, - "referencedDeclaration": 48963, - "src": "1385:9:51", + "referencedDeclaration": 46309, + "src": "1610:9:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" } } @@ -3548,16 +3440,16 @@ "visibility": "public" }, { - "id": 49045, + "id": 46736, "nodeType": "VariableDeclaration", - "src": "1474:63:51", + "src": "1699:63:38", "nodes": [], "constant": false, "functionSelector": "5881fc33", "mutability": "mutable", "name": "relyMapping", - "nameLocation": "1526:11:51", - "scope": 50616, + "nameLocation": "1751:11:38", + "scope": 48280, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -3565,21 +3457,21 @@ "typeString": "mapping(address => mapping(address => bool))" }, "typeName": { - "id": 49044, + "id": 46735, "keyName": "", "keyNameLocation": "-1:-1:-1", "keyType": { - "id": 49040, + "id": 46731, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1482:7:51", + "src": "1707:7:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "1474:44:51", + "src": "1699:44:38", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", "typeString": "mapping(address => mapping(address => bool))" @@ -3587,21 +3479,21 @@ "valueName": "", "valueNameLocation": "-1:-1:-1", "valueType": { - "id": 49043, + "id": 46734, "keyName": "", "keyNameLocation": "-1:-1:-1", "keyType": { - "id": 49041, + "id": 46732, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1501:7:51", + "src": "1726:7:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "1493:24:51", + "src": "1718:24:38", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" @@ -3609,10 +3501,10 @@ "valueName": "", "valueNameLocation": "-1:-1:-1", "valueType": { - "id": 49042, + "id": 46733, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1512:4:51", + "src": "1737:4:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3623,53 +3515,41 @@ "visibility": "public" }, { - "id": 49077, + "id": 46773, "nodeType": "FunctionDefinition", - "src": "1634:251:51", + "src": "1859:296:38", "nodes": [], "body": { - "id": 49076, + "id": 46772, "nodeType": "Block", - "src": "1690:195:51", + "src": "1937:218:38", "nodes": [], "statements": [ { "expression": { "arguments": [ - { - "id": 49054, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "1711:18:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, { "expression": { - "id": 49055, + "id": 46747, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "1731:3:51", + "src": "1964:3:38", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 49056, + "id": 46748, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "1735:6:51", + "memberLocation": "1968:6:38", "memberName": "sender", "nodeType": "MemberAccess", - "src": "1731:10:51", + "src": "1964:10:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3678,27 +3558,23 @@ ], "expression": { "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, { "typeIdentifier": "t_address", "typeString": "address" } ], - "id": 49053, - "name": "_grantRole", + "id": 46746, + "name": "_initializeOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 43644, - "src": "1700:10:51", + "referencedDeclaration": 44260, + "src": "1947:16:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) returns (bool)" + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" } }, - "id": 49057, + "id": 46749, "isConstant": false, "isLValue": false, "isPure": false, @@ -3707,90 +3583,90 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "1700:42:51", + "src": "1947:28:38", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 49058, + "id": 46750, "nodeType": "ExpressionStatement", - "src": "1700:42:51" + "src": "1947:28:38" }, { "expression": { - "id": 49061, + "id": 46753, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 49059, + "id": 46751, "name": "CURRENCY_TOKEN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49016, - "src": "1752:14:51", + "referencedDeclaration": 46700, + "src": "1985:14:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", + "typeIdentifier": "t_contract$_Currency_$46042", "typeString": "contract Currency" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49060, + "id": 46752, "name": "_currencyToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49048, - "src": "1769:14:51", + "referencedDeclaration": 46739, + "src": "2002:14:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", + "typeIdentifier": "t_contract$_Currency_$46042", "typeString": "contract Currency" } }, - "src": "1752:31:51", + "src": "1985:31:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", + "typeIdentifier": "t_contract$_Currency_$46042", "typeString": "contract Currency" } }, - "id": 49062, + "id": 46754, "nodeType": "ExpressionStatement", - "src": "1752:31:51" + "src": "1985:31:38" }, { "expression": { - "id": 49068, + "id": 46760, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 49063, + "id": 46755, "name": "baseRateInfo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49019, - "src": "1794:12:51", + "referencedDeclaration": 46710, + "src": "2027:12:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", "typeString": "struct IVault.RateInfo storage ref" } }, - "id": 49065, + "id": 46757, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "1807:14:51", + "memberLocation": "2040:14:38", "memberName": "lastUpdateTime", "nodeType": "MemberAccess", - "referencedDeclaration": 48929, - "src": "1794:27:51", + "referencedDeclaration": 46279, + "src": "2027:27:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3800,71 +3676,71 @@ "operator": "=", "rightHandSide": { "expression": { - "id": 49066, + "id": 46758, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "1824:5:51", + "src": "2057:5:38", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 49067, + "id": 46759, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "1830:9:51", + "memberLocation": "2063:9:38", "memberName": "timestamp", "nodeType": "MemberAccess", - "src": "1824:15:51", + "src": "2057:15:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1794:45:51", + "src": "2027:45:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49069, + "id": 46761, "nodeType": "ExpressionStatement", - "src": "1794:45:51" + "src": "2027:45:38" }, { "expression": { - "id": 49074, + "id": 46766, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 49070, + "id": 46762, "name": "baseRateInfo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49019, - "src": "1849:12:51", + "referencedDeclaration": 46710, + "src": "2082:12:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", "typeString": "struct IVault.RateInfo storage ref" } }, - "id": 49072, + "id": 46764, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "1862:4:51", + "memberLocation": "2095:4:38", "memberName": "rate", "nodeType": "MemberAccess", - "referencedDeclaration": 48925, - "src": "1849:17:51", + "referencedDeclaration": 46275, + "src": "2082:17:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3873,26 +3749,69 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49073, + "id": 46765, "name": "_baseRate", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49050, - "src": "1869:9:51", + "referencedDeclaration": 46741, + "src": "2102:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2082:29:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 46767, + "nodeType": "ExpressionStatement", + "src": "2082:29:38" + }, + { + "expression": { + "id": 46770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 46768, + "name": "debtCeiling", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46712, + "src": "2122:11:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1849:29:51", + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 46769, + "name": "_debtCeiling", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46743, + "src": "2136:12:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2122:26:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49075, + "id": 46771, "nodeType": "ExpressionStatement", - "src": "1849:29:51" + "src": "2122:26:38" } ] }, @@ -3902,39 +3821,39 @@ "name": "", "nameLocation": "-1:-1:-1", "parameters": { - "id": 49051, + "id": 46744, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49048, + "id": 46739, "mutability": "mutable", "name": "_currencyToken", - "nameLocation": "1655:14:51", + "nameLocation": "1880:14:38", "nodeType": "VariableDeclaration", - "scope": 49077, - "src": "1646:23:51", + "scope": 46773, + "src": "1871:23:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", + "typeIdentifier": "t_contract$_Currency_$46042", "typeString": "contract Currency" }, "typeName": { - "id": 49047, + "id": 46738, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49046, + "id": 46737, "name": "Currency", - "nameLocations": ["1646:8:51"], + "nameLocations": ["1871:8:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48549, - "src": "1646:8:51" + "referencedDeclaration": 46042, + "src": "1871:8:38" }, - "referencedDeclaration": 48549, - "src": "1646:8:51", + "referencedDeclaration": 46042, + "src": "1871:8:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", + "typeIdentifier": "t_contract$_Currency_$46042", "typeString": "contract Currency" } }, @@ -3942,13 +3861,40 @@ }, { "constant": false, - "id": 49050, + "id": 46741, "mutability": "mutable", "name": "_baseRate", - "nameLocation": "1679:9:51", + "nameLocation": "1904:9:38", + "nodeType": "VariableDeclaration", + "scope": 46773, + "src": "1896:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 46740, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1896:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 46743, + "mutability": "mutable", + "name": "_debtCeiling", + "nameLocation": "1923:12:38", "nodeType": "VariableDeclaration", - "scope": 49077, - "src": "1671:17:51", + "scope": 46773, + "src": "1915:20:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3956,10 +3902,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49049, + "id": 46742, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1671:7:51", + "src": "1915:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3968,208 +3914,350 @@ "visibility": "internal" } ], - "src": "1645:44:51" + "src": "1870:66:38" }, "returnParameters": { - "id": 49052, + "id": 46745, "nodeType": "ParameterList", "parameters": [], - "src": "1690:0:51" + "src": "1937:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { - "id": 49094, - "nodeType": "ModifierDefinition", - "src": "1960:158:51", + "id": 46784, + "nodeType": "FunctionDefinition", + "src": "2234:88:38", "nodes": [], "body": { - "id": 49093, + "id": 46783, "nodeType": "Block", - "src": "2010:108:51", + "src": "2297:25:38", "nodes": [], "statements": [ { - "condition": { - "id": 49087, + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 46780, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [-19, -19], + "referencedDeclaration": -19, + "src": "2307:6:38", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 46781, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "2024:43:51", - "subExpression": { - "expression": { - "baseExpression": { - "id": 49083, - "name": "collateralMapping", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49031, - "src": "2025:17:51", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo storage ref)" - } - }, - "id": 49085, - "indexExpression": { - "id": 49084, - "name": "_collateralToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49081, - "src": "2043:16:51", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2025:35:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage", - "typeString": "struct IVault.CollateralInfo storage ref" + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2307:8:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 46782, + "nodeType": "ExpressionStatement", + "src": "2307:8:38" + } + ] + }, + "baseFunctions": [44319], + "documentation": { + "id": 46774, + "nodeType": "StructuredDocumentation", + "src": "2161:68:38", + "text": " @dev override renounce ownership to be impossible" + }, + "functionSelector": "715018a6", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 46778, + "kind": "modifierInvocation", + "modifierName": { + "id": 46777, + "name": "onlyOwner", + "nameLocations": ["2287:9:38"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 44380, + "src": "2287:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "2287:9:38" + } + ], + "name": "renounceOwnership", + "nameLocation": "2243:17:38", + "overrides": { + "id": 46776, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2278:8:38" + }, + "parameters": { + "id": 46775, + "nodeType": "ParameterList", + "parameters": [], + "src": "2260:2:38" + }, + "returnParameters": { + "id": 46779, + "nodeType": "ParameterList", + "parameters": [], + "src": "2297:0:38" + }, + "scope": 48280, + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "id": 46804, + "nodeType": "ModifierDefinition", + "src": "2397:198:38", + "nodes": [], + "body": { + "id": 46803, + "nodeType": "Block", + "src": "2452:143:38", + "nodes": [], + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 46796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "baseExpression": { + "id": 46790, + "name": "collateralMapping", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46722, + "src": "2466:17:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_struct$_CollateralInfo_$46300_storage_$", + "typeString": "mapping(contract ERC20Token => struct IVault.CollateralInfo storage ref)" + } + }, + "id": 46792, + "indexExpression": { + "id": 46791, + "name": "_collateralToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46788, + "src": "2484:16:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2466:35:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage", + "typeString": "struct IVault.CollateralInfo storage ref" + } + }, + "id": 46793, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2502:8:38", + "memberName": "rateInfo", + "nodeType": "MemberAccess", + "referencedDeclaration": 46291, + "src": "2466:44:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" } }, - "id": 49086, + "id": 46794, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "2061:6:51", - "memberName": "exists", + "memberLocation": "2511:4:38", + "memberName": "rate", "nodeType": "MemberAccess", - "referencedDeclaration": 48953, - "src": "2025:42:51", + "referencedDeclaration": 46275, + "src": "2466:49:38", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 46795, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2519:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2466:54:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 49091, + "id": 46801, "nodeType": "IfStatement", - "src": "2020:80:51", + "src": "2462:116:38", "trueBody": { - "errorCall": { - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 49088, - "name": "CollateralDoesNotExist", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48869, - "src": "2076:22:51", - "typeDescriptions": { - "typeIdentifier": "t_function_error_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 49089, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2076:24:51", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "id": 46800, + "nodeType": "Block", + "src": "2522:56:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 46797, + "name": "CollateralDoesNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46209, + "src": "2543:22:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 46798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2543:24:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 46799, + "nodeType": "RevertStatement", + "src": "2536:31:38" } - }, - "id": 49090, - "nodeType": "RevertStatement", - "src": "2069:31:51" + ] } }, { - "id": 49092, + "id": 46802, "nodeType": "PlaceholderStatement", - "src": "2110:1:51" + "src": "2587:1:38" } ] }, "documentation": { - "id": 49078, + "id": 46785, "nodeType": "StructuredDocumentation", - "src": "1891:64:51", + "src": "2328:64:38", "text": " @dev reverts if the collateral does not exist" }, "name": "collateralExists", - "nameLocation": "1969:16:51", + "nameLocation": "2406:16:38", "parameters": { - "id": 49082, + "id": 46789, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49081, + "id": 46788, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "1992:16:51", + "nameLocation": "2434:16:38", "nodeType": "VariableDeclaration", - "scope": 49094, - "src": "1986:22:51", + "scope": 46804, + "src": "2423:27:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 49080, + "id": 46787, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49079, - "name": "ERC20", - "nameLocations": ["1986:5:51"], + "id": 46786, + "name": "ERC20Token", + "nameLocations": ["2423:10:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "1986:5:51" + "referencedDeclaration": 46438, + "src": "2423:10:38" }, - "referencedDeclaration": 44443, - "src": "1986:5:51", + "referencedDeclaration": 46438, + "src": "2423:10:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "visibility": "internal" } ], - "src": "1985:24:51" + "src": "2422:29:38" }, "virtual": false, "visibility": "internal" }, { - "id": 49117, + "id": 46828, "nodeType": "ModifierDefinition", - "src": "2318:166:51", + "src": "2795:190:38", "nodes": [], "body": { - "id": 49116, + "id": 46827, "nodeType": "Block", - "src": "2365:119:51", + "src": "2842:143:38", "nodes": [], "statements": [ { @@ -4178,7 +4266,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 49110, + "id": 46820, "isConstant": false, "isLValue": false, "isPure": false, @@ -4188,18 +4276,18 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 49102, + "id": 46812, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 49099, + "id": 46809, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49097, - "src": "2379:6:51", + "referencedDeclaration": 46807, + "src": "2856:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4209,32 +4297,32 @@ "operator": "!=", "rightExpression": { "expression": { - "id": 49100, + "id": 46810, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "2389:3:51", + "src": "2866:3:38", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 49101, + "id": 46811, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "2393:6:51", + "memberLocation": "2870:6:38", "memberName": "sender", "nodeType": "MemberAccess", - "src": "2389:10:51", + "src": "2866:10:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "2379:20:51", + "src": "2856:20:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4243,7 +4331,7 @@ "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { - "id": 49109, + "id": 46819, "isConstant": false, "isLValue": false, "isPure": false, @@ -4251,29 +4339,29 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "2403:32:51", + "src": "2880:32:38", "subExpression": { "baseExpression": { "baseExpression": { - "id": 49103, + "id": 46813, "name": "relyMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49045, - "src": "2404:11:51", + "referencedDeclaration": 46736, + "src": "2881:11:38", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", "typeString": "mapping(address => mapping(address => bool))" } }, - "id": 49105, + "id": 46815, "indexExpression": { - "id": 49104, + "id": 46814, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49097, - "src": "2416:6:51", + "referencedDeclaration": 46807, + "src": "2893:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4284,35 +4372,35 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2404:19:51", + "src": "2881:19:38", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 49108, + "id": 46818, "indexExpression": { "expression": { - "id": 49106, + "id": 46816, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "2424:3:51", + "src": "2901:3:38", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 49107, + "id": 46817, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "2428:6:51", + "memberLocation": "2905:6:38", "memberName": "sender", "nodeType": "MemberAccess", - "src": "2424:10:51", + "src": "2901:10:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4323,7 +4411,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2404:31:51", + "src": "2881:31:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4334,80 +4422,87 @@ "typeString": "bool" } }, - "src": "2379:56:51", + "src": "2856:56:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 49114, + "id": 46825, "nodeType": "IfStatement", - "src": "2375:91:51", + "src": "2852:116:38", "trueBody": { - "errorCall": { - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 49111, - "name": "NotOwnerOrReliedUpon", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48871, - "src": "2444:20:51", - "typeDescriptions": { - "typeIdentifier": "t_function_error_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 49112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2444:22:51", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "id": 46824, + "nodeType": "Block", + "src": "2914:54:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 46821, + "name": "NotOwnerOrReliedUpon", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46211, + "src": "2935:20:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 46822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2935:22:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 46823, + "nodeType": "RevertStatement", + "src": "2928:29:38" } - }, - "id": 49113, - "nodeType": "RevertStatement", - "src": "2437:29:51" + ] } }, { - "id": 49115, + "id": 46826, "nodeType": "PlaceholderStatement", - "src": "2476:1:51" + "src": "2977:1:38" } ] }, "documentation": { - "id": 49095, + "id": 46805, "nodeType": "StructuredDocumentation", - "src": "2124:189:51", + "src": "2601:189:38", "text": " @param _owner address of the vault to interact with\n @dev reverts if the msg.sender is not `_owner` and is also not allowed to interact with `_owner`'s vault" }, "name": "onlyOwnerOrReliedUpon", - "nameLocation": "2327:21:51", + "nameLocation": "2804:21:38", "parameters": { - "id": 49098, + "id": 46808, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49097, + "id": 46807, "mutability": "mutable", "name": "_owner", - "nameLocation": "2357:6:51", + "nameLocation": "2834:6:38", "nodeType": "VariableDeclaration", - "scope": 49117, - "src": "2349:14:51", + "scope": 46828, + "src": "2826:14:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4415,10 +4510,10 @@ "typeString": "address" }, "typeName": { - "id": 49096, + "id": 46806, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2349:7:51", + "src": "2826:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4428,36 +4523,36 @@ "visibility": "internal" } ], - "src": "2348:16:51" + "src": "2825:16:38" }, "virtual": false, "visibility": "internal" }, { - "id": 49132, + "id": 46840, "nodeType": "FunctionDefinition", - "src": "2802:107:51", + "src": "3303:77:38", "nodes": [], "body": { - "id": 49131, + "id": 46839, "nodeType": "Block", - "src": "2879:30:51", + "src": "3350:30:38", "nodes": [], "statements": [ { "expression": { - "id": 49129, + "id": 46837, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 49127, + "id": 46835, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48725, - "src": "2889:6:51", + "referencedDeclaration": 46056, + "src": "3360:6:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4466,34 +4561,34 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49128, + "id": 46836, "name": "TRUE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48723, - "src": "2898:4:51", + "referencedDeclaration": 46054, + "src": "3369:4:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2889:13:51", + "src": "3360:13:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49130, + "id": 46838, "nodeType": "ExpressionStatement", - "src": "2889:13:51" + "src": "3360:13:38" } ] }, - "baseFunctions": [48763], + "baseFunctions": [46094], "documentation": { - "id": 49118, + "id": 46829, "nodeType": "StructuredDocumentation", - "src": "2490:307:51", + "src": "2991:307:38", "text": " @notice allows interactions with functions having `whenNotPaused` modifier and prevents interactions with ones with the `whenPaused` modifier\n @dev interactions with functions without a `whenNotPaused` or `whenPaused` modifier are unaffected\n @dev reverts if not paused" }, "functionSelector": "3f4ba83a", @@ -4501,98 +4596,70 @@ "kind": "function", "modifiers": [ { - "id": 49122, - "kind": "modifierInvocation", - "modifierName": { - "id": 49121, - "name": "whenPaused", - "nameLocations": ["2839:10:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48755, - "src": "2839:10:51" - }, - "nodeType": "ModifierInvocation", - "src": "2839:10:51" - }, - { - "arguments": [ - { - "id": 49124, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "2859:18:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 49125, + "id": 46833, "kind": "modifierInvocation", "modifierName": { - "id": 49123, - "name": "onlyRole", - "nameLocations": ["2850:8:51"], + "id": 46832, + "name": "onlyOwner", + "nameLocations": ["3340:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "2850:8:51" + "referencedDeclaration": 44380, + "src": "3340:9:38" }, "nodeType": "ModifierInvocation", - "src": "2850:28:51" + "src": "3340:9:38" } ], "name": "unpause", - "nameLocation": "2811:7:51", + "nameLocation": "3312:7:38", "overrides": { - "id": 49120, + "id": 46831, "nodeType": "OverrideSpecifier", "overrides": [], - "src": "2830:8:51" + "src": "3331:8:38" }, "parameters": { - "id": 49119, + "id": 46830, "nodeType": "ParameterList", "parameters": [], - "src": "2818:2:51" + "src": "3319:2:38" }, "returnParameters": { - "id": 49126, + "id": 46834, "nodeType": "ParameterList", "parameters": [], - "src": "2879:0:51" + "src": "3350:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 49147, + "id": 46852, "nodeType": "FunctionDefinition", - "src": "3227:109:51", + "src": "3698:76:38", "nodes": [], "body": { - "id": 49146, + "id": 46851, "nodeType": "Block", - "src": "3305:31:51", + "src": "3743:31:38", "nodes": [], "statements": [ { "expression": { - "id": 49144, + "id": 46849, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 49142, + "id": 46847, "name": "status", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48725, - "src": "3315:6:51", + "referencedDeclaration": 46056, + "src": "3753:6:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4601,34 +4668,34 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49143, + "id": 46848, "name": "FALSE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48720, - "src": "3324:5:51", + "referencedDeclaration": 46051, + "src": "3762:5:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3315:14:51", + "src": "3753:14:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49145, + "id": 46850, "nodeType": "ExpressionStatement", - "src": "3315:14:51" + "src": "3753:14:38" } ] }, - "baseFunctions": [48771], + "baseFunctions": [46102], "documentation": { - "id": 49133, + "id": 46841, "nodeType": "StructuredDocumentation", - "src": "2915:307:51", + "src": "3386:307:38", "text": " @notice prevents interactions with functions having `whenNotPaused` modifier and allows interactions with ones with the `whenPaused` modifier\n @dev interactions with functions without a `whenNotPaused` or `whenPaused` modifier are unaffected\n @dev reverts if not paused" }, "functionSelector": "8456cb59", @@ -4636,224 +4703,155 @@ "kind": "function", "modifiers": [ { - "id": 49137, - "kind": "modifierInvocation", - "modifierName": { - "id": 49136, - "name": "whenNotPaused", - "nameLocations": ["3262:13:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "3262:13:51" - }, - "nodeType": "ModifierInvocation", - "src": "3262:13:51" - }, - { - "arguments": [ - { - "id": 49139, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "3285:18:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 49140, + "id": 46845, "kind": "modifierInvocation", "modifierName": { - "id": 49138, - "name": "onlyRole", - "nameLocations": ["3276:8:51"], + "id": 46844, + "name": "onlyOwner", + "nameLocations": ["3733:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "3276:8:51" + "referencedDeclaration": 44380, + "src": "3733:9:38" }, "nodeType": "ModifierInvocation", - "src": "3276:28:51" + "src": "3733:9:38" } ], "name": "pause", - "nameLocation": "3236:5:51", + "nameLocation": "3707:5:38", "overrides": { - "id": 49135, + "id": 46843, "nodeType": "OverrideSpecifier", "overrides": [], - "src": "3253:8:51" + "src": "3724:8:38" }, "parameters": { - "id": 49134, + "id": 46842, "nodeType": "ParameterList", "parameters": [], - "src": "3241:2:51" + "src": "3712:2:38" }, "returnParameters": { - "id": 49141, + "id": 46846, "nodeType": "ParameterList", "parameters": [], - "src": "3305:0:51" + "src": "3743:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 49164, + "id": 46867, "nodeType": "FunctionDefinition", - "src": "3606:165:51", + "src": "3973:121:38", "nodes": [], "body": { - "id": 49163, + "id": 46866, "nodeType": "Block", - "src": "3709:62:51", + "src": "4053:41:38", "nodes": [], "statements": [ { "expression": { - "arguments": [ - { - "id": 49159, - "name": "FEED_CONTRACT_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48994, - "src": "3730:18:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 49160, - "name": "_feedContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49150, - "src": "3750:13:51", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 49158, - "name": "_grantRole", + "id": 46864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 46862, + "name": "feedModule", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 43644, - "src": "3719:10:51", + "referencedDeclaration": 46704, + "src": "4063:10:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) returns (bool)" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 49161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3719:45:51", - "tryCall": false, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 46863, + "name": "_feedModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46855, + "src": "4076:11:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4063:24:38", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 49162, + "id": 46865, "nodeType": "ExpressionStatement", - "src": "3719:45:51" + "src": "4063:24:38" } ] }, "documentation": { - "id": 49148, + "id": 46853, "nodeType": "StructuredDocumentation", - "src": "3342:259:51", - "text": " @notice updates the address allowed to perform actions requiring caller to have the `FEED_CONTRACT_ROLE` role\n @dev reverts if the contract is paused\n @dev reverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role" + "src": "3780:188:38", + "text": " @notice updates the feedModule address\n @dev reverts if the contract is paused\n @dev reverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role" }, - "functionSelector": "4522fa85", + "functionSelector": "0ae5ccab", "implemented": true, "kind": "function", "modifiers": [ { - "id": 49153, + "id": 46858, "kind": "modifierInvocation", "modifierName": { - "id": 49152, + "id": 46857, "name": "whenNotPaused", - "nameLocations": ["3666:13:51"], + "nameLocations": ["4029:13:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "3666:13:51" + "referencedDeclaration": 46075, + "src": "4029:13:38" }, "nodeType": "ModifierInvocation", - "src": "3666:13:51" + "src": "4029:13:38" }, { - "arguments": [ - { - "id": 49155, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "3689:18:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 49156, + "id": 46860, "kind": "modifierInvocation", "modifierName": { - "id": 49154, - "name": "onlyRole", - "nameLocations": ["3680:8:51"], + "id": 46859, + "name": "onlyOwner", + "nameLocations": ["4043:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "3680:8:51" + "referencedDeclaration": 44380, + "src": "4043:9:38" }, "nodeType": "ModifierInvocation", - "src": "3680:28:51" + "src": "4043:9:38" } ], - "name": "updateFeedContract", - "nameLocation": "3615:18:51", + "name": "updateFeedModule", + "nameLocation": "3982:16:38", "parameters": { - "id": 49151, + "id": 46856, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49150, + "id": 46855, "mutability": "mutable", - "name": "_feedContract", - "nameLocation": "3642:13:51", + "name": "_feedModule", + "nameLocation": "4007:11:38", "nodeType": "VariableDeclaration", - "scope": 49164, - "src": "3634:21:51", + "scope": 46867, + "src": "3999:19:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4861,10 +4859,10 @@ "typeString": "address" }, "typeName": { - "id": 49149, + "id": 46854, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3634:7:51", + "src": "3999:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4874,170 +4872,279 @@ "visibility": "internal" } ], - "src": "3633:23:51" + "src": "3998:21:38" }, "returnParameters": { - "id": 49157, + "id": 46861, "nodeType": "ParameterList", "parameters": [], - "src": "3709:0:51" + "src": "4053:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 49181, + "id": 46883, "nodeType": "FunctionDefinition", - "src": "4044:177:51", + "src": "4293:119:38", "nodes": [], "body": { - "id": 49180, + "id": 46882, "nodeType": "Block", - "src": "4153:68:51", + "src": "4371:41:38", "nodes": [], "statements": [ { "expression": { - "arguments": [ - { - "id": 49176, - "name": "STABILITY_MODULE_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48999, - "src": "4174:21:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "id": 49177, - "name": "_stabilityModule", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49167, - "src": "4197:16:51", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } + "id": 46880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 46878, + "name": "rateModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46707, + "src": "4381:10:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IRate_$46191", + "typeString": "contract IRate" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 49175, - "name": "_grantRole", + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 46879, + "name": "_rateModule", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 43644, - "src": "4163:10:51", + "referencedDeclaration": 46871, + "src": "4394:11:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", - "typeString": "function (bytes32,address) returns (bool)" + "typeIdentifier": "t_contract$_IRate_$46191", + "typeString": "contract IRate" } }, - "id": 49178, + "src": "4381:24:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IRate_$46191", + "typeString": "contract IRate" + } + }, + "id": 46881, + "nodeType": "ExpressionStatement", + "src": "4381:24:38" + } + ] + }, + "documentation": { + "id": 46868, + "nodeType": "StructuredDocumentation", + "src": "4100:188:38", + "text": " @notice updates the rateModule address\n @dev reverts if the contract is paused\n @dev reverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role" + }, + "functionSelector": "d707eed5", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 46874, + "kind": "modifierInvocation", + "modifierName": { + "id": 46873, + "name": "whenNotPaused", + "nameLocations": ["4347:13:38"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46075, + "src": "4347:13:38" + }, + "nodeType": "ModifierInvocation", + "src": "4347:13:38" + }, + { + "id": 46876, + "kind": "modifierInvocation", + "modifierName": { + "id": 46875, + "name": "onlyOwner", + "nameLocations": ["4361:9:38"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 44380, + "src": "4361:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "4361:9:38" + } + ], + "name": "updateRateModule", + "nameLocation": "4302:16:38", + "parameters": { + "id": 46872, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 46871, + "mutability": "mutable", + "name": "_rateModule", + "nameLocation": "4325:11:38", + "nodeType": "VariableDeclaration", + "scope": 46883, + "src": "4319:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IRate_$46191", + "typeString": "contract IRate" + }, + "typeName": { + "id": 46870, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 46869, + "name": "IRate", + "nameLocations": ["4319:5:38"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46191, + "src": "4319:5:38" + }, + "referencedDeclaration": 46191, + "src": "4319:5:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IRate_$46191", + "typeString": "contract IRate" + } + }, + "visibility": "internal" + } + ], + "src": "4318:19:38" + }, + "returnParameters": { + "id": 46877, + "nodeType": "ParameterList", + "parameters": [], + "src": "4371:0:38" + }, + "scope": 48280, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 46898, + "nodeType": "FunctionDefinition", + "src": "4617:141:38", + "nodes": [], + "body": { + "id": 46897, + "nodeType": "Block", + "src": "4707:51:38", + "nodes": [], + "statements": [ + { + "expression": { + "id": 46895, "isConstant": false, "isLValue": false, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "4163:51:51", - "tryCall": false, + "leftHandSide": { + "id": 46893, + "name": "stabilityModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46702, + "src": "4717:15:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 46894, + "name": "_stabilityModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46886, + "src": "4735:16:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4717:34:38", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 49179, + "id": 46896, "nodeType": "ExpressionStatement", - "src": "4163:51:51" + "src": "4717:34:38" } ] }, "documentation": { - "id": 49165, + "id": 46884, "nodeType": "StructuredDocumentation", - "src": "3777:262:51", - "text": " @notice updates the address allowed to perform actions requiring caller to have the `STABILITY_MODULE_ROLE` role\n @dev reverts if the contract is paused\n @dev reverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role" + "src": "4418:194:38", + "text": " @notice updates the address fees are sent to\n @dev reverts if the contract is paused\n @dev reverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role" }, "functionSelector": "0408ccd6", "implemented": true, "kind": "function", "modifiers": [ { - "id": 49170, + "id": 46889, "kind": "modifierInvocation", "modifierName": { - "id": 49169, + "id": 46888, "name": "whenNotPaused", - "nameLocations": ["4110:13:51"], + "nameLocations": ["4683:13:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "4110:13:51" + "referencedDeclaration": 46075, + "src": "4683:13:38" }, "nodeType": "ModifierInvocation", - "src": "4110:13:51" + "src": "4683:13:38" }, { - "arguments": [ - { - "id": 49172, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "4133:18:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 49173, + "id": 46891, "kind": "modifierInvocation", "modifierName": { - "id": 49171, - "name": "onlyRole", - "nameLocations": ["4124:8:51"], + "id": 46890, + "name": "onlyOwner", + "nameLocations": ["4697:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "4124:8:51" + "referencedDeclaration": 44380, + "src": "4697:9:38" }, "nodeType": "ModifierInvocation", - "src": "4124:28:51" + "src": "4697:9:38" } ], "name": "updateStabilityModule", - "nameLocation": "4053:21:51", + "nameLocation": "4626:21:38", "parameters": { - "id": 49168, + "id": 46887, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49167, + "id": 46886, "mutability": "mutable", "name": "_stabilityModule", - "nameLocation": "4083:16:51", + "nameLocation": "4656:16:38", "nodeType": "VariableDeclaration", - "scope": 49181, - "src": "4075:24:51", + "scope": 46898, + "src": "4648:24:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5045,10 +5152,10 @@ "typeString": "address" }, "typeName": { - "id": 49166, + "id": 46885, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4075:7:51", + "src": "4648:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -5058,115 +5165,257 @@ "visibility": "internal" } ], - "src": "4074:26:51" + "src": "4647:26:38" }, "returnParameters": { - "id": 49174, + "id": 46892, "nodeType": "ParameterList", "parameters": [], - "src": "4153:0:51" + "src": "4707:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 49272, + "id": 46913, "nodeType": "FunctionDefinition", - "src": "5190:750:51", + "src": "4958:125:38", "nodes": [], "body": { - "id": 49271, + "id": 46912, "nodeType": "Block", - "src": "5300:640:51", + "src": "5040:43:38", "nodes": [], "statements": [ { - "condition": { - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 49199, + "expression": { + "id": 46910, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftExpression": { - "id": 49194, - "name": "_tokenAddress", + "leftHandSide": { + "id": 46908, + "name": "debtCeiling", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49184, - "src": "5314:13:51", + "referencedDeclaration": 46712, + "src": "5050:11:38", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "arguments": [ - { - "id": 49197, - "name": "CURRENCY_TOKEN", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49016, - "src": "5339:14:51", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", - "typeString": "contract Currency" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Currency_$48549", - "typeString": "contract Currency" - } - ], - "id": 49196, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5331:7:51", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 49195, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5331:7:51", - "typeDescriptions": {} - } - }, - "id": 49198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "5331:23:51", - "tryCall": false, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 46909, + "name": "_debtCeiling", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46901, + "src": "5064:12:38", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "src": "5314:40:51", + "src": "5050:26:38", "typeDescriptions": { - "typeIdentifier": "t_bool", + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 46911, + "nodeType": "ExpressionStatement", + "src": "5050:26:38" + } + ] + }, + "documentation": { + "id": 46899, + "nodeType": "StructuredDocumentation", + "src": "4764:189:38", + "text": " @notice updates the global debt ceiling\n @dev reverts if the contract is paused\n @dev reverts if msg.sender does not have the `DEFAULT_ADMIN_ROLE` role" + }, + "functionSelector": "1218c5fd", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 46904, + "kind": "modifierInvocation", + "modifierName": { + "id": 46903, + "name": "whenNotPaused", + "nameLocations": ["5016:13:38"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46075, + "src": "5016:13:38" + }, + "nodeType": "ModifierInvocation", + "src": "5016:13:38" + }, + { + "id": 46906, + "kind": "modifierInvocation", + "modifierName": { + "id": 46905, + "name": "onlyOwner", + "nameLocations": ["5030:9:38"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 44380, + "src": "5030:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "5030:9:38" + } + ], + "name": "updateDebtCeiling", + "nameLocation": "4967:17:38", + "parameters": { + "id": 46902, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 46901, + "mutability": "mutable", + "name": "_debtCeiling", + "nameLocation": "4993:12:38", + "nodeType": "VariableDeclaration", + "scope": 46913, + "src": "4985:20:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 46900, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4985:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4984:22:38" + }, + "returnParameters": { + "id": 46907, + "nodeType": "ParameterList", + "parameters": [], + "src": "5040:0:38" + }, + "scope": 48280, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 47001, + "nodeType": "FunctionDefinition", + "src": "6052:1230:38", + "nodes": [], + "body": { + "id": 47000, + "nodeType": "Block", + "src": "6133:1149:38", + "nodes": [], + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 46928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 46923, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46916, + "src": "6147:13:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "id": 46926, + "name": "CURRENCY_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46700, + "src": "6172:14:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Currency_$46042", + "typeString": "contract Currency" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Currency_$46042", + "typeString": "contract Currency" + } + ], + "id": 46925, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6164:7:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 46924, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6164:7:38", + "typeDescriptions": {} + } + }, + "id": 46927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6164:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6147:40:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", "typeString": "bool" } }, @@ -5176,18 +5425,18 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 49221, + "id": 46950, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 49216, + "id": 46945, "name": "_tokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49184, - "src": "5471:13:51", + "referencedDeclaration": 46916, + "src": "6417:13:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5199,14 +5448,14 @@ "arguments": [ { "hexValue": "30", - "id": 49219, + "id": 46948, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5496:1:51", + "src": "6442:1:38", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" @@ -5221,26 +5470,26 @@ "typeString": "int_const 0" } ], - "id": 49218, + "id": 46947, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5488:7:51", + "src": "6434:7:38", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 49217, + "id": 46946, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5488:7:51", + "src": "6434:7:38", "typeDescriptions": {} } }, - "id": 49220, + "id": 46949, "isConstant": false, "isLValue": false, "isPure": true, @@ -5249,73 +5498,73 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5488:10:51", + "src": "6434:10:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "5471:27:51", + "src": "6417:27:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 49268, + "id": 46997, "nodeType": "Block", - "src": "5645:289:51", + "src": "6721:555:38", "statements": [ { - "assignments": [49244], + "assignments": [46973], "declarations": [ { "constant": false, - "id": 49244, + "id": 46973, "mutability": "mutable", "name": "_tokenContract", - "nameLocation": "5665:14:51", + "nameLocation": "6885:14:38", "nodeType": "VariableDeclaration", - "scope": 49268, - "src": "5659:20:51", + "scope": 46997, + "src": "6874:25:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 49243, + "id": 46972, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49242, - "name": "ERC20", - "nameLocations": ["5659:5:51"], + "id": 46971, + "name": "ERC20Token", + "nameLocations": ["6874:10:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "5659:5:51" + "referencedDeclaration": 46438, + "src": "6874:10:38" }, - "referencedDeclaration": 44443, - "src": "5659:5:51", + "referencedDeclaration": 46438, + "src": "6874:10:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "visibility": "internal" } ], - "id": 49248, + "id": 46977, "initialValue": { "arguments": [ { - "id": 49246, + "id": 46975, "name": "_tokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49184, - "src": "5688:13:51", + "referencedDeclaration": 46916, + "src": "6913:13:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5329,18 +5578,18 @@ "typeString": "address" } ], - "id": 49245, - "name": "ERC20", + "id": 46974, + "name": "ERC20Token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44443, - "src": "5682:5:51", + "referencedDeclaration": 46438, + "src": "6902:10:38", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$44443_$", - "typeString": "type(contract ERC20)" + "typeIdentifier": "t_type$_t_contract$_ERC20Token_$46438_$", + "typeString": "type(contract ERC20Token)" } }, - "id": 49247, + "id": 46976, "isConstant": false, "isLValue": false, "isPure": false, @@ -5349,38 +5598,38 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5682:20:51", + "src": "6902:25:38", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "nodeType": "VariableDeclarationStatement", - "src": "5659:43:51" + "src": "6874:53:38" }, { "expression": { "arguments": [ { - "id": 49252, - "name": "_tokenContract", + "id": 46981, + "name": "_tokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49244, - "src": "5756:14:51", + "referencedDeclaration": 46916, + "src": "7099:13:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_address", + "typeString": "address" } }, { - "id": 49253, + "id": 46982, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49186, - "src": "5788:3:51", + "referencedDeclaration": 46918, + "src": "7130:3:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5391,7 +5640,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 49265, + "id": 46994, "isConstant": false, "isLValue": false, "isPure": false, @@ -5401,14 +5650,14 @@ { "arguments": [ { - "id": 49258, + "id": 46987, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, - "src": "5842:4:51", + "src": "7184:4:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } } @@ -5416,30 +5665,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } ], - "id": 49257, + "id": 46986, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5834:7:51", + "src": "7176:7:38", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 49256, + "id": 46985, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5834:7:51", + "src": "7176:7:38", "typeDescriptions": {} } }, - "id": 49259, + "id": 46988, "isConstant": false, "isLValue": false, "isPure": false, @@ -5448,7 +5697,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5834:13:51", + "src": "7176:13:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", @@ -5464,33 +5713,33 @@ } ], "expression": { - "id": 49254, + "id": 46983, "name": "_tokenContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49244, - "src": "5809:14:51", + "referencedDeclaration": 46973, + "src": "7151:14:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, - "id": 49255, + "id": 46984, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "5824:9:51", + "memberLocation": "7166:9:38", "memberName": "balanceOf", "nodeType": "MemberAccess", - "referencedDeclaration": 44029, - "src": "5809:24:51", + "referencedDeclaration": 44502, + "src": "7151:24:38", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, - "id": 49260, + "id": 46989, "isConstant": false, "isLValue": false, "isPure": false, @@ -5499,7 +5748,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5809:39:51", + "src": "7151:39:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -5511,28 +5760,28 @@ "rightExpression": { "expression": { "baseExpression": { - "id": 49261, + "id": 46990, "name": "collateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49031, - "src": "5851:17:51", + "referencedDeclaration": 46722, + "src": "7193:17:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo storage ref)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_struct$_CollateralInfo_$46300_storage_$", + "typeString": "mapping(contract ERC20Token => struct IVault.CollateralInfo storage ref)" } }, - "id": 49263, + "id": 46992, "indexExpression": { - "id": 49262, + "id": 46991, "name": "_tokenContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49244, - "src": "5869:14:51", + "referencedDeclaration": 46973, + "src": "7211:14:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -5540,28 +5789,28 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5851:33:51", + "src": "7193:33:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage", "typeString": "struct IVault.CollateralInfo storage ref" } }, - "id": 49264, + "id": 46993, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "5885:24:51", + "memberLocation": "7227:24:38", "memberName": "totalDepositedCollateral", "nodeType": "MemberAccess", - "referencedDeclaration": 48932, - "src": "5851:58:51", + "referencedDeclaration": 46282, + "src": "7193:58:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5809:100:51", + "src": "7151:100:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5571,8 +5820,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_address", + "typeString": "address" }, { "typeIdentifier": "t_address", @@ -5584,33 +5833,33 @@ } ], "expression": { - "id": 49249, - "name": "SafeERC20", + "id": 46978, + "name": "SafeTransferLib", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 45027, - "src": "5716:9:51", + "referencedDeclaration": 44996, + "src": "7053:15:38", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$45027_$", - "typeString": "type(library SafeERC20)" + "typeIdentifier": "t_type$_t_contract$_SafeTransferLib_$44996_$", + "typeString": "type(library SafeTransferLib)" } }, - "id": 49251, + "id": 46980, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "5726:12:51", + "memberLocation": "7069:12:38", "memberName": "safeTransfer", "nodeType": "MemberAccess", - "referencedDeclaration": 44787, - "src": "5716:22:51", + "referencedDeclaration": 44947, + "src": "7053:28:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$44521_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" } }, - "id": 49266, + "id": 46995, "isConstant": false, "isLValue": false, "isPure": false, @@ -5619,39 +5868,39 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5716:207:51", + "src": "7053:212:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 49267, + "id": 46996, "nodeType": "ExpressionStatement", - "src": "5716:207:51" + "src": "7053:212:38" } ] }, - "id": 49269, + "id": 46998, "nodeType": "IfStatement", - "src": "5467:467:51", + "src": "6413:863:38", "trueBody": { - "id": 49241, + "id": 46970, "nodeType": "Block", - "src": "5500:139:51", + "src": "6446:269:38", "statements": [ { - "assignments": [49223, null], + "assignments": [46952, null], "declarations": [ { "constant": false, - "id": 49223, + "id": 46952, "mutability": "mutable", "name": "success", - "nameLocation": "5520:7:51", + "nameLocation": "6596:7:38", "nodeType": "VariableDeclaration", - "scope": 49241, - "src": "5515:12:51", + "scope": 46970, + "src": "6591:12:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5659,10 +5908,10 @@ "typeString": "bool" }, "typeName": { - "id": 49222, + "id": 46951, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "5515:4:51", + "src": "6591:4:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5672,19 +5921,19 @@ }, null ], - "id": 49234, + "id": 46963, "initialValue": { "arguments": [ { "hexValue": "", - "id": 49232, + "id": 46961, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5571:2:51", + "src": "6647:2:38", "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" @@ -5707,32 +5956,32 @@ } ], "expression": { - "id": 49224, + "id": 46953, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49186, - "src": "5532:3:51", + "referencedDeclaration": 46918, + "src": "6608:3:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 49225, + "id": 46954, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "5536:4:51", + "memberLocation": "6612:4:38", "memberName": "call", "nodeType": "MemberAccess", - "src": "5532:8:51", + "src": "6608:8:38", "typeDescriptions": { "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } }, - "id": 49231, + "id": 46960, "isConstant": false, "isLValue": false, "isPure": false, @@ -5744,14 +5993,14 @@ "expression": { "arguments": [ { - "id": 49228, + "id": 46957, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, - "src": "5556:4:51", + "src": "6632:4:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } } @@ -5759,30 +6008,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } ], - "id": 49227, + "id": 46956, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5548:7:51", + "src": "6624:7:38", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 49226, + "id": 46955, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5548:7:51", + "src": "6624:7:38", "typeDescriptions": {} } }, - "id": 49229, + "id": 46958, "isConstant": false, "isLValue": false, "isPure": false, @@ -5791,35 +6040,35 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5548:13:51", + "src": "6624:13:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 49230, + "id": 46959, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "5562:7:51", + "memberLocation": "6638:7:38", "memberName": "balance", "nodeType": "MemberAccess", - "src": "5548:21:51", + "src": "6624:21:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "src": "5532:38:51", + "src": "6608:38:38", "typeDescriptions": { "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", "typeString": "function (bytes memory) payable returns (bool,bytes memory)" } }, - "id": 49233, + "id": 46962, "isConstant": false, "isLValue": false, "isPure": false, @@ -5828,7 +6077,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5532:42:51", + "src": "6608:42:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", @@ -5836,11 +6085,11 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "5514:60:51" + "src": "6590:60:38" }, { "condition": { - "id": 49236, + "id": 46965, "isConstant": false, "isLValue": false, "isPure": false, @@ -5848,14 +6097,14 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "5592:8:51", + "src": "6668:8:38", "subExpression": { - "id": 49235, + "id": 46964, "name": "success", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49223, - "src": "5593:7:51", + "referencedDeclaration": 46952, + "src": "6669:7:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5866,26 +6115,26 @@ "typeString": "bool" } }, - "id": 49240, + "id": 46969, "nodeType": "IfStatement", - "src": "5588:40:51", + "src": "6664:40:38", "trueBody": { "errorCall": { "arguments": [], "expression": { "argumentTypes": [], - "id": 49237, + "id": 46966, "name": "EthTransferFailed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48877, - "src": "5609:17:51", + "referencedDeclaration": 46217, + "src": "6685:17:38", "typeDescriptions": { "typeIdentifier": "t_function_error_pure$__$returns$__$", "typeString": "function () pure" } }, - "id": 49238, + "id": 46967, "isConstant": false, "isLValue": false, "isPure": false, @@ -5894,39 +6143,39 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5609:19:51", + "src": "6685:19:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 49239, + "id": 46968, "nodeType": "RevertStatement", - "src": "5602:26:51" + "src": "6678:26:38" } } ] } }, - "id": 49270, + "id": 46999, "nodeType": "IfStatement", - "src": "5310:624:51", + "src": "6143:1133:38", "trueBody": { - "id": 49215, + "id": 46944, "nodeType": "Block", - "src": "5356:105:51", + "src": "6189:218:38", "statements": [ { "expression": { "arguments": [ { - "id": 49203, + "id": 46932, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49186, - "src": "5394:3:51", + "referencedDeclaration": 46918, + "src": "6340:3:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5937,7 +6186,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 49212, + "id": 46941, "isConstant": false, "isLValue": false, "isPure": false, @@ -5947,14 +6196,14 @@ { "arguments": [ { - "id": 49208, + "id": 46937, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, - "src": "5432:4:51", + "src": "6378:4:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } } @@ -5962,30 +6211,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } ], - "id": 49207, + "id": 46936, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5424:7:51", + "src": "6370:7:38", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 49206, + "id": 46935, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5424:7:51", + "src": "6370:7:38", "typeDescriptions": {} } }, - "id": 49209, + "id": 46938, "isConstant": false, "isLValue": false, "isPure": false, @@ -5994,7 +6243,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5424:13:51", + "src": "6370:13:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", @@ -6010,33 +6259,33 @@ } ], "expression": { - "id": 49204, + "id": 46933, "name": "CURRENCY_TOKEN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49016, - "src": "5399:14:51", + "referencedDeclaration": 46700, + "src": "6345:14:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", + "typeIdentifier": "t_contract$_Currency_$46042", "typeString": "contract Currency" } }, - "id": 49205, + "id": 46934, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "5414:9:51", + "memberLocation": "6360:9:38", "memberName": "balanceOf", "nodeType": "MemberAccess", - "referencedDeclaration": 44029, - "src": "5399:24:51", + "referencedDeclaration": 44502, + "src": "6345:24:38", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, - "id": 49210, + "id": 46939, "isConstant": false, "isLValue": false, "isPure": false, @@ -6045,7 +6294,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5399:39:51", + "src": "6345:39:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -6055,18 +6304,18 @@ "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { - "id": 49211, + "id": 46940, "name": "paidFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49025, - "src": "5441:8:51", + "referencedDeclaration": 46716, + "src": "6387:8:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5399:50:51", + "src": "6345:50:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6085,33 +6334,33 @@ } ], "expression": { - "id": 49200, + "id": 46929, "name": "CURRENCY_TOKEN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49016, - "src": "5370:14:51", + "referencedDeclaration": 46700, + "src": "6316:14:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", + "typeIdentifier": "t_contract$_Currency_$46042", "typeString": "contract Currency" } }, - "id": 49202, + "id": 46931, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "5385:8:51", + "memberLocation": "6331:8:38", "memberName": "transfer", "nodeType": "MemberAccess", - "referencedDeclaration": 44053, - "src": "5370:23:51", + "referencedDeclaration": 44556, + "src": "6316:23:38", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, - "id": 49213, + "id": 46942, "isConstant": false, "isLValue": false, "isPure": false, @@ -6120,16 +6369,16 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5370:80:51", + "src": "6316:80:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 49214, + "id": 46943, "nodeType": "ExpressionStatement", - "src": "5370:80:51" + "src": "6316:80:38" } ] } @@ -6137,9 +6386,9 @@ ] }, "documentation": { - "id": 49182, + "id": 46914, "nodeType": "StructuredDocumentation", - "src": "4227:958:51", + "src": "5089:958:38", "text": " @notice Used to recover `all` tokens and eth `possible` without affecting collateral reserves or unwithdrawn interest\n @param _tokenAddress address of token to recover. if it is eth, address(0) is expected\n @param _to address to send the recovered tokens to\n @dev if `_tokenAddress` is address(0), send all eth in this contract to `_to`\n else if `_tokenAddress` is this vaults `CURRENCY_TOKEN`, send balance of this address of that token minus the paidFees (i.e unwithdrawn paid fees)\n else (this means this token can/might be a collateral), send the balance of this address of that token minus the `totalDepositedCollateral` of it as a collateral\n @dev reverts if `_tokenAddress` is address(0) i.e eth, and `_to` is a contract that has no non reverting way to accept eth\n reverts if `_tokenAddress` is not `CURRENCY_TOKEN` and not `address(0) but is a contract" }, "functionSelector": "feaea586", @@ -6147,63 +6396,35 @@ "kind": "function", "modifiers": [ { - "id": 49189, + "id": 46921, "kind": "modifierInvocation", "modifierName": { - "id": 49188, + "id": 46920, "name": "whenNotPaused", - "nameLocations": ["5257:13:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "5257:13:51" - }, - "nodeType": "ModifierInvocation", - "src": "5257:13:51" - }, - { - "arguments": [ - { - "id": 49191, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "5280:18:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 49192, - "kind": "modifierInvocation", - "modifierName": { - "id": 49190, - "name": "onlyRole", - "nameLocations": ["5271:8:51"], + "nameLocations": ["6119:13:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "5271:8:51" + "referencedDeclaration": 46075, + "src": "6119:13:38" }, "nodeType": "ModifierInvocation", - "src": "5271:28:51" + "src": "6119:13:38" } ], "name": "recoverToken", - "nameLocation": "5199:12:51", + "nameLocation": "6061:12:38", "parameters": { - "id": 49187, + "id": 46919, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49184, + "id": 46916, "mutability": "mutable", "name": "_tokenAddress", - "nameLocation": "5220:13:51", + "nameLocation": "6082:13:38", "nodeType": "VariableDeclaration", - "scope": 49272, - "src": "5212:21:51", + "scope": 47001, + "src": "6074:21:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6211,10 +6432,10 @@ "typeString": "address" }, "typeName": { - "id": 49183, + "id": 46915, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5212:7:51", + "src": "6074:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -6225,13 +6446,13 @@ }, { "constant": false, - "id": 49186, + "id": 46918, "mutability": "mutable", "name": "_to", - "nameLocation": "5243:3:51", + "nameLocation": "6105:3:38", "nodeType": "VariableDeclaration", - "scope": 49272, - "src": "5235:11:51", + "scope": 47001, + "src": "6097:11:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6239,10 +6460,10 @@ "typeString": "address" }, "typeName": { - "id": 49185, + "id": 46917, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5235:7:51", + "src": "6097:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -6252,94 +6473,94 @@ "visibility": "internal" } ], - "src": "5211:36:51" + "src": "6073:36:38" }, "returnParameters": { - "id": 49193, + "id": 46922, "nodeType": "ParameterList", "parameters": [], - "src": "5300:0:51" + "src": "6133:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 49372, + "id": 47097, "nodeType": "FunctionDefinition", - "src": "7100:1001:51", + "src": "8441:966:38", "nodes": [], "body": { - "id": 49371, + "id": 47096, "nodeType": "Block", - "src": "7392:709:51", + "src": "8719:688:38", "nodes": [], "statements": [ { - "assignments": [49296], + "assignments": [47024], "declarations": [ { "constant": false, - "id": 49296, + "id": 47024, "mutability": "mutable", "name": "_collateral", - "nameLocation": "7425:11:51", + "nameLocation": "8752:11:38", "nodeType": "VariableDeclaration", - "scope": 49371, - "src": "7402:34:51", + "scope": 47096, + "src": "8729:34:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 49295, + "id": 47023, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49294, + "id": 47022, "name": "CollateralInfo", - "nameLocations": ["7402:14:51"], + "nameLocations": ["8729:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "7402:14:51" + "referencedDeclaration": 46300, + "src": "8729:14:38" }, - "referencedDeclaration": 48954, - "src": "7402:14:51", + "referencedDeclaration": 46300, + "src": "8729:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, "visibility": "internal" } ], - "id": 49300, + "id": 47028, "initialValue": { "baseExpression": { - "id": 49297, + "id": 47025, "name": "collateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49031, - "src": "7439:17:51", + "referencedDeclaration": 46722, + "src": "8766:17:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo storage ref)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_struct$_CollateralInfo_$46300_storage_$", + "typeString": "mapping(contract ERC20Token => struct IVault.CollateralInfo storage ref)" } }, - "id": 49299, + "id": 47027, "indexExpression": { - "id": 49298, + "id": 47026, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49276, - "src": "7457:16:51", + "referencedDeclaration": 47005, + "src": "8784:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -6347,64 +6568,114 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7439:35:51", + "src": "8766:35:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage", "typeString": "struct IVault.CollateralInfo storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "7402:72:51" + "src": "8729:72:38" }, { "condition": { - "expression": { - "id": 49301, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49296, - "src": "7488:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 49302, + "id": 47033, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "7500:6:51", - "memberName": "exists", - "nodeType": "MemberAccess", - "referencedDeclaration": 48953, - "src": "7488:18:51", + "leftExpression": { + "expression": { + "expression": { + "id": 47029, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47024, + "src": "8815:11:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + } + }, + "id": 47030, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8827:8:38", + "memberName": "rateInfo", + "nodeType": "MemberAccess", + "referencedDeclaration": 46291, + "src": "8815:20:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" + } + }, + "id": 47031, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8836:4:38", + "memberName": "rate", + "nodeType": "MemberAccess", + "referencedDeclaration": 46275, + "src": "8815:25:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 47032, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8844:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8815:30:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 49306, + "id": 47037, "nodeType": "IfStatement", - "src": "7484:56:51", + "src": "8811:68:38", "trueBody": { "errorCall": { "arguments": [], "expression": { "argumentTypes": [], - "id": 49303, + "id": 47034, "name": "CollateralAlreadyExists", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48867, - "src": "7515:23:51", + "referencedDeclaration": 46207, + "src": "8854:23:38", "typeDescriptions": { "typeIdentifier": "t_function_error_pure$__$returns$__$", "typeString": "function () pure" } }, - "id": 49304, + "id": 47035, "isConstant": false, "isLValue": false, "isPure": false, @@ -6413,21 +6684,21 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "7515:25:51", + "src": "8854:25:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 49305, + "id": 47036, "nodeType": "RevertStatement", - "src": "7508:32:51" + "src": "8847:32:38" } }, { "expression": { - "id": 49313, + "id": 47044, "isConstant": false, "isLValue": false, "isPure": false, @@ -6435,42 +6706,42 @@ "leftHandSide": { "expression": { "expression": { - "id": 49307, + "id": 47038, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49296, - "src": "7551:11:51", + "referencedDeclaration": 47024, + "src": "8890:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 49310, + "id": 47041, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "7563:8:51", + "memberLocation": "8902:8:38", "memberName": "rateInfo", "nodeType": "MemberAccess", - "referencedDeclaration": 48941, - "src": "7551:20:51", + "referencedDeclaration": 46291, + "src": "8890:20:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", "typeString": "struct IVault.RateInfo storage ref" } }, - "id": 49311, + "id": 47042, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "7572:4:51", + "memberLocation": "8911:4:38", "memberName": "rate", "nodeType": "MemberAccess", - "referencedDeclaration": 48925, - "src": "7551:25:51", + "referencedDeclaration": 46275, + "src": "8890:25:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6479,30 +6750,30 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49312, + "id": 47043, "name": "_rate", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49278, - "src": "7579:5:51", + "referencedDeclaration": 47007, + "src": "8918:5:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7551:33:51", + "src": "8890:33:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49314, + "id": 47045, "nodeType": "ExpressionStatement", - "src": "7551:33:51" + "src": "8890:33:38" }, { "expression": { - "id": 49322, + "id": 47053, "isConstant": false, "isLValue": false, "isPure": false, @@ -6510,42 +6781,42 @@ "leftHandSide": { "expression": { "expression": { - "id": 49315, + "id": 47046, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49296, - "src": "7594:11:51", + "referencedDeclaration": 47024, + "src": "8933:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 49318, + "id": 47049, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "7606:8:51", + "memberLocation": "8945:8:38", "memberName": "rateInfo", "nodeType": "MemberAccess", - "referencedDeclaration": 48941, - "src": "7594:20:51", + "referencedDeclaration": 46291, + "src": "8933:20:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", "typeString": "struct IVault.RateInfo storage ref" } }, - "id": 49319, + "id": 47050, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "7615:14:51", + "memberLocation": "8954:14:38", "memberName": "lastUpdateTime", "nodeType": "MemberAccess", - "referencedDeclaration": 48929, - "src": "7594:35:51", + "referencedDeclaration": 46279, + "src": "8933:35:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6555,71 +6826,71 @@ "operator": "=", "rightHandSide": { "expression": { - "id": 49320, + "id": 47051, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "7632:5:51", + "src": "8971:5:38", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 49321, + "id": 47052, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "7638:9:51", + "memberLocation": "8977:9:38", "memberName": "timestamp", "nodeType": "MemberAccess", - "src": "7632:15:51", + "src": "8971:15:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7594:53:51", + "src": "8933:53:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49323, + "id": 47054, "nodeType": "ExpressionStatement", - "src": "7594:53:51" + "src": "8933:53:38" }, { "expression": { - "id": 49328, + "id": 47059, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 49324, + "id": 47055, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49296, - "src": "7657:11:51", + "referencedDeclaration": 47024, + "src": "8996:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 49326, + "id": 47057, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "7669:20:51", + "memberLocation": "9008:20:38", "memberName": "liquidationThreshold", "nodeType": "MemberAccess", - "referencedDeclaration": 48936, - "src": "7657:32:51", + "referencedDeclaration": 46286, + "src": "8996:32:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6628,57 +6899,57 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49327, + "id": 47058, "name": "_liquidationThreshold", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49280, - "src": "7692:21:51", + "referencedDeclaration": 47009, + "src": "9031:21:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7657:56:51", + "src": "8996:56:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49329, + "id": 47060, "nodeType": "ExpressionStatement", - "src": "7657:56:51" + "src": "8996:56:38" }, { "expression": { - "id": 49334, + "id": 47065, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 49330, + "id": 47061, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49296, - "src": "7723:11:51", + "referencedDeclaration": 47024, + "src": "9062:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 49332, + "id": 47063, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "7735:16:51", + "memberLocation": "9074:16:38", "memberName": "liquidationBonus", "nodeType": "MemberAccess", - "referencedDeclaration": 48938, - "src": "7723:28:51", + "referencedDeclaration": 46288, + "src": "9062:28:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6687,57 +6958,57 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49333, + "id": 47064, "name": "_liquidationBonus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49282, - "src": "7754:17:51", + "referencedDeclaration": 47011, + "src": "9093:17:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7723:48:51", + "src": "9062:48:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49335, + "id": 47066, "nodeType": "ExpressionStatement", - "src": "7723:48:51" + "src": "9062:48:38" }, { "expression": { - "id": 49340, + "id": 47071, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 49336, + "id": 47067, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49296, - "src": "7781:11:51", + "referencedDeclaration": 47024, + "src": "9120:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 49338, + "id": 47069, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "7793:11:51", + "memberLocation": "9132:11:38", "memberName": "debtCeiling", "nodeType": "MemberAccess", - "referencedDeclaration": 48947, - "src": "7781:23:51", + "referencedDeclaration": 46295, + "src": "9120:23:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6746,57 +7017,57 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49339, + "id": 47070, "name": "_debtCeiling", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49284, - "src": "7807:12:51", + "referencedDeclaration": 47013, + "src": "9146:12:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7781:38:51", + "src": "9120:38:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49341, + "id": 47072, "nodeType": "ExpressionStatement", - "src": "7781:38:51" + "src": "9120:38:38" }, { "expression": { - "id": 49346, + "id": 47077, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 49342, + "id": 47073, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49296, - "src": "7829:11:51", + "referencedDeclaration": 47024, + "src": "9168:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 49344, + "id": 47075, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "7841:26:51", + "memberLocation": "9180:26:38", "memberName": "collateralFloorPerPosition", "nodeType": "MemberAccess", - "referencedDeclaration": 48949, - "src": "7829:38:51", + "referencedDeclaration": 46297, + "src": "9168:38:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6805,57 +7076,57 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49345, + "id": 47076, "name": "_collateralFloorPerPosition", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49286, - "src": "7870:27:51", + "referencedDeclaration": 47015, + "src": "9209:27:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7829:68:51", + "src": "9168:68:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49347, + "id": 47078, "nodeType": "ExpressionStatement", - "src": "7829:68:51" + "src": "9168:68:38" }, { "expression": { - "id": 49356, + "id": 47087, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 49348, + "id": 47079, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49296, - "src": "7907:11:51", + "referencedDeclaration": 47024, + "src": "9246:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 49350, + "id": 47081, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "7919:29:51", + "memberLocation": "9258:29:38", "memberName": "additionalCollateralPrecision", "nodeType": "MemberAccess", - "referencedDeclaration": 48951, - "src": "7907:41:51", + "referencedDeclaration": 46299, + "src": "9246:41:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6868,18 +7139,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 49355, + "id": 47086, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 49351, - "name": "PRECISION_DEGREE", + "id": 47082, + "name": "MAX_TOKEN_DECIMALS", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49002, - "src": "7951:16:51", + "referencedDeclaration": 46678, + "src": "9290:18:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6892,33 +7163,33 @@ "expression": { "argumentTypes": [], "expression": { - "id": 49352, + "id": 47083, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49276, - "src": "7970:16:51", + "referencedDeclaration": 47005, + "src": "9311:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, - "id": 49353, + "id": 47084, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "7987:8:51", + "memberLocation": "9328:8:38", "memberName": "decimals", "nodeType": "MemberAccess", - "referencedDeclaration": 44007, - "src": "7970:25:51", + "referencedDeclaration": 46368, + "src": "9311:25:38", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", "typeString": "function () view external returns (uint8)" } }, - "id": 49354, + "id": 47085, "isConstant": false, "isLValue": false, "isPure": false, @@ -6927,91 +7198,28 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "7970:27:51", + "src": "9311:27:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "src": "7951:46:51", + "src": "9290:48:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7907:90:51", + "src": "9246:92:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49357, + "id": 47088, "nodeType": "ExpressionStatement", - "src": "7907:90:51" - }, - { - "expression": { - "id": 49362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "id": 49358, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49296, - "src": "8007:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - }, - "id": 49360, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "8019:6:51", - "memberName": "exists", - "nodeType": "MemberAccess", - "referencedDeclaration": 48953, - "src": "8007:18:51", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 49361, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8028:4:51", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "8007:25:51", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 49363, - "nodeType": "ExpressionStatement", - "src": "8007:25:51" + "src": "9246:92:38" }, { "eventCall": { @@ -7019,45 +7227,45 @@ { "arguments": [ { - "id": 49367, + "id": 47092, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49276, - "src": "8076:16:51", + "referencedDeclaration": 47005, + "src": "9382:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } ], - "id": 49366, + "id": 47091, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "8068:7:51", + "src": "9374:7:38", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 49365, + "id": 47090, "name": "address", "nodeType": "ElementaryTypeName", - "src": "8068:7:51", + "src": "9374:7:38", "typeDescriptions": {} } }, - "id": 49368, + "id": 47093, "isConstant": false, "isLValue": false, "isPure": false, @@ -7066,7 +7274,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "8068:25:51", + "src": "9374:25:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", @@ -7081,18 +7289,18 @@ "typeString": "address" } ], - "id": 49364, + "id": 47089, "name": "CollateralTypeAdded", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48881, - "src": "8048:19:51", + "referencedDeclaration": 46231, + "src": "9354:19:38", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 49369, + "id": 47094, "isConstant": false, "isLValue": false, "isPure": false, @@ -7101,122 +7309,108 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "8048:46:51", + "src": "9354:46:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 49370, + "id": 47095, "nodeType": "EmitStatement", - "src": "8043:51:51" + "src": "9349:51:38" } ] }, "documentation": { - "id": 49273, + "id": 47002, "nodeType": "StructuredDocumentation", - "src": "5946:1149:51", - "text": " @notice Creates a collateral type that'll be accepted by the system\n @param _collateralToken contract address of the token to add\n @param _rate value to set as the collateral rate (per second) for the collateral, should be denominated in 1e18 where 1e18 is 100%\n @param _liquidationThreshold value to set as the liquidation threshold of the collateral, should be denominated in 1e18 where 1e18 is 100%\n @param _liquidationBonus value to set as the liquidation bonus of the collateral, used to incentivize liquidators, should be denominated in 1e18 where 1e18 is 100%\n @param _debtCeiling value to set as the debt ceiling of the collateral, used to limit risk by capping borrowable amount of currency backed by the given collateral\n @param _collateralFloorPerPosition value to set as the minimum amount of this collateral that can be borrowed against\n @dev should revert if contract is paused\n should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role\n should revert if the collateral already exists, i.e if _collateral.exists returns true" + "src": "7288:1148:38", + "text": " @notice Creates a collateral type that'll be accepted by the system\n @param _collateralToken contract address of the token to add\n @param _rate value to set as the collateral rate (per second) for the collateral, should be denominated in 1e18 where 1e18 is 100%\n @param _liquidationThreshold value to set as the liquidation threshold of the collateral, should be denominated in 1e18 where 1e18 is 100%\n @param _liquidationBonus value to set as the liquidation bonus of the collateral, used to incentivize liquidators, should be denominated in 1e18 where 1e18 is 100%\n @param _debtCeiling value to set as the debt ceiling of the collateral, used to limit risk by capping borrowable amount of currency backed by the given collateral\n @param _collateralFloorPerPosition value to set as the minimum amount of this collateral that can be borrowed against\n @dev should revert if contract is paused\n should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role\n should revert if the collateral already exists, i.e if _collateral.rateInfo.rate == 0" }, "functionSelector": "645ba425", "implemented": true, "kind": "function", "modifiers": [ { - "id": 49289, + "id": 47018, "kind": "modifierInvocation", "modifierName": { - "id": 49288, + "id": 47017, "name": "whenNotPaused", - "nameLocations": ["7349:13:51"], + "nameLocations": ["8695:13:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "7349:13:51" + "referencedDeclaration": 46075, + "src": "8695:13:38" }, "nodeType": "ModifierInvocation", - "src": "7349:13:51" + "src": "8695:13:38" }, { - "arguments": [ - { - "id": 49291, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "7372:18:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 49292, + "id": 47020, "kind": "modifierInvocation", "modifierName": { - "id": 49290, - "name": "onlyRole", - "nameLocations": ["7363:8:51"], + "id": 47019, + "name": "onlyOwner", + "nameLocations": ["8709:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "7363:8:51" + "referencedDeclaration": 44380, + "src": "8709:9:38" }, "nodeType": "ModifierInvocation", - "src": "7363:28:51" + "src": "8709:9:38" } ], "name": "createCollateralType", - "nameLocation": "7109:20:51", + "nameLocation": "8450:20:38", "parameters": { - "id": 49287, + "id": 47016, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49276, + "id": 47005, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "7145:16:51", + "nameLocation": "8491:16:38", "nodeType": "VariableDeclaration", - "scope": 49372, - "src": "7139:22:51", + "scope": 47097, + "src": "8480:27:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 49275, + "id": 47004, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49274, - "name": "ERC20", - "nameLocations": ["7139:5:51"], + "id": 47003, + "name": "ERC20Token", + "nameLocations": ["8480:10:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "7139:5:51" + "referencedDeclaration": 46438, + "src": "8480:10:38" }, - "referencedDeclaration": 44443, - "src": "7139:5:51", + "referencedDeclaration": 46438, + "src": "8480:10:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 49278, + "id": 47007, "mutability": "mutable", "name": "_rate", - "nameLocation": "7179:5:51", + "nameLocation": "8525:5:38", "nodeType": "VariableDeclaration", - "scope": 49372, - "src": "7171:13:51", + "scope": 47097, + "src": "8517:13:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7224,10 +7418,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49277, + "id": 47006, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "7171:7:51", + "src": "8517:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7237,13 +7431,13 @@ }, { "constant": false, - "id": 49280, + "id": 47009, "mutability": "mutable", "name": "_liquidationThreshold", - "nameLocation": "7202:21:51", + "nameLocation": "8548:21:38", "nodeType": "VariableDeclaration", - "scope": 49372, - "src": "7194:29:51", + "scope": 47097, + "src": "8540:29:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7251,10 +7445,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49279, + "id": 47008, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "7194:7:51", + "src": "8540:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7264,13 +7458,13 @@ }, { "constant": false, - "id": 49282, + "id": 47011, "mutability": "mutable", "name": "_liquidationBonus", - "nameLocation": "7241:17:51", + "nameLocation": "8587:17:38", "nodeType": "VariableDeclaration", - "scope": 49372, - "src": "7233:25:51", + "scope": 47097, + "src": "8579:25:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7278,10 +7472,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49281, + "id": 47010, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "7233:7:51", + "src": "8579:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7291,13 +7485,13 @@ }, { "constant": false, - "id": 49284, + "id": 47013, "mutability": "mutable", "name": "_debtCeiling", - "nameLocation": "7276:12:51", + "nameLocation": "8622:12:38", "nodeType": "VariableDeclaration", - "scope": 49372, - "src": "7268:20:51", + "scope": 47097, + "src": "8614:20:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7305,10 +7499,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49283, + "id": 47012, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "7268:7:51", + "src": "8614:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7318,13 +7512,13 @@ }, { "constant": false, - "id": 49286, + "id": 47015, "mutability": "mutable", "name": "_collateralFloorPerPosition", - "nameLocation": "7306:27:51", + "nameLocation": "8652:27:38", "nodeType": "VariableDeclaration", - "scope": 49372, - "src": "7298:35:51", + "scope": 47097, + "src": "8644:35:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7332,10 +7526,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49285, + "id": 47014, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "7298:7:51", + "src": "8644:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7344,94 +7538,94 @@ "visibility": "internal" } ], - "src": "7129:210:51" + "src": "8470:215:38" }, "returnParameters": { - "id": 49293, + "id": 47021, "nodeType": "ParameterList", "parameters": [], - "src": "7392:0:51" + "src": "8719:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 49452, + "id": 47202, "nodeType": "FunctionDefinition", - "src": "8729:875:51", + "src": "10035:1528:38", "nodes": [], "body": { - "id": 49451, + "id": 47201, "nodeType": "Block", - "src": "8950:654:51", + "src": "10242:1321:38", "nodes": [], "statements": [ { - "assignments": [49394], + "assignments": [47118], "declarations": [ { "constant": false, - "id": 49394, + "id": 47118, "mutability": "mutable", "name": "_collateral", - "nameLocation": "8983:11:51", + "nameLocation": "10275:11:38", "nodeType": "VariableDeclaration", - "scope": 49451, - "src": "8960:34:51", + "scope": 47201, + "src": "10252:34:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 49393, + "id": 47117, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49392, + "id": 47116, "name": "CollateralInfo", - "nameLocations": ["8960:14:51"], + "nameLocations": ["10252:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "8960:14:51" + "referencedDeclaration": 46300, + "src": "10252:14:38" }, - "referencedDeclaration": 48954, - "src": "8960:14:51", + "referencedDeclaration": 46300, + "src": "10252:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, "visibility": "internal" } ], - "id": 49398, + "id": 47122, "initialValue": { "baseExpression": { - "id": 49395, + "id": 47119, "name": "collateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49031, - "src": "8997:17:51", + "referencedDeclaration": 46722, + "src": "10289:17:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo storage ref)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_struct$_CollateralInfo_$46300_storage_$", + "typeString": "mapping(contract ERC20Token => struct IVault.CollateralInfo storage ref)" } }, - "id": 49397, + "id": 47121, "indexExpression": { - "id": 49396, + "id": 47120, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49376, - "src": "9015:16:51", + "referencedDeclaration": 47101, + "src": "10307:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -7439,35 +7633,35 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "8997:35:51", + "src": "10289:35:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage", "typeString": "struct IVault.CollateralInfo storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "8960:72:51" + "src": "10252:72:38" }, { "condition": { "commonType": { - "typeIdentifier": "t_enum$_ModifiableParameters_$48968", + "typeIdentifier": "t_enum$_ModifiableParameters_$46315", "typeString": "enum IVault.ModifiableParameters" }, - "id": 49402, + "id": 47126, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 49399, + "id": 47123, "name": "_param", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49379, - "src": "9047:6:51", + "referencedDeclaration": 47104, + "src": "10339:6:38", "typeDescriptions": { - "typeIdentifier": "t_enum$_ModifiableParameters_$48968", + "typeIdentifier": "t_enum$_ModifiableParameters_$46315", "typeString": "enum IVault.ModifiableParameters" } }, @@ -7475,33 +7669,33 @@ "operator": "==", "rightExpression": { "expression": { - "id": 49400, + "id": 47124, "name": "ModifiableParameters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48968, - "src": "9057:20:51", + "referencedDeclaration": 46315, + "src": "10349:20:38", "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ModifiableParameters_$48968_$", + "typeIdentifier": "t_type$_t_enum$_ModifiableParameters_$46315_$", "typeString": "type(enum IVault.ModifiableParameters)" } }, - "id": 49401, + "id": 47125, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "memberLocation": "9078:12:51", - "memberName": "DEBT_CEILING", + "memberLocation": "10370:4:38", + "memberName": "RATE", "nodeType": "MemberAccess", - "referencedDeclaration": 48964, - "src": "9057:33:51", + "referencedDeclaration": 46310, + "src": "10349:25:38", "typeDescriptions": { - "typeIdentifier": "t_enum$_ModifiableParameters_$48968", + "typeIdentifier": "t_enum$_ModifiableParameters_$46315", "typeString": "enum IVault.ModifiableParameters" } }, - "src": "9047:43:51", + "src": "10339:35:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -7510,23 +7704,23 @@ "falseBody": { "condition": { "commonType": { - "typeIdentifier": "t_enum$_ModifiableParameters_$48968", + "typeIdentifier": "t_enum$_ModifiableParameters_$46315", "typeString": "enum IVault.ModifiableParameters" }, - "id": 49413, + "id": 47160, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 49410, + "id": 47157, "name": "_param", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49379, - "src": "9158:6:51", + "referencedDeclaration": 47104, + "src": "11048:6:38", "typeDescriptions": { - "typeIdentifier": "t_enum$_ModifiableParameters_$48968", + "typeIdentifier": "t_enum$_ModifiableParameters_$46315", "typeString": "enum IVault.ModifiableParameters" } }, @@ -7534,33 +7728,33 @@ "operator": "==", "rightExpression": { "expression": { - "id": 49411, + "id": 47158, "name": "ModifiableParameters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48968, - "src": "9168:20:51", + "referencedDeclaration": 46315, + "src": "11058:20:38", "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ModifiableParameters_$48968_$", + "typeIdentifier": "t_type$_t_enum$_ModifiableParameters_$46315_$", "typeString": "type(enum IVault.ModifiableParameters)" } }, - "id": 49412, + "id": 47159, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "memberLocation": "9189:29:51", - "memberName": "COLLATERAL_FLOOR_PER_POSITION", + "memberLocation": "11079:12:38", + "memberName": "DEBT_CEILING", "nodeType": "MemberAccess", - "referencedDeclaration": 48965, - "src": "9168:50:51", + "referencedDeclaration": 46311, + "src": "11058:33:38", "typeDescriptions": { - "typeIdentifier": "t_enum$_ModifiableParameters_$48968", + "typeIdentifier": "t_enum$_ModifiableParameters_$46315", "typeString": "enum IVault.ModifiableParameters" } }, - "src": "9158:60:51", + "src": "11048:43:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -7569,23 +7763,23 @@ "falseBody": { "condition": { "commonType": { - "typeIdentifier": "t_enum$_ModifiableParameters_$48968", + "typeIdentifier": "t_enum$_ModifiableParameters_$46315", "typeString": "enum IVault.ModifiableParameters" }, - "id": 49424, + "id": 47171, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 49421, + "id": 47168, "name": "_param", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49379, - "src": "9301:6:51", + "referencedDeclaration": 47104, + "src": "11159:6:38", "typeDescriptions": { - "typeIdentifier": "t_enum$_ModifiableParameters_$48968", + "typeIdentifier": "t_enum$_ModifiableParameters_$46315", "typeString": "enum IVault.ModifiableParameters" } }, @@ -7593,33 +7787,33 @@ "operator": "==", "rightExpression": { "expression": { - "id": 49422, + "id": 47169, "name": "ModifiableParameters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48968, - "src": "9311:20:51", + "referencedDeclaration": 46315, + "src": "11169:20:38", "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ModifiableParameters_$48968_$", + "typeIdentifier": "t_type$_t_enum$_ModifiableParameters_$46315_$", "typeString": "type(enum IVault.ModifiableParameters)" } }, - "id": 49423, + "id": 47170, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "memberLocation": "9332:17:51", - "memberName": "LIQUIDATION_BONUS", + "memberLocation": "11190:29:38", + "memberName": "COLLATERAL_FLOOR_PER_POSITION", "nodeType": "MemberAccess", - "referencedDeclaration": 48966, - "src": "9311:38:51", + "referencedDeclaration": 46312, + "src": "11169:50:38", "typeDescriptions": { - "typeIdentifier": "t_enum$_ModifiableParameters_$48968", + "typeIdentifier": "t_enum$_ModifiableParameters_$46315", "typeString": "enum IVault.ModifiableParameters" } }, - "src": "9301:48:51", + "src": "11159:60:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -7628,23 +7822,23 @@ "falseBody": { "condition": { "commonType": { - "typeIdentifier": "t_enum$_ModifiableParameters_$48968", + "typeIdentifier": "t_enum$_ModifiableParameters_$46315", "typeString": "enum IVault.ModifiableParameters" }, - "id": 49435, + "id": 47182, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 49432, + "id": 47179, "name": "_param", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49379, - "src": "9422:6:51", + "referencedDeclaration": 47104, + "src": "11302:6:38", "typeDescriptions": { - "typeIdentifier": "t_enum$_ModifiableParameters_$48968", + "typeIdentifier": "t_enum$_ModifiableParameters_$46315", "typeString": "enum IVault.ModifiableParameters" } }, @@ -7652,119 +7846,142 @@ "operator": "==", "rightExpression": { "expression": { - "id": 49433, + "id": 47180, "name": "ModifiableParameters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48968, - "src": "9432:20:51", + "referencedDeclaration": 46315, + "src": "11312:20:38", "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ModifiableParameters_$48968_$", + "typeIdentifier": "t_type$_t_enum$_ModifiableParameters_$46315_$", "typeString": "type(enum IVault.ModifiableParameters)" } }, - "id": 49434, + "id": 47181, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "memberLocation": "9453:21:51", - "memberName": "LIQUIDATION_THRESHOLD", + "memberLocation": "11333:17:38", + "memberName": "LIQUIDATION_BONUS", "nodeType": "MemberAccess", - "referencedDeclaration": 48967, - "src": "9432:42:51", + "referencedDeclaration": 46313, + "src": "11312:38:38", "typeDescriptions": { - "typeIdentifier": "t_enum$_ModifiableParameters_$48968", + "typeIdentifier": "t_enum$_ModifiableParameters_$46315", "typeString": "enum IVault.ModifiableParameters" } }, - "src": "9422:52:51", + "src": "11302:48:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 49446, + "id": 47196, "nodeType": "Block", - "src": "9547:51:51", + "src": "11419:138:38", "statements": [ { - "errorCall": { - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 49443, - "name": "UnrecognizedParam", + "expression": { + "id": 47194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 47190, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47118, + "src": "11506:11:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + } + }, + "id": 47192, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "11518:20:38", + "memberName": "liquidationThreshold", + "nodeType": "MemberAccess", + "referencedDeclaration": 46286, + "src": "11506:32:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 47193, + "name": "_data", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48857, - "src": "9568:17:51", + "referencedDeclaration": 47106, + "src": "11541:5:38", "typeDescriptions": { - "typeIdentifier": "t_function_error_pure$__$returns$__$", - "typeString": "function () pure" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 49444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "9568:19:51", - "tryCall": false, + "src": "11506:40:38", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 49445, - "nodeType": "RevertStatement", - "src": "9561:26:51" + "id": 47195, + "nodeType": "ExpressionStatement", + "src": "11506:40:38" } ] }, - "id": 49447, + "id": 47197, "nodeType": "IfStatement", - "src": "9418:180:51", + "src": "11298:259:38", "trueBody": { - "id": 49442, + "id": 47189, "nodeType": "Block", - "src": "9476:65:51", + "src": "11352:61:38", "statements": [ { "expression": { - "id": 49440, + "id": 47187, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 49436, + "id": 47183, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49394, - "src": "9490:11:51", + "referencedDeclaration": 47118, + "src": "11366:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 49438, + "id": 47185, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "9502:20:51", - "memberName": "liquidationThreshold", + "memberLocation": "11378:16:38", + "memberName": "liquidationBonus", "nodeType": "MemberAccess", - "referencedDeclaration": 48936, - "src": "9490:32:51", + "referencedDeclaration": 46288, + "src": "11366:28:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7773,68 +7990,68 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49439, + "id": 47186, "name": "_data", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49381, - "src": "9525:5:51", + "referencedDeclaration": 47106, + "src": "11397:5:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "9490:40:51", + "src": "11366:36:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49441, + "id": 47188, "nodeType": "ExpressionStatement", - "src": "9490:40:51" + "src": "11366:36:38" } ] } }, - "id": 49448, + "id": 47198, "nodeType": "IfStatement", - "src": "9297:301:51", + "src": "11155:402:38", "trueBody": { - "id": 49431, + "id": 47178, "nodeType": "Block", - "src": "9351:61:51", + "src": "11221:71:38", "statements": [ { "expression": { - "id": 49429, + "id": 47176, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 49425, + "id": 47172, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49394, - "src": "9365:11:51", + "referencedDeclaration": 47118, + "src": "11235:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 49427, + "id": 47174, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "9377:16:51", - "memberName": "liquidationBonus", + "memberLocation": "11247:26:38", + "memberName": "collateralFloorPerPosition", "nodeType": "MemberAccess", - "referencedDeclaration": 48938, - "src": "9365:28:51", + "referencedDeclaration": 46297, + "src": "11235:38:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7843,68 +8060,68 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49428, + "id": 47175, "name": "_data", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49381, - "src": "9396:5:51", + "referencedDeclaration": 47106, + "src": "11276:5:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "9365:36:51", + "src": "11235:46:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49430, + "id": 47177, "nodeType": "ExpressionStatement", - "src": "9365:36:51" + "src": "11235:46:38" } ] } }, - "id": 49449, + "id": 47199, "nodeType": "IfStatement", - "src": "9154:444:51", + "src": "11044:513:38", "trueBody": { - "id": 49420, + "id": 47167, "nodeType": "Block", - "src": "9220:71:51", + "src": "11093:56:38", "statements": [ { "expression": { - "id": 49418, + "id": 47165, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 49414, + "id": 47161, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49394, - "src": "9234:11:51", + "referencedDeclaration": 47118, + "src": "11107:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 49416, + "id": 47163, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "9246:26:51", - "memberName": "collateralFloorPerPosition", + "memberLocation": "11119:11:38", + "memberName": "debtCeiling", "nodeType": "MemberAccess", - "referencedDeclaration": 48949, - "src": "9234:38:51", + "referencedDeclaration": 46295, + "src": "11107:23:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7913,68 +8130,319 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49417, + "id": 47164, "name": "_data", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49381, - "src": "9275:5:51", + "referencedDeclaration": 47106, + "src": "11133:5:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "9234:46:51", + "src": "11107:31:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49419, + "id": 47166, "nodeType": "ExpressionStatement", - "src": "9234:46:51" + "src": "11107:31:38" } ] } }, - "id": 49450, + "id": 47200, "nodeType": "IfStatement", - "src": "9043:555:51", + "src": "10335:1222:38", "trueBody": { - "id": 49409, + "id": 47156, "nodeType": "Block", - "src": "9092:56:51", + "src": "10376:662:38", "statements": [ { + "documentation": " @dev updates the last stored accumulated rate by adding accumulated rate (since _collateral.rateInfo.lastUpdateTime) to it before updating the rate, this way borrowers are charged the previous rate up until block.timestamp before being charged the new rate.\n @dev updates the last update time too for correct future updates to accumulate past rates correctly", "expression": { - "id": 49407, + "id": 47137, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 49403, - "name": "_collateral", + "expression": { + "id": 47127, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47118, + "src": "10810:11:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + } + }, + "id": 47130, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10822:8:38", + "memberName": "rateInfo", + "nodeType": "MemberAccess", + "referencedDeclaration": 46291, + "src": "10810:20:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" + } + }, + "id": 47131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "10831:15:38", + "memberName": "accumulatedRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 46277, + "src": "10810:36:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 47134, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47118, + "src": "10892:11:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + } + }, + "id": 47135, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10904:8:38", + "memberName": "rateInfo", + "nodeType": "MemberAccess", + "referencedDeclaration": 46291, + "src": "10892:20:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" + } + ], + "expression": { + "id": 47132, + "name": "rateModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46707, + "src": "10849:10:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IRate_$46191", + "typeString": "contract IRate" + } + }, + "id": 47133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10860:31:38", + "memberName": "calculateCurrentAccumulatedRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 46190, + "src": "10849:42:38", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_struct$_RateInfo_$46280_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct IVault.RateInfo memory) view external returns (uint256)" + } + }, + "id": 47136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10849:64:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10810:103:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 47138, + "nodeType": "ExpressionStatement", + "src": "10810:103:38" + }, + { + "expression": { + "id": 47146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "id": 47139, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47118, + "src": "10927:11:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + } + }, + "id": 47142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10939:8:38", + "memberName": "rateInfo", + "nodeType": "MemberAccess", + "referencedDeclaration": 46291, + "src": "10927:20:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" + } + }, + "id": 47143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "10948:14:38", + "memberName": "lastUpdateTime", + "nodeType": "MemberAccess", + "referencedDeclaration": 46279, + "src": "10927:35:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 47144, + "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49394, - "src": "9106:11:51", + "referencedDeclaration": -4, + "src": "10965:5:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 47145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10971:9:38", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "10965:15:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10927:53:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 47147, + "nodeType": "ExpressionStatement", + "src": "10927:53:38" + }, + { + "expression": { + "id": 47154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "expression": { + "id": 47148, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47118, + "src": "10994:11:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + } + }, + "id": 47151, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11006:8:38", + "memberName": "rateInfo", + "nodeType": "MemberAccess", + "referencedDeclaration": 46291, + "src": "10994:20:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" } }, - "id": 49405, + "id": 47152, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "9118:11:51", - "memberName": "debtCeiling", + "memberLocation": "11015:4:38", + "memberName": "rate", "nodeType": "MemberAccess", - "referencedDeclaration": 48947, - "src": "9106:23:51", + "referencedDeclaration": 46275, + "src": "10994:25:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7983,26 +8451,26 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49406, + "id": 47153, "name": "_data", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49381, - "src": "9132:5:51", + "referencedDeclaration": 47106, + "src": "11022:5:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "9106:31:51", + "src": "10994:33:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49408, + "id": 47155, "nodeType": "ExpressionStatement", - "src": "9106:31:51" + "src": "10994:33:38" } ] } @@ -8010,9 +8478,9 @@ ] }, "documentation": { - "id": 49373, + "id": 47098, "nodeType": "StructuredDocumentation", - "src": "8107:617:51", + "src": "9413:617:38", "text": " @notice updates `manually updateable` parameters of an existing collateral\n @param _collateralToken contract address of the token to modify it's parameters\n @param _param contract address of the token to modify it's parameters\n @dev updates the value of the chosen parameter with `_data`\n @dev should revert if the contract is paused\n should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role\n should revert if the collateral does not exist\n should revert if `_param` is not a variant of ModifiableParameters enum" }, "functionSelector": "57b35a78", @@ -8020,147 +8488,133 @@ "kind": "function", "modifiers": [ { - "id": 49384, + "id": 47109, "kind": "modifierInvocation", "modifierName": { - "id": 49383, + "id": 47108, "name": "whenNotPaused", - "nameLocations": ["8852:13:51"], + "nameLocations": ["10163:13:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "8852:13:51" + "referencedDeclaration": 46075, + "src": "10163:13:38" }, "nodeType": "ModifierInvocation", - "src": "8852:13:51" + "src": "10163:13:38" }, { - "arguments": [ - { - "id": 49386, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "8883:18:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 49387, + "id": 47111, "kind": "modifierInvocation", "modifierName": { - "id": 49385, - "name": "onlyRole", - "nameLocations": ["8874:8:51"], + "id": 47110, + "name": "onlyOwner", + "nameLocations": ["10185:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "8874:8:51" + "referencedDeclaration": 44380, + "src": "10185:9:38" }, "nodeType": "ModifierInvocation", - "src": "8874:28:51" + "src": "10185:9:38" }, { "arguments": [ { - "id": 49389, + "id": 47113, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49376, - "src": "8928:16:51", + "referencedDeclaration": 47101, + "src": "10220:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } } ], - "id": 49390, + "id": 47114, "kind": "modifierInvocation", "modifierName": { - "id": 49388, + "id": 47112, "name": "collateralExists", - "nameLocations": ["8911:16:51"], + "nameLocations": ["10203:16:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49094, - "src": "8911:16:51" + "referencedDeclaration": 46804, + "src": "10203:16:38" }, "nodeType": "ModifierInvocation", - "src": "8911:34:51" + "src": "10203:34:38" } ], "name": "updateCollateralData", - "nameLocation": "8738:20:51", + "nameLocation": "10044:20:38", "parameters": { - "id": 49382, + "id": 47107, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49376, + "id": 47101, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "8765:16:51", + "nameLocation": "10076:16:38", "nodeType": "VariableDeclaration", - "scope": 49452, - "src": "8759:22:51", + "scope": 47202, + "src": "10065:27:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 49375, + "id": 47100, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49374, - "name": "ERC20", - "nameLocations": ["8759:5:51"], + "id": 47099, + "name": "ERC20Token", + "nameLocations": ["10065:10:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "8759:5:51" + "referencedDeclaration": 46438, + "src": "10065:10:38" }, - "referencedDeclaration": 44443, - "src": "8759:5:51", + "referencedDeclaration": 46438, + "src": "10065:10:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 49379, + "id": 47104, "mutability": "mutable", "name": "_param", - "nameLocation": "8804:6:51", + "nameLocation": "10115:6:38", "nodeType": "VariableDeclaration", - "scope": 49452, - "src": "8783:27:51", + "scope": 47202, + "src": "10094:27:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_enum$_ModifiableParameters_$48968", + "typeIdentifier": "t_enum$_ModifiableParameters_$46315", "typeString": "enum IVault.ModifiableParameters" }, "typeName": { - "id": 49378, + "id": 47103, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49377, + "id": 47102, "name": "ModifiableParameters", - "nameLocations": ["8783:20:51"], + "nameLocations": ["10094:20:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48968, - "src": "8783:20:51" + "referencedDeclaration": 46315, + "src": "10094:20:38" }, - "referencedDeclaration": 48968, - "src": "8783:20:51", + "referencedDeclaration": 46315, + "src": "10094:20:38", "typeDescriptions": { - "typeIdentifier": "t_enum$_ModifiableParameters_$48968", + "typeIdentifier": "t_enum$_ModifiableParameters_$46315", "typeString": "enum IVault.ModifiableParameters" } }, @@ -8168,13 +8622,13 @@ }, { "constant": false, - "id": 49381, + "id": 47106, "mutability": "mutable", "name": "_data", - "nameLocation": "8820:5:51", + "nameLocation": "10131:5:38", "nodeType": "VariableDeclaration", - "scope": 49452, - "src": "8812:13:51", + "scope": 47202, + "src": "10123:13:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8182,10 +8636,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49380, + "id": 47105, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8812:7:51", + "src": "10123:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8194,33 +8648,131 @@ "visibility": "internal" } ], - "src": "8758:68:51" + "src": "10064:73:38" }, "returnParameters": { - "id": 49391, + "id": 47115, "nodeType": "ParameterList", "parameters": [], - "src": "8950:0:51" + "src": "10242:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 49480, + "id": 47232, "nodeType": "FunctionDefinition", - "src": "10043:273:51", + "src": "12002:289:38", "nodes": [], "body": { - "id": 49479, + "id": 47231, "nodeType": "Block", - "src": "10240:76:51", + "src": "12158:133:38", "nodes": [], "statements": [ { - "expression": { - "id": 49477, + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 47219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 47216, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12172:3:38", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 47217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12176:6:38", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "12172:10:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 47218, + "name": "feedModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46704, + "src": "12186:10:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12172:24:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 47223, + "nodeType": "IfStatement", + "src": "12168:54:38", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 47220, + "name": "NotFeedContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46227, + "src": "12205:15:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 47221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12205:17:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 47222, + "nodeType": "RevertStatement", + "src": "12198:24:38" + } + }, + { + "expression": { + "id": 47229, "isConstant": false, "isLValue": false, "isPure": false, @@ -8228,65 +8780,28 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 49470, + "id": 47224, "name": "collateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49031, - "src": "10250:17:51", + "referencedDeclaration": 46722, + "src": "12232:17:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo storage ref)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_struct$_CollateralInfo_$46300_storage_$", + "typeString": "mapping(contract ERC20Token => struct IVault.CollateralInfo storage ref)" } }, - "id": 49474, + "id": 47226, "indexExpression": { - "arguments": [ - { - "id": 49472, - "name": "_collateralAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49455, - "src": "10274:18:51", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 49471, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 44443, - "src": "10268:5:51", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$44443_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 49473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "10268:25:51", - "tryCall": false, + "id": 47225, + "name": "_collateralAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47206, + "src": "12250:18:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -8294,22 +8809,22 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "10250:44:51", + "src": "12232:37:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage", "typeString": "struct IVault.CollateralInfo storage ref" } }, - "id": 49475, + "id": 47227, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "10295:5:51", + "memberLocation": "12270:5:38", "memberName": "price", "nodeType": "MemberAccess", - "referencedDeclaration": 48945, - "src": "10250:50:51", + "referencedDeclaration": 46293, + "src": "12232:43:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8318,33 +8833,33 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49476, + "id": 47228, "name": "_price", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49457, - "src": "10303:6:51", + "referencedDeclaration": 47208, + "src": "12278:6:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "10250:59:51", + "src": "12232:52:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49478, + "id": 47230, "nodeType": "ExpressionStatement", - "src": "10250:59:51" + "src": "12232:52:38" } ] }, "documentation": { - "id": 49453, + "id": 47203, "nodeType": "StructuredDocumentation", - "src": "9610:428:51", + "src": "11569:428:38", "text": " @notice feed contract calls this to update the price with the oracle value\n @param _collateralAddress contract address of the collateral token to update it's price\n @param _price new price\n @dev should revert if the contract is paused\n should revert if the caller does not have the `FEED_CONTRACT_ROLE` role\n should revert if the collateral does not exist" }, "functionSelector": "457972de", @@ -8352,156 +8867,98 @@ "kind": "function", "modifiers": [ { - "id": 49460, + "id": 47211, "kind": "modifierInvocation", "modifierName": { - "id": 49459, + "id": 47210, "name": "whenNotPaused", - "nameLocations": ["10133:13:51"], + "nameLocations": ["12095:13:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "10133:13:51" + "referencedDeclaration": 46075, + "src": "12095:13:38" }, "nodeType": "ModifierInvocation", - "src": "10133:13:51" + "src": "12095:13:38" }, { "arguments": [ { - "id": 49462, - "name": "FEED_CONTRACT_ROLE", + "id": 47213, + "name": "_collateralAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48994, - "src": "10164:18:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 49463, - "kind": "modifierInvocation", - "modifierName": { - "id": 49461, - "name": "onlyRole", - "nameLocations": ["10155:8:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "10155:8:51" - }, - "nodeType": "ModifierInvocation", - "src": "10155:28:51" - }, - { - "arguments": [ - { - "arguments": [ - { - "id": 49466, - "name": "_collateralAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49455, - "src": "10215:18:51", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 49465, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 44443, - "src": "10209:5:51", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$44443_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 49467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "10209:25:51", - "tryCall": false, + "referencedDeclaration": 47206, + "src": "12134:18:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } } ], - "id": 49468, + "id": 47214, "kind": "modifierInvocation", "modifierName": { - "id": 49464, + "id": 47212, "name": "collateralExists", - "nameLocations": ["10192:16:51"], + "nameLocations": ["12117:16:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49094, - "src": "10192:16:51" + "referencedDeclaration": 46804, + "src": "12117:16:38" }, "nodeType": "ModifierInvocation", - "src": "10192:43:51" + "src": "12117:36:38" } ], "name": "updatePrice", - "nameLocation": "10052:11:51", + "nameLocation": "12011:11:38", "parameters": { - "id": 49458, + "id": 47209, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49455, + "id": 47206, "mutability": "mutable", "name": "_collateralAddress", - "nameLocation": "10072:18:51", + "nameLocation": "12034:18:38", "nodeType": "VariableDeclaration", - "scope": 49480, - "src": "10064:26:51", + "scope": 47232, + "src": "12023:29:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 49454, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10064:7:51", - "stateMutability": "nonpayable", + "id": 47205, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 47204, + "name": "ERC20Token", + "nameLocations": ["12023:10:38"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46438, + "src": "12023:10:38" + }, + "referencedDeclaration": 46438, + "src": "12023:10:38", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 49457, + "id": 47208, "mutability": "mutable", "name": "_price", - "nameLocation": "10100:6:51", + "nameLocation": "12062:6:38", "nodeType": "VariableDeclaration", - "scope": 49480, - "src": "10092:14:51", + "scope": 47232, + "src": "12054:14:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8509,10 +8966,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49456, + "id": 47207, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "10092:7:51", + "src": "12054:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8521,242 +8978,172 @@ "visibility": "internal" } ], - "src": "10063:44:51" + "src": "12022:47:38" }, "returnParameters": { - "id": 49469, + "id": 47215, "nodeType": "ParameterList", "parameters": [], - "src": "10240:0:51" + "src": "12158:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 49519, + "id": 47265, "nodeType": "FunctionDefinition", - "src": "11026:306:51", + "src": "13001:274:38", "nodes": [], "body": { - "id": 49518, + "id": 47264, "nodeType": "Block", - "src": "11121:211:51", + "src": "13077:198:38", "nodes": [], "statements": [ { "expression": { - "id": 49503, + "id": 47249, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 49491, + "id": 47242, "name": "baseRateInfo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49019, - "src": "11131:12:51", + "referencedDeclaration": 46710, + "src": "13087:12:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", "typeString": "struct IVault.RateInfo storage ref" } }, - "id": 49493, + "id": 47244, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "11144:15:51", + "memberLocation": "13100:15:38", "memberName": "accumulatedRate", "nodeType": "MemberAccess", - "referencedDeclaration": 48927, - "src": "11131:28:51", + "referencedDeclaration": 46277, + "src": "13087:28:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", - "operator": "+=", + "operator": "=", "rightHandSide": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 49502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "components": [ + "arguments": [ + { + "id": 47247, + "name": "baseRateInfo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46710, + "src": "13161:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" + } + } + ], + "expression": { + "argumentTypes": [ { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 49498, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 49494, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "11164:5:51", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 49495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "11170:9:51", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "11164:15:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "expression": { - "id": 49496, - "name": "baseRateInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49019, - "src": "11182:12:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", - "typeString": "struct IVault.RateInfo storage ref" - } - }, - "id": 49497, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "11195:14:51", - "memberName": "lastUpdateTime", - "nodeType": "MemberAccess", - "referencedDeclaration": 48929, - "src": "11182:27:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11164:45:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" } ], - "id": 49499, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "11163:47:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { "expression": { - "id": 49500, - "name": "baseRateInfo", + "id": 47245, + "name": "rateModule", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49019, - "src": "11213:12:51", + "referencedDeclaration": 46707, + "src": "13118:10:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", - "typeString": "struct IVault.RateInfo storage ref" + "typeIdentifier": "t_contract$_IRate_$46191", + "typeString": "contract IRate" } }, - "id": 49501, + "id": 47246, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "11226:4:51", - "memberName": "rate", + "memberLocation": "13129:31:38", + "memberName": "calculateCurrentAccumulatedRate", "nodeType": "MemberAccess", - "referencedDeclaration": 48925, - "src": "11213:17:51", + "referencedDeclaration": 46190, + "src": "13118:42:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_external_view$_t_struct$_RateInfo_$46280_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct IVault.RateInfo memory) view external returns (uint256)" } }, - "src": "11163:67:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11131:99:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "id": 47248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13118:56:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13087:87:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 49504, + "id": 47250, "nodeType": "ExpressionStatement", - "src": "11131:99:51" + "src": "13087:87:38" }, { "expression": { - "id": 49510, + "id": 47256, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 49505, + "id": 47251, "name": "baseRateInfo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49019, - "src": "11240:12:51", + "referencedDeclaration": 46710, + "src": "13184:12:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", "typeString": "struct IVault.RateInfo storage ref" } }, - "id": 49507, + "id": 47253, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "11253:14:51", + "memberLocation": "13197:14:38", "memberName": "lastUpdateTime", "nodeType": "MemberAccess", - "referencedDeclaration": 48929, - "src": "11240:27:51", + "referencedDeclaration": 46279, + "src": "13184:27:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8766,71 +9153,71 @@ "operator": "=", "rightHandSide": { "expression": { - "id": 49508, + "id": 47254, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "11270:5:51", + "src": "13214:5:38", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 49509, + "id": 47255, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "11276:9:51", + "memberLocation": "13220:9:38", "memberName": "timestamp", "nodeType": "MemberAccess", - "src": "11270:15:51", + "src": "13214:15:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "11240:45:51", + "src": "13184:45:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49511, + "id": 47257, "nodeType": "ExpressionStatement", - "src": "11240:45:51" + "src": "13184:45:38" }, { "expression": { - "id": 49516, + "id": 47262, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 49512, + "id": 47258, "name": "baseRateInfo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49019, - "src": "11296:12:51", + "referencedDeclaration": 46710, + "src": "13239:12:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", "typeString": "struct IVault.RateInfo storage ref" } }, - "id": 49514, + "id": 47260, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "11309:4:51", + "memberLocation": "13252:4:38", "memberName": "rate", "nodeType": "MemberAccess", - "referencedDeclaration": 48925, - "src": "11296:17:51", + "referencedDeclaration": 46275, + "src": "13239:17:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8839,33 +9226,33 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49515, + "id": 47261, "name": "_baseRate", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49483, - "src": "11316:9:51", + "referencedDeclaration": 47235, + "src": "13259:9:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "11296:29:51", + "src": "13239:29:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49517, + "id": 47263, "nodeType": "ExpressionStatement", - "src": "11296:29:51" + "src": "13239:29:38" } ] }, "documentation": { - "id": 49481, + "id": 47233, "nodeType": "StructuredDocumentation", - "src": "10322:699:51", + "src": "12297:699:38", "text": " @notice updates the base rate charged for borrowing this currency\n @param _baseRate new base rate (per second), should be denominated in 1e18 where 1e18 is 100%\n @dev updates the last stored accumulated rate by adding accumulated rate (since baseRateInfo.lastUpdateTime) to it before updating the rate, this way borrowers are charged the previous rate up until block.timestamp before being charged the new rate.\n @dev updates the last update time too for correct future updates to accumulate past rates correctly\n @dev should revert if the contract is paused\n should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role" }, "functionSelector": "330283aa", @@ -8873,63 +9260,49 @@ "kind": "function", "modifiers": [ { - "id": 49486, + "id": 47238, "kind": "modifierInvocation", "modifierName": { - "id": 49485, + "id": 47237, "name": "whenNotPaused", - "nameLocations": ["11078:13:51"], + "nameLocations": ["13053:13:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "11078:13:51" + "referencedDeclaration": 46075, + "src": "13053:13:38" }, "nodeType": "ModifierInvocation", - "src": "11078:13:51" + "src": "13053:13:38" }, { - "arguments": [ - { - "id": 49488, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "11101:18:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 49489, + "id": 47240, "kind": "modifierInvocation", "modifierName": { - "id": 49487, - "name": "onlyRole", - "nameLocations": ["11092:8:51"], + "id": 47239, + "name": "onlyOwner", + "nameLocations": ["13067:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "11092:8:51" + "referencedDeclaration": 44380, + "src": "13067:9:38" }, "nodeType": "ModifierInvocation", - "src": "11092:28:51" + "src": "13067:9:38" } ], "name": "updateBaseRate", - "nameLocation": "11035:14:51", + "nameLocation": "13010:14:38", "parameters": { - "id": 49484, + "id": 47236, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49483, + "id": 47235, "mutability": "mutable", "name": "_baseRate", - "nameLocation": "11058:9:51", + "nameLocation": "13033:9:38", "nodeType": "VariableDeclaration", - "scope": 49519, - "src": "11050:17:51", + "scope": 47265, + "src": "13025:17:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8937,10 +9310,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49482, + "id": 47234, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "11050:7:51", + "src": "13025:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8949,713 +9322,692 @@ "visibility": "internal" } ], - "src": "11049:19:51" + "src": "13024:19:38" }, "returnParameters": { - "id": 49490, + "id": 47241, "nodeType": "ParameterList", "parameters": [], - "src": "11121:0:51" + "src": "13077:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 49579, + "id": 47301, "nodeType": "FunctionDefinition", - "src": "12243:533:51", + "src": "13628:307:38", "nodes": [], "body": { - "id": 49578, + "id": 47300, "nodeType": "Block", - "src": "12435:341:51", + "src": "13675:260:38", "nodes": [], "statements": [ { - "assignments": [49538], + "assignments": [47272], "declarations": [ { "constant": false, - "id": 49538, + "id": 47272, "mutability": "mutable", - "name": "_collateral", - "nameLocation": "12468:11:51", + "name": "_stabilityModule", + "nameLocation": "13693:16:38", "nodeType": "VariableDeclaration", - "scope": 49578, - "src": "12445:34:51", + "scope": 47300, + "src": "13685:24:38", "stateVariable": false, - "storageLocation": "storage", + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 49537, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 49536, - "name": "CollateralInfo", - "nameLocations": ["12445:14:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "12445:14:51" - }, - "referencedDeclaration": 48954, - "src": "12445:14:51", + "id": 47271, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13685:7:38", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo" + "typeIdentifier": "t_address", + "typeString": "address" } }, "visibility": "internal" } ], - "id": 49542, + "id": 47274, "initialValue": { - "baseExpression": { - "id": 49539, - "name": "collateralMapping", + "id": 47273, + "name": "stabilityModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46702, + "src": "13712:15:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13685:42:38" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 47280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 47275, + "name": "_stabilityModule", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49031, - "src": "12482:17:51", + "referencedDeclaration": 47272, + "src": "13741:16:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo storage ref)" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 49541, - "indexExpression": { - "id": 49540, - "name": "_collateralToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49523, - "src": "12500:16:51", + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 47278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13769:1:38", + "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": 47277, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13761:7:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 47276, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13761:7:38", + "typeDescriptions": {} + } + }, + "id": 47279, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13761:10:38", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12482:35:51", + "src": "13741:30:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage", - "typeString": "struct IVault.CollateralInfo storage ref" + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 47284, + "nodeType": "IfStatement", + "src": "13737:67:38", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 47281, + "name": "InvalidStabilityModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46225, + "src": "13780:22:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 47282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13780:24:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 47283, + "nodeType": "RevertStatement", + "src": "13773:31:38" + } + }, + { + "assignments": [47286], + "declarations": [ + { + "constant": false, + "id": 47286, + "mutability": "mutable", + "name": "_paidFees", + "nameLocation": "13823:9:38", + "nodeType": "VariableDeclaration", + "scope": 47300, + "src": "13815:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 47285, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13815:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 47288, + "initialValue": { + "id": 47287, + "name": "paidFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46716, + "src": "13835:8:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "12445:72:51" + "src": "13815:28:38" }, { "expression": { - "id": 49559, + "id": 47291, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "expression": { - "expression": { - "id": 49543, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49538, - "src": "12527:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - }, - "id": 49546, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12539:8:51", - "memberName": "rateInfo", - "nodeType": "MemberAccess", - "referencedDeclaration": 48941, - "src": "12527:20:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", - "typeString": "struct IVault.RateInfo storage ref" - } - }, - "id": 49547, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "12548:15:51", - "memberName": "accumulatedRate", - "nodeType": "MemberAccess", - "referencedDeclaration": 48927, - "src": "12527:36:51", + "id": 47289, + "name": "paidFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46716, + "src": "13853:8:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", - "operator": "+=", + "operator": "=", "rightHandSide": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 49558, + "hexValue": "30", + "id": 47290, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "number", "lValueRequested": false, - "leftExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 49553, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 49548, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "12580:5:51", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 49549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12586:9:51", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "12580:15:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "expression": { - "expression": { - "id": 49550, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49538, - "src": "12598:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - }, - "id": 49551, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12610:8:51", - "memberName": "rateInfo", - "nodeType": "MemberAccess", - "referencedDeclaration": 48941, - "src": "12598:20:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", - "typeString": "struct IVault.RateInfo storage ref" - } - }, - "id": 49552, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12619:14:51", - "memberName": "lastUpdateTime", - "nodeType": "MemberAccess", - "referencedDeclaration": 48929, - "src": "12598:35:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12580:53:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 49554, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "12579:55:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "expression": { - "expression": { - "id": 49555, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49538, - "src": "12637:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - }, - "id": 49556, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12649:8:51", - "memberName": "rateInfo", - "nodeType": "MemberAccess", - "referencedDeclaration": 48941, - "src": "12637:20:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", - "typeString": "struct IVault.RateInfo storage ref" - } - }, - "id": 49557, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12658:4:51", - "memberName": "rate", - "nodeType": "MemberAccess", - "referencedDeclaration": 48925, - "src": "12637:25:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12579:83:51", + "nodeType": "Literal", + "src": "13864:1:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "src": "12527:135:51", + "src": "13853:12:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49560, + "id": 47292, "nodeType": "ExpressionStatement", - "src": "12527:135:51" + "src": "13853:12:38" }, { "expression": { - "id": 49568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "expression": { - "id": 49561, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49538, - "src": "12672:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - }, - "id": 49564, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12684:8:51", - "memberName": "rateInfo", - "nodeType": "MemberAccess", - "referencedDeclaration": 48941, - "src": "12672:20:51", + "arguments": [ + { + "id": 47296, + "name": "_stabilityModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47272, + "src": "13900:16:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", - "typeString": "struct IVault.RateInfo storage ref" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 49565, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "12693:14:51", - "memberName": "lastUpdateTime", - "nodeType": "MemberAccess", - "referencedDeclaration": 48929, - "src": "12672:35:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + { + "id": 47297, + "name": "_paidFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47286, + "src": "13918:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], "expression": { - "id": 49566, - "name": "block", + "id": 47293, + "name": "CURRENCY_TOKEN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "12710:5:51", + "referencedDeclaration": 46700, + "src": "13876:14:38", "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" + "typeIdentifier": "t_contract$_Currency_$46042", + "typeString": "contract Currency" } }, - "id": 49567, + "id": 47295, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "12716:9:51", - "memberName": "timestamp", + "memberLocation": "13891:8:38", + "memberName": "transfer", "nodeType": "MemberAccess", - "src": "12710:15:51", + "referencedDeclaration": 44556, + "src": "13876:23:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" } }, - "src": "12672:53:51", + "id": 47298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13876:52:38", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 49569, + "id": 47299, "nodeType": "ExpressionStatement", - "src": "12672:53:51" + "src": "13876:52:38" + } + ] + }, + "documentation": { + "id": 47266, + "nodeType": "StructuredDocumentation", + "src": "13281:342:38", + "text": " @notice allows the stability module to withdraw all fees that have been paid on borrowed currency\n @dev updates the paidFees for the collateral and globally then transfers the token to the caller\n @dev should revert if the contract is paused\n @dev should revert if the stabilityModule is address(0)" + }, + "functionSelector": "476343ee", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 47269, + "kind": "modifierInvocation", + "modifierName": { + "id": 47268, + "name": "whenNotPaused", + "nameLocations": ["13661:13:38"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46075, + "src": "13661:13:38" }, + "nodeType": "ModifierInvocation", + "src": "13661:13:38" + } + ], + "name": "withdrawFees", + "nameLocation": "13637:12:38", + "parameters": { + "id": 47267, + "nodeType": "ParameterList", + "parameters": [], + "src": "13649:2:38" + }, + "returnParameters": { + "id": 47270, + "nodeType": "ParameterList", + "parameters": [], + "src": "13675:0:38" + }, + "scope": 48280, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 47319, + "nodeType": "FunctionDefinition", + "src": "14184:114:38", + "nodes": [], + "body": { + "id": 47318, + "nodeType": "Block", + "src": "14240:58:38", + "nodes": [], + "statements": [ { "expression": { - "id": 49576, + "id": 47316, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "expression": { - "expression": { - "id": 49570, - "name": "_collateral", + "baseExpression": { + "baseExpression": { + "id": 47309, + "name": "relyMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49538, - "src": "12736:11:51", + "referencedDeclaration": 46736, + "src": "14250:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 47313, + "indexExpression": { + "expression": { + "id": 47310, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14262:3:38", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 47311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14266:6:38", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "14262:10:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 49573, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "12748:8:51", - "memberName": "rateInfo", - "nodeType": "MemberAccess", - "referencedDeclaration": 48941, - "src": "12736:20:51", + "nodeType": "IndexAccess", + "src": "14250:23:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", - "typeString": "struct IVault.RateInfo storage ref" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 47314, + "indexExpression": { + "id": 47312, + "name": "_relyUpon", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47304, + "src": "14274:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 49574, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "12757:4:51", - "memberName": "rate", - "nodeType": "MemberAccess", - "referencedDeclaration": 48925, - "src": "12736:25:51", + "nodeType": "IndexAccess", + "src": "14250:34:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 49575, - "name": "_rate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49525, - "src": "12764:5:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "hexValue": "74727565", + "id": 47315, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14287:4:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" }, - "src": "12736:33:51", + "src": "14250:41:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 49577, + "id": 47317, "nodeType": "ExpressionStatement", - "src": "12736:33:51" + "src": "14250:41:38" } ] }, "documentation": { - "id": 49520, + "id": 47302, "nodeType": "StructuredDocumentation", - "src": "11338:900:51", - "text": " @notice updates the collateral rate charged for borrowing this currency against a given collateral\n @param _collateralToken contract address of collateral token to update it's collateral rate\n @param _rate new collateral rate (per second), should be denominated in 1e18 where 1e18 is 100%\n @dev updates the last stored accumulated rate by adding accumulated rate (since _collateral.rateInfo.lastUpdateTime) to it before updating the rate, this way borrowers are charged the previous rate up until block.timestamp before being charged the new rate.\n @dev updates the last update time too for correct future updates to accumulate past rates correctly\n @dev should revert if the contract is paused\n should revert if the caller does not have the `DEFAULT_ADMIN_ROLE` role\n should revert if the collateral does not exist" + "src": "13941:238:38", + "text": " @notice lets an address (the caller) approve another address to perform actions on it's (the caller's) vault\n @param _relyUpon address to rely upon\n @dev should revert if the contract is paused" }, - "functionSelector": "da3b7703", + "functionSelector": "65fae35e", "implemented": true, "kind": "function", "modifiers": [ { - "id": 49528, + "id": 47307, "kind": "modifierInvocation", "modifierName": { - "id": 49527, + "id": 47306, "name": "whenNotPaused", - "nameLocations": ["12337:13:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "12337:13:51" - }, - "nodeType": "ModifierInvocation", - "src": "12337:13:51" - }, - { - "arguments": [ - { - "id": 49530, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43417, - "src": "12368:18:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 49531, - "kind": "modifierInvocation", - "modifierName": { - "id": 49529, - "name": "onlyRole", - "nameLocations": ["12359:8:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "12359:8:51" - }, - "nodeType": "ModifierInvocation", - "src": "12359:28:51" - }, - { - "arguments": [ - { - "id": 49533, - "name": "_collateralToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49523, - "src": "12413:16:51", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" - } - } - ], - "id": 49534, - "kind": "modifierInvocation", - "modifierName": { - "id": 49532, - "name": "collateralExists", - "nameLocations": ["12396:16:51"], + "nameLocations": ["14226:13:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49094, - "src": "12396:16:51" + "referencedDeclaration": 46075, + "src": "14226:13:38" }, "nodeType": "ModifierInvocation", - "src": "12396:34:51" + "src": "14226:13:38" } ], - "name": "updateCollateralRate", - "nameLocation": "12252:20:51", + "name": "rely", + "nameLocation": "14193:4:38", "parameters": { - "id": 49526, + "id": 47305, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49523, - "mutability": "mutable", - "name": "_collateralToken", - "nameLocation": "12279:16:51", - "nodeType": "VariableDeclaration", - "scope": 49579, - "src": "12273:22:51", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" - }, - "typeName": { - "id": 49522, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 49521, - "name": "ERC20", - "nameLocations": ["12273:5:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "12273:5:51" - }, - "referencedDeclaration": 44443, - "src": "12273:5:51", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 49525, + "id": 47304, "mutability": "mutable", - "name": "_rate", - "nameLocation": "12305:5:51", + "name": "_relyUpon", + "nameLocation": "14206:9:38", "nodeType": "VariableDeclaration", - "scope": 49579, - "src": "12297:13:51", + "scope": 47319, + "src": "14198:17:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 49524, - "name": "uint256", + "id": 47303, + "name": "address", "nodeType": "ElementaryTypeName", - "src": "12297:7:51", + "src": "14198:7:38", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, "visibility": "internal" } ], - "src": "12272:39:51" + "src": "14197:19:38" }, "returnParameters": { - "id": 49535, + "id": 47308, "nodeType": "ParameterList", "parameters": [], - "src": "12435:0:51" + "src": "14240:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 49616, + "id": 47337, "nodeType": "FunctionDefinition", - "src": "13364:345:51", + "src": "14558:119:38", "nodes": [], "body": { - "id": 49615, + "id": 47336, "nodeType": "Block", - "src": "13553:156:51", + "src": "14616:61:38", "nodes": [], "statements": [ { "expression": { - "id": 49601, + "id": 47334, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "expression": { + "baseExpression": { "baseExpression": { - "id": 49596, - "name": "collateralMapping", + "id": 47327, + "name": "relyMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49031, - "src": "13563:17:51", + "referencedDeclaration": 46736, + "src": "14626:11:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo storage ref)" + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" } }, - "id": 49598, + "id": 47331, "indexExpression": { - "id": 49597, - "name": "_collateralToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49583, - "src": "13581:16:51", + "expression": { + "id": 47328, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14638:3:38", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 47329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14642:6:38", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "14638:10:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_address", + "typeString": "address" } }, "isConstant": false, @@ -9663,131 +10015,172 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "13563:35:51", + "src": "14626:23:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage", - "typeString": "struct IVault.CollateralInfo storage ref" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 47332, + "indexExpression": { + "id": 47330, + "name": "_reliedUpon", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47322, + "src": "14650:11:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 49599, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "13599:8:51", - "memberName": "paidFees", - "nodeType": "MemberAccess", - "referencedDeclaration": 48943, - "src": "13563:44:51", + "nodeType": "IndexAccess", + "src": "14626:36:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, "nodeType": "Assignment", - "operator": "-=", + "operator": "=", "rightHandSide": { - "id": 49600, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49585, - "src": "13611:7:51", + "hexValue": "66616c7365", + "id": 47333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14665:5:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" }, - "src": "13563:55:51", + "src": "14626:44:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 49602, + "id": 47335, "nodeType": "ExpressionStatement", - "src": "13563:55:51" + "src": "14626:44:38" + } + ] + }, + "documentation": { + "id": 47320, + "nodeType": "StructuredDocumentation", + "src": "14304:249:38", + "text": " @notice lets an address (the caller) remove access of another address to perform actions on it's (the caller's) vault\n @param _reliedUpon address to rely upon\n @dev should revert if the contract is paused" + }, + "functionSelector": "9c52a7f1", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 47325, + "kind": "modifierInvocation", + "modifierName": { + "id": 47324, + "name": "whenNotPaused", + "nameLocations": ["14602:13:38"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46075, + "src": "14602:13:38" }, + "nodeType": "ModifierInvocation", + "src": "14602:13:38" + } + ], + "name": "deny", + "nameLocation": "14567:4:38", + "parameters": { + "id": 47323, + "nodeType": "ParameterList", + "parameters": [ { - "expression": { - "id": 49605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 49603, - "name": "paidFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49025, - "src": "13628:8:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "id": 49604, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49585, - "src": "13640:7:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13628:19:51", + "constant": false, + "id": 47322, + "mutability": "mutable", + "name": "_reliedUpon", + "nameLocation": "14580:11:38", + "nodeType": "VariableDeclaration", + "scope": 47337, + "src": "14572:19:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 47321, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14572:7:38", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 49606, - "nodeType": "ExpressionStatement", - "src": "13628:19:51" - }, + "visibility": "internal" + } + ], + "src": "14571:21:38" + }, + "returnParameters": { + "id": 47326, + "nodeType": "ParameterList", + "parameters": [], + "src": "14616:0:38" + }, + "scope": 48280, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 47365, + "nodeType": "FunctionDefinition", + "src": "15290:331:38", + "nodes": [], + "body": { + "id": 47364, + "nodeType": "Block", + "src": "15465:156:38", + "nodes": [], + "statements": [ { - "expression": { + "eventCall": { "arguments": [ { - "expression": { - "id": 49610, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "13682:3:51", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 49611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "13686:6:51", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "13682:10:51", + "id": 47354, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47343, + "src": "15500:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 49612, + "id": 47355, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49585, - "src": "13694:7:51", + "referencedDeclaration": 47345, + "src": "15508:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9805,34 +10198,104 @@ "typeString": "uint256" } ], - "expression": { - "id": 49607, - "name": "CURRENCY_TOKEN", + "id": 47353, + "name": "CollateralDeposited", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46237, + "src": "15480:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 47356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15480:36:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 47357, + "nodeType": "EmitStatement", + "src": "15475:41:38" + }, + { + "expression": { + "arguments": [ + { + "id": 47359, + "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49016, - "src": "13658:14:51", + "referencedDeclaration": 47341, + "src": "15580:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", - "typeString": "contract Currency" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, - "id": 49609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "13673:8:51", - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 44053, - "src": "13658:23:51", + { + "id": 47360, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47343, + "src": "15598:6:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 47361, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47345, + "src": "15606:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 47358, + "name": "_depositCollateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47784, + "src": "15561:18:38", "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20Token_$46438_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract ERC20Token,address,uint256)" } }, - "id": 49613, + "id": 47362, "isConstant": false, "isLValue": false, "isPure": false, @@ -9841,150 +10304,150 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "13658:44:51", + "src": "15561:53:38", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 49614, + "id": 47363, "nodeType": "ExpressionStatement", - "src": "13658:44:51" + "src": "15561:53:38" } ] }, "documentation": { - "id": 49580, + "id": 47338, "nodeType": "StructuredDocumentation", - "src": "12782:577:51", - "text": " @notice allows the stability module to withdraw fees that have been paid on borrowed currency\n @param _collateralToken contract address of collateral token to withdraw from it's paid fees\n @param _amount amount of fees to withdraw\n @dev updates the paidFees for the collateral and globally then transfers the token to the caller\n @dev should revert if the contract is paused\n should revert if the caller does not have the `STABILITY_MODULE_ROLE` role\n should revert if the collateral does not exist" + "src": "14683:602:38", + "text": " @notice deposits collateral into `_owner`'s vault from `_owner`'s address\n @param _collateralToken contract address of the collateral to deposit\n @param _owner owner of the vault to deposit into\n @param _amount amount of `_collateralToken` to deposit into `_owner`'s vault\n @dev should revert if the contract is paused\n should revert if the collateral does not exist\n should revert if transfer from `_owner` to this contract fails based on SafeERC20.safeTransferFrom()'s expectations of a successful erc20 transferFrom call" }, - "functionSelector": "ad3b1b47", + "functionSelector": "f970c3b7", "implemented": true, "kind": "function", "modifiers": [ { - "id": 49588, + "id": 47348, "kind": "modifierInvocation", "modifierName": { - "id": 49587, + "id": 47347, "name": "whenNotPaused", - "nameLocations": ["13452:13:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "13452:13:51" - }, - "nodeType": "ModifierInvocation", - "src": "13452:13:51" - }, - { - "arguments": [ - { - "id": 49590, - "name": "STABILITY_MODULE_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48999, - "src": "13483:21:51", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "id": 49591, - "kind": "modifierInvocation", - "modifierName": { - "id": 49589, - "name": "onlyRole", - "nameLocations": ["13474:8:51"], + "nameLocations": ["15404:13:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43428, - "src": "13474:8:51" + "referencedDeclaration": 46075, + "src": "15404:13:38" }, "nodeType": "ModifierInvocation", - "src": "13474:31:51" + "src": "15404:13:38" }, { "arguments": [ { - "id": 49593, + "id": 47350, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49583, - "src": "13531:16:51", + "referencedDeclaration": 47341, + "src": "15443:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } } ], - "id": 49594, + "id": 47351, "kind": "modifierInvocation", "modifierName": { - "id": 49592, + "id": 47349, "name": "collateralExists", - "nameLocations": ["13514:16:51"], + "nameLocations": ["15426:16:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49094, - "src": "13514:16:51" + "referencedDeclaration": 46804, + "src": "15426:16:38" }, "nodeType": "ModifierInvocation", - "src": "13514:34:51" + "src": "15426:34:38" } ], - "name": "withdrawFees", - "nameLocation": "13373:12:51", + "name": "depositCollateral", + "nameLocation": "15299:17:38", "parameters": { - "id": 49586, + "id": 47346, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49583, + "id": 47341, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "13392:16:51", + "nameLocation": "15328:16:38", "nodeType": "VariableDeclaration", - "scope": 49616, - "src": "13386:22:51", + "scope": 47365, + "src": "15317:27:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 49582, + "id": 47340, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49581, - "name": "ERC20", - "nameLocations": ["13386:5:51"], + "id": 47339, + "name": "ERC20Token", + "nameLocations": ["15317:10:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "13386:5:51" + "referencedDeclaration": 46438, + "src": "15317:10:38" }, - "referencedDeclaration": 44443, - "src": "13386:5:51", + "referencedDeclaration": 46438, + "src": "15317:10:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 47343, + "mutability": "mutable", + "name": "_owner", + "nameLocation": "15354:6:38", + "nodeType": "VariableDeclaration", + "scope": 47365, + "src": "15346:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 47342, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15346:7:38", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_address", + "typeString": "address" } }, "visibility": "internal" }, { "constant": false, - "id": 49585, + "id": 47345, "mutability": "mutable", "name": "_amount", - "nameLocation": "13418:7:51", + "nameLocation": "15370:7:38", "nodeType": "VariableDeclaration", - "scope": 49616, - "src": "13410:15:51", + "scope": 47365, + "src": "15362:15:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9992,10 +10455,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49584, + "id": 47344, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "13410:7:51", + "src": "15362:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10004,477 +10467,266 @@ "visibility": "internal" } ], - "src": "13385:41:51" + "src": "15316:62:38" }, "returnParameters": { - "id": 49595, + "id": 47352, "nodeType": "ParameterList", "parameters": [], - "src": "13553:0:51" + "src": "15465:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 49634, + "id": 47424, "nodeType": "FunctionDefinition", - "src": "13958:114:51", + "src": "16914:727:38", "nodes": [], "body": { - "id": 49633, + "id": 47423, "nodeType": "Block", - "src": "14014:58:51", + "src": "17119:522:38", "nodes": [], "statements": [ { - "expression": { - "id": 49631, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "baseExpression": { - "id": 49624, - "name": "relyMapping", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49045, - "src": "14024:11:51", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", - "typeString": "mapping(address => mapping(address => bool))" - } - }, - "id": 49628, - "indexExpression": { - "expression": { - "id": 49625, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "14036:3:51", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 49626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "14040:6:51", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "14036:10:51", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } + "assignments": [47386], + "declarations": [ + { + "constant": false, + "id": 47386, + "mutability": "mutable", + "name": "_vault", + "nameLocation": "17147:6:38", + "nodeType": "VariableDeclaration", + "scope": 47423, + "src": "17129:24:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo" + }, + "typeName": { + "id": 47385, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 47384, + "name": "VaultInfo", + "nameLocations": ["17129:9:38"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46309, + "src": "17129:9:38" }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14024:23:51", + "referencedDeclaration": 46309, + "src": "17129:9:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo" + } + }, + "visibility": "internal" + } + ], + "id": 47392, + "initialValue": { + "baseExpression": { + "baseExpression": { + "id": 47387, + "name": "vaultMapping", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46730, + "src": "17156:12:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$_$", + "typeString": "mapping(contract ERC20Token => mapping(address => struct IVault.VaultInfo storage ref))" } }, - "id": 49629, + "id": 47389, "indexExpression": { - "id": 49627, - "name": "_relyUpon", + "id": 47388, + "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49619, - "src": "14048:9:51", + "referencedDeclaration": 47369, + "src": "17169:16:38", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, "isLValue": true, "isPure": false, - "lValueRequested": true, + "lValueRequested": false, "nodeType": "IndexAccess", - "src": "14024:34:51", + "src": "17156:30:38", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$", + "typeString": "mapping(address => struct IVault.VaultInfo storage ref)" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 49630, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14061:4:51", + "id": 47391, + "indexExpression": { + "id": 47390, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47371, + "src": "17187:6:38", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" + "typeIdentifier": "t_address", + "typeString": "address" + } }, - "src": "14024:41:51", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17156:38:38", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage", + "typeString": "struct IVault.VaultInfo storage ref" } }, - "id": 49632, - "nodeType": "ExpressionStatement", - "src": "14024:41:51" - } - ] - }, - "documentation": { - "id": 49617, - "nodeType": "StructuredDocumentation", - "src": "13715:238:51", - "text": " @notice lets an address (the caller) approve another address to perform actions on it's (the caller's) vault\n @param _relyUpon address to rely upon\n @dev should revert if the contract is paused" - }, - "functionSelector": "65fae35e", - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 49622, - "kind": "modifierInvocation", - "modifierName": { - "id": 49621, - "name": "whenNotPaused", - "nameLocations": ["14000:13:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "14000:13:51" + "nodeType": "VariableDeclarationStatement", + "src": "17129:65:38" }, - "nodeType": "ModifierInvocation", - "src": "14000:13:51" - } - ], - "name": "rely", - "nameLocation": "13967:4:51", - "parameters": { - "id": 49620, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 49619, - "mutability": "mutable", - "name": "_relyUpon", - "nameLocation": "13980:9:51", - "nodeType": "VariableDeclaration", - "scope": 49634, - "src": "13972:17:51", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 49618, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13972:7:51", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "13971:19:51" - }, - "returnParameters": { - "id": 49623, - "nodeType": "ParameterList", - "parameters": [], - "src": "14014:0:51" - }, - "scope": 50616, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "id": 49652, - "nodeType": "FunctionDefinition", - "src": "14332:119:51", - "nodes": [], - "body": { - "id": 49651, - "nodeType": "Block", - "src": "14390:61:51", - "nodes": [], - "statements": [ { - "expression": { - "id": 49649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "baseExpression": { - "id": 49642, - "name": "relyMapping", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49045, - "src": "14400:11:51", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", - "typeString": "mapping(address => mapping(address => bool))" - } - }, - "id": 49646, - "indexExpression": { - "expression": { - "id": 49643, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "14412:3:51", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 49644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "14416:6:51", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "14412:10:51", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14400:23:51", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - } + "assignments": [47395], + "declarations": [ + { + "constant": false, + "id": 47395, + "mutability": "mutable", + "name": "_collateral", + "nameLocation": "17227:11:38", + "nodeType": "VariableDeclaration", + "scope": 47423, + "src": "17204:34:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo" }, - "id": 49647, - "indexExpression": { - "id": 49645, - "name": "_reliedUpon", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49637, - "src": "14424:11:51", + "typeName": { + "id": 47394, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 47393, + "name": "CollateralInfo", + "nameLocations": ["17204:14:38"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46300, + "src": "17204:14:38" + }, + "referencedDeclaration": 46300, + "src": "17204:14:38", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "14400:36:51", + "visibility": "internal" + } + ], + "id": 47399, + "initialValue": { + "baseExpression": { + "id": 47396, + "name": "collateralMapping", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46722, + "src": "17241:17:38", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_struct$_CollateralInfo_$46300_storage_$", + "typeString": "mapping(contract ERC20Token => struct IVault.CollateralInfo storage ref)" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 49648, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14439:5:51", + "id": 47398, + "indexExpression": { + "id": 47397, + "name": "_collateralToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47369, + "src": "17259:16:38", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" + } }, - "src": "14400:44:51", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17241:35:38", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage", + "typeString": "struct IVault.CollateralInfo storage ref" } }, - "id": 49650, - "nodeType": "ExpressionStatement", - "src": "14400:44:51" - } - ] - }, - "documentation": { - "id": 49635, - "nodeType": "StructuredDocumentation", - "src": "14078:249:51", - "text": " @notice lets an address (the caller) remove access of another address to perform actions on it's (the caller's) vault\n @param _reliedUpon address to rely upon\n @dev should revert if the contract is paused" - }, - "functionSelector": "9c52a7f1", - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 49640, - "kind": "modifierInvocation", - "modifierName": { - "id": 49639, - "name": "whenNotPaused", - "nameLocations": ["14376:13:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "14376:13:51" + "nodeType": "VariableDeclarationStatement", + "src": "17204:72:38" }, - "nodeType": "ModifierInvocation", - "src": "14376:13:51" - } - ], - "name": "deny", - "nameLocation": "14341:4:51", - "parameters": { - "id": 49638, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 49637, - "mutability": "mutable", - "name": "_reliedUpon", - "nameLocation": "14354:11:51", - "nodeType": "VariableDeclaration", - "scope": 49652, - "src": "14346:19:51", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 49636, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14346:7:51", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "14345:21:51" - }, - "returnParameters": { - "id": 49641, - "nodeType": "ParameterList", - "parameters": [], - "src": "14390:0:51" - }, - "scope": 50616, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "id": 49683, - "nodeType": "FunctionDefinition", - "src": "15153:330:51", - "nodes": [], - "body": { - "id": 49682, - "nodeType": "Block", - "src": "15361:122:51", - "nodes": [], - "statements": [ { - "eventCall": { + "expression": { "arguments": [ { - "id": 49672, - "name": "_owner", + "id": 47401, + "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49658, - "src": "15396:6:51", + "referencedDeclaration": 47395, + "src": "17404:11:38", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" } }, { - "id": 49673, - "name": "_amount", + "id": 47402, + "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49660, - "src": "15404:7:51", + "referencedDeclaration": 47386, + "src": "17417:6:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo storage pointer" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" }, { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo storage pointer" } ], - "id": 49671, - "name": "CollateralDeposited", + "id": 47400, + "name": "_accrueFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48887, - "src": "15376:19:51", + "referencedDeclaration": 48046, + "src": "17392:11:38", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_struct$_VaultInfo_$46309_storage_ptr_$returns$__$", + "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer)" } }, - "id": 49674, + "id": 47403, "isConstant": false, "isLValue": false, "isPure": false, @@ -10483,51 +10735,51 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "15376:36:51", + "src": "17392:32:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 49675, - "nodeType": "EmitStatement", - "src": "15371:41:51" + "id": 47404, + "nodeType": "ExpressionStatement", + "src": "17392:32:38" }, { - "expression": { + "eventCall": { "arguments": [ { - "id": 49677, - "name": "_collateralToken", + "id": 47406, + "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49656, - "src": "15442:16:51", + "referencedDeclaration": 47371, + "src": "17460:6:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_address", + "typeString": "address" } }, { - "id": 49678, - "name": "_owner", + "id": 47407, + "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49658, - "src": "15460:6:51", + "referencedDeclaration": 47373, + "src": "17468:3:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 49679, + "id": 47408, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49660, - "src": "15468:7:51", + "referencedDeclaration": 47375, + "src": "17473:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10537,8 +10789,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_address", + "typeString": "address" }, { "typeIdentifier": "t_address", @@ -10549,18 +10801,190 @@ "typeString": "uint256" } ], - "id": 49676, - "name": "_depositCollateral", + "id": 47405, + "name": "CollateralWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46245, + "src": "17440:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 47409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17440:41:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 47410, + "nodeType": "EmitStatement", + "src": "17435:46:38" + }, + { + "expression": { + "arguments": [ + { + "id": 47412, + "name": "_collateralToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47369, + "src": "17512:16:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" + } + }, + { + "id": 47413, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47371, + "src": "17530:6:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 47414, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47373, + "src": "17538:3:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 47415, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47375, + "src": "17543:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 47411, + "name": "_withdrawCollateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47837, + "src": "17492:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20Token_$46438_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract ERC20Token,address,address,uint256)" + } + }, + "id": 47416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17492:59:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 47417, + "nodeType": "ExpressionStatement", + "src": "17492:59:38" + }, + { + "expression": { + "arguments": [ + { + "id": 47419, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47395, + "src": "17614:11:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + } + }, + { + "id": 47420, + "name": "_vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47386, + "src": "17627:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + }, + { + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo storage pointer" + } + ], + "id": 47418, + "name": "_revertIfCollateralRatioIsAboveLiquidationThreshold", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50077, - "src": "15423:18:51", + "referencedDeclaration": 48243, + "src": "17562:51:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20_$44443_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract ERC20,address,uint256)" + "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_struct$_VaultInfo_$46309_storage_ptr_$returns$__$", + "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer) view" } }, - "id": 49680, + "id": 47421, "isConstant": false, "isLValue": false, "isPure": false, @@ -10569,150 +10993,164 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "15423:53:51", + "src": "17562:72:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 49681, + "id": 47422, "nodeType": "ExpressionStatement", - "src": "15423:53:51" + "src": "17562:72:38" } ] }, "documentation": { - "id": 49653, + "id": 47366, "nodeType": "StructuredDocumentation", - "src": "14457:691:51", - "text": " @notice deposits collateral into `_owner`'s vault from `_owner`'s address\n @param _collateralToken contract address of the collateral to deposit\n @param _owner owner of the vault to deposit into\n @param _amount amount of `_collateralToken` to deposit into `_owner`'s vault\n @dev should revert if the contract is paused\n should revert if the collateral does not exist\n should revert if the caller is not the `_owner` and not also not relied upon\n should revert if transfer from `_owner` to this contract fails based on SafeERC20.safeTransferFrom()'s expectations of a successful erc20 transferFrom call" + "src": "15627:1282:38", + "text": " @notice withdraws collateral from `_owner`'s vault to `_to`'s address\n @param _collateralToken contract address of the collateral to withdraw\n @param _owner owner of the vault to withdraw from\n @param _to address to send the withdrawn collateral to\n @param _amount amount of `_collateralToken` to withdraw from `_owner`'s vault to `_to`'s address\n @dev should update fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratio\n @dev should revert if the collateral does not exist\n should revert if the caller is not the `_owner` and not also not relied upon\n should revert if transfer from this contract to the `_to` address fails based on SafeERC20.safeTransfer()'s expectations of a successful erc20 transfer call\n should revert if the collateral ratio of `_owner` is below the liquidation threshold at the end of the function. This can happen if the position was already under-water (liquidatable) prior to the function call or if the withdrawal of `_amount` make it under-water" }, - "functionSelector": "f970c3b7", + "functionSelector": "5820ba63", "implemented": true, "kind": "function", "modifiers": [ - { - "id": 49663, - "kind": "modifierInvocation", - "modifierName": { - "id": 49662, - "name": "whenNotPaused", - "nameLocations": ["15262:13:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "15262:13:51" - }, - "nodeType": "ModifierInvocation", - "src": "15262:13:51" - }, { "arguments": [ { - "id": 49665, + "id": 47378, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49656, - "src": "15301:16:51", + "referencedDeclaration": 47369, + "src": "17059:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } } ], - "id": 49666, + "id": 47379, "kind": "modifierInvocation", "modifierName": { - "id": 49664, + "id": 47377, "name": "collateralExists", - "nameLocations": ["15284:16:51"], + "nameLocations": ["17042:16:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49094, - "src": "15284:16:51" + "referencedDeclaration": 46804, + "src": "17042:16:38" }, "nodeType": "ModifierInvocation", - "src": "15284:34:51" + "src": "17042:34:38" }, { "arguments": [ { - "id": 49668, + "id": 47381, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49658, - "src": "15349:6:51", + "referencedDeclaration": 47371, + "src": "17107:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], - "id": 49669, + "id": 47382, "kind": "modifierInvocation", "modifierName": { - "id": 49667, + "id": 47380, "name": "onlyOwnerOrReliedUpon", - "nameLocations": ["15327:21:51"], + "nameLocations": ["17085:21:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49117, - "src": "15327:21:51" + "referencedDeclaration": 46828, + "src": "17085:21:38" }, "nodeType": "ModifierInvocation", - "src": "15327:29:51" + "src": "17085:29:38" } ], - "name": "depositCollateral", - "nameLocation": "15162:17:51", + "name": "withdrawCollateral", + "nameLocation": "16923:18:38", "parameters": { - "id": 49661, + "id": 47376, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49656, + "id": 47369, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "15186:16:51", + "nameLocation": "16953:16:38", "nodeType": "VariableDeclaration", - "scope": 49683, - "src": "15180:22:51", + "scope": 47424, + "src": "16942:27:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 49655, + "id": 47368, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49654, - "name": "ERC20", - "nameLocations": ["15180:5:51"], + "id": 47367, + "name": "ERC20Token", + "nameLocations": ["16942:10:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "15180:5:51" + "referencedDeclaration": 46438, + "src": "16942:10:38" }, - "referencedDeclaration": 44443, - "src": "15180:5:51", + "referencedDeclaration": 46438, + "src": "16942:10:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 49658, + "id": 47371, "mutability": "mutable", "name": "_owner", - "nameLocation": "15212:6:51", + "nameLocation": "16979:6:38", + "nodeType": "VariableDeclaration", + "scope": 47424, + "src": "16971:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 47370, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16971:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 47373, + "mutability": "mutable", + "name": "_to", + "nameLocation": "16995:3:38", "nodeType": "VariableDeclaration", - "scope": 49683, - "src": "15204:14:51", + "scope": 47424, + "src": "16987:11:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -10720,10 +11158,10 @@ "typeString": "address" }, "typeName": { - "id": 49657, + "id": 47372, "name": "address", "nodeType": "ElementaryTypeName", - "src": "15204:7:51", + "src": "16987:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -10734,13 +11172,13 @@ }, { "constant": false, - "id": 49660, + "id": 47375, "mutability": "mutable", "name": "_amount", - "nameLocation": "15228:7:51", + "nameLocation": "17008:7:38", "nodeType": "VariableDeclaration", - "scope": 49683, - "src": "15220:15:51", + "scope": 47424, + "src": "17000:15:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -10748,10 +11186,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49659, + "id": 47374, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "15220:7:51", + "src": "17000:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10760,95 +11198,95 @@ "visibility": "internal" } ], - "src": "15179:57:51" + "src": "16941:75:38" }, "returnParameters": { - "id": 49670, + "id": 47383, "nodeType": "ParameterList", "parameters": [], - "src": "15361:0:51" + "src": "17119:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 49744, + "id": 47533, "nodeType": "FunctionDefinition", - "src": "16828:744:51", + "src": "19470:1611:38", "nodes": [], "body": { - "id": 49743, + "id": 47532, "nodeType": "Block", - "src": "17050:522:51", + "src": "19691:1390:38", "nodes": [], "statements": [ { - "assignments": [49706], + "assignments": [47447], "declarations": [ { "constant": false, - "id": 49706, + "id": 47447, "mutability": "mutable", "name": "_vault", - "nameLocation": "17078:6:51", + "nameLocation": "19719:6:38", "nodeType": "VariableDeclaration", - "scope": 49743, - "src": "17060:24:51", + "scope": 47532, + "src": "19701:24:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 49705, + "id": 47446, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49704, + "id": 47445, "name": "VaultInfo", - "nameLocations": ["17060:9:51"], + "nameLocations": ["19701:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48963, - "src": "17060:9:51" + "referencedDeclaration": 46309, + "src": "19701:9:38" }, - "referencedDeclaration": 48963, - "src": "17060:9:51", + "referencedDeclaration": 46309, + "src": "19701:9:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "id": 49712, + "id": 47453, "initialValue": { "baseExpression": { "baseExpression": { - "id": 49707, + "id": 47448, "name": "vaultMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49039, - "src": "17087:12:51", + "referencedDeclaration": 46730, + "src": "19728:12:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$_$", - "typeString": "mapping(contract ERC20 => mapping(address => struct IVault.VaultInfo storage ref))" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$_$", + "typeString": "mapping(contract ERC20Token => mapping(address => struct IVault.VaultInfo storage ref))" } }, - "id": 49709, + "id": 47450, "indexExpression": { - "id": 49708, + "id": 47449, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49687, - "src": "17100:16:51", + "referencedDeclaration": 47428, + "src": "19741:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -10856,20 +11294,20 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "17087:30:51", + "src": "19728:30:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$", + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$", "typeString": "mapping(address => struct IVault.VaultInfo storage ref)" } }, - "id": 49711, + "id": 47452, "indexExpression": { - "id": 49710, + "id": 47451, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49689, - "src": "17118:6:51", + "referencedDeclaration": 47430, + "src": "19759:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -10880,79 +11318,79 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "17087:38:51", + "src": "19728:38:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage", "typeString": "struct IVault.VaultInfo storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "17060:65:51" + "src": "19701:65:38" }, { - "assignments": [49715], + "assignments": [47456], "declarations": [ { "constant": false, - "id": 49715, + "id": 47456, "mutability": "mutable", "name": "_collateral", - "nameLocation": "17158:11:51", + "nameLocation": "19799:11:38", "nodeType": "VariableDeclaration", - "scope": 49743, - "src": "17135:34:51", + "scope": 47532, + "src": "19776:34:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 49714, + "id": 47455, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49713, + "id": 47454, "name": "CollateralInfo", - "nameLocations": ["17135:14:51"], + "nameLocations": ["19776:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "17135:14:51" + "referencedDeclaration": 46300, + "src": "19776:14:38" }, - "referencedDeclaration": 48954, - "src": "17135:14:51", + "referencedDeclaration": 46300, + "src": "19776:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, "visibility": "internal" } ], - "id": 49719, + "id": 47460, "initialValue": { "baseExpression": { - "id": 49716, + "id": 47457, "name": "collateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49031, - "src": "17172:17:51", + "referencedDeclaration": 46722, + "src": "19813:17:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo storage ref)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_struct$_CollateralInfo_$46300_storage_$", + "typeString": "mapping(contract ERC20Token => struct IVault.CollateralInfo storage ref)" } }, - "id": 49718, + "id": 47459, "indexExpression": { - "id": 49717, + "id": 47458, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49687, - "src": "17190:16:51", + "referencedDeclaration": 47428, + "src": "19831:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -10960,759 +11398,249 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "17172:35:51", + "src": "19813:35:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage", "typeString": "struct IVault.CollateralInfo storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "17135:72:51" + "src": "19776:72:38" }, { - "expression": { - "arguments": [ - { - "id": 49721, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 47465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 47461, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49715, - "src": "17335:11:51", + "referencedDeclaration": 47456, + "src": "20000:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - { - "id": 49722, + "id": 47462, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "20012:26:38", + "memberName": "collateralFloorPerPosition", + "nodeType": "MemberAccess", + "referencedDeclaration": 46297, + "src": "20000:38:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "id": 47463, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49706, - "src": "17348:6:51", + "referencedDeclaration": 47447, + "src": "20041:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo storage pointer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - }, - { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } - ], - "id": 49720, - "name": "_accrueFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50342, - "src": "17323:11:51", + }, + "id": 47464, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "20048:19:38", + "memberName": "depositedCollateral", + "nodeType": "MemberAccess", + "referencedDeclaration": 46302, + "src": "20041:26:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$returns$__$", - "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 49723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "17323:32:51", - "tryCall": false, + "src": "20000:67:38", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 49724, - "nodeType": "ExpressionStatement", - "src": "17323:32:51" - }, - { - "eventCall": { - "arguments": [ - { - "id": 49726, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49689, - "src": "17391:6:51", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, + "id": 47470, + "nodeType": "IfStatement", + "src": "19996:136:38", + "trueBody": { + "id": 47469, + "nodeType": "Block", + "src": "20069:63:38", + "statements": [ { - "id": 49727, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49691, - "src": "17399:3:51", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 49728, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49693, - "src": "17404:7:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 47466, + "name": "TotalUserCollateralBelowFloor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46205, + "src": "20090:29:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 47467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20090:31:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 49725, - "name": "CollateralWithdrawn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48895, - "src": "17371:19:51", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" + "id": 47468, + "nodeType": "RevertStatement", + "src": "20083:38:38" } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 49729, + "id": 47475, "isConstant": false, "isLValue": false, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "17371:41:51", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 49730, - "nodeType": "EmitStatement", - "src": "17366:46:51" - }, - { - "expression": { - "arguments": [ - { - "id": 49732, - "name": "_collateralToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49687, - "src": "17443:16:51", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" - } - }, - { - "id": 49733, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49689, - "src": "17461:6:51", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - { - "id": 49734, - "name": "_to", + "id": 47473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 47471, + "name": "debt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49691, - "src": "17469:3:51", + "referencedDeclaration": 46714, + "src": "20222:4:38", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - { - "id": 49735, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 47472, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49693, - "src": "17474:7:51", + "referencedDeclaration": 47434, + "src": "20229:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 49731, - "name": "_withdrawCollateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50115, - "src": "17423:19:51", + }, + "src": "20222:14:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20_$44443_$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract ERC20,address,address,uint256)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 49736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "17423:59:51", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 49737, - "nodeType": "ExpressionStatement", - "src": "17423:59:51" - }, - { - "expression": { - "arguments": [ - { - "id": 49739, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49715, - "src": "17545:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - }, - { - "id": 49740, - "name": "_vault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49706, - "src": "17558:6:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo storage pointer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - }, - { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo storage pointer" - } - ], - "id": 49738, - "name": "_revertIfCollateralRatioIsAboveLiquidationThreshold", + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 47474, + "name": "debtCeiling", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50579, - "src": "17493:51:51", + "referencedDeclaration": 46712, + "src": "20239:11:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$returns$__$", - "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer) view" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 49741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "17493:72:51", - "tryCall": false, + "src": "20222:28:38", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 49742, - "nodeType": "ExpressionStatement", - "src": "17493:72:51" - } - ] - }, - "documentation": { - "id": 49684, - "nodeType": "StructuredDocumentation", - "src": "15489:1334:51", - "text": " @notice withdraws collateral from `_owner`'s vault to `_to`'s address\n @param _collateralToken contract address of the collateral to withdraw\n @param _owner owner of the vault to withdraw from\n @param _to address to send the withdrawn collateral to\n @param _amount amount of `_collateralToken` to withdraw from `_owner`'s vault to `_to`'s address\n @dev should update fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratio\n @dev should revert if the contract is paused\n should revert if the collateral does not exist\n should revert if the caller is not the `_owner` and not also not relied upon\n should revert if transfer from this contract to the `_to` address fails based on SafeERC20.safeTransfer()'s expectations of a successful erc20 transfer call\n should revert if the collateral ratio of `_owner` is below the liquidation threshold at the end of the function. This can happen if the position was already under-water (liquidatable) prior to the function call or if the withdrawal of `_amount` make it under-water" - }, - "functionSelector": "5820ba63", - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 49696, - "kind": "modifierInvocation", - "modifierName": { - "id": 49695, - "name": "whenNotPaused", - "nameLocations": ["16951:13:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "16951:13:51" - }, - "nodeType": "ModifierInvocation", - "src": "16951:13:51" - }, - { - "arguments": [ - { - "id": 49698, - "name": "_collateralToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49687, - "src": "16990:16:51", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" - } - } - ], - "id": 49699, - "kind": "modifierInvocation", - "modifierName": { - "id": 49697, - "name": "collateralExists", - "nameLocations": ["16973:16:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 49094, - "src": "16973:16:51" - }, - "nodeType": "ModifierInvocation", - "src": "16973:34:51" - }, - { - "arguments": [ - { - "id": 49701, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49689, - "src": "17038:6:51", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 49702, - "kind": "modifierInvocation", - "modifierName": { - "id": 49700, - "name": "onlyOwnerOrReliedUpon", - "nameLocations": ["17016:21:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 49117, - "src": "17016:21:51" - }, - "nodeType": "ModifierInvocation", - "src": "17016:29:51" - } - ], - "name": "withdrawCollateral", - "nameLocation": "16837:18:51", - "parameters": { - "id": 49694, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 49687, - "mutability": "mutable", - "name": "_collateralToken", - "nameLocation": "16862:16:51", - "nodeType": "VariableDeclaration", - "scope": 49744, - "src": "16856:22:51", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" - }, - "typeName": { - "id": 49686, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 49685, - "name": "ERC20", - "nameLocations": ["16856:5:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "16856:5:51" - }, - "referencedDeclaration": 44443, - "src": "16856:5:51", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 49689, - "mutability": "mutable", - "name": "_owner", - "nameLocation": "16888:6:51", - "nodeType": "VariableDeclaration", - "scope": 49744, - "src": "16880:14:51", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 49688, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16880:7:51", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 49691, - "mutability": "mutable", - "name": "_to", - "nameLocation": "16904:3:51", - "nodeType": "VariableDeclaration", - "scope": 49744, - "src": "16896:11:51", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 49690, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "16896:7:51", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 49693, - "mutability": "mutable", - "name": "_amount", - "nameLocation": "16917:7:51", - "nodeType": "VariableDeclaration", - "scope": 49744, - "src": "16909:15:51", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 49692, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "16909:7:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "visibility": "internal" - } - ], - "src": "16855:70:51" - }, - "returnParameters": { - "id": 49703, - "nodeType": "ParameterList", - "parameters": [], - "src": "17050:0:51" - }, - "scope": 50616, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "id": 49826, - "nodeType": "FunctionDefinition", - "src": "19401:1193:51", - "nodes": [], - "body": { - "id": 49825, - "nodeType": "Block", - "src": "19617:977:51", - "nodes": [], - "statements": [ - { - "assignments": [49767], - "declarations": [ - { - "constant": false, - "id": 49767, - "mutability": "mutable", - "name": "_vault", - "nameLocation": "19645:6:51", - "nodeType": "VariableDeclaration", - "scope": 49825, - "src": "19627:24:51", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo" - }, - "typeName": { - "id": 49766, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 49765, - "name": "VaultInfo", - "nameLocations": ["19627:9:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48963, - "src": "19627:9:51" - }, - "referencedDeclaration": 48963, - "src": "19627:9:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo" - } - }, - "visibility": "internal" - } - ], - "id": 49773, - "initialValue": { - "baseExpression": { - "baseExpression": { - "id": 49768, - "name": "vaultMapping", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49039, - "src": "19654:12:51", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$_$", - "typeString": "mapping(contract ERC20 => mapping(address => struct IVault.VaultInfo storage ref))" - } - }, - "id": 49770, - "indexExpression": { - "id": 49769, - "name": "_collateralToken", + "id": 47479, + "nodeType": "IfStatement", + "src": "20218:68:38", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 47476, + "name": "GlobalDebtCeilingExceeded", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49748, - "src": "19667:16:51", + "referencedDeclaration": 46219, + "src": "20259:25:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" } }, + "id": 47477, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19654:30:51", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$", - "typeString": "mapping(address => struct IVault.VaultInfo storage ref)" - } - }, - "id": 49772, - "indexExpression": { - "id": 49771, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49750, - "src": "19685:6:51", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19654:38:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage", - "typeString": "struct IVault.VaultInfo storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19627:65:51" - }, - { - "assignments": [49776], - "declarations": [ - { - "constant": false, - "id": 49776, - "mutability": "mutable", - "name": "_collateral", - "nameLocation": "19725:11:51", - "nodeType": "VariableDeclaration", - "scope": 49825, - "src": "19702:34:51", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo" - }, - "typeName": { - "id": 49775, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 49774, - "name": "CollateralInfo", - "nameLocations": ["19702:14:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "19702:14:51" - }, - "referencedDeclaration": 48954, - "src": "19702:14:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo" - } - }, - "visibility": "internal" - } - ], - "id": 49780, - "initialValue": { - "baseExpression": { - "id": 49777, - "name": "collateralMapping", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49031, - "src": "19739:17:51", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo storage ref)" - } - }, - "id": 49779, - "indexExpression": { - "id": 49778, - "name": "_collateralToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49748, - "src": "19757:16:51", + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20259:27:38", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19739:35:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage", - "typeString": "struct IVault.CollateralInfo storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19702:72:51" + "id": 47478, + "nodeType": "RevertStatement", + "src": "20252:34:38" + } }, { "condition": { @@ -11720,34 +11648,64 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 49785, + "id": 47486, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "expression": { - "id": 49781, - "name": "_collateral", + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 47483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 47480, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47456, + "src": "20300:11:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + } + }, + "id": 47481, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "20312:19:38", + "memberName": "totalBorrowedAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 46284, + "src": "20300:31:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 47482, + "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49776, - "src": "19926:11:51", + "referencedDeclaration": 47434, + "src": "20334:7:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 49782, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "19938:26:51", - "memberName": "collateralFloorPerPosition", - "nodeType": "MemberAccess", - "referencedDeclaration": 48949, - "src": "19926:38:51", + "src": "20300:41:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11757,76 +11715,83 @@ "operator": ">", "rightExpression": { "expression": { - "id": 49783, - "name": "_vault", + "id": 47484, + "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49767, - "src": "19967:6:51", + "referencedDeclaration": 47456, + "src": "20344:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo storage pointer" + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 49784, + "id": 47485, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "19974:19:51", - "memberName": "depositedCollateral", + "memberLocation": "20356:11:38", + "memberName": "debtCeiling", "nodeType": "MemberAccess", - "referencedDeclaration": 48956, - "src": "19967:26:51", + "referencedDeclaration": 46295, + "src": "20344:23:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "19926:67:51", + "src": "20300:67:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 49789, + "id": 47491, "nodeType": "IfStatement", - "src": "19922:111:51", + "src": "20296:136:38", "trueBody": { - "errorCall": { - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 49786, - "name": "TotalUserCollateralBelowFloor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48865, - "src": "20002:29:51", - "typeDescriptions": { - "typeIdentifier": "t_function_error_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 49787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "20002:31:51", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "id": 47490, + "nodeType": "Block", + "src": "20369:63:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 47487, + "name": "CollateralDebtCeilingExceeded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46221, + "src": "20390:29:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 47488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20390:31:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 47489, + "nodeType": "RevertStatement", + "src": "20383:38:38" } - }, - "id": 49788, - "nodeType": "RevertStatement", - "src": "19995:38:51" + ] } }, { @@ -11835,34 +11800,34 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 49793, + "id": 47495, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { - "id": 49790, + "id": 47492, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49767, - "src": "20240:6:51", + "referencedDeclaration": 47447, + "src": "20638:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 49791, + "id": 47493, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "20247:14:51", + "memberLocation": "20645:14:38", "memberName": "borrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 48958, - "src": "20240:21:51", + "referencedDeclaration": 46304, + "src": "20638:21:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11872,218 +11837,280 @@ "operator": "!=", "rightExpression": { "hexValue": "30", - "id": 49792, + "id": 47494, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "20265:1:51", + "src": "20663:1:38", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "20240:26:51", + "src": "20638:26:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "expression": { - "id": 49805, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { + "id": 47513, + "nodeType": "Block", + "src": "20729:158:38", + "statements": [ + { "expression": { - "id": 49799, - "name": "_vault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49767, - "src": "20315:6:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo storage pointer" - } - }, - "id": 49801, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "20322:24:51", - "memberName": "lastTotalAccumulatedRate", - "nodeType": "MemberAccess", - "referencedDeclaration": 48962, - "src": "20315:31:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "id": 49803, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49776, - "src": "20387:11:51", + "id": 47511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 47502, + "name": "_vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47447, + "src": "20743:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo storage pointer" + } + }, + "id": 47504, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "20750:24:38", + "memberName": "lastTotalAccumulatedRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 46308, + "src": "20743:31:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 47507, + "name": "baseRateInfo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46710, + "src": "20841:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" + } + }, + { + "expression": { + "id": 47508, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47456, + "src": "20855:11:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + } + }, + "id": 47509, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "20867:8:38", + "memberName": "rateInfo", + "nodeType": "MemberAccess", + "referencedDeclaration": 46291, + "src": "20855:20:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" + }, + { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" + } + ], + "expression": { + "id": 47505, + "name": "rateModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46707, + "src": "20793:10:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IRate_$46191", + "typeString": "contract IRate" + } + }, + "id": 47506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "20804:36:38", + "memberName": "calculateCurrentTotalAccumulatedRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 46182, + "src": "20793:47:38", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_struct$_RateInfo_$46280_memory_ptr_$_t_struct$_RateInfo_$46280_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct IVault.RateInfo memory,struct IVault.RateInfo memory) view external returns (uint256)" + } + }, + "id": 47510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20793:83:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 49802, - "name": "_calculateCurrentTotalAccumulatedRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50537, - "src": "20349:37:51", + }, + "src": "20743:133:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$48954_storage_ptr_$returns$_t_uint256_$", - "typeString": "function (struct IVault.CollateralInfo storage pointer) view returns (uint256)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 49804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "20349:50:51", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20315:84:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "id": 47512, + "nodeType": "ExpressionStatement", + "src": "20743:133:38" } - }, - "id": 49806, - "nodeType": "ExpressionStatement", - "src": "20315:84:51" + ] }, - "id": 49807, + "id": 47514, "nodeType": "IfStatement", - "src": "20236:163:51", + "src": "20634:253:38", "trueBody": { - "expression": { - "arguments": [ - { - "id": 49795, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49776, - "src": "20280:11:51", + "id": 47501, + "nodeType": "Block", + "src": "20666:57:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 47497, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47456, + "src": "20692:11:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + } + }, + { + "id": 47498, + "name": "_vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47447, + "src": "20705:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + }, + { + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo storage pointer" + } + ], + "id": 47496, + "name": "_accrueFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48046, + "src": "20680:11:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_struct$_VaultInfo_$46309_storage_ptr_$returns$__$", + "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer)" + } + }, + "id": 47499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20680:32:38", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - { - "id": 49796, - "name": "_vault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49767, - "src": "20293:6:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo storage pointer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - }, - { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo storage pointer" - } - ], - "id": 49794, - "name": "_accrueFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50342, - "src": "20268:11:51", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$returns$__$", - "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer)" - } - }, - "id": 49797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "20268:32:51", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "id": 47500, + "nodeType": "ExpressionStatement", + "src": "20680:32:38" } - }, - "id": 49798, - "nodeType": "ExpressionStatement", - "src": "20268:32:51" + ] } }, { "eventCall": { "arguments": [ { - "id": 49809, + "id": 47516, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49750, - "src": "20430:6:51", + "referencedDeclaration": 47430, + "src": "20917:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 49810, + "id": 47517, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49754, - "src": "20438:7:51", + "referencedDeclaration": 47434, + "src": "20925:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12101,18 +12128,18 @@ "typeString": "uint256" } ], - "id": 49808, + "id": 47515, "name": "CurrencyMinted", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48901, - "src": "20415:14:51", + "referencedDeclaration": 46251, + "src": "20902:14:38", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, - "id": 49811, + "id": 47518, "isConstant": false, "isLValue": false, "isPure": false, @@ -12121,63 +12148,63 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "20415:31:51", + "src": "20902:31:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 49812, + "id": 47519, "nodeType": "EmitStatement", - "src": "20410:36:51" + "src": "20897:36:38" }, { "expression": { "arguments": [ { - "id": 49814, + "id": 47521, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49776, - "src": "20470:11:51", + "referencedDeclaration": 47456, + "src": "20957:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, { - "id": 49815, + "id": 47522, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49767, - "src": "20483:6:51", + "referencedDeclaration": 47447, + "src": "20970:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, { - "id": 49816, + "id": 47523, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49752, - "src": "20491:3:51", + "referencedDeclaration": 47432, + "src": "20978:3:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 49817, + "id": 47524, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49754, - "src": "20496:7:51", + "referencedDeclaration": 47434, + "src": "20983:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12187,11 +12214,11 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" }, { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" }, { @@ -12203,18 +12230,18 @@ "typeString": "uint256" } ], - "id": 49813, + "id": 47520, "name": "_mintCurrency", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50153, - "src": "20456:13:51", + "referencedDeclaration": 47875, + "src": "20943:13:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$_t_address_$_t_uint256_$returns$__$", + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_struct$_VaultInfo_$46309_storage_ptr_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer,address,uint256)" } }, - "id": 49818, + "id": 47525, "isConstant": false, "isLValue": false, "isPure": false, @@ -12223,41 +12250,41 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "20456:48:51", + "src": "20943:48:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 49819, + "id": 47526, "nodeType": "ExpressionStatement", - "src": "20456:48:51" + "src": "20943:48:38" }, { "expression": { "arguments": [ { - "id": 49821, + "id": 47528, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49776, - "src": "20567:11:51", + "referencedDeclaration": 47456, + "src": "21054:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, { - "id": 49822, + "id": 47529, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49767, - "src": "20580:6:51", + "referencedDeclaration": 47447, + "src": "21067:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } } @@ -12265,26 +12292,26 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" }, { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } ], - "id": 49820, + "id": 47527, "name": "_revertIfCollateralRatioIsAboveLiquidationThreshold", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50579, - "src": "20515:51:51", + "referencedDeclaration": 48243, + "src": "21002:51:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$returns$__$", + "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_struct$_VaultInfo_$46309_storage_ptr_$returns$__$", "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer) view" } }, - "id": 49823, + "id": 47530, "isConstant": false, "isLValue": false, "isPure": false, @@ -12293,23 +12320,23 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "20515:72:51", + "src": "21002:72:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 49824, + "id": 47531, "nodeType": "ExpressionStatement", - "src": "20515:72:51" + "src": "21002:72:38" } ] }, "documentation": { - "id": 49745, + "id": 47425, "nodeType": "StructuredDocumentation", - "src": "17578:1818:51", + "src": "17647:1818:38", "text": " @notice mints/borrows `_amount` of currency to `_to`, backed by `_owner`'s deposited collateral\n @param _collateralToken contract address of collateral to mint/borrow the vault's currency against\n @param _owner owner of the vault to use it's collateral balance\n @param _to address to send the minted/borrowed currency to\n @param _amount amount of currency to mint\n @dev if the users currencly minted/borrwed amount if greater than 0, it should update fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratio\n else i.e when currenctly minted/borrwed amount is 0 (this means that no past fees to accrue), it should set the `lastTotalAccumulatedRate` of the vault to be the current totalAccumulatedRate (i.e current accumulated base rate + current accumulated collateral rate, emphaisis on current as these values are recalculated for both rates to their current values)\n @dev should revert if the contract is paused\n should revert if the collateral does not exist\n should revert if the caller is not the `_owner` and not also not relied upon\n should revert if `_owner`'s deposited collateral amount is less than the collateralFloorPerPosition for the given collateral\n should revert if mint to the `_to` address fails\n should revert if the collateral ratio of `_owner` is below the liquidation threshold at the end of the function. This can happen if the position was already under-water (liquidatable) prior to the function call or if the withdrawal of `_amount` make it under-water" }, "functionSelector": "49a66ca3", @@ -12317,126 +12344,126 @@ "kind": "function", "modifiers": [ { - "id": 49757, + "id": 47437, "kind": "modifierInvocation", "modifierName": { - "id": 49756, + "id": 47436, "name": "whenNotPaused", - "nameLocations": ["19518:13:51"], + "nameLocations": ["19592:13:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "19518:13:51" + "referencedDeclaration": 46075, + "src": "19592:13:38" }, "nodeType": "ModifierInvocation", - "src": "19518:13:51" + "src": "19592:13:38" }, { "arguments": [ { - "id": 49759, + "id": 47439, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49748, - "src": "19557:16:51", + "referencedDeclaration": 47428, + "src": "19631:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } } ], - "id": 49760, + "id": 47440, "kind": "modifierInvocation", "modifierName": { - "id": 49758, + "id": 47438, "name": "collateralExists", - "nameLocations": ["19540:16:51"], + "nameLocations": ["19614:16:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49094, - "src": "19540:16:51" + "referencedDeclaration": 46804, + "src": "19614:16:38" }, "nodeType": "ModifierInvocation", - "src": "19540:34:51" + "src": "19614:34:38" }, { "arguments": [ { - "id": 49762, + "id": 47442, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49750, - "src": "19605:6:51", + "referencedDeclaration": 47430, + "src": "19679:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], - "id": 49763, + "id": 47443, "kind": "modifierInvocation", "modifierName": { - "id": 49761, + "id": 47441, "name": "onlyOwnerOrReliedUpon", - "nameLocations": ["19583:21:51"], + "nameLocations": ["19657:21:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49117, - "src": "19583:21:51" + "referencedDeclaration": 46828, + "src": "19657:21:38" }, "nodeType": "ModifierInvocation", - "src": "19583:29:51" + "src": "19657:29:38" } ], "name": "mintCurrency", - "nameLocation": "19410:12:51", + "nameLocation": "19479:12:38", "parameters": { - "id": 49755, + "id": 47435, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49748, + "id": 47428, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "19429:16:51", + "nameLocation": "19503:16:38", "nodeType": "VariableDeclaration", - "scope": 49826, - "src": "19423:22:51", + "scope": 47533, + "src": "19492:27:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 49747, + "id": 47427, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49746, - "name": "ERC20", - "nameLocations": ["19423:5:51"], + "id": 47426, + "name": "ERC20Token", + "nameLocations": ["19492:10:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "19423:5:51" + "referencedDeclaration": 46438, + "src": "19492:10:38" }, - "referencedDeclaration": 44443, - "src": "19423:5:51", + "referencedDeclaration": 46438, + "src": "19492:10:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 49750, + "id": 47430, "mutability": "mutable", "name": "_owner", - "nameLocation": "19455:6:51", + "nameLocation": "19529:6:38", "nodeType": "VariableDeclaration", - "scope": 49826, - "src": "19447:14:51", + "scope": 47533, + "src": "19521:14:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -12444,10 +12471,10 @@ "typeString": "address" }, "typeName": { - "id": 49749, + "id": 47429, "name": "address", "nodeType": "ElementaryTypeName", - "src": "19447:7:51", + "src": "19521:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -12458,13 +12485,13 @@ }, { "constant": false, - "id": 49752, + "id": 47432, "mutability": "mutable", "name": "_to", - "nameLocation": "19471:3:51", + "nameLocation": "19545:3:38", "nodeType": "VariableDeclaration", - "scope": 49826, - "src": "19463:11:51", + "scope": 47533, + "src": "19537:11:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -12472,10 +12499,10 @@ "typeString": "address" }, "typeName": { - "id": 49751, + "id": 47431, "name": "address", "nodeType": "ElementaryTypeName", - "src": "19463:7:51", + "src": "19537:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -12486,13 +12513,13 @@ }, { "constant": false, - "id": 49754, + "id": 47434, "mutability": "mutable", "name": "_amount", - "nameLocation": "19484:7:51", + "nameLocation": "19558:7:38", "nodeType": "VariableDeclaration", - "scope": 49826, - "src": "19476:15:51", + "scope": 47533, + "src": "19550:15:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -12500,10 +12527,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49753, + "id": 47433, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "19476:7:51", + "src": "19550:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12512,95 +12539,95 @@ "visibility": "internal" } ], - "src": "19422:70:51" + "src": "19491:75:38" }, "returnParameters": { - "id": 49764, + "id": 47444, "nodeType": "ParameterList", "parameters": [], - "src": "19617:0:51" + "src": "19691:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 49875, + "id": 47578, "nodeType": "FunctionDefinition", - "src": "21418:586:51", + "src": "21853:535:38", "nodes": [], "body": { - "id": 49874, + "id": 47577, "nodeType": "Block", - "src": "21621:383:51", + "src": "22001:387:38", "nodes": [], "statements": [ { - "assignments": [49847], + "assignments": [47549], "declarations": [ { "constant": false, - "id": 49847, + "id": 47549, "mutability": "mutable", "name": "_vault", - "nameLocation": "21649:6:51", + "nameLocation": "22029:6:38", "nodeType": "VariableDeclaration", - "scope": 49874, - "src": "21631:24:51", + "scope": 47577, + "src": "22011:24:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 49846, + "id": 47548, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49845, + "id": 47547, "name": "VaultInfo", - "nameLocations": ["21631:9:51"], + "nameLocations": ["22011:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48963, - "src": "21631:9:51" + "referencedDeclaration": 46309, + "src": "22011:9:38" }, - "referencedDeclaration": 48963, - "src": "21631:9:51", + "referencedDeclaration": 46309, + "src": "22011:9:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "id": 49853, + "id": 47555, "initialValue": { "baseExpression": { "baseExpression": { - "id": 49848, + "id": 47550, "name": "vaultMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49039, - "src": "21658:12:51", + "referencedDeclaration": 46730, + "src": "22038:12:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$_$", - "typeString": "mapping(contract ERC20 => mapping(address => struct IVault.VaultInfo storage ref))" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$_$", + "typeString": "mapping(contract ERC20Token => mapping(address => struct IVault.VaultInfo storage ref))" } }, - "id": 49850, + "id": 47552, "indexExpression": { - "id": 49849, + "id": 47551, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49830, - "src": "21671:16:51", + "referencedDeclaration": 47537, + "src": "22051:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -12608,20 +12635,20 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "21658:30:51", + "src": "22038:30:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$", + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$", "typeString": "mapping(address => struct IVault.VaultInfo storage ref)" } }, - "id": 49852, + "id": 47554, "indexExpression": { - "id": 49851, + "id": 47553, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49832, - "src": "21689:6:51", + "referencedDeclaration": 47539, + "src": "22069:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -12632,79 +12659,79 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "21658:38:51", + "src": "22038:38:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage", "typeString": "struct IVault.VaultInfo storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "21631:65:51" + "src": "22011:65:38" }, { - "assignments": [49856], + "assignments": [47558], "declarations": [ { "constant": false, - "id": 49856, + "id": 47558, "mutability": "mutable", "name": "_collateral", - "nameLocation": "21729:11:51", + "nameLocation": "22109:11:38", "nodeType": "VariableDeclaration", - "scope": 49874, - "src": "21706:34:51", + "scope": 47577, + "src": "22086:34:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 49855, + "id": 47557, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49854, + "id": 47556, "name": "CollateralInfo", - "nameLocations": ["21706:14:51"], + "nameLocations": ["22086:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "21706:14:51" + "referencedDeclaration": 46300, + "src": "22086:14:38" }, - "referencedDeclaration": 48954, - "src": "21706:14:51", + "referencedDeclaration": 46300, + "src": "22086:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, "visibility": "internal" } ], - "id": 49860, + "id": 47562, "initialValue": { "baseExpression": { - "id": 49857, + "id": 47559, "name": "collateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49031, - "src": "21743:17:51", + "referencedDeclaration": 46722, + "src": "22123:17:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo storage ref)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_struct$_CollateralInfo_$46300_storage_$", + "typeString": "mapping(contract ERC20Token => struct IVault.CollateralInfo storage ref)" } }, - "id": 49859, + "id": 47561, "indexExpression": { - "id": 49858, + "id": 47560, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49830, - "src": "21761:16:51", + "referencedDeclaration": 47537, + "src": "22141:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -12712,39 +12739,39 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "21743:35:51", + "src": "22123:35:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage", "typeString": "struct IVault.CollateralInfo storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "21706:72:51" + "src": "22086:72:38" }, { "expression": { "arguments": [ { - "id": 49862, + "id": 47564, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49856, - "src": "21907:11:51", + "referencedDeclaration": 47558, + "src": "22287:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, { - "id": 49863, + "id": 47565, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49847, - "src": "21920:6:51", + "referencedDeclaration": 47549, + "src": "22300:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } } @@ -12752,26 +12779,26 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" }, { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } ], - "id": 49861, + "id": 47563, "name": "_accrueFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50342, - "src": "21895:11:51", + "referencedDeclaration": 48046, + "src": "22275:11:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$returns$__$", + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_struct$_VaultInfo_$46309_storage_ptr_$returns$__$", "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer)" } }, - "id": 49864, + "id": 47566, "isConstant": false, "isLValue": false, "isPure": false, @@ -12780,75 +12807,90 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "21895:32:51", + "src": "22275:32:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 49865, + "id": 47567, "nodeType": "ExpressionStatement", - "src": "21895:32:51" + "src": "22275:32:38" }, { "expression": { "arguments": [ { - "id": 49867, + "id": 47569, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49856, - "src": "21952:11:51", + "referencedDeclaration": 47558, + "src": "22332:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, { - "id": 49868, + "id": 47570, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49847, - "src": "21965:6:51", + "referencedDeclaration": 47549, + "src": "22345:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, { - "id": 49869, + "id": 47571, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49832, - "src": "21973:6:51", + "referencedDeclaration": 47539, + "src": "22353:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 49870, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49832, - "src": "21981:6:51", + "expression": { + "id": 47572, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "22361:3:38", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 47573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "22365:6:38", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "22361:10:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 49871, + "id": 47574, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49834, - "src": "21989:7:51", + "referencedDeclaration": 47541, + "src": "22373:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12858,11 +12900,11 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" }, { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" }, { @@ -12878,18 +12920,18 @@ "typeString": "uint256" } ], - "id": 49866, + "id": 47568, "name": "_burnCurrency", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50248, - "src": "21938:13:51", + "referencedDeclaration": 47969, + "src": "22318:13:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_struct$_VaultInfo_$46309_storage_ptr_$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer,address,address,uint256)" } }, - "id": 49872, + "id": 47575, "isConstant": false, "isLValue": false, "isPure": false, @@ -12898,150 +12940,108 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "21938:59:51", + "src": "22318:63:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 49873, + "id": 47576, "nodeType": "ExpressionStatement", - "src": "21938:59:51" + "src": "22318:63:38" } ] }, "documentation": { - "id": 49827, + "id": 47534, "nodeType": "StructuredDocumentation", - "src": "20600:813:51", - "text": " @notice burns/pays back a borrowed/minted currency\n @param _collateralToken contract address of collateral to burn/pay back the vault's currency for,\n @param _owner owner of the vault to pay back it's loan\n @param _amount amount of currency to pay back / burn\n @dev we accrue fees here to enable full payment of both borrowed amount and fees in one function. This way unupdated accrued fees are accounted for too and can be paid back\n @dev should revert if the contract is paused\n should revert if the collateral does not exist\n should revert if the caller is not the `_owner` and not also not relied upon\n should revert if the amount of currency to burn / pay back is more than `borrowed amount + total accrued fees`" + "src": "21087:761:38", + "text": " @notice burns/pays back a borrowed/minted currency\n @param _collateralToken contract address of collateral to burn/pay back the vault's currency for,\n @param _owner owner of the vault to pay back it's loan\n @param _amount amount of currency to pay back / burn\n @dev we accrue fees here to enable full payment of both borrowed amount and fees in one function. This way unupdated accrued fees are accounted for too and can be paid back\n @dev should revert if the collateral does not exist\n should revert if the caller is not the `_owner` and not also not relied upon\n should revert if the amount of currency to burn / pay back is more than `borrowed amount + total accrued fees`" }, "functionSelector": "4fa73919", "implemented": true, "kind": "function", "modifiers": [ - { - "id": 49837, - "kind": "modifierInvocation", - "modifierName": { - "id": 49836, - "name": "whenNotPaused", - "nameLocations": ["21522:13:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "21522:13:51" - }, - "nodeType": "ModifierInvocation", - "src": "21522:13:51" - }, { "arguments": [ { - "id": 49839, + "id": 47544, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49830, - "src": "21561:16:51", + "referencedDeclaration": 47537, + "src": "21979:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } } ], - "id": 49840, + "id": 47545, "kind": "modifierInvocation", "modifierName": { - "id": 49838, + "id": 47543, "name": "collateralExists", - "nameLocations": ["21544:16:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 49094, - "src": "21544:16:51" - }, - "nodeType": "ModifierInvocation", - "src": "21544:34:51" - }, - { - "arguments": [ - { - "id": 49842, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49832, - "src": "21609:6:51", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 49843, - "kind": "modifierInvocation", - "modifierName": { - "id": 49841, - "name": "onlyOwnerOrReliedUpon", - "nameLocations": ["21587:21:51"], + "nameLocations": ["21962:16:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49117, - "src": "21587:21:51" + "referencedDeclaration": 46804, + "src": "21962:16:38" }, "nodeType": "ModifierInvocation", - "src": "21587:29:51" + "src": "21962:34:38" } ], "name": "burnCurrency", - "nameLocation": "21427:12:51", + "nameLocation": "21862:12:38", "parameters": { - "id": 49835, + "id": 47542, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49830, + "id": 47537, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "21446:16:51", + "nameLocation": "21886:16:38", "nodeType": "VariableDeclaration", - "scope": 49875, - "src": "21440:22:51", + "scope": 47578, + "src": "21875:27:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 49829, + "id": 47536, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49828, - "name": "ERC20", - "nameLocations": ["21440:5:51"], + "id": 47535, + "name": "ERC20Token", + "nameLocations": ["21875:10:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "21440:5:51" + "referencedDeclaration": 46438, + "src": "21875:10:38" }, - "referencedDeclaration": 44443, - "src": "21440:5:51", + "referencedDeclaration": 46438, + "src": "21875:10:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 49832, + "id": 47539, "mutability": "mutable", "name": "_owner", - "nameLocation": "21472:6:51", + "nameLocation": "21912:6:38", "nodeType": "VariableDeclaration", - "scope": 49875, - "src": "21464:14:51", + "scope": 47578, + "src": "21904:14:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -13049,10 +13049,10 @@ "typeString": "address" }, "typeName": { - "id": 49831, + "id": 47538, "name": "address", "nodeType": "ElementaryTypeName", - "src": "21464:7:51", + "src": "21904:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -13063,13 +13063,13 @@ }, { "constant": false, - "id": 49834, + "id": 47541, "mutability": "mutable", "name": "_amount", - "nameLocation": "21488:7:51", + "nameLocation": "21928:7:38", "nodeType": "VariableDeclaration", - "scope": 49875, - "src": "21480:15:51", + "scope": 47578, + "src": "21920:15:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -13077,10 +13077,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49833, + "id": 47540, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "21480:7:51", + "src": "21920:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13089,95 +13089,95 @@ "visibility": "internal" } ], - "src": "21439:57:51" + "src": "21874:62:38" }, "returnParameters": { - "id": 49844, + "id": 47546, "nodeType": "ParameterList", "parameters": [], - "src": "21621:0:51" + "src": "22001:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 50015, + "id": 47718, "nodeType": "FunctionDefinition", - "src": "23170:2414:51", + "src": "23502:2620:38", "nodes": [], "body": { - "id": 50014, + "id": 47717, "nodeType": "Block", - "src": "23358:2226:51", + "src": "23673:2449:38", "nodes": [], "statements": [ { - "assignments": [49895], + "assignments": [47596], "declarations": [ { "constant": false, - "id": 49895, + "id": 47596, "mutability": "mutable", "name": "_vault", - "nameLocation": "23547:6:51", + "nameLocation": "23862:6:38", "nodeType": "VariableDeclaration", - "scope": 50014, - "src": "23529:24:51", + "scope": 47717, + "src": "23844:24:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 49894, + "id": 47595, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49893, + "id": 47594, "name": "VaultInfo", - "nameLocations": ["23529:9:51"], + "nameLocations": ["23844:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48963, - "src": "23529:9:51" + "referencedDeclaration": 46309, + "src": "23844:9:38" }, - "referencedDeclaration": 48963, - "src": "23529:9:51", + "referencedDeclaration": 46309, + "src": "23844:9:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "id": 49901, + "id": 47602, "initialValue": { "baseExpression": { "baseExpression": { - "id": 49896, + "id": 47597, "name": "vaultMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49039, - "src": "23556:12:51", + "referencedDeclaration": 46730, + "src": "23871:12:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$_$", - "typeString": "mapping(contract ERC20 => mapping(address => struct IVault.VaultInfo storage ref))" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$_$", + "typeString": "mapping(contract ERC20Token => mapping(address => struct IVault.VaultInfo storage ref))" } }, - "id": 49898, + "id": 47599, "indexExpression": { - "id": 49897, + "id": 47598, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49879, - "src": "23569:16:51", + "referencedDeclaration": 47582, + "src": "23884:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -13185,20 +13185,20 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "23556:30:51", + "src": "23871:30:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$", + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$", "typeString": "mapping(address => struct IVault.VaultInfo storage ref)" } }, - "id": 49900, + "id": 47601, "indexExpression": { - "id": 49899, + "id": 47600, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49881, - "src": "23587:6:51", + "referencedDeclaration": 47584, + "src": "23902:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -13209,79 +13209,79 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "23556:38:51", + "src": "23871:38:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage", "typeString": "struct IVault.VaultInfo storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "23529:65:51" + "src": "23844:65:38" }, { - "assignments": [49904], + "assignments": [47605], "declarations": [ { "constant": false, - "id": 49904, + "id": 47605, "mutability": "mutable", "name": "_collateral", - "nameLocation": "23627:11:51", + "nameLocation": "23942:11:38", "nodeType": "VariableDeclaration", - "scope": 50014, - "src": "23604:34:51", + "scope": 47717, + "src": "23919:34:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 49903, + "id": 47604, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49902, + "id": 47603, "name": "CollateralInfo", - "nameLocations": ["23604:14:51"], + "nameLocations": ["23919:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "23604:14:51" + "referencedDeclaration": 46300, + "src": "23919:14:38" }, - "referencedDeclaration": 48954, - "src": "23604:14:51", + "referencedDeclaration": 46300, + "src": "23919:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, "visibility": "internal" } ], - "id": 49908, + "id": 47609, "initialValue": { "baseExpression": { - "id": 49905, + "id": 47606, "name": "collateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49031, - "src": "23641:17:51", + "referencedDeclaration": 46722, + "src": "23956:17:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo storage ref)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_struct$_CollateralInfo_$46300_storage_$", + "typeString": "mapping(contract ERC20Token => struct IVault.CollateralInfo storage ref)" } }, - "id": 49907, + "id": 47608, "indexExpression": { - "id": 49906, + "id": 47607, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49879, - "src": "23659:16:51", + "referencedDeclaration": 47582, + "src": "23974:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -13289,39 +13289,39 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "23641:35:51", + "src": "23956:35:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage", "typeString": "struct IVault.CollateralInfo storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "23604:72:51" + "src": "23919:72:38" }, { "expression": { "arguments": [ { - "id": 49910, + "id": 47611, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49904, - "src": "23804:11:51", + "referencedDeclaration": 47605, + "src": "24119:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, { - "id": 49911, + "id": 47612, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49895, - "src": "23817:6:51", + "referencedDeclaration": 47596, + "src": "24132:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } } @@ -13329,26 +13329,26 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" }, { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } ], - "id": 49909, + "id": 47610, "name": "_accrueFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50342, - "src": "23792:11:51", + "referencedDeclaration": 48046, + "src": "24107:11:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$returns$__$", + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_struct$_VaultInfo_$46309_storage_ptr_$returns$__$", "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer)" } }, - "id": 49912, + "id": 47613, "isConstant": false, "isLValue": false, "isPure": false, @@ -13357,29 +13357,29 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "23792:32:51", + "src": "24107:32:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 49913, + "id": 47614, "nodeType": "ExpressionStatement", - "src": "23792:32:51" + "src": "24107:32:38" }, { - "assignments": [49915], + "assignments": [47616], "declarations": [ { "constant": false, - "id": 49915, + "id": 47616, "mutability": "mutable", "name": "_preCollateralRatio", - "nameLocation": "23843:19:51", + "nameLocation": "24158:19:38", "nodeType": "VariableDeclaration", - "scope": 50014, - "src": "23835:27:51", + "scope": 47717, + "src": "24150:27:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -13387,10 +13387,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49914, + "id": 47615, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "23835:7:51", + "src": "24150:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13399,30 +13399,30 @@ "visibility": "internal" } ], - "id": 49920, + "id": 47621, "initialValue": { "arguments": [ { - "id": 49917, + "id": 47618, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49904, - "src": "23885:11:51", + "referencedDeclaration": 47605, + "src": "24200:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, { - "id": 49918, + "id": 47619, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49895, - "src": "23898:6:51", + "referencedDeclaration": 47596, + "src": "24213:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } } @@ -13430,26 +13430,26 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" }, { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } ], - "id": 49916, + "id": 47617, "name": "_getCollateralRatio", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50384, - "src": "23865:19:51", + "referencedDeclaration": 48099, + "src": "24180:19:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$returns$_t_uint256_$", + "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_struct$_VaultInfo_$46309_storage_ptr_$returns$_t_uint256_$", "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer) view returns (uint256)" } }, - "id": 49919, + "id": 47620, "isConstant": false, "isLValue": false, "isPure": false, @@ -13458,7 +13458,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "23865:40:51", + "src": "24180:40:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -13466,7 +13466,7 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "23835:70:51" + "src": "24150:70:38" }, { "condition": { @@ -13474,18 +13474,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 49924, + "id": 47625, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 49921, + "id": 47622, "name": "_preCollateralRatio", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49915, - "src": "23919:19:51", + "referencedDeclaration": 47616, + "src": "24234:19:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13495,76 +13495,83 @@ "operator": "<=", "rightExpression": { "expression": { - "id": 49922, + "id": 47623, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49904, - "src": "23942:11:51", + "referencedDeclaration": 47605, + "src": "24257:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 49923, + "id": 47624, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "23954:20:51", + "memberLocation": "24269:20:38", "memberName": "liquidationThreshold", "nodeType": "MemberAccess", - "referencedDeclaration": 48936, - "src": "23942:32:51", + "referencedDeclaration": 46286, + "src": "24257:32:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "23919:55:51", + "src": "24234:55:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 49928, + "id": 47630, "nodeType": "IfStatement", - "src": "23915:84:51", + "src": "24230:109:38", "trueBody": { - "errorCall": { - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 49925, - "name": "PositionIsSafe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48861, - "src": "23983:14:51", - "typeDescriptions": { - "typeIdentifier": "t_function_error_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 49926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "23983:16:51", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "id": 47629, + "nodeType": "Block", + "src": "24291:48:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 47626, + "name": "PositionIsSafe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46201, + "src": "24312:14:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 47627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "24312:16:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 47628, + "nodeType": "RevertStatement", + "src": "24305:23:38" } - }, - "id": 49927, - "nodeType": "RevertStatement", - "src": "23976:23:51" + ] } }, { @@ -13573,18 +13580,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 49935, + "id": 47637, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 49929, + "id": 47631, "name": "_currencyAmountToPay", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49885, - "src": "24014:20:51", + "referencedDeclaration": 47588, + "src": "24353:20:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13596,22 +13603,22 @@ "expression": { "arguments": [ { - "id": 49932, + "id": 47634, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "24043:7:51", + "src": "24382:7:38", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { - "id": 49931, + "id": 47633, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "24043:7:51", + "src": "24382:7:38", "typeDescriptions": {} } } @@ -13623,18 +13630,18 @@ "typeString": "type(uint256)" } ], - "id": 49930, + "id": 47632, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, - "src": "24038:4:51", + "src": "24377:4:38", "typeDescriptions": { "typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure" } }, - "id": 49933, + "id": 47635, "isConstant": false, "isLValue": false, "isPure": true, @@ -13643,55 +13650,55 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "24038:13:51", + "src": "24377:13:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_magic_meta_type_t_uint256", "typeString": "type(uint256)" } }, - "id": 49934, + "id": 47636, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "memberLocation": "24052:3:51", + "memberLocation": "24391:3:38", "memberName": "max", "nodeType": "MemberAccess", - "src": "24038:17:51", + "src": "24377:17:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "24014:41:51", + "src": "24353:41:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 49945, + "id": 47647, "nodeType": "IfStatement", - "src": "24010:614:51", + "src": "24349:614:38", "trueBody": { - "id": 49944, + "id": 47646, "nodeType": "Block", - "src": "24057:567:51", + "src": "24396:567:38", "statements": [ { "expression": { - "id": 49942, + "id": 47644, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 49936, + "id": 47638, "name": "_currencyAmountToPay", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49885, - "src": "24548:20:51", + "referencedDeclaration": 47588, + "src": "24887:20:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13704,34 +13711,34 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 49941, + "id": 47643, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { - "id": 49937, + "id": 47639, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49895, - "src": "24571:6:51", + "referencedDeclaration": 47596, + "src": "24910:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 49938, + "id": 47640, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "24578:14:51", + "memberLocation": "24917:14:38", "memberName": "borrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 48958, - "src": "24571:21:51", + "referencedDeclaration": 46304, + "src": "24910:21:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13741,63 +13748,63 @@ "operator": "+", "rightExpression": { "expression": { - "id": 49939, + "id": 47641, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49895, - "src": "24595:6:51", + "referencedDeclaration": 47596, + "src": "24934:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 49940, + "id": 47642, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "24602:11:51", + "memberLocation": "24941:11:38", "memberName": "accruedFees", "nodeType": "MemberAccess", - "referencedDeclaration": 48960, - "src": "24595:18:51", + "referencedDeclaration": 46306, + "src": "24934:18:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "24571:42:51", + "src": "24910:42:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "24548:65:51", + "src": "24887:65:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49943, + "id": 47645, "nodeType": "ExpressionStatement", - "src": "24548:65:51" + "src": "24887:65:38" } ] } }, { - "assignments": [49947], + "assignments": [47649], "declarations": [ { "constant": false, - "id": 49947, + "id": 47649, "mutability": "mutable", "name": "_collateralAmountCovered", - "nameLocation": "24642:24:51", + "nameLocation": "24981:24:38", "nodeType": "VariableDeclaration", - "scope": 50014, - "src": "24634:32:51", + "scope": 47717, + "src": "24973:32:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -13805,10 +13812,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49946, + "id": 47648, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "24634:7:51", + "src": "24973:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13817,28 +13824,28 @@ "visibility": "internal" } ], - "id": 49952, + "id": 47654, "initialValue": { "arguments": [ { - "id": 49949, + "id": 47651, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49904, - "src": "24707:11:51", + "referencedDeclaration": 47605, + "src": "25046:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, { - "id": 49950, + "id": 47652, "name": "_currencyAmountToPay", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49885, - "src": "24720:20:51", + "referencedDeclaration": 47588, + "src": "25059:20:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13848,7 +13855,7 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" }, { @@ -13856,18 +13863,18 @@ "typeString": "uint256" } ], - "id": 49948, + "id": 47650, "name": "_getCollateralAmountFromCurrencyValue", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50449, - "src": "24669:37:51", + "referencedDeclaration": 48159, + "src": "25008:37:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (struct IVault.CollateralInfo storage pointer,uint256) view returns (uint256)" } }, - "id": 49951, + "id": 47653, "isConstant": false, "isLValue": false, "isPure": false, @@ -13876,7 +13883,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "24669:72:51", + "src": "25008:72:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -13884,20 +13891,20 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "24634:107:51" + "src": "24973:107:38" }, { - "assignments": [49954], + "assignments": [47656], "declarations": [ { "constant": false, - "id": 49954, + "id": 47656, "mutability": "mutable", "name": "_bonus", - "nameLocation": "24759:6:51", + "nameLocation": "25098:6:38", "nodeType": "VariableDeclaration", - "scope": 50014, - "src": "24751:14:51", + "scope": 47717, + "src": "25090:14:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -13905,10 +13912,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49953, + "id": 47655, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "24751:7:51", + "src": "25090:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13917,13 +13924,13 @@ "visibility": "internal" } ], - "id": 49962, + "id": 47664, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 49961, + "id": 47663, "isConstant": false, "isLValue": false, "isPure": false, @@ -13935,18 +13942,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 49958, + "id": 47660, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 49955, + "id": 47657, "name": "_collateralAmountCovered", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49947, - "src": "24769:24:51", + "referencedDeclaration": 47649, + "src": "25108:24:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13956,47 +13963,47 @@ "operator": "*", "rightExpression": { "expression": { - "id": 49956, + "id": 47658, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49904, - "src": "24796:11:51", + "referencedDeclaration": 47605, + "src": "25135:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 49957, + "id": 47659, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "24808:16:51", + "memberLocation": "25147:16:38", "memberName": "liquidationBonus", "nodeType": "MemberAccess", - "referencedDeclaration": 48938, - "src": "24796:28:51", + "referencedDeclaration": 46288, + "src": "25135:28:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "24769:55:51", + "src": "25108:55:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 49959, + "id": 47661, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "24768:57:51", + "src": "25107:57:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14005,38 +14012,38 @@ "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { - "id": 49960, - "name": "PRECISION", + "id": 47662, + "name": "HUNDRED_PERCENTAGE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49010, - "src": "24828:9:51", + "referencedDeclaration": 46694, + "src": "25167:18:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "24768:69:51", + "src": "25107:78:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "24751:86:51" + "src": "25090:95:38" }, { - "assignments": [49964], + "assignments": [47666], "declarations": [ { "constant": false, - "id": 49964, + "id": 47666, "mutability": "mutable", "name": "_total", - "nameLocation": "24855:6:51", + "nameLocation": "25203:6:38", "nodeType": "VariableDeclaration", - "scope": 50014, - "src": "24847:14:51", + "scope": 47717, + "src": "25195:14:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -14044,10 +14051,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49963, + "id": 47665, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "24847:7:51", + "src": "25195:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14056,24 +14063,24 @@ "visibility": "internal" } ], - "id": 49968, + "id": 47670, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 49967, + "id": 47669, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 49965, + "id": 47667, "name": "_collateralAmountCovered", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49947, - "src": "24864:24:51", + "referencedDeclaration": 47649, + "src": "25212:24:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14082,25 +14089,25 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "id": 49966, + "id": 47668, "name": "_bonus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49954, - "src": "24891:6:51", + "referencedDeclaration": 47656, + "src": "25239:6:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "24864:33:51", + "src": "25212:33:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "24847:50:51" + "src": "25195:50:38" }, { "condition": { @@ -14108,18 +14115,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 49972, + "id": 47674, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 49969, + "id": 47671, "name": "_total", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49964, - "src": "25048:6:51", + "referencedDeclaration": 47666, + "src": "25562:6:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14129,60 +14136,60 @@ "operator": ">", "rightExpression": { "expression": { - "id": 49970, + "id": 47672, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49895, - "src": "25057:6:51", + "referencedDeclaration": 47596, + "src": "25571:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 49971, + "id": 47673, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "25064:19:51", + "memberLocation": "25578:19:38", "memberName": "depositedCollateral", "nodeType": "MemberAccess", - "referencedDeclaration": 48956, - "src": "25057:26:51", + "referencedDeclaration": 46302, + "src": "25571:26:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "25048:35:51", + "src": "25562:35:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 49979, + "id": 47681, "nodeType": "IfStatement", - "src": "25044:101:51", + "src": "25558:101:38", "trueBody": { - "id": 49978, + "id": 47680, "nodeType": "Block", - "src": "25085:60:51", + "src": "25599:60:38", "statements": [ { "expression": { - "id": 49976, + "id": 47678, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 49973, + "id": 47675, "name": "_total", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49964, - "src": "25099:6:51", + "referencedDeclaration": 47666, + "src": "25613:6:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14192,41 +14199,41 @@ "operator": "=", "rightHandSide": { "expression": { - "id": 49974, + "id": 47676, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49895, - "src": "25108:6:51", + "referencedDeclaration": 47596, + "src": "25622:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 49975, + "id": 47677, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "25115:19:51", + "memberLocation": "25629:19:38", "memberName": "depositedCollateral", "nodeType": "MemberAccess", - "referencedDeclaration": 48956, - "src": "25108:26:51", + "referencedDeclaration": 46302, + "src": "25622:26:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "25099:35:51", + "src": "25613:35:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49977, + "id": 47679, "nodeType": "ExpressionStatement", - "src": "25099:35:51" + "src": "25613:35:38" } ] } @@ -14235,12 +14242,12 @@ "eventCall": { "arguments": [ { - "id": 49981, + "id": 47683, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49881, - "src": "25171:6:51", + "referencedDeclaration": 47584, + "src": "25685:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -14248,50 +14255,50 @@ }, { "expression": { - "id": 49982, + "id": 47684, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "25179:3:51", + "src": "25693:3:38", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 49983, + "id": 47685, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "25183:6:51", + "memberLocation": "25697:6:38", "memberName": "sender", "nodeType": "MemberAccess", - "src": "25179:10:51", + "src": "25693:10:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 49984, + "id": 47686, "name": "_currencyAmountToPay", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49885, - "src": "25191:20:51", + "referencedDeclaration": 47588, + "src": "25705:20:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 49985, + "id": 47687, "name": "_total", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49964, - "src": "25213:6:51", + "referencedDeclaration": 47666, + "src": "25727:6:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14317,18 +14324,18 @@ "typeString": "uint256" } ], - "id": 49980, + "id": 47682, "name": "Liquidated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48923, - "src": "25160:10:51", + "referencedDeclaration": 46273, + "src": "25674:10:38", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256,uint256)" } }, - "id": 49986, + "id": 47688, "isConstant": false, "isLValue": false, "isPure": false, @@ -14337,63 +14344,63 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "25160:60:51", + "src": "25674:60:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 49987, + "id": 47689, "nodeType": "EmitStatement", - "src": "25155:65:51" + "src": "25669:65:38" }, { "expression": { "arguments": [ { - "id": 49989, + "id": 47691, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49879, - "src": "25251:16:51", + "referencedDeclaration": 47582, + "src": "25765:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, { - "id": 49990, + "id": 47692, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49881, - "src": "25269:6:51", + "referencedDeclaration": 47584, + "src": "25783:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 49991, + "id": 47693, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49883, - "src": "25277:3:51", + "referencedDeclaration": 47586, + "src": "25791:3:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 49992, + "id": 47694, "name": "_total", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49964, - "src": "25282:6:51", + "referencedDeclaration": 47666, + "src": "25796:6:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14403,8 +14410,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, { "typeIdentifier": "t_address", @@ -14419,18 +14426,18 @@ "typeString": "uint256" } ], - "id": 49988, + "id": 47690, "name": "_withdrawCollateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50115, - "src": "25231:19:51", + "referencedDeclaration": 47837, + "src": "25745:19:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20_$44443_$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract ERC20,address,address,uint256)" + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ERC20Token_$46438_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract ERC20Token,address,address,uint256)" } }, - "id": 49993, + "id": 47695, "isConstant": false, "isLValue": false, "isPure": false, @@ -14439,51 +14446,51 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "25231:58:51", + "src": "25745:58:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 49994, + "id": 47696, "nodeType": "ExpressionStatement", - "src": "25231:58:51" + "src": "25745:58:38" }, { "expression": { "arguments": [ { - "id": 49996, + "id": 47698, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49904, - "src": "25313:11:51", + "referencedDeclaration": 47605, + "src": "25827:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, { - "id": 49997, + "id": 47699, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49895, - "src": "25326:6:51", + "referencedDeclaration": 47596, + "src": "25840:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, { - "id": 49998, + "id": 47700, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49881, - "src": "25334:6:51", + "referencedDeclaration": 47584, + "src": "25848:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -14491,38 +14498,38 @@ }, { "expression": { - "id": 49999, + "id": 47701, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "25342:3:51", + "src": "25856:3:38", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 50000, + "id": 47702, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "25346:6:51", + "memberLocation": "25860:6:38", "memberName": "sender", "nodeType": "MemberAccess", - "src": "25342:10:51", + "src": "25856:10:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 50001, + "id": 47703, "name": "_currencyAmountToPay", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49885, - "src": "25354:20:51", + "referencedDeclaration": 47588, + "src": "25868:20:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14532,11 +14539,11 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" }, { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" }, { @@ -14552,18 +14559,18 @@ "typeString": "uint256" } ], - "id": 49995, + "id": 47697, "name": "_burnCurrency", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50248, - "src": "25299:13:51", + "referencedDeclaration": 47969, + "src": "25813:13:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_struct$_VaultInfo_$46309_storage_ptr_$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer,address,address,uint256)" } }, - "id": 50002, + "id": 47704, "isConstant": false, "isLValue": false, "isPure": false, @@ -14572,16 +14579,16 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "25299:76:51", + "src": "25813:76:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 50003, + "id": 47705, "nodeType": "ExpressionStatement", - "src": "25299:76:51" + "src": "25813:76:38" }, { "condition": { @@ -14589,18 +14596,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50009, + "id": 47711, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 50004, + "id": 47706, "name": "_preCollateralRatio", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49915, - "src": "25477:19:51", + "referencedDeclaration": 47616, + "src": "25991:19:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14611,26 +14618,26 @@ "rightExpression": { "arguments": [ { - "id": 50006, + "id": 47708, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49904, - "src": "25520:11:51", + "referencedDeclaration": 47605, + "src": "26034:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, { - "id": 50007, + "id": 47709, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49895, - "src": "25533:6:51", + "referencedDeclaration": 47596, + "src": "26047:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } } @@ -14638,26 +14645,26 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" }, { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } ], - "id": 50005, + "id": 47707, "name": "_getCollateralRatio", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50384, - "src": "25500:19:51", + "referencedDeclaration": 48099, + "src": "26014:19:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$returns$_t_uint256_$", + "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_struct$_VaultInfo_$46309_storage_ptr_$returns$_t_uint256_$", "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer) view returns (uint256)" } }, - "id": 50008, + "id": 47710, "isConstant": false, "isLValue": false, "isPure": false, @@ -14666,164 +14673,157 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "25500:40:51", + "src": "26014:40:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "25477:63:51", + "src": "25991:63:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 50013, + "id": 47716, "nodeType": "IfStatement", - "src": "25473:104:51", + "src": "25987:129:38", "trueBody": { - "errorCall": { - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 50010, - "name": "CollateralRatioNotImproved", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48873, - "src": "25549:26:51", - "typeDescriptions": { - "typeIdentifier": "t_function_error_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 50011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "25549:28:51", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "id": 47715, + "nodeType": "Block", + "src": "26056:60:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 47712, + "name": "CollateralRatioNotImproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46213, + "src": "26077:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 47713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26077:28:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 47714, + "nodeType": "RevertStatement", + "src": "26070:35:38" } - }, - "id": 50012, - "nodeType": "RevertStatement", - "src": "25542:35:51" + ] } } ] }, - "documentation": { - "id": 49876, - "nodeType": "StructuredDocumentation", - "src": "22010:1155:51", - "text": " @notice liquidates a vault making sure the liquidation strictly improves the collateral ratio i.e doesn't leave it the same as before or decreases it (if that's possible)\n @param _collateralToken contract address of collateral used by vault that is to be liquidate, also the token to recieved by the `_to` address after liquidation\n @param _owner owner of the vault to liquidate\n @param _to address to send the liquidated collateral (collateral covered) to\n @param _currencyAmountToPay the amount of currency tokens to pay back for `_owner`\n @dev updates fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the start and end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratio\n @dev should revert if the contract is paused\n should revert if the collateral does not exist\n should revert if the vault is not under-water\n should revert if liqudiation did not strictly imporve the collateral ratio of the vault" - }, - "functionSelector": "aab3f868", - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 49888, - "kind": "modifierInvocation", - "modifierName": { - "id": 49887, - "name": "whenNotPaused", - "nameLocations": ["23297:13:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48744, - "src": "23297:13:51" - }, - "nodeType": "ModifierInvocation", - "src": "23297:13:51" - }, + "documentation": { + "id": 47579, + "nodeType": "StructuredDocumentation", + "src": "22394:1103:38", + "text": " @notice liquidates a vault making sure the liquidation strictly improves the collateral ratio i.e doesn't leave it the same as before or decreases it (if that's possible)\n @param _collateralToken contract address of collateral used by vault that is to be liquidate, also the token to recieved by the `_to` address after liquidation\n @param _owner owner of the vault to liquidate\n @param _to address to send the liquidated collateral (collateral covered) to\n @param _currencyAmountToPay the amount of currency tokens to pay back for `_owner`\n @dev updates fees accrued for `_owner`'s vault since last fee update, this is important as it ensures that the collateral-ratio check at the start and end of the function uses an updated total owed amount i.e (borrowedAmount + accruedFees) when checking `_owner`'s collateral-ratio\n @dev should revert if the collateral does not exist\n should revert if the vault is not under-water\n should revert if liqudiation did not strictly imporve the collateral ratio of the vault" + }, + "functionSelector": "aab3f868", + "implemented": true, + "kind": "function", + "modifiers": [ { "arguments": [ { - "id": 49890, + "id": 47591, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49879, - "src": "23336:16:51", + "referencedDeclaration": 47582, + "src": "23651:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } } ], - "id": 49891, + "id": 47592, "kind": "modifierInvocation", "modifierName": { - "id": 49889, + "id": 47590, "name": "collateralExists", - "nameLocations": ["23319:16:51"], + "nameLocations": ["23634:16:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49094, - "src": "23319:16:51" + "referencedDeclaration": 46804, + "src": "23634:16:38" }, "nodeType": "ModifierInvocation", - "src": "23319:34:51" + "src": "23634:34:38" } ], "name": "liquidate", - "nameLocation": "23179:9:51", + "nameLocation": "23511:9:38", "parameters": { - "id": 49886, + "id": 47589, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 49879, + "id": 47582, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "23195:16:51", + "nameLocation": "23532:16:38", "nodeType": "VariableDeclaration", - "scope": 50015, - "src": "23189:22:51", + "scope": 47718, + "src": "23521:27:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 49878, + "id": 47581, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 49877, - "name": "ERC20", - "nameLocations": ["23189:5:51"], + "id": 47580, + "name": "ERC20Token", + "nameLocations": ["23521:10:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "23189:5:51" + "referencedDeclaration": 46438, + "src": "23521:10:38" }, - "referencedDeclaration": 44443, - "src": "23189:5:51", + "referencedDeclaration": 46438, + "src": "23521:10:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 49881, + "id": 47584, "mutability": "mutable", "name": "_owner", - "nameLocation": "23221:6:51", + "nameLocation": "23558:6:38", "nodeType": "VariableDeclaration", - "scope": 50015, - "src": "23213:14:51", + "scope": 47718, + "src": "23550:14:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -14831,10 +14831,10 @@ "typeString": "address" }, "typeName": { - "id": 49880, + "id": 47583, "name": "address", "nodeType": "ElementaryTypeName", - "src": "23213:7:51", + "src": "23550:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -14845,13 +14845,13 @@ }, { "constant": false, - "id": 49883, + "id": 47586, "mutability": "mutable", "name": "_to", - "nameLocation": "23237:3:51", + "nameLocation": "23574:3:38", "nodeType": "VariableDeclaration", - "scope": 50015, - "src": "23229:11:51", + "scope": 47718, + "src": "23566:11:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -14859,10 +14859,10 @@ "typeString": "address" }, "typeName": { - "id": 49882, + "id": 47585, "name": "address", "nodeType": "ElementaryTypeName", - "src": "23229:7:51", + "src": "23566:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -14873,13 +14873,13 @@ }, { "constant": false, - "id": 49885, + "id": 47588, "mutability": "mutable", "name": "_currencyAmountToPay", - "nameLocation": "23250:20:51", + "nameLocation": "23587:20:38", "nodeType": "VariableDeclaration", - "scope": 50015, - "src": "23242:28:51", + "scope": 47718, + "src": "23579:28:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -14887,10 +14887,10 @@ "typeString": "uint256" }, "typeName": { - "id": 49884, + "id": 47587, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "23242:7:51", + "src": "23579:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14899,42 +14899,42 @@ "visibility": "internal" } ], - "src": "23188:83:51" + "src": "23520:88:38" }, "returnParameters": { - "id": 49892, + "id": 47593, "nodeType": "ParameterList", "parameters": [], - "src": "23358:0:51" + "src": "23673:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { - "id": 50077, + "id": 47784, "nodeType": "FunctionDefinition", - "src": "25939:703:51", + "src": "26477:795:38", "nodes": [], "body": { - "id": 50076, + "id": 47783, "nodeType": "Block", - "src": "26033:609:51", + "src": "26576:696:38", "nodes": [], "statements": [ { - "assignments": [50027], + "assignments": [47730], "declarations": [ { "constant": false, - "id": 50027, + "id": 47730, "mutability": "mutable", "name": "preBalance", - "nameLocation": "26243:10:51", + "nameLocation": "26758:10:38", "nodeType": "VariableDeclaration", - "scope": 50076, - "src": "26235:18:51", + "scope": 47783, + "src": "26750:18:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -14942,10 +14942,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50026, + "id": 47729, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "26235:7:51", + "src": "26750:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14954,20 +14954,20 @@ "visibility": "internal" } ], - "id": 50035, + "id": 47738, "initialValue": { "arguments": [ { "arguments": [ { - "id": 50032, + "id": 47735, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, - "src": "26291:4:51", + "src": "26806:4:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } } @@ -14975,30 +14975,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } ], - "id": 50031, + "id": 47734, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "26283:7:51", + "src": "26798:7:38", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 50030, + "id": 47733, "name": "address", "nodeType": "ElementaryTypeName", - "src": "26283:7:51", + "src": "26798:7:38", "typeDescriptions": {} } }, - "id": 50033, + "id": 47736, "isConstant": false, "isLValue": false, "isPure": false, @@ -15007,7 +15007,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "26283:13:51", + "src": "26798:13:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", @@ -15023,33 +15023,33 @@ } ], "expression": { - "id": 50028, + "id": 47731, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50019, - "src": "26256:16:51", + "referencedDeclaration": 47722, + "src": "26771:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, - "id": 50029, + "id": 47732, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "26273:9:51", + "memberLocation": "26788:9:38", "memberName": "balanceOf", "nodeType": "MemberAccess", - "referencedDeclaration": 44029, - "src": "26256:26:51", + "referencedDeclaration": 44502, + "src": "26771:26:38", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, - "id": 50034, + "id": 47737, "isConstant": false, "isLValue": false, "isPure": false, @@ -15058,7 +15058,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "26256:41:51", + "src": "26771:41:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -15066,30 +15066,90 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "26235:62:51" + "src": "26750:62:38" }, { "expression": { "arguments": [ { - "id": 50039, - "name": "_collateralToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50019, - "src": "26334:16:51", + "arguments": [ + { + "id": 47744, + "name": "_collateralToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47722, + "src": "26959:16:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" + } + ], + "id": 47743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26951:7:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 47742, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26951:7:38", + "typeDescriptions": {} + } + }, + "id": 47745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26951:25:38", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_address", + "typeString": "address" } }, { - "id": 50040, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50021, - "src": "26352:6:51", + "expression": { + "id": 47746, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "26978:3:38", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 47747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "26982:6:38", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "26978:10:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -15098,14 +15158,14 @@ { "arguments": [ { - "id": 50043, + "id": 47750, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, - "src": "26368:4:51", + "src": "26998:4:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } } @@ -15113,30 +15173,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } ], - "id": 50042, + "id": 47749, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "26360:7:51", + "src": "26990:7:38", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 50041, + "id": 47748, "name": "address", "nodeType": "ElementaryTypeName", - "src": "26360:7:51", + "src": "26990:7:38", "typeDescriptions": {} } }, - "id": 50044, + "id": 47751, "isConstant": false, "isLValue": false, "isPure": false, @@ -15145,7 +15205,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "26360:13:51", + "src": "26990:13:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", @@ -15153,12 +15213,12 @@ } }, { - "id": 50045, + "id": 47752, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50023, - "src": "26375:7:51", + "referencedDeclaration": 47726, + "src": "27005:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15168,8 +15228,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_address", + "typeString": "address" }, { "typeIdentifier": "t_address", @@ -15185,33 +15245,33 @@ } ], "expression": { - "id": 50036, - "name": "SafeERC20", + "id": 47739, + "name": "SafeTransferLib", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 45027, - "src": "26307:9:51", + "referencedDeclaration": 44996, + "src": "26918:15:38", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$45027_$", - "typeString": "type(library SafeERC20)" + "typeIdentifier": "t_type$_t_contract$_SafeTransferLib_$44996_$", + "typeString": "type(library SafeTransferLib)" } }, - "id": 50038, + "id": 47741, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "26317:16:51", + "memberLocation": "26934:16:38", "memberName": "safeTransferFrom", "nodeType": "MemberAccess", - "referencedDeclaration": 44814, - "src": "26307:26:51", + "referencedDeclaration": 44921, + "src": "26918:32:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$44521_$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,address,uint256)" + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,address,uint256)" } }, - "id": 50046, + "id": 47753, "isConstant": false, "isLValue": false, "isPure": false, @@ -15220,29 +15280,29 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "26307:76:51", + "src": "26918:95:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 50047, + "id": 47754, "nodeType": "ExpressionStatement", - "src": "26307:76:51" + "src": "26918:95:38" }, { - "assignments": [50049], + "assignments": [47756], "declarations": [ { "constant": false, - "id": 50049, + "id": 47756, "mutability": "mutable", "name": "difference", - "nameLocation": "26401:10:51", + "nameLocation": "27031:10:38", "nodeType": "VariableDeclaration", - "scope": 50076, - "src": "26393:18:51", + "scope": 47783, + "src": "27023:18:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -15250,10 +15310,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50048, + "id": 47755, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "26393:7:51", + "src": "27023:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15262,13 +15322,13 @@ "visibility": "internal" } ], - "id": 50059, + "id": 47766, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50058, + "id": 47765, "isConstant": false, "isLValue": false, "isPure": false, @@ -15278,14 +15338,14 @@ { "arguments": [ { - "id": 50054, + "id": 47761, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, - "src": "26449:4:51", + "src": "27079:4:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } } @@ -15293,30 +15353,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } ], - "id": 50053, + "id": 47760, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "26441:7:51", + "src": "27071:7:38", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 50052, + "id": 47759, "name": "address", "nodeType": "ElementaryTypeName", - "src": "26441:7:51", + "src": "27071:7:38", "typeDescriptions": {} } }, - "id": 50055, + "id": 47762, "isConstant": false, "isLValue": false, "isPure": false, @@ -15325,7 +15385,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "26441:13:51", + "src": "27071:13:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", @@ -15341,33 +15401,33 @@ } ], "expression": { - "id": 50050, + "id": 47757, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50019, - "src": "26414:16:51", + "referencedDeclaration": 47722, + "src": "27044:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, - "id": 50051, + "id": 47758, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "26431:9:51", + "memberLocation": "27061:9:38", "memberName": "balanceOf", "nodeType": "MemberAccess", - "referencedDeclaration": 44029, - "src": "26414:26:51", + "referencedDeclaration": 44502, + "src": "27044:26:38", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, - "id": 50056, + "id": 47763, "isConstant": false, "isLValue": false, "isPure": false, @@ -15376,7 +15436,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "26414:41:51", + "src": "27044:41:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -15386,29 +15446,29 @@ "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { - "id": 50057, + "id": 47764, "name": "preBalance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50027, - "src": "26458:10:51", + "referencedDeclaration": 47730, + "src": "27088:10:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "26414:54:51", + "src": "27044:54:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "26393:75:51" + "src": "27023:75:38" }, { "expression": { - "id": 50067, + "id": 47774, "isConstant": false, "isLValue": false, "isPure": false, @@ -15417,28 +15477,28 @@ "expression": { "baseExpression": { "baseExpression": { - "id": 50060, + "id": 47767, "name": "vaultMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49039, - "src": "26479:12:51", + "referencedDeclaration": 46730, + "src": "27109:12:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$_$", - "typeString": "mapping(contract ERC20 => mapping(address => struct IVault.VaultInfo storage ref))" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$_$", + "typeString": "mapping(contract ERC20Token => mapping(address => struct IVault.VaultInfo storage ref))" } }, - "id": 50063, + "id": 47770, "indexExpression": { - "id": 50061, + "id": 47768, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50019, - "src": "26492:16:51", + "referencedDeclaration": 47722, + "src": "27122:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -15446,20 +15506,20 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "26479:30:51", + "src": "27109:30:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$", + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$", "typeString": "mapping(address => struct IVault.VaultInfo storage ref)" } }, - "id": 50064, + "id": 47771, "indexExpression": { - "id": 50062, + "id": 47769, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50021, - "src": "26510:6:51", + "referencedDeclaration": 47724, + "src": "27140:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -15470,22 +15530,22 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "26479:38:51", + "src": "27109:38:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage", "typeString": "struct IVault.VaultInfo storage ref" } }, - "id": 50065, + "id": 47772, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "26518:19:51", + "memberLocation": "27148:19:38", "memberName": "depositedCollateral", "nodeType": "MemberAccess", - "referencedDeclaration": 48956, - "src": "26479:58:51", + "referencedDeclaration": 46302, + "src": "27109:58:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15494,30 +15554,30 @@ "nodeType": "Assignment", "operator": "+=", "rightHandSide": { - "id": 50066, + "id": 47773, "name": "difference", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50049, - "src": "26541:10:51", + "referencedDeclaration": 47756, + "src": "27171:10:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "26479:72:51", + "src": "27109:72:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50068, + "id": 47775, "nodeType": "ExpressionStatement", - "src": "26479:72:51" + "src": "27109:72:38" }, { "expression": { - "id": 50074, + "id": 47781, "isConstant": false, "isLValue": false, "isPure": false, @@ -15525,28 +15585,28 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 50069, + "id": 47776, "name": "collateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49031, - "src": "26561:17:51", + "referencedDeclaration": 46722, + "src": "27191:17:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo storage ref)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_struct$_CollateralInfo_$46300_storage_$", + "typeString": "mapping(contract ERC20Token => struct IVault.CollateralInfo storage ref)" } }, - "id": 50071, + "id": 47778, "indexExpression": { - "id": 50070, + "id": 47777, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50019, - "src": "26579:16:51", + "referencedDeclaration": 47722, + "src": "27209:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -15554,22 +15614,22 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "26561:35:51", + "src": "27191:35:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage", "typeString": "struct IVault.CollateralInfo storage ref" } }, - "id": 50072, + "id": 47779, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "26597:24:51", + "memberLocation": "27227:24:38", "memberName": "totalDepositedCollateral", "nodeType": "MemberAccess", - "referencedDeclaration": 48932, - "src": "26561:60:51", + "referencedDeclaration": 46282, + "src": "27191:60:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15578,88 +15638,88 @@ "nodeType": "Assignment", "operator": "+=", "rightHandSide": { - "id": 50073, + "id": 47780, "name": "difference", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50049, - "src": "26625:10:51", + "referencedDeclaration": 47756, + "src": "27255:10:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "26561:74:51", + "src": "27191:74:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50075, + "id": 47782, "nodeType": "ExpressionStatement", - "src": "26561:74:51" + "src": "27191:74:38" } ] }, "documentation": { - "id": 50016, + "id": 47719, "nodeType": "StructuredDocumentation", - "src": "25715:219:51", + "src": "26253:219:38", "text": " @dev deposits collateral from `_owner` into this contract and updates the vaults depositedCollateral and collateral's totalDepositedCollateral\n @dev reverts if SafeERC20.safeTransferFrom() fails" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_depositCollateral", - "nameLocation": "25948:18:51", + "nameLocation": "26486:18:38", "parameters": { - "id": 50024, + "id": 47727, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50019, + "id": 47722, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "25973:16:51", + "nameLocation": "26516:16:38", "nodeType": "VariableDeclaration", - "scope": 50077, - "src": "25967:22:51", + "scope": 47784, + "src": "26505:27:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 50018, + "id": 47721, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50017, - "name": "ERC20", - "nameLocations": ["25967:5:51"], + "id": 47720, + "name": "ERC20Token", + "nameLocations": ["26505:10:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "25967:5:51" + "referencedDeclaration": 46438, + "src": "26505:10:38" }, - "referencedDeclaration": 44443, - "src": "25967:5:51", + "referencedDeclaration": 46438, + "src": "26505:10:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 50021, + "id": 47724, "mutability": "mutable", "name": "_owner", - "nameLocation": "25999:6:51", + "nameLocation": "26542:6:38", "nodeType": "VariableDeclaration", - "scope": 50077, - "src": "25991:14:51", + "scope": 47784, + "src": "26534:14:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -15667,10 +15727,10 @@ "typeString": "address" }, "typeName": { - "id": 50020, + "id": 47723, "name": "address", "nodeType": "ElementaryTypeName", - "src": "25991:7:51", + "src": "26534:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -15681,13 +15741,13 @@ }, { "constant": false, - "id": 50023, + "id": 47726, "mutability": "mutable", "name": "_amount", - "nameLocation": "26015:7:51", + "nameLocation": "26558:7:38", "nodeType": "VariableDeclaration", - "scope": 50077, - "src": "26007:15:51", + "scope": 47784, + "src": "26550:15:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -15695,10 +15755,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50022, + "id": 47725, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "26007:7:51", + "src": "26550:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15707,33 +15767,33 @@ "visibility": "internal" } ], - "src": "25966:57:51" + "src": "26504:62:38" }, "returnParameters": { - "id": 50025, + "id": 47728, "nodeType": "ParameterList", "parameters": [], - "src": "26033:0:51" + "src": "26576:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { - "id": 50115, + "id": 47837, "nodeType": "FunctionDefinition", - "src": "26915:340:51", + "src": "27545:426:38", "nodes": [], "body": { - "id": 50114, + "id": 47836, "nodeType": "Block", - "src": "27023:232:51", + "src": "27658:313:38", "nodes": [], "statements": [ { "expression": { - "id": 50097, + "id": 47804, "isConstant": false, "isLValue": false, "isPure": false, @@ -15742,28 +15802,28 @@ "expression": { "baseExpression": { "baseExpression": { - "id": 50090, + "id": 47797, "name": "vaultMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49039, - "src": "27033:12:51", + "referencedDeclaration": 46730, + "src": "27668:12:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$_$", - "typeString": "mapping(contract ERC20 => mapping(address => struct IVault.VaultInfo storage ref))" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$_$", + "typeString": "mapping(contract ERC20Token => mapping(address => struct IVault.VaultInfo storage ref))" } }, - "id": 50093, + "id": 47800, "indexExpression": { - "id": 50091, + "id": 47798, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50081, - "src": "27046:16:51", + "referencedDeclaration": 47788, + "src": "27681:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -15771,20 +15831,20 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "27033:30:51", + "src": "27668:30:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_VaultInfo_$48963_storage_$", + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_VaultInfo_$46309_storage_$", "typeString": "mapping(address => struct IVault.VaultInfo storage ref)" } }, - "id": 50094, + "id": 47801, "indexExpression": { - "id": 50092, + "id": 47799, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50083, - "src": "27064:6:51", + "referencedDeclaration": 47790, + "src": "27699:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -15795,22 +15855,22 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "27033:38:51", + "src": "27668:38:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage", "typeString": "struct IVault.VaultInfo storage ref" } }, - "id": 50095, + "id": 47802, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "27072:19:51", + "memberLocation": "27707:19:38", "memberName": "depositedCollateral", "nodeType": "MemberAccess", - "referencedDeclaration": 48956, - "src": "27033:58:51", + "referencedDeclaration": 46302, + "src": "27668:58:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15819,30 +15879,30 @@ "nodeType": "Assignment", "operator": "-=", "rightHandSide": { - "id": 50096, + "id": 47803, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50087, - "src": "27095:7:51", + "referencedDeclaration": 47794, + "src": "27730:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "27033:69:51", + "src": "27668:69:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50098, + "id": 47805, "nodeType": "ExpressionStatement", - "src": "27033:69:51" + "src": "27668:69:38" }, { "expression": { - "id": 50104, + "id": 47811, "isConstant": false, "isLValue": false, "isPure": false, @@ -15850,28 +15910,28 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 50099, + "id": 47806, "name": "collateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49031, - "src": "27112:17:51", + "referencedDeclaration": 46722, + "src": "27747:17:38", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_contract$_ERC20_$44443_$_t_struct$_CollateralInfo_$48954_storage_$", - "typeString": "mapping(contract ERC20 => struct IVault.CollateralInfo storage ref)" + "typeIdentifier": "t_mapping$_t_contract$_ERC20Token_$46438_$_t_struct$_CollateralInfo_$46300_storage_$", + "typeString": "mapping(contract ERC20Token => struct IVault.CollateralInfo storage ref)" } }, - "id": 50101, + "id": 47808, "indexExpression": { - "id": 50100, + "id": 47807, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50081, - "src": "27130:16:51", + "referencedDeclaration": 47788, + "src": "27765:16:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "isConstant": false, @@ -15879,22 +15939,22 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "27112:35:51", + "src": "27747:35:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage", "typeString": "struct IVault.CollateralInfo storage ref" } }, - "id": 50102, + "id": 47809, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "27148:24:51", + "memberLocation": "27783:24:38", "memberName": "totalDepositedCollateral", "nodeType": "MemberAccess", - "referencedDeclaration": 48932, - "src": "27112:60:51", + "referencedDeclaration": 46282, + "src": "27747:60:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15903,61 +15963,268 @@ "nodeType": "Assignment", "operator": "-=", "rightHandSide": { - "id": 50103, + "id": 47810, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50087, - "src": "27176:7:51", + "referencedDeclaration": 47794, + "src": "27811:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "27112:71:51", + "src": "27747:71:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50105, + "id": 47812, "nodeType": "ExpressionStatement", - "src": "27112:71:51" + "src": "27747:71:38" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 47820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "arguments": [ + { + "id": 47815, + "name": "_collateralToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47788, + "src": "27841:16:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" + } + ], + "id": 47814, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27833:7:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 47813, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27833:7:38", + "typeDescriptions": {} + } + }, + "id": 47816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27833:25:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 47817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "27859:4:38", + "memberName": "code", + "nodeType": "MemberAccess", + "src": "27833:30:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 47818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "27864:6:38", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "27833:37:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 47819, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27874:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "27833:42:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 47824, + "nodeType": "IfStatement", + "src": "27829:56:38", + "trueBody": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 47821, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [-19, -19], + "referencedDeclaration": -19, + "src": "27877:6:38", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 47822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27877:8:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 47823, + "nodeType": "ExpressionStatement", + "src": "27877:8:38" + } }, { "expression": { "arguments": [ { - "id": 50109, - "name": "_collateralToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50081, - "src": "27217:16:51", + "arguments": [ + { + "id": 47830, + "name": "_collateralToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 47788, + "src": "27932:16:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" + } + ], + "id": 47829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27924:7:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 47828, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27924:7:38", + "typeDescriptions": {} + } + }, + "id": 47831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27924:25:38", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_address", + "typeString": "address" } }, { - "id": 50110, + "id": 47832, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50085, - "src": "27235:3:51", + "referencedDeclaration": 47792, + "src": "27951:3:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 50111, + "id": 47833, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50087, - "src": "27240:7:51", + "referencedDeclaration": 47794, + "src": "27956:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15967,8 +16234,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_address", + "typeString": "address" }, { "typeIdentifier": "t_address", @@ -15980,33 +16247,33 @@ } ], "expression": { - "id": 50106, - "name": "SafeERC20", + "id": 47825, + "name": "SafeTransferLib", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 45027, - "src": "27194:9:51", + "referencedDeclaration": 44996, + "src": "27895:15:38", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeERC20_$45027_$", - "typeString": "type(library SafeERC20)" + "typeIdentifier": "t_type$_t_contract$_SafeTransferLib_$44996_$", + "typeString": "type(library SafeTransferLib)" } }, - "id": 50108, + "id": 47827, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "27204:12:51", + "memberLocation": "27911:12:38", "memberName": "safeTransfer", "nodeType": "MemberAccess", - "referencedDeclaration": 44787, - "src": "27194:22:51", + "referencedDeclaration": 44947, + "src": "27895:28:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$44521_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract IERC20,address,uint256)" + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" } }, - "id": 50112, + "id": 47834, "isConstant": false, "isLValue": false, "isPure": false, @@ -16015,78 +16282,78 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "27194:54:51", + "src": "27895:69:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 50113, + "id": 47835, "nodeType": "ExpressionStatement", - "src": "27194:54:51" + "src": "27895:69:38" } ] }, "documentation": { - "id": 50078, + "id": 47785, "nodeType": "StructuredDocumentation", - "src": "26648:262:51", + "src": "27278:262:38", "text": " @dev withdraws collateral to `_to` and updates the vaults depositedCollateral and collateral's totalDepositedCollateral\n @dev reverts if `_amount` is greater than the vaults depositedCollateral\n reverts if safeTransfer() fails" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_withdrawCollateral", - "nameLocation": "26924:19:51", + "nameLocation": "27554:19:38", "parameters": { - "id": 50088, + "id": 47795, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50081, + "id": 47788, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "26950:16:51", + "nameLocation": "27585:16:38", "nodeType": "VariableDeclaration", - "scope": 50115, - "src": "26944:22:51", + "scope": 47837, + "src": "27574:27:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 50080, + "id": 47787, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50079, - "name": "ERC20", - "nameLocations": ["26944:5:51"], + "id": 47786, + "name": "ERC20Token", + "nameLocations": ["27574:10:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 44443, - "src": "26944:5:51" + "referencedDeclaration": 46438, + "src": "27574:10:38" }, - "referencedDeclaration": 44443, - "src": "26944:5:51", + "referencedDeclaration": 46438, + "src": "27574:10:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$44443", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46438", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 50083, + "id": 47790, "mutability": "mutable", "name": "_owner", - "nameLocation": "26976:6:51", + "nameLocation": "27611:6:38", "nodeType": "VariableDeclaration", - "scope": 50115, - "src": "26968:14:51", + "scope": 47837, + "src": "27603:14:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -16094,10 +16361,10 @@ "typeString": "address" }, "typeName": { - "id": 50082, + "id": 47789, "name": "address", "nodeType": "ElementaryTypeName", - "src": "26968:7:51", + "src": "27603:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -16108,13 +16375,13 @@ }, { "constant": false, - "id": 50085, + "id": 47792, "mutability": "mutable", "name": "_to", - "nameLocation": "26992:3:51", + "nameLocation": "27627:3:38", "nodeType": "VariableDeclaration", - "scope": 50115, - "src": "26984:11:51", + "scope": 47837, + "src": "27619:11:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -16122,10 +16389,10 @@ "typeString": "address" }, "typeName": { - "id": 50084, + "id": 47791, "name": "address", "nodeType": "ElementaryTypeName", - "src": "26984:7:51", + "src": "27619:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -16136,13 +16403,13 @@ }, { "constant": false, - "id": 50087, + "id": 47794, "mutability": "mutable", "name": "_amount", - "nameLocation": "27005:7:51", + "nameLocation": "27640:7:38", "nodeType": "VariableDeclaration", - "scope": 50115, - "src": "26997:15:51", + "scope": 47837, + "src": "27632:15:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -16150,10 +16417,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50086, + "id": 47793, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "26997:7:51", + "src": "27632:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16162,60 +16429,60 @@ "visibility": "internal" } ], - "src": "26943:70:51" + "src": "27573:75:38" }, "returnParameters": { - "id": 50089, + "id": 47796, "nodeType": "ParameterList", "parameters": [], - "src": "27023:0:51" + "src": "27658:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { - "id": 50153, + "id": 47875, "nodeType": "FunctionDefinition", - "src": "27439:306:51", + "src": "28155:306:38", "nodes": [], "body": { - "id": 50152, + "id": 47874, "nodeType": "Block", - "src": "27575:170:51", + "src": "28291:170:38", "nodes": [], "statements": [ { "expression": { - "id": 50133, + "id": 47855, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 50129, + "id": 47851, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50122, - "src": "27585:6:51", + "referencedDeclaration": 47844, + "src": "28301:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 50131, + "id": 47853, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "27592:14:51", + "memberLocation": "28308:14:38", "memberName": "borrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 48958, - "src": "27585:21:51", + "referencedDeclaration": 46304, + "src": "28301:21:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16224,57 +16491,57 @@ "nodeType": "Assignment", "operator": "+=", "rightHandSide": { - "id": 50132, + "id": 47854, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50126, - "src": "27610:7:51", + "referencedDeclaration": 47848, + "src": "28326:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "27585:32:51", + "src": "28301:32:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50134, + "id": 47856, "nodeType": "ExpressionStatement", - "src": "27585:32:51" + "src": "28301:32:38" }, { "expression": { - "id": 50139, + "id": 47861, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 50135, + "id": 47857, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50119, - "src": "27627:11:51", + "referencedDeclaration": 47841, + "src": "28343:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 50137, + "id": 47859, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "27639:19:51", + "memberLocation": "28355:19:38", "memberName": "totalBorrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 48934, - "src": "27627:31:51", + "referencedDeclaration": 46284, + "src": "28343:31:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16283,41 +16550,41 @@ "nodeType": "Assignment", "operator": "+=", "rightHandSide": { - "id": 50138, + "id": 47860, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50126, - "src": "27662:7:51", + "referencedDeclaration": 47848, + "src": "28378:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "27627:42:51", + "src": "28343:42:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50140, + "id": 47862, "nodeType": "ExpressionStatement", - "src": "27627:42:51" + "src": "28343:42:38" }, { "expression": { - "id": 50143, + "id": 47865, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 50141, + "id": 47863, "name": "debt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49021, - "src": "27679:4:51", + "referencedDeclaration": 46714, + "src": "28395:4:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16326,49 +16593,49 @@ "nodeType": "Assignment", "operator": "+=", "rightHandSide": { - "id": 50142, + "id": 47864, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50126, - "src": "27687:7:51", + "referencedDeclaration": 47848, + "src": "28403:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "27679:15:51", + "src": "28395:15:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50144, + "id": 47866, "nodeType": "ExpressionStatement", - "src": "27679:15:51" + "src": "28395:15:38" }, { "expression": { "arguments": [ { - "id": 50148, + "id": 47870, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50124, - "src": "27725:3:51", + "referencedDeclaration": 47846, + "src": "28441:3:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 50149, + "id": 47871, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50126, - "src": "27730:7:51", + "referencedDeclaration": 47848, + "src": "28446:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16387,33 +16654,33 @@ } ], "expression": { - "id": 50145, + "id": 47867, "name": "CURRENCY_TOKEN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49016, - "src": "27705:14:51", + "referencedDeclaration": 46700, + "src": "28421:14:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", + "typeIdentifier": "t_contract$_Currency_$46042", "typeString": "contract Currency" } }, - "id": 50147, + "id": 47869, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "27720:4:51", + "memberLocation": "28436:4:38", "memberName": "mint", "nodeType": "MemberAccess", - "referencedDeclaration": 48419, - "src": "27705:19:51", + "referencedDeclaration": 45901, + "src": "28421:19:38", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, - "id": 50150, + "id": 47872, "isConstant": false, "isLValue": false, "isPure": false, @@ -16422,64 +16689,64 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "27705:33:51", + "src": "28421:33:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 50151, + "id": 47873, "nodeType": "ExpressionStatement", - "src": "27705:33:51" + "src": "28421:33:38" } ] }, "documentation": { - "id": 50116, + "id": 47838, "nodeType": "StructuredDocumentation", - "src": "27261:173:51", + "src": "27977:173:38", "text": " @dev mints currency to `_to` and updates the vaults borrowedAmount and collateral's totalBorrowedAmount\n @dev reverts if CURRENCY_TOKEN.mint() fails" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_mintCurrency", - "nameLocation": "27448:13:51", + "nameLocation": "28164:13:38", "parameters": { - "id": 50127, + "id": 47849, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50119, + "id": 47841, "mutability": "mutable", "name": "_collateral", - "nameLocation": "27485:11:51", + "nameLocation": "28201:11:38", "nodeType": "VariableDeclaration", - "scope": 50153, - "src": "27462:34:51", + "scope": 47875, + "src": "28178:34:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 50118, + "id": 47840, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50117, + "id": 47839, "name": "CollateralInfo", - "nameLocations": ["27462:14:51"], + "nameLocations": ["28178:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "27462:14:51" + "referencedDeclaration": 46300, + "src": "28178:14:38" }, - "referencedDeclaration": 48954, - "src": "27462:14:51", + "referencedDeclaration": 46300, + "src": "28178:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, @@ -16487,34 +16754,34 @@ }, { "constant": false, - "id": 50122, + "id": 47844, "mutability": "mutable", "name": "_vault", - "nameLocation": "27516:6:51", + "nameLocation": "28232:6:38", "nodeType": "VariableDeclaration", - "scope": 50153, - "src": "27498:24:51", + "scope": 47875, + "src": "28214:24:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 50121, + "id": 47843, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50120, + "id": 47842, "name": "VaultInfo", - "nameLocations": ["27498:9:51"], + "nameLocations": ["28214:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48963, - "src": "27498:9:51" + "referencedDeclaration": 46309, + "src": "28214:9:38" }, - "referencedDeclaration": 48963, - "src": "27498:9:51", + "referencedDeclaration": 46309, + "src": "28214:9:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, @@ -16522,13 +16789,13 @@ }, { "constant": false, - "id": 50124, + "id": 47846, "mutability": "mutable", "name": "_to", - "nameLocation": "27532:3:51", + "nameLocation": "28248:3:38", "nodeType": "VariableDeclaration", - "scope": 50153, - "src": "27524:11:51", + "scope": 47875, + "src": "28240:11:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -16536,10 +16803,10 @@ "typeString": "address" }, "typeName": { - "id": 50123, + "id": 47845, "name": "address", "nodeType": "ElementaryTypeName", - "src": "27524:7:51", + "src": "28240:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -16550,13 +16817,13 @@ }, { "constant": false, - "id": 50126, + "id": 47848, "mutability": "mutable", "name": "_amount", - "nameLocation": "27545:7:51", + "nameLocation": "28261:7:38", "nodeType": "VariableDeclaration", - "scope": 50153, - "src": "27537:15:51", + "scope": 47875, + "src": "28253:15:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -16564,10 +16831,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50125, + "id": 47847, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "27537:7:51", + "src": "28253:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16576,28 +16843,28 @@ "visibility": "internal" } ], - "src": "27461:92:51" + "src": "28177:92:38" }, "returnParameters": { - "id": 50128, + "id": 47850, "nodeType": "ParameterList", "parameters": [], - "src": "27575:0:51" + "src": "28291:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { - "id": 50248, + "id": 47969, "nodeType": "FunctionDefinition", - "src": "28245:1102:51", + "src": "28961:1089:38", "nodes": [], "body": { - "id": 50247, + "id": 47968, "nodeType": "Block", - "src": "28433:914:51", + "src": "29149:901:38", "nodes": [], "statements": [ { @@ -16606,18 +16873,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50172, + "id": 47894, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 50169, + "id": 47891, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50166, - "src": "28607:7:51", + "referencedDeclaration": 47888, + "src": "29323:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16627,55 +16894,55 @@ "operator": "<=", "rightExpression": { "expression": { - "id": 50170, + "id": 47892, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50160, - "src": "28618:6:51", + "referencedDeclaration": 47882, + "src": "29334:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 50171, + "id": 47893, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "28625:14:51", + "memberLocation": "29341:14:38", "memberName": "borrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 48958, - "src": "28618:21:51", + "referencedDeclaration": 46304, + "src": "29334:21:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "28607:32:51", + "src": "29323:32:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 50245, + "id": 47966, "nodeType": "Block", - "src": "28889:452:51", + "src": "29605:439:38", "statements": [ { - "assignments": [50203], + "assignments": [47925], "declarations": [ { "constant": false, - "id": 50203, + "id": 47925, "mutability": "mutable", "name": "_cacheBorrowedAmount", - "nameLocation": "28911:20:51", + "nameLocation": "29627:20:38", "nodeType": "VariableDeclaration", - "scope": 50245, - "src": "28903:28:51", + "scope": 47966, + "src": "29619:28:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -16683,10 +16950,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50202, + "id": 47924, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "28903:7:51", + "src": "29619:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16695,68 +16962,68 @@ "visibility": "internal" } ], - "id": 50206, + "id": 47928, "initialValue": { "expression": { - "id": 50204, + "id": 47926, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50160, - "src": "28934:6:51", + "referencedDeclaration": 47882, + "src": "29650:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 50205, + "id": 47927, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "28941:14:51", + "memberLocation": "29657:14:38", "memberName": "borrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 48958, - "src": "28934:21:51", + "referencedDeclaration": 46304, + "src": "29650:21:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "28903:52:51" + "src": "29619:52:38" }, { "expression": { - "id": 50211, + "id": 47933, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 50207, + "id": 47929, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50160, - "src": "28970:6:51", + "referencedDeclaration": 47882, + "src": "29686:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 50209, + "id": 47931, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "28977:14:51", + "memberLocation": "29693:14:38", "memberName": "borrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 48958, - "src": "28970:21:51", + "referencedDeclaration": 46304, + "src": "29686:21:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16766,60 +17033,60 @@ "operator": "=", "rightHandSide": { "hexValue": "30", - "id": 50210, + "id": 47932, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "28994:1:51", + "src": "29710:1:38", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "28970:25:51", + "src": "29686:25:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50212, + "id": 47934, "nodeType": "ExpressionStatement", - "src": "28970:25:51" + "src": "29686:25:38" }, { "expression": { - "id": 50217, + "id": 47939, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 50213, + "id": 47935, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50157, - "src": "29009:11:51", + "referencedDeclaration": 47879, + "src": "29725:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 50215, + "id": 47937, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "29021:19:51", + "memberLocation": "29737:19:38", "memberName": "totalBorrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 48934, - "src": "29009:31:51", + "referencedDeclaration": 46284, + "src": "29725:31:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16828,41 +17095,41 @@ "nodeType": "Assignment", "operator": "-=", "rightHandSide": { - "id": 50216, + "id": 47938, "name": "_cacheBorrowedAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50203, - "src": "29044:20:51", + "referencedDeclaration": 47925, + "src": "29760:20:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "29009:55:51", + "src": "29725:55:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50218, + "id": 47940, "nodeType": "ExpressionStatement", - "src": "29009:55:51" + "src": "29725:55:38" }, { "expression": { - "id": 50221, + "id": 47943, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 50219, + "id": 47941, "name": "debt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49021, - "src": "29078:4:51", + "referencedDeclaration": 46714, + "src": "29794:4:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16871,49 +17138,49 @@ "nodeType": "Assignment", "operator": "-=", "rightHandSide": { - "id": 50220, + "id": 47942, "name": "_cacheBorrowedAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50203, - "src": "29086:20:51", + "referencedDeclaration": 47925, + "src": "29802:20:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "29078:28:51", + "src": "29794:28:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50222, + "id": 47944, "nodeType": "ExpressionStatement", - "src": "29078:28:51" + "src": "29794:28:38" }, { "eventCall": { "arguments": [ { - "id": 50224, + "id": 47946, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50162, - "src": "29141:6:51", + "referencedDeclaration": 47884, + "src": "29857:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 50225, + "id": 47947, "name": "_cacheBorrowedAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50203, - "src": "29149:20:51", + "referencedDeclaration": 47925, + "src": "29865:20:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16931,18 +17198,18 @@ "typeString": "uint256" } ], - "id": 50223, + "id": 47945, "name": "CurrencyBurned", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48907, - "src": "29126:14:51", + "referencedDeclaration": 46257, + "src": "29842:14:38", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, - "id": 50226, + "id": 47948, "isConstant": false, "isLValue": false, "isPure": false, @@ -16951,39 +17218,39 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "29126:44:51", + "src": "29842:44:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 50227, + "id": 47949, "nodeType": "EmitStatement", - "src": "29121:49:51" + "src": "29837:49:38" }, { "expression": { "arguments": [ { - "id": 50231, + "id": 47953, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50164, - "src": "29204:5:51", + "referencedDeclaration": 47886, + "src": "29920:5:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 50232, + "id": 47954, "name": "_cacheBorrowedAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50203, - "src": "29211:20:51", + "referencedDeclaration": 47925, + "src": "29927:20:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17002,33 +17269,33 @@ } ], "expression": { - "id": 50228, + "id": 47950, "name": "CURRENCY_TOKEN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49016, - "src": "29184:14:51", + "referencedDeclaration": 46700, + "src": "29900:14:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", + "typeIdentifier": "t_contract$_Currency_$46042", "typeString": "contract Currency" } }, - "id": 50230, + "id": 47952, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "29199:4:51", + "memberLocation": "29915:4:38", "memberName": "burn", "nodeType": "MemberAccess", - "referencedDeclaration": 48440, - "src": "29184:19:51", + "referencedDeclaration": 45932, + "src": "29900:19:38", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, - "id": 50233, + "id": 47955, "isConstant": false, "isLValue": false, "isPure": false, @@ -17037,63 +17304,51 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "29184:48:51", + "src": "29900:48:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 50234, - "nodeType": "ExpressionStatement", - "src": "29184:48:51" - }, - { - "expression": { - "arguments": [ - { - "id": 50236, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50157, - "src": "29263:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - }, + "id": 47956, + "nodeType": "ExpressionStatement", + "src": "29900:48:38" + }, + { + "expression": { + "arguments": [ { - "id": 50237, + "id": 47958, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50160, - "src": "29276:6:51", + "referencedDeclaration": 47882, + "src": "29979:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, { - "id": 50238, + "id": 47959, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50162, - "src": "29284:6:51", + "referencedDeclaration": 47884, + "src": "29987:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 50239, + "id": 47960, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50164, - "src": "29292:5:51", + "referencedDeclaration": 47886, + "src": "29995:5:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -17104,18 +17359,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50242, + "id": 47963, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 50240, + "id": 47961, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50166, - "src": "29299:7:51", + "referencedDeclaration": 47888, + "src": "30002:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17124,18 +17379,18 @@ "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { - "id": 50241, + "id": 47962, "name": "_cacheBorrowedAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50203, - "src": "29309:20:51", + "referencedDeclaration": 47925, + "src": "30012:20:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "29299:30:51", + "src": "30002:30:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17145,11 +17400,7 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - }, - { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" }, { @@ -17165,18 +17416,18 @@ "typeString": "uint256" } ], - "id": 50235, + "id": 47957, "name": "_payAccruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50301, - "src": "29247:15:51", + "referencedDeclaration": 48009, + "src": "29963:15:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer,address,address,uint256)" + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VaultInfo_$46309_storage_ptr_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (struct IVault.VaultInfo storage pointer,address,address,uint256)" } }, - "id": 50243, + "id": 47964, "isConstant": false, "isLValue": false, "isPure": false, @@ -17185,57 +17436,57 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "29247:83:51", + "src": "29963:70:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 50244, + "id": 47965, "nodeType": "ExpressionStatement", - "src": "29247:83:51" + "src": "29963:70:38" } ] }, - "id": 50246, + "id": 47967, "nodeType": "IfStatement", - "src": "28603:738:51", + "src": "29319:725:38", "trueBody": { - "id": 50201, + "id": 47923, "nodeType": "Block", - "src": "28641:242:51", + "src": "29357:242:38", "statements": [ { "expression": { - "id": 50177, + "id": 47899, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 50173, + "id": 47895, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50160, - "src": "28655:6:51", + "referencedDeclaration": 47882, + "src": "29371:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 50175, + "id": 47897, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "28662:14:51", + "memberLocation": "29378:14:38", "memberName": "borrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 48958, - "src": "28655:21:51", + "referencedDeclaration": 46304, + "src": "29371:21:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17244,57 +17495,57 @@ "nodeType": "Assignment", "operator": "-=", "rightHandSide": { - "id": 50176, + "id": 47898, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50166, - "src": "28680:7:51", + "referencedDeclaration": 47888, + "src": "29396:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "28655:32:51", + "src": "29371:32:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50178, + "id": 47900, "nodeType": "ExpressionStatement", - "src": "28655:32:51" + "src": "29371:32:38" }, { "expression": { - "id": 50183, + "id": 47905, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 50179, + "id": 47901, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50157, - "src": "28701:11:51", + "referencedDeclaration": 47879, + "src": "29417:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 50181, + "id": 47903, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "28713:19:51", + "memberLocation": "29429:19:38", "memberName": "totalBorrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 48934, - "src": "28701:31:51", + "referencedDeclaration": 46284, + "src": "29417:31:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17303,41 +17554,41 @@ "nodeType": "Assignment", "operator": "-=", "rightHandSide": { - "id": 50182, + "id": 47904, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50166, - "src": "28736:7:51", + "referencedDeclaration": 47888, + "src": "29452:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "28701:42:51", + "src": "29417:42:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50184, + "id": 47906, "nodeType": "ExpressionStatement", - "src": "28701:42:51" + "src": "29417:42:38" }, { "expression": { - "id": 50187, + "id": 47909, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 50185, + "id": 47907, "name": "debt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49021, - "src": "28757:4:51", + "referencedDeclaration": 46714, + "src": "29473:4:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17346,49 +17597,49 @@ "nodeType": "Assignment", "operator": "-=", "rightHandSide": { - "id": 50186, + "id": 47908, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50166, - "src": "28765:7:51", + "referencedDeclaration": 47888, + "src": "29481:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "28757:15:51", + "src": "29473:15:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50188, + "id": 47910, "nodeType": "ExpressionStatement", - "src": "28757:15:51" + "src": "29473:15:38" }, { "eventCall": { "arguments": [ { - "id": 50190, + "id": 47912, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50162, - "src": "28807:6:51", + "referencedDeclaration": 47884, + "src": "29523:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 50191, + "id": 47913, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50166, - "src": "28815:7:51", + "referencedDeclaration": 47888, + "src": "29531:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17406,18 +17657,18 @@ "typeString": "uint256" } ], - "id": 50189, + "id": 47911, "name": "CurrencyBurned", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48907, - "src": "28792:14:51", + "referencedDeclaration": 46257, + "src": "29508:14:38", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, - "id": 50192, + "id": 47914, "isConstant": false, "isLValue": false, "isPure": false, @@ -17426,39 +17677,39 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "28792:31:51", + "src": "29508:31:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 50193, + "id": 47915, "nodeType": "EmitStatement", - "src": "28787:36:51" + "src": "29503:36:38" }, { "expression": { "arguments": [ { - "id": 50197, + "id": 47919, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50164, - "src": "28857:5:51", + "referencedDeclaration": 47886, + "src": "29573:5:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 50198, + "id": 47920, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50166, - "src": "28864:7:51", + "referencedDeclaration": 47888, + "src": "29580:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17477,33 +17728,33 @@ } ], "expression": { - "id": 50194, + "id": 47916, "name": "CURRENCY_TOKEN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49016, - "src": "28837:14:51", + "referencedDeclaration": 46700, + "src": "29553:14:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", + "typeIdentifier": "t_contract$_Currency_$46042", "typeString": "contract Currency" } }, - "id": 50196, + "id": 47918, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "28852:4:51", + "memberLocation": "29568:4:38", "memberName": "burn", "nodeType": "MemberAccess", - "referencedDeclaration": 48440, - "src": "28837:19:51", + "referencedDeclaration": 45932, + "src": "29553:19:38", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, - "id": 50199, + "id": 47921, "isConstant": false, "isLValue": false, "isPure": false, @@ -17512,16 +17763,16 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "28837:35:51", + "src": "29553:35:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 50200, + "id": 47922, "nodeType": "ExpressionStatement", - "src": "28837:35:51" + "src": "29553:35:38" } ] } @@ -17529,50 +17780,50 @@ ] }, "documentation": { - "id": 50154, + "id": 47876, "nodeType": "StructuredDocumentation", - "src": "27751:489:51", + "src": "28467:489:38", "text": " @dev burns currency from `_from` or/and tranfers currency from `_from` to this contract\n @dev if `_amount` > the vaults borrowed amount, the rest is used to pay accrued fees (if it is too big for that too, it reverts). else it's only used to pay the borrowed amount\n @dev borrowed amount paid back is burnt while accrued fees paid back is sent to this contract\n @dev reverts if CURRENCY_TOKEN.burn() fails\n reverts if _payAccruedFees() fails" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_burnCurrency", - "nameLocation": "28254:13:51", + "nameLocation": "28970:13:38", "parameters": { - "id": 50167, + "id": 47889, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50157, + "id": 47879, "mutability": "mutable", "name": "_collateral", - "nameLocation": "28300:11:51", + "nameLocation": "29016:11:38", "nodeType": "VariableDeclaration", - "scope": 50248, - "src": "28277:34:51", + "scope": 47969, + "src": "28993:34:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 50156, + "id": 47878, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50155, + "id": 47877, "name": "CollateralInfo", - "nameLocations": ["28277:14:51"], + "nameLocations": ["28993:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "28277:14:51" + "referencedDeclaration": 46300, + "src": "28993:14:38" }, - "referencedDeclaration": 48954, - "src": "28277:14:51", + "referencedDeclaration": 46300, + "src": "28993:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, @@ -17580,34 +17831,34 @@ }, { "constant": false, - "id": 50160, + "id": 47882, "mutability": "mutable", "name": "_vault", - "nameLocation": "28339:6:51", + "nameLocation": "29055:6:38", "nodeType": "VariableDeclaration", - "scope": 50248, - "src": "28321:24:51", + "scope": 47969, + "src": "29037:24:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 50159, + "id": 47881, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50158, + "id": 47880, "name": "VaultInfo", - "nameLocations": ["28321:9:51"], + "nameLocations": ["29037:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48963, - "src": "28321:9:51" + "referencedDeclaration": 46309, + "src": "29037:9:38" }, - "referencedDeclaration": 48963, - "src": "28321:9:51", + "referencedDeclaration": 46309, + "src": "29037:9:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, @@ -17615,13 +17866,13 @@ }, { "constant": false, - "id": 50162, + "id": 47884, "mutability": "mutable", "name": "_owner", - "nameLocation": "28363:6:51", + "nameLocation": "29079:6:38", "nodeType": "VariableDeclaration", - "scope": 50248, - "src": "28355:14:51", + "scope": 47969, + "src": "29071:14:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -17629,10 +17880,10 @@ "typeString": "address" }, "typeName": { - "id": 50161, + "id": 47883, "name": "address", "nodeType": "ElementaryTypeName", - "src": "28355:7:51", + "src": "29071:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -17643,13 +17894,13 @@ }, { "constant": false, - "id": 50164, + "id": 47886, "mutability": "mutable", "name": "_from", - "nameLocation": "28387:5:51", + "nameLocation": "29103:5:38", "nodeType": "VariableDeclaration", - "scope": 50248, - "src": "28379:13:51", + "scope": 47969, + "src": "29095:13:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -17657,10 +17908,10 @@ "typeString": "address" }, "typeName": { - "id": 50163, + "id": 47885, "name": "address", "nodeType": "ElementaryTypeName", - "src": "28379:7:51", + "src": "29095:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -17671,13 +17922,13 @@ }, { "constant": false, - "id": 50166, + "id": 47888, "mutability": "mutable", "name": "_amount", - "nameLocation": "28410:7:51", + "nameLocation": "29126:7:38", "nodeType": "VariableDeclaration", - "scope": 50248, - "src": "28402:15:51", + "scope": 47969, + "src": "29118:15:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -17685,10 +17936,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50165, + "id": 47887, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "28402:7:51", + "src": "29118:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17697,103 +17948,60 @@ "visibility": "internal" } ], - "src": "28267:156:51" + "src": "28983:156:38" }, "returnParameters": { - "id": 50168, + "id": 47890, "nodeType": "ParameterList", "parameters": [], - "src": "28433:0:51" + "src": "29149:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { - "id": 50301, + "id": 48009, "nodeType": "FunctionDefinition", - "src": "29704:449:51", + "src": "30407:292:38", "nodes": [], "body": { - "id": 50300, + "id": 48008, "nodeType": "Block", - "src": "29894:259:51", + "src": "30515:184:38", "nodes": [], "statements": [ { "expression": { - "id": 50268, + "id": 47986, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 50264, + "id": 47982, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50255, - "src": "29904:6:51", + "referencedDeclaration": 47973, + "src": "30525:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 50266, + "id": 47984, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "29911:11:51", + "memberLocation": "30532:11:38", "memberName": "accruedFees", "nodeType": "MemberAccess", - "referencedDeclaration": 48960, - "src": "29904:18:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "id": 50267, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50261, - "src": "29926:7:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "29904:29:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 50269, - "nodeType": "ExpressionStatement", - "src": "29904:29:51" - }, - { - "expression": { - "id": 50272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 50270, - "name": "accruedFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49023, - "src": "29943:11:51", + "referencedDeclaration": 46306, + "src": "30525:18:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17802,100 +18010,41 @@ "nodeType": "Assignment", "operator": "-=", "rightHandSide": { - "id": 50271, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50261, - "src": "29958:7:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "29943:22:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 50273, - "nodeType": "ExpressionStatement", - "src": "29943:22:51" - }, - { - "expression": { - "id": 50278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "id": 50274, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50252, - "src": "29976:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - }, - "id": 50276, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "29988:8:51", - "memberName": "paidFees", - "nodeType": "MemberAccess", - "referencedDeclaration": 48943, - "src": "29976:20:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "id": 50277, + "id": 47985, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50261, - "src": "30000:7:51", + "referencedDeclaration": 47979, + "src": "30547:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "29976:31:51", + "src": "30525:29:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50279, + "id": 47987, "nodeType": "ExpressionStatement", - "src": "29976:31:51" + "src": "30525:29:38" }, { "expression": { - "id": 50282, + "id": 47990, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 50280, + "id": 47988, "name": "paidFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49025, - "src": "30017:8:51", + "referencedDeclaration": 46716, + "src": "30564:8:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17904,49 +18053,49 @@ "nodeType": "Assignment", "operator": "+=", "rightHandSide": { - "id": 50281, + "id": 47989, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50261, - "src": "30029:7:51", + "referencedDeclaration": 47979, + "src": "30576:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "30017:19:51", + "src": "30564:19:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50283, + "id": 47991, "nodeType": "ExpressionStatement", - "src": "30017:19:51" + "src": "30564:19:38" }, { "eventCall": { "arguments": [ { - "id": 50285, + "id": 47993, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50257, - "src": "30061:6:51", + "referencedDeclaration": 47975, + "src": "30608:6:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 50286, + "id": 47994, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50261, - "src": "30069:7:51", + "referencedDeclaration": 47979, + "src": "30616:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17964,18 +18113,18 @@ "typeString": "uint256" } ], - "id": 50284, + "id": 47992, "name": "FeesPaid", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48913, - "src": "30052:8:51", + "referencedDeclaration": 46263, + "src": "30599:8:38", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, - "id": 50287, + "id": 47995, "isConstant": false, "isLValue": false, "isPure": false, @@ -17984,27 +18133,27 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "30052:25:51", + "src": "30599:25:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 50288, + "id": 47996, "nodeType": "EmitStatement", - "src": "30047:30:51" + "src": "30594:30:38" }, { "expression": { "arguments": [ { - "id": 50292, + "id": 48000, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50259, - "src": "30116:5:51", + "referencedDeclaration": 47977, + "src": "30662:5:38", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -18013,14 +18162,14 @@ { "arguments": [ { - "id": 50295, + "id": 48003, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -28, - "src": "30131:4:51", + "src": "30677:4:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } } @@ -18028,30 +18177,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$50616", + "typeIdentifier": "t_contract$_Vault_$48280", "typeString": "contract Vault" } ], - "id": 50294, + "id": 48002, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "30123:7:51", + "src": "30669:7:38", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 50293, + "id": 48001, "name": "address", "nodeType": "ElementaryTypeName", - "src": "30123:7:51", + "src": "30669:7:38", "typeDescriptions": {} } }, - "id": 50296, + "id": 48004, "isConstant": false, "isLValue": false, "isPure": false, @@ -18060,7 +18209,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "30123:13:51", + "src": "30669:13:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", @@ -18068,12 +18217,12 @@ } }, { - "id": 50297, + "id": 48005, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50261, - "src": "30138:7:51", + "referencedDeclaration": 47979, + "src": "30684:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18096,33 +18245,33 @@ } ], "expression": { - "id": 50289, + "id": 47997, "name": "CURRENCY_TOKEN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49016, - "src": "30088:14:51", + "referencedDeclaration": 46700, + "src": "30634:14:38", "typeDescriptions": { - "typeIdentifier": "t_contract$_Currency_$48549", + "typeIdentifier": "t_contract$_Currency_$46042", "typeString": "contract Currency" } }, - "id": 50291, + "id": 47999, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "30103:12:51", + "memberLocation": "30649:12:38", "memberName": "transferFrom", "nodeType": "MemberAccess", - "referencedDeclaration": 44126, - "src": "30088:27:51", + "referencedDeclaration": 44584, + "src": "30634:27:38", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,address,uint256) external returns (bool)" } }, - "id": 50298, + "id": 48006, "isConstant": false, "isLValue": false, "isPure": false, @@ -18131,99 +18280,64 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "30088:58:51", + "src": "30634:58:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 50299, + "id": 48007, "nodeType": "ExpressionStatement", - "src": "30088:58:51" + "src": "30634:58:38" } ] }, "documentation": { - "id": 50249, + "id": 47970, "nodeType": "StructuredDocumentation", - "src": "29353:346:51", + "src": "30056:346:38", "text": " @dev used to move `_amount` of accrued fees from accruedFees vault and global variables to the vault's and collateral's paidFees variables and then transfer the fee from the user to this contract\n @dev reverts if `_amount` is greater than the vault's accruedFees\n reverts if CURRENCY_TOKEN.transferFrom() fails" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_payAccruedFees", - "nameLocation": "29713:15:51", + "nameLocation": "30416:15:38", "parameters": { - "id": 50262, + "id": 47980, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50252, - "mutability": "mutable", - "name": "_collateral", - "nameLocation": "29761:11:51", - "nodeType": "VariableDeclaration", - "scope": 50301, - "src": "29738:34:51", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo" - }, - "typeName": { - "id": 50251, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 50250, - "name": "CollateralInfo", - "nameLocations": ["29738:14:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "29738:14:51" - }, - "referencedDeclaration": 48954, - "src": "29738:14:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 50255, + "id": 47973, "mutability": "mutable", "name": "_vault", - "nameLocation": "29800:6:51", + "nameLocation": "30450:6:38", "nodeType": "VariableDeclaration", - "scope": 50301, - "src": "29782:24:51", + "scope": 48009, + "src": "30432:24:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 50254, + "id": 47972, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50253, + "id": 47971, "name": "VaultInfo", - "nameLocations": ["29782:9:51"], + "nameLocations": ["30432:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48963, - "src": "29782:9:51" + "referencedDeclaration": 46309, + "src": "30432:9:38" }, - "referencedDeclaration": 48963, - "src": "29782:9:51", + "referencedDeclaration": 46309, + "src": "30432:9:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, @@ -18231,13 +18345,13 @@ }, { "constant": false, - "id": 50257, + "id": 47975, "mutability": "mutable", "name": "_owner", - "nameLocation": "29824:6:51", + "nameLocation": "30466:6:38", "nodeType": "VariableDeclaration", - "scope": 50301, - "src": "29816:14:51", + "scope": 48009, + "src": "30458:14:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -18245,10 +18359,10 @@ "typeString": "address" }, "typeName": { - "id": 50256, + "id": 47974, "name": "address", "nodeType": "ElementaryTypeName", - "src": "29816:7:51", + "src": "30458:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -18259,13 +18373,13 @@ }, { "constant": false, - "id": 50259, + "id": 47977, "mutability": "mutable", "name": "_from", - "nameLocation": "29848:5:51", + "nameLocation": "30482:5:38", "nodeType": "VariableDeclaration", - "scope": 50301, - "src": "29840:13:51", + "scope": 48009, + "src": "30474:13:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -18273,10 +18387,10 @@ "typeString": "address" }, "typeName": { - "id": 50258, + "id": 47976, "name": "address", "nodeType": "ElementaryTypeName", - "src": "29840:7:51", + "src": "30474:7:38", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -18287,13 +18401,13 @@ }, { "constant": false, - "id": 50261, + "id": 47979, "mutability": "mutable", "name": "_amount", - "nameLocation": "29871:7:51", + "nameLocation": "30497:7:38", "nodeType": "VariableDeclaration", - "scope": 50301, - "src": "29863:15:51", + "scope": 48009, + "src": "30489:15:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -18301,10 +18415,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50260, + "id": 47978, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "29863:7:51", + "src": "30489:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18313,42 +18427,42 @@ "visibility": "internal" } ], - "src": "29728:156:51" + "src": "30431:74:38" }, "returnParameters": { - "id": 50263, + "id": 47981, "nodeType": "ParameterList", "parameters": [], - "src": "29894:0:51" + "src": "30515:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { - "id": 50342, + "id": 48046, "nodeType": "FunctionDefinition", - "src": "30311:487:51", + "src": "30857:449:38", "nodes": [], "body": { - "id": 50341, + "id": 48045, "nodeType": "Block", - "src": "30403:395:51", + "src": "30948:358:38", "nodes": [], "statements": [ { - "assignments": [50312, 50314], + "assignments": [48020, 48022], "declarations": [ { "constant": false, - "id": 50312, + "id": 48020, "mutability": "mutable", "name": "_accruedFees", - "nameLocation": "30422:12:51", + "nameLocation": "30967:12:38", "nodeType": "VariableDeclaration", - "scope": 50341, - "src": "30414:20:51", + "scope": 48045, + "src": "30959:20:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -18356,10 +18470,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50311, + "id": 48019, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "30414:7:51", + "src": "30959:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18369,13 +18483,13 @@ }, { "constant": false, - "id": 50314, + "id": 48022, "mutability": "mutable", "name": "_currentTotalAccumulatedRate", - "nameLocation": "30444:28:51", + "nameLocation": "30989:28:38", "nodeType": "VariableDeclaration", - "scope": 50341, - "src": "30436:36:51", + "scope": 48045, + "src": "30981:36:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -18383,10 +18497,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50313, + "id": 48021, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "30436:7:51", + "src": "30981:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18395,30 +18509,30 @@ "visibility": "internal" } ], - "id": 50319, + "id": 48027, "initialValue": { "arguments": [ { - "id": 50316, + "id": 48024, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50305, - "src": "30498:11:51", + "referencedDeclaration": 48013, + "src": "31043:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, { - "id": 50317, + "id": 48025, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50308, - "src": "30511:6:51", + "referencedDeclaration": 48016, + "src": "31056:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } } @@ -18426,26 +18540,26 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" }, { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } ], - "id": 50315, + "id": 48023, "name": "_calculateAccruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50488, - "src": "30476:21:51", + "referencedDeclaration": 48201, + "src": "31021:21:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$returns$_t_uint256_$_t_uint256_$", + "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_struct$_VaultInfo_$46309_storage_ptr_$returns$_t_uint256_$_t_uint256_$", "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer) view returns (uint256,uint256)" } }, - "id": 50318, + "id": 48026, "isConstant": false, "isLValue": false, "isPure": false, @@ -18454,7 +18568,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "30476:42:51", + "src": "31021:42:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", @@ -18462,38 +18576,38 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "30413:105:51" + "src": "30958:105:38" }, { "expression": { - "id": 50324, + "id": 48032, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 50320, + "id": 48028, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50308, - "src": "30528:6:51", + "referencedDeclaration": 48016, + "src": "31073:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 50322, + "id": 48030, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "30535:24:51", + "memberLocation": "31080:24:38", "memberName": "lastTotalAccumulatedRate", "nodeType": "MemberAccess", - "referencedDeclaration": 48962, - "src": "30528:31:51", + "referencedDeclaration": 46308, + "src": "31073:31:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18502,26 +18616,26 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 50323, + "id": 48031, "name": "_currentTotalAccumulatedRate", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50314, - "src": "30562:28:51", + "referencedDeclaration": 48022, + "src": "31107:28:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "30528:62:51", + "src": "31073:62:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50325, + "id": 48033, "nodeType": "ExpressionStatement", - "src": "30528:62:51" + "src": "31073:62:38" }, { "condition": { @@ -18529,18 +18643,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50328, + "id": 48036, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 50326, + "id": 48034, "name": "_accruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50312, - "src": "30684:12:51", + "referencedDeclaration": 48020, + "src": "31229:12:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18550,109 +18664,66 @@ "operator": "==", "rightExpression": { "hexValue": "30", - "id": 50327, + "id": 48035, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "30700:1:51", + "src": "31245:1:38", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "30684:17:51", + "src": "31229:17:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 50330, + "id": 48038, "nodeType": "IfStatement", - "src": "30680:30:51", + "src": "31225:30:38", "trueBody": { - "functionReturnParameters": 50310, - "id": 50329, + "functionReturnParameters": 48018, + "id": 48037, "nodeType": "Return", - "src": "30703:7:51" + "src": "31248:7:38" } }, { "expression": { - "id": 50335, + "id": 48043, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "expression": { - "id": 50331, + "id": 48039, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50308, - "src": "30720:6:51", + "referencedDeclaration": 48016, + "src": "31265:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 50333, + "id": 48041, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberLocation": "30727:11:51", + "memberLocation": "31272:11:38", "memberName": "accruedFees", "nodeType": "MemberAccess", - "referencedDeclaration": 48960, - "src": "30720:18:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "id": 50334, - "name": "_accruedFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50312, - "src": "30742:12:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "30720:34:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 50336, - "nodeType": "ExpressionStatement", - "src": "30720:34:51" - }, - { - "expression": { - "id": 50339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 50337, - "name": "accruedFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49023, - "src": "30764:11:51", + "referencedDeclaration": 46306, + "src": "31265:18:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18661,74 +18732,74 @@ "nodeType": "Assignment", "operator": "+=", "rightHandSide": { - "id": 50338, + "id": 48042, "name": "_accruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50312, - "src": "30779:12:51", + "referencedDeclaration": 48020, + "src": "31287:12:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "30764:27:51", + "src": "31265:34:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50340, + "id": 48044, "nodeType": "ExpressionStatement", - "src": "30764:27:51" + "src": "31265:34:38" } ] }, "documentation": { - "id": 50302, + "id": 48010, "nodeType": "StructuredDocumentation", - "src": "30159:147:51", + "src": "30705:147:38", "text": " @dev increments accrued fees of a vault by it's accrued fees since it's`_vault.lastUpdateTime`.\n @dev should never revert!" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_accrueFees", - "nameLocation": "30320:11:51", + "nameLocation": "30866:11:38", "parameters": { - "id": 50309, + "id": 48017, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50305, + "id": 48013, "mutability": "mutable", "name": "_collateral", - "nameLocation": "30355:11:51", + "nameLocation": "30901:11:38", "nodeType": "VariableDeclaration", - "scope": 50342, - "src": "30332:34:51", + "scope": 48046, + "src": "30878:34:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 50304, + "id": 48012, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50303, + "id": 48011, "name": "CollateralInfo", - "nameLocations": ["30332:14:51"], + "nameLocations": ["30878:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "30332:14:51" + "referencedDeclaration": 46300, + "src": "30878:14:38" }, - "referencedDeclaration": 48954, - "src": "30332:14:51", + "referencedDeclaration": 46300, + "src": "30878:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, @@ -18736,76 +18807,76 @@ }, { "constant": false, - "id": 50308, + "id": 48016, "mutability": "mutable", "name": "_vault", - "nameLocation": "30386:6:51", + "nameLocation": "30932:6:38", "nodeType": "VariableDeclaration", - "scope": 50342, - "src": "30368:24:51", + "scope": 48046, + "src": "30914:24:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 50307, + "id": 48015, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50306, + "id": 48014, "name": "VaultInfo", - "nameLocations": ["30368:9:51"], + "nameLocations": ["30914:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48963, - "src": "30368:9:51" + "referencedDeclaration": 46309, + "src": "30914:9:38" }, - "referencedDeclaration": 48963, - "src": "30368:9:51", + "referencedDeclaration": 46309, + "src": "30914:9:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "src": "30331:62:51" + "src": "30877:62:38" }, "returnParameters": { - "id": 50310, + "id": 48018, "nodeType": "ParameterList", "parameters": [], - "src": "30403:0:51" + "src": "30948:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "nonpayable", "virtual": false, - "visibility": "internal" + "visibility": "private" }, { - "id": 50384, + "id": 48099, "nodeType": "FunctionDefinition", - "src": "30947:965:51", + "src": "31455:1193:38", "nodes": [], "body": { - "id": 50383, + "id": 48098, "nodeType": "Block", - "src": "31098:814:51", + "src": "31605:1043:38", "nodes": [], "statements": [ { - "assignments": [50355], + "assignments": [48059], "declarations": [ { "constant": false, - "id": 50355, + "id": 48059, "mutability": "mutable", "name": "_totalUserDebt", - "nameLocation": "31462:14:51", + "nameLocation": "31923:14:38", "nodeType": "VariableDeclaration", - "scope": 50383, - "src": "31454:22:51", + "scope": 48098, + "src": "31915:22:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -18813,10 +18884,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50354, + "id": 48058, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "31454:7:51", + "src": "31915:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18825,40 +18896,40 @@ "visibility": "internal" } ], - "id": 50361, + "id": 48065, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50360, + "id": 48064, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { - "id": 50356, + "id": 48060, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50349, - "src": "31479:6:51", + "referencedDeclaration": 48053, + "src": "31940:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 50357, + "id": 48061, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "31486:14:51", + "memberLocation": "31947:14:38", "memberName": "borrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 48958, - "src": "31479:21:51", + "referencedDeclaration": 46304, + "src": "31940:21:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18868,40 +18939,40 @@ "operator": "+", "rightExpression": { "expression": { - "id": 50358, + "id": 48062, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50349, - "src": "31503:6:51", + "referencedDeclaration": 48053, + "src": "31964:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 50359, + "id": 48063, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "31510:11:51", + "memberLocation": "31971:11:38", "memberName": "accruedFees", "nodeType": "MemberAccess", - "referencedDeclaration": 48960, - "src": "31503:18:51", + "referencedDeclaration": 46306, + "src": "31964:18:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "31479:42:51", + "src": "31940:42:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "31454:67:51" + "src": "31915:67:38" }, { "condition": { @@ -18909,18 +18980,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50364, + "id": 48068, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 50362, + "id": 48066, "name": "_totalUserDebt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50355, - "src": "31535:14:51", + "referencedDeclaration": 48059, + "src": "32036:14:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18930,64 +19001,209 @@ "operator": "==", "rightExpression": { "hexValue": "30", - "id": 50363, + "id": 48067, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "31553:1:51", + "src": "32054:1:38", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "31535:19:51", + "src": "32036:19:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 50367, + "id": 48071, "nodeType": "IfStatement", - "src": "31531:33:51", + "src": "32032:33:38", "trueBody": { "expression": { "hexValue": "30", - "id": 50365, + "id": 48069, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32064:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 48057, + "id": 48070, + "nodeType": "Return", + "src": "32057:8:38" + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 48075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 48072, + "name": "_vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48053, + "src": "32234:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo storage pointer" + } + }, + "id": 48073, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "32241:19:38", + "memberName": "depositedCollateral", + "nodeType": "MemberAccess", + "referencedDeclaration": 46302, + "src": "32234:26:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 48074, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, - "nodeType": "Literal", - "src": "31563:1:51", + "nodeType": "Literal", + "src": "32264:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "32234:31:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 48082, + "nodeType": "IfStatement", + "src": "32230:61:38", + "trueBody": { + "expression": { + "expression": { + "arguments": [ + { + "id": 48078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32279:7:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 48077, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32279:7:38", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 48076, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "32274:4:38", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 48079, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32274:13:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 48080, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "32288:3:38", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "32274:17:38", "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "functionReturnParameters": 50353, - "id": 50366, + "functionReturnParameters": 48057, + "id": 48081, "nodeType": "Return", - "src": "31556:8:51" + "src": "32267:24:38" } }, { - "assignments": [50369], + "assignments": [48084], "declarations": [ { "constant": false, - "id": 50369, + "id": 48084, "mutability": "mutable", "name": "_collateralValueInCurrency", - "nameLocation": "31697:26:51", + "nameLocation": "32424:26:38", "nodeType": "VariableDeclaration", - "scope": 50383, - "src": "31689:34:51", + "scope": 48098, + "src": "32416:34:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -18995,10 +19211,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50368, + "id": 48083, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "31689:7:51", + "src": "32416:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19007,30 +19223,30 @@ "visibility": "internal" } ], - "id": 50374, + "id": 48089, "initialValue": { "arguments": [ { - "id": 50371, + "id": 48086, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50346, - "src": "31756:11:51", + "referencedDeclaration": 48050, + "src": "32483:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, { - "id": 50372, + "id": 48087, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50349, - "src": "31769:6:51", + "referencedDeclaration": 48053, + "src": "32496:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } } @@ -19038,141 +19254,26 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" }, { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } ], - "id": 50370, + "id": 48085, "name": "_getCurrencyValueOfCollateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50415, - "src": "31726:29:51", + "referencedDeclaration": 48130, + "src": "32453:29:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$returns$_t_uint256_$", + "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_struct$_VaultInfo_$46309_storage_ptr_$returns$_t_uint256_$", "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer) view returns (uint256)" } }, - "id": 50373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "31726:50:51", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "31689:87:51" - }, - { - "expression": { - "arguments": [ - { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 50378, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 50376, - "name": "_totalUserDebt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50355, - "src": "31849:14:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "id": 50377, - "name": "PRECISION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49010, - "src": "31866:9:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "31849:26:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 50379, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "31848:28:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 50380, - "name": "_collateralValueInCurrency", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50369, - "src": "31878:26:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 50375, - "name": "_divUp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50615, - "src": "31841:6:51", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 50381, + "id": 48088, "isConstant": false, "isLValue": false, "isPure": false, @@ -19180,299 +19281,39 @@ "lValueRequested": false, "nameLocations": [], "names": [], - "nodeType": "FunctionCall", - "src": "31841:64:51", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 50353, - "id": 50382, - "nodeType": "Return", - "src": "31834:71:51" - } - ] - }, - "documentation": { - "id": 50343, - "nodeType": "StructuredDocumentation", - "src": "30804:138:51", - "text": " @dev returns the collateral ratio of a vault where anything below 1e18 is liquidatable\n @dev should never revert!" - }, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_getCollateralRatio", - "nameLocation": "30956:19:51", - "parameters": { - "id": 50350, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 50346, - "mutability": "mutable", - "name": "_collateral", - "nameLocation": "30999:11:51", - "nodeType": "VariableDeclaration", - "scope": 50384, - "src": "30976:34:51", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo" - }, - "typeName": { - "id": 50345, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 50344, - "name": "CollateralInfo", - "nameLocations": ["30976:14:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "30976:14:51" - }, - "referencedDeclaration": 48954, - "src": "30976:14:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 50349, - "mutability": "mutable", - "name": "_vault", - "nameLocation": "31030:6:51", - "nodeType": "VariableDeclaration", - "scope": 50384, - "src": "31012:24:51", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo" - }, - "typeName": { - "id": 50348, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 50347, - "name": "VaultInfo", - "nameLocations": ["31012:9:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48963, - "src": "31012:9:51" - }, - "referencedDeclaration": 48963, - "src": "31012:9:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo" - } - }, - "visibility": "internal" - } - ], - "src": "30975:62:51" - }, - "returnParameters": { - "id": 50353, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 50352, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 50384, - "src": "31085:7:51", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 50351, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "31085:7:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "31084:9:51" - }, - "scope": 50616, - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "id": 50415, - "nodeType": "FunctionDefinition", - "src": "32059:434:51", - "nodes": [], - "body": { - "id": 50414, - "nodeType": "Block", - "src": "32220:273:51", - "nodes": [], - "statements": [ - { - "assignments": [50397], - "declarations": [ - { - "constant": false, - "id": 50397, - "mutability": "mutable", - "name": "_currencyValueOfCollateral", - "nameLocation": "32238:26:51", - "nodeType": "VariableDeclaration", - "scope": 50414, - "src": "32230:34:51", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 50396, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "32230:7:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 50411, - "initialValue": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 50410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 50407, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "nodeType": "FunctionCall", + "src": "32453:50:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32416:87:38" + }, + { + "expression": { + "arguments": [ + { + "components": [ + { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50405, + "id": 48093, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "arguments": [ - { - "id": 50399, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50388, - "src": "32317:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - }, - { - "expression": { - "id": 50400, - "name": "_vault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50391, - "src": "32330:6:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo storage pointer" - } - }, - "id": 50401, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "32337:19:51", - "memberName": "depositedCollateral", - "nodeType": "MemberAccess", - "referencedDeclaration": 48956, - "src": "32330:26:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 50398, - "name": "_scaleCollateralToExpectedPrecision", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50557, - "src": "32281:35:51", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (struct IVault.CollateralInfo storage pointer,uint256) view returns (uint256)" - } - }, - "id": 50402, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "32281:76:51", - "tryCall": false, + "id": 48091, + "name": "_totalUserDebt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48059, + "src": "32576:14:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19481,161 +19322,140 @@ "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { - "expression": { - "id": 50403, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50388, - "src": "32360:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - }, - "id": 50404, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "32372:5:51", - "memberName": "price", - "nodeType": "MemberAccess", - "referencedDeclaration": 48945, - "src": "32360:17:51", + "id": 48092, + "name": "HUNDRED_PERCENTAGE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46694, + "src": "32593:18:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "32281:96:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "id": 50406, - "name": "ADDITIONAL_FEED_PRECISION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49013, - "src": "32396:25:51", + "src": "32576:35:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } - }, - "src": "32281:140:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" } + ], + "id": 48094, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "32575:37:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 48095, + "name": "_collateralValueInCurrency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48084, + "src": "32614:26:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 50408, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "32267:164:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "id": 50409, - "name": "PRECISION", + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 48090, + "name": "_divUp", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49010, - "src": "32434:9:51", + "referencedDeclaration": 48279, + "src": "32568:6:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "src": "32267:176:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "32230:213:51" - }, - { - "expression": { - "id": 50412, - "name": "_currencyValueOfCollateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50397, - "src": "32460:26:51", + "id": 48096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32568:73:38", + "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 50395, - "id": 50413, + "functionReturnParameters": 48057, + "id": 48097, "nodeType": "Return", - "src": "32453:33:51" + "src": "32561:80:38" } ] }, "documentation": { - "id": 50385, + "id": 48047, "nodeType": "StructuredDocumentation", - "src": "31918:136:51", - "text": " @dev returns the conversion of a vaults deposited collateral to the vault's currency\n @dev should never revert!" + "src": "31312:138:38", + "text": " @dev returns the collateral ratio of a vault where anything below 1e18 is liquidatable\n @dev should never revert!" }, "implemented": true, "kind": "function", "modifiers": [], - "name": "_getCurrencyValueOfCollateral", - "nameLocation": "32068:29:51", + "name": "_getCollateralRatio", + "nameLocation": "31464:19:38", "parameters": { - "id": 50392, + "id": 48054, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50388, + "id": 48050, "mutability": "mutable", "name": "_collateral", - "nameLocation": "32121:11:51", + "nameLocation": "31507:11:38", "nodeType": "VariableDeclaration", - "scope": 50415, - "src": "32098:34:51", + "scope": 48099, + "src": "31484:34:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 50387, + "id": 48049, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50386, + "id": 48048, "name": "CollateralInfo", - "nameLocations": ["32098:14:51"], + "nameLocations": ["31484:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "32098:14:51" + "referencedDeclaration": 46300, + "src": "31484:14:38" }, - "referencedDeclaration": 48954, - "src": "32098:14:51", + "referencedDeclaration": 46300, + "src": "31484:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, @@ -19643,55 +19463,55 @@ }, { "constant": false, - "id": 50391, + "id": 48053, "mutability": "mutable", "name": "_vault", - "nameLocation": "32152:6:51", + "nameLocation": "31538:6:38", "nodeType": "VariableDeclaration", - "scope": 50415, - "src": "32134:24:51", + "scope": 48099, + "src": "31520:24:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 50390, + "id": 48052, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50389, + "id": 48051, "name": "VaultInfo", - "nameLocations": ["32134:9:51"], + "nameLocations": ["31520:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48963, - "src": "32134:9:51" + "referencedDeclaration": 46309, + "src": "31520:9:38" }, - "referencedDeclaration": 48963, - "src": "32134:9:51", + "referencedDeclaration": 46309, + "src": "31520:9:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "src": "32097:62:51" + "src": "31483:62:38" }, "returnParameters": { - "id": 50395, + "id": 48057, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50394, + "id": 48056, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 50415, - "src": "32207:7:51", + "scope": 48099, + "src": "31592:7:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -19699,10 +19519,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50393, + "id": 48055, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "32207:7:51", + "src": "31592:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19711,151 +19531,164 @@ "visibility": "internal" } ], - "src": "32206:9:51" + "src": "31591:9:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "view", "virtual": false, - "visibility": "internal" + "visibility": "private" }, { - "id": 50449, - "nodeType": "FunctionDefinition", - "src": "32640:417:51", - "nodes": [], - "body": { - "id": 50448, - "nodeType": "Block", - "src": "32800:257:51", - "nodes": [], - "statements": [ - { - "assignments": [50427], - "declarations": [ - { - "constant": false, - "id": 50427, - "mutability": "mutable", - "name": "_collateralAmountOfCurrencyValue", - "nameLocation": "32818:32:51", - "nodeType": "VariableDeclaration", - "scope": 50448, - "src": "32810:40:51", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 50426, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "32810:7:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 50439, - "initialValue": { - "arguments": [ - { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 50431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 50429, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50421, - "src": "32873:7:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "id": 50430, - "name": "PRECISION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49010, - "src": "32883:9:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "32873:19:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 50432, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "32872:21:51", + "id": 48130, + "nodeType": "FunctionDefinition", + "src": "32795:433:38", + "nodes": [], + "body": { + "id": 48129, + "nodeType": "Block", + "src": "32955:273:38", + "nodes": [], + "statements": [ + { + "assignments": [48112], + "declarations": [ + { + "constant": false, + "id": 48112, + "mutability": "mutable", + "name": "_currencyValueOfCollateral", + "nameLocation": "32973:26:38", + "nodeType": "VariableDeclaration", + "scope": 48129, + "src": "32965:34:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 48111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32965:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - { - "components": [ - { + "visibility": "internal" + } + ], + "id": 48126, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 48125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 48122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50436, + "id": 48120, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { + "arguments": [ + { + "id": 48114, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48103, + "src": "33052:11:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + } + }, + { + "expression": { + "id": 48115, + "name": "_vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48106, + "src": "33065:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo storage pointer" + } + }, + "id": 48116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "33072:19:38", + "memberName": "depositedCollateral", + "nodeType": "MemberAccess", + "referencedDeclaration": 46302, + "src": "33065:26:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], "expression": { - "id": 50433, - "name": "_collateral", + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 48113, + "name": "_scaleCollateralToExpectedPrecision", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50419, - "src": "32896:11:51", + "referencedDeclaration": 48221, + "src": "33016:35:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" + "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct IVault.CollateralInfo storage pointer,uint256) view returns (uint256)" } }, - "id": 50434, + "id": 48117, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "memberLocation": "32908:5:51", - "memberName": "price", - "nodeType": "MemberAccess", - "referencedDeclaration": 48945, - "src": "32896:17:51", + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "33016:76:38", + "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19864,247 +19697,161 @@ "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { - "id": 50435, - "name": "ADDITIONAL_FEED_PRECISION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49013, - "src": "32916:25:51", + "expression": { + "id": 48118, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48103, + "src": "33095:11:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + } + }, + "id": 48119, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "33107:5:38", + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 46293, + "src": "33095:17:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "32896:45:51", + "src": "33016:96:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } - } - ], - "id": 50437, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "32895:47:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 50428, - "name": "_divUp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50615, - "src": "32865:6:51", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 50438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "32865:78:51", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "32810:133:51" - }, - { - "expression": { - "arguments": [ - { - "id": 50441, - "name": "_collateralAmountOfCurrencyValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50427, - "src": "32968:32:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 50445, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "hexValue": "3130", - "id": 50442, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "33002:2:51", - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "expression": { - "id": 50443, - "name": "_collateral", + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 48121, + "name": "ADDITIONAL_FEED_PRECISION", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50419, - "src": "33008:11:51", + "referencedDeclaration": 46697, + "src": "33131:25:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 50444, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "33020:29:51", - "memberName": "additionalCollateralPrecision", - "nodeType": "MemberAccess", - "referencedDeclaration": 48951, - "src": "33008:41:51", + "src": "33016:140:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } - }, - "src": "33002:47:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" } ], - "id": 50440, - "name": "_divUp", + "id": 48123, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "33002:164:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 48124, + "name": "PRECISION", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50615, - "src": "32961:6:51", + "referencedDeclaration": 46686, + "src": "33169:9:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 50446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "32961:89:51", - "tryCall": false, + "src": "33002:176:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32965:213:38" + }, + { + "expression": { + "id": 48127, + "name": "_currencyValueOfCollateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48112, + "src": "33195:26:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 50425, - "id": 50447, + "functionReturnParameters": 48110, + "id": 48128, "nodeType": "Return", - "src": "32954:96:51" + "src": "33188:33:38" } ] }, "documentation": { - "id": 50416, + "id": 48100, "nodeType": "StructuredDocumentation", - "src": "32499:136:51", - "text": " @dev returns the conversion of an amount of currency to a given supported collateral\n @dev should never revert!" + "src": "32654:136:38", + "text": " @dev returns the conversion of a vaults deposited collateral to the vault's currency\n @dev should never revert!" }, "implemented": true, "kind": "function", "modifiers": [], - "name": "_getCollateralAmountFromCurrencyValue", - "nameLocation": "32649:37:51", + "name": "_getCurrencyValueOfCollateral", + "nameLocation": "32804:29:38", "parameters": { - "id": 50422, + "id": 48107, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50419, + "id": 48103, "mutability": "mutable", "name": "_collateral", - "nameLocation": "32710:11:51", + "nameLocation": "32857:11:38", "nodeType": "VariableDeclaration", - "scope": 50449, - "src": "32687:34:51", + "scope": 48130, + "src": "32834:34:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 50418, + "id": 48102, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50417, + "id": 48101, "name": "CollateralInfo", - "nameLocations": ["32687:14:51"], + "nameLocations": ["32834:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "32687:14:51" + "referencedDeclaration": 46300, + "src": "32834:14:38" }, - "referencedDeclaration": 48954, - "src": "32687:14:51", + "referencedDeclaration": 46300, + "src": "32834:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, @@ -20112,47 +19859,55 @@ }, { "constant": false, - "id": 50421, + "id": 48106, "mutability": "mutable", - "name": "_amount", - "nameLocation": "32731:7:51", + "name": "_vault", + "nameLocation": "32888:6:38", "nodeType": "VariableDeclaration", - "scope": 50449, - "src": "32723:15:51", + "scope": 48130, + "src": "32870:24:38", "stateVariable": false, - "storageLocation": "default", + "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 50420, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "32723:7:51", + "id": 48105, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 48104, + "name": "VaultInfo", + "nameLocations": ["32870:9:38"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46309, + "src": "32870:9:38" + }, + "referencedDeclaration": 46309, + "src": "32870:9:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "src": "32686:53:51" + "src": "32833:62:38" }, "returnParameters": { - "id": 50425, + "id": 48110, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50424, + "id": 48109, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 50449, - "src": "32787:7:51", + "scope": 48130, + "src": "32942:7:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -20160,10 +19915,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50423, + "id": 48108, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "32787:7:51", + "src": "32942:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20172,146 +19927,31 @@ "visibility": "internal" } ], - "src": "32786:9:51" + "src": "32941:9:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "view", "virtual": false, - "visibility": "internal" + "visibility": "private" }, { - "id": 50488, + "id": 48159, "nodeType": "FunctionDefinition", - "src": "33197:478:51", + "src": "33375:318:38", "nodes": [], "body": { - "id": 50487, + "id": 48158, "nodeType": "Block", - "src": "33359:316:51", + "src": "33534:159:38", "nodes": [], "statements": [ { - "assignments": [50464], - "declarations": [ - { - "constant": false, - "id": 50464, - "mutability": "mutable", - "name": "_totalCurrentAccumulatedRate", - "nameLocation": "33377:28:51", - "nodeType": "VariableDeclaration", - "scope": 50487, - "src": "33369:36:51", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 50463, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "33369:7:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 50468, - "initialValue": { - "arguments": [ - { - "id": 50466, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50453, - "src": "33446:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - ], - "id": 50465, - "name": "_calculateCurrentTotalAccumulatedRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50537, - "src": "33408:37:51", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$48954_storage_ptr_$returns$_t_uint256_$", - "typeString": "function (struct IVault.CollateralInfo storage pointer) view returns (uint256)" - } - }, - "id": 50467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "33408:50:51", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "33369:89:51" - }, - { - "assignments": [50470], - "declarations": [ - { - "constant": false, - "id": 50470, - "mutability": "mutable", - "name": "_accruedFees", - "nameLocation": "33477:12:51", - "nodeType": "VariableDeclaration", - "scope": 50487, - "src": "33469:20:51", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 50469, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "33469:7:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 50482, - "initialValue": { + "expression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50481, + "id": 48156, "isConstant": false, "isLValue": false, "isPure": false, @@ -20323,251 +19963,287 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50478, + "id": 48143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 48141, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48136, + "src": "33552:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 48142, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46686, + "src": "33562:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33552:19:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 48144, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "33551:21:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 48154, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 48148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 48145, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48134, + "src": "33588:11:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" + } + }, + "id": 48146, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "33600:5:38", + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 46293, + "src": "33588:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 48147, + "name": "ADDITIONAL_FEED_PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46697, + "src": "33608:25:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33588:45:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { "components": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50474, + "id": 48152, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 50471, - "name": "_totalCurrentAccumulatedRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50464, - "src": "33506:28:51", + "hexValue": "3130", + "id": 48149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33637:2:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" }, "nodeType": "BinaryOperation", - "operator": "-", + "operator": "**", "rightExpression": { "expression": { - "id": 50472, - "name": "_vault", + "id": 48150, + "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50456, - "src": "33537:6:51", + "referencedDeclaration": 48134, + "src": "33643:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo storage pointer" + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 50473, + "id": 48151, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "33544:24:51", - "memberName": "lastTotalAccumulatedRate", + "memberLocation": "33655:29:38", + "memberName": "additionalCollateralPrecision", "nodeType": "MemberAccess", - "referencedDeclaration": 48962, - "src": "33537:31:51", + "referencedDeclaration": 46299, + "src": "33643:41:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "33506:62:51", + "src": "33637:47:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 50475, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "33505:64:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "expression": { - "id": 50476, - "name": "_vault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50456, - "src": "33572:6:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo storage pointer" - } - }, - "id": 50477, + "id": 48153, "isConstant": false, - "isLValue": true, + "isInlineArray": false, + "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "33579:14:51", - "memberName": "borrowedAmount", - "nodeType": "MemberAccess", - "referencedDeclaration": 48958, - "src": "33572:21:51", + "nodeType": "TupleExpression", + "src": "33636:49:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "33505:88:51", + "src": "33588:97:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 50479, + "id": 48155, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "33504:90:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "id": 50480, - "name": "PRECISION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49010, - "src": "33597:9:51", + "src": "33587:99:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "33504:102:51", + "src": "33551:135:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "VariableDeclarationStatement", - "src": "33469:137:51" - }, - { - "expression": { - "components": [ - { - "id": 50483, - "name": "_accruedFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50470, - "src": "33625:12:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 50484, - "name": "_totalCurrentAccumulatedRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50464, - "src": "33639:28:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 50485, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "33624:44:51", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", - "typeString": "tuple(uint256,uint256)" - } - }, - "functionReturnParameters": 50462, - "id": 50486, + "functionReturnParameters": 48140, + "id": 48157, "nodeType": "Return", - "src": "33617:51:51" + "src": "33544:142:38" } ] }, "documentation": { - "id": 50450, + "id": 48131, "nodeType": "StructuredDocumentation", - "src": "33063:129:51", - "text": " @dev returns the fees accrued by a user's vault since `_vault.lastUpdateTime`\n @dev should never revert!" + "src": "33234:136:38", + "text": " @dev returns the conversion of an amount of currency to a given supported collateral\n @dev should never revert!" }, "implemented": true, "kind": "function", "modifiers": [], - "name": "_calculateAccruedFees", - "nameLocation": "33206:21:51", + "name": "_getCollateralAmountFromCurrencyValue", + "nameLocation": "33384:37:38", "parameters": { - "id": 50457, + "id": 48137, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50453, + "id": 48134, "mutability": "mutable", "name": "_collateral", - "nameLocation": "33251:11:51", + "nameLocation": "33445:11:38", "nodeType": "VariableDeclaration", - "scope": 50488, - "src": "33228:34:51", + "scope": 48159, + "src": "33422:34:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 50452, + "id": 48133, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50451, + "id": 48132, "name": "CollateralInfo", - "nameLocations": ["33228:14:51"], + "nameLocations": ["33422:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "33228:14:51" + "referencedDeclaration": 46300, + "src": "33422:14:38" }, - "referencedDeclaration": 48954, - "src": "33228:14:51", + "referencedDeclaration": 46300, + "src": "33422:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, @@ -20575,55 +20251,13 @@ }, { "constant": false, - "id": 50456, - "mutability": "mutable", - "name": "_vault", - "nameLocation": "33282:6:51", - "nodeType": "VariableDeclaration", - "scope": 50488, - "src": "33264:24:51", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo" - }, - "typeName": { - "id": 50455, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 50454, - "name": "VaultInfo", - "nameLocations": ["33264:9:51"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 48963, - "src": "33264:9:51" - }, - "referencedDeclaration": 48963, - "src": "33264:9:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", - "typeString": "struct IVault.VaultInfo" - } - }, - "visibility": "internal" - } - ], - "src": "33227:62:51" - }, - "returnParameters": { - "id": 50462, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 50459, + "id": 48136, "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", + "name": "_amount", + "nameLocation": "33466:7:38", "nodeType": "VariableDeclaration", - "scope": 50488, - "src": "33337:7:51", + "scope": 48159, + "src": "33458:15:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -20631,26 +20265,33 @@ "typeString": "uint256" }, "typeName": { - "id": 50458, + "id": 48135, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "33337:7:51", + "src": "33458:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" - }, + } + ], + "src": "33421:53:38" + }, + "returnParameters": { + "id": 48140, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 50461, + "id": 48139, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 50488, - "src": "33346:7:51", + "scope": 48159, + "src": "33521:7:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -20658,10 +20299,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50460, + "id": 48138, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "33346:7:51", + "src": "33521:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20670,36 +20311,36 @@ "visibility": "internal" } ], - "src": "33336:18:51" + "src": "33520:9:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "view", "virtual": false, - "visibility": "internal" + "visibility": "private" }, { - "id": 50537, + "id": 48201, "nodeType": "FunctionDefinition", - "src": "33881:815:51", + "src": "33833:541:38", "nodes": [], "body": { - "id": 50536, + "id": 48200, "nodeType": "Block", - "src": "34024:672:51", + "src": "33994:380:38", "nodes": [], "statements": [ { - "assignments": [50498], + "assignments": [48174], "declarations": [ { "constant": false, - "id": 50498, + "id": 48174, "mutability": "mutable", - "name": "_collateralCurrentAccumulatedRate", - "nameLocation": "34135:33:51", + "name": "_totalCurrentAccumulatedRate", + "nameLocation": "34012:28:38", "nodeType": "VariableDeclaration", - "scope": 50536, - "src": "34127:41:51", + "scope": 48200, + "src": "34004:36:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -20707,279 +20348,131 @@ "typeString": "uint256" }, "typeName": { - "id": 50497, + "id": 48173, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "34127:7:51", + "src": "34004:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" - } - ], - "id": 50515, - "initialValue": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 50514, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "expression": { - "id": 50499, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50492, - "src": "34171:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - }, - "id": 50500, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "34183:8:51", - "memberName": "rateInfo", - "nodeType": "MemberAccess", - "referencedDeclaration": 48941, - "src": "34171:20:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", - "typeString": "struct IVault.RateInfo storage ref" - } - }, - "id": 50501, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "34192:15:51", - "memberName": "accumulatedRate", - "nodeType": "MemberAccess", - "referencedDeclaration": 48927, - "src": "34171:36:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 50512, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "expression": { - "id": 50502, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50492, - "src": "34223:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - }, - "id": 50503, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "34235:8:51", - "memberName": "rateInfo", - "nodeType": "MemberAccess", - "referencedDeclaration": 48941, - "src": "34223:20:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", - "typeString": "struct IVault.RateInfo storage ref" - } - }, - "id": 50504, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "34244:4:51", - "memberName": "rate", - "nodeType": "MemberAccess", - "referencedDeclaration": 48925, - "src": "34223:25:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 50510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 50505, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "34252:5:51", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 50506, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "34258:9:51", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "34252:15:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "expression": { - "expression": { - "id": 50507, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50492, - "src": "34270:11:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", - "typeString": "struct IVault.CollateralInfo storage pointer" - } - }, - "id": 50508, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "34282:8:51", - "memberName": "rateInfo", - "nodeType": "MemberAccess", - "referencedDeclaration": 48941, - "src": "34270:20:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", - "typeString": "struct IVault.RateInfo storage ref" - } - }, - "id": 50509, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "34291:14:51", - "memberName": "lastUpdateTime", - "nodeType": "MemberAccess", - "referencedDeclaration": 48929, - "src": "34270:35:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "34252:53:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 50511, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "34251:55:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "34223:83:51", + } + ], + "id": 48181, + "initialValue": { + "arguments": [ + { + "id": 48177, + "name": "baseRateInfo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46710, + "src": "34103:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" + } + }, + { + "expression": { + "id": 48178, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48163, + "src": "34117:11:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", + "typeString": "struct IVault.CollateralInfo storage pointer" } + }, + "id": 48179, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "34129:8:38", + "memberName": "rateInfo", + "nodeType": "MemberAccess", + "referencedDeclaration": 46291, + "src": "34117:20:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" + }, + { + "typeIdentifier": "t_struct$_RateInfo_$46280_storage", + "typeString": "struct IVault.RateInfo storage ref" } ], - "id": 50513, + "expression": { + "id": 48175, + "name": "rateModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46707, + "src": "34055:10:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IRate_$46191", + "typeString": "contract IRate" + } + }, + "id": 48176, "isConstant": false, - "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "34222:85:51", + "memberLocation": "34066:36:38", + "memberName": "calculateCurrentTotalAccumulatedRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 46182, + "src": "34055:47:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_external_view$_t_struct$_RateInfo_$46280_memory_ptr_$_t_struct$_RateInfo_$46280_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct IVault.RateInfo memory,struct IVault.RateInfo memory) view external returns (uint256)" } }, - "src": "34171:136:51", + "id": 48180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "34055:83:38", + "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "34127:180:51" + "src": "34004:134:38" }, { - "assignments": [50517], + "assignments": [48183], "declarations": [ { "constant": false, - "id": 50517, + "id": 48183, "mutability": "mutable", - "name": "_baseCurrentAccumulatedRate", - "nameLocation": "34407:27:51", + "name": "_accruedFees", + "nameLocation": "34157:12:38", "nodeType": "VariableDeclaration", - "scope": 50536, - "src": "34399:35:51", + "scope": 48200, + "src": "34149:20:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -20987,10 +20480,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50516, + "id": 48182, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "34399:7:51", + "src": "34149:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20999,123 +20492,48 @@ "visibility": "internal" } ], - "id": 50531, + "id": 48195, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50530, + "id": 48194, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "expression": { - "id": 50518, - "name": "baseRateInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49019, - "src": "34449:12:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", - "typeString": "struct IVault.RateInfo storage ref" - } - }, - "id": 50519, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "34462:15:51", - "memberName": "accumulatedRate", - "nodeType": "MemberAccess", - "referencedDeclaration": 48927, - "src": "34449:28:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { "components": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50528, + "id": 48191, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "expression": { - "id": 50520, - "name": "baseRateInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 49019, - "src": "34481:12:51", - "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", - "typeString": "struct IVault.RateInfo storage ref" - } - }, - "id": 50521, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "34494:4:51", - "memberName": "rate", - "nodeType": "MemberAccess", - "referencedDeclaration": 48925, - "src": "34481:17:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { "components": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50526, + "id": 48187, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "expression": { - "id": 50522, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "34502:5:51", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 50523, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "34508:9:51", - "memberName": "timestamp", - "nodeType": "MemberAccess", - "src": "34502:15:51", + "id": 48184, + "name": "_totalCurrentAccumulatedRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48174, + "src": "34187:28:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21125,197 +20543,274 @@ "operator": "-", "rightExpression": { "expression": { - "id": 50524, - "name": "baseRateInfo", + "id": 48185, + "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49019, - "src": "34520:12:51", + "referencedDeclaration": 48166, + "src": "34218:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$48930_storage", - "typeString": "struct IVault.RateInfo storage ref" + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo storage pointer" } }, - "id": 50525, + "id": 48186, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "34533:14:51", - "memberName": "lastUpdateTime", + "memberLocation": "34225:24:38", + "memberName": "lastTotalAccumulatedRate", "nodeType": "MemberAccess", - "referencedDeclaration": 48929, - "src": "34520:27:51", + "referencedDeclaration": 46308, + "src": "34218:31:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "34502:45:51", + "src": "34187:62:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 50527, + "id": 48188, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "34501:47:51", + "src": "34186:64:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "expression": { + "id": 48189, + "name": "_vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48166, + "src": "34253:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo storage pointer" + } + }, + "id": 48190, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "34260:14:38", + "memberName": "borrowedAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 46304, + "src": "34253:21:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "34481:67:51", + "src": "34186:88:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 50529, + "id": 48192, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "34480:69:51", + "src": "34172:112:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 48193, + "name": "HUNDRED_PERCENTAGE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46694, + "src": "34287:18:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "34449:100:51", + "src": "34172:133:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "34399:150:51" + "src": "34149:156:38" }, { "expression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 50534, + "components": [ + { + "id": 48196, + "name": "_accruedFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48183, + "src": "34324:12:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 48197, + "name": "_totalCurrentAccumulatedRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48174, + "src": "34338:28:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 48198, "isConstant": false, + "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftExpression": { - "id": 50532, - "name": "_collateralCurrentAccumulatedRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50498, - "src": "34626:33:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "id": 50533, - "name": "_baseCurrentAccumulatedRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50517, - "src": "34662:27:51", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "34626:63:51", + "nodeType": "TupleExpression", + "src": "34323:44:38", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" } }, - "functionReturnParameters": 50496, - "id": 50535, + "functionReturnParameters": 48172, + "id": 48199, "nodeType": "Return", - "src": "34619:70:51" + "src": "34316:51:38" } ] }, "documentation": { - "id": 50489, + "id": 48160, "nodeType": "StructuredDocumentation", - "src": "33681:195:51", - "text": " @dev returns the current total accumulated rate i.e current accumulated base rate + current accumulated collateral rate of the given collateral\n @dev should never revert!" + "src": "33699:129:38", + "text": " @dev returns the fees accrued by a user's vault since `_vault.lastUpdateTime`\n @dev should never revert!" }, "implemented": true, "kind": "function", "modifiers": [], - "name": "_calculateCurrentTotalAccumulatedRate", - "nameLocation": "33890:37:51", + "name": "_calculateAccruedFees", + "nameLocation": "33842:21:38", "parameters": { - "id": 50493, + "id": 48167, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50492, + "id": 48163, "mutability": "mutable", "name": "_collateral", - "nameLocation": "33951:11:51", + "nameLocation": "33887:11:38", "nodeType": "VariableDeclaration", - "scope": 50537, - "src": "33928:34:51", + "scope": 48201, + "src": "33864:34:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 50491, + "id": 48162, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50490, + "id": 48161, "name": "CollateralInfo", - "nameLocations": ["33928:14:51"], + "nameLocations": ["33864:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "33928:14:51" + "referencedDeclaration": 46300, + "src": "33864:14:38" }, - "referencedDeclaration": 48954, - "src": "33928:14:51", + "referencedDeclaration": 46300, + "src": "33864:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, "visibility": "internal" + }, + { + "constant": false, + "id": 48166, + "mutability": "mutable", + "name": "_vault", + "nameLocation": "33918:6:38", + "nodeType": "VariableDeclaration", + "scope": 48201, + "src": "33900:24:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo" + }, + "typeName": { + "id": 48165, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 48164, + "name": "VaultInfo", + "nameLocations": ["33900:9:38"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46309, + "src": "33900:9:38" + }, + "referencedDeclaration": 46309, + "src": "33900:9:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", + "typeString": "struct IVault.VaultInfo" + } + }, + "visibility": "internal" } ], - "src": "33927:36:51" + "src": "33863:62:38" }, "returnParameters": { - "id": 50496, + "id": 48172, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50495, + "id": 48169, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 50537, - "src": "34011:7:51", + "scope": 48201, + "src": "33972:7:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -21323,10 +20818,37 @@ "typeString": "uint256" }, "typeName": { - "id": 50494, + "id": 48168, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "34011:7:51", + "src": "33972:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 48171, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 48201, + "src": "33981:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 48170, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33981:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21335,22 +20857,22 @@ "visibility": "internal" } ], - "src": "34010:9:51" + "src": "33971:18:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "view", "virtual": false, - "visibility": "internal" + "visibility": "private" }, { - "id": 50557, + "id": 48221, "nodeType": "FunctionDefinition", - "src": "34815:239:51", + "src": "34493:238:38", "nodes": [], "body": { - "id": 50556, + "id": 48220, "nodeType": "Block", - "src": "34972:82:51", + "src": "34649:82:38", "nodes": [], "statements": [ { @@ -21359,18 +20881,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50554, + "id": 48218, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 50548, + "id": 48212, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50543, - "src": "34989:6:51", + "referencedDeclaration": 48207, + "src": "34666:6:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21385,21 +20907,21 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50552, + "id": 48216, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "hexValue": "3130", - "id": 50549, + "id": 48213, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "34999:2:51", + "src": "34676:2:38", "typeDescriptions": { "typeIdentifier": "t_rational_10_by_1", "typeString": "int_const 10" @@ -21410,110 +20932,110 @@ "operator": "**", "rightExpression": { "expression": { - "id": 50550, + "id": 48214, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50541, - "src": "35005:11:51", + "referencedDeclaration": 48205, + "src": "34682:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 50551, + "id": 48215, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "35017:29:51", + "memberLocation": "34694:29:38", "memberName": "additionalCollateralPrecision", "nodeType": "MemberAccess", - "referencedDeclaration": 48951, - "src": "35005:41:51", + "referencedDeclaration": 46299, + "src": "34682:41:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "34999:47:51", + "src": "34676:47:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 50553, + "id": 48217, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "34998:49:51", + "src": "34675:49:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "34989:58:51", + "src": "34666:58:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 50547, - "id": 50555, + "functionReturnParameters": 48211, + "id": 48219, "nodeType": "Return", - "src": "34982:65:51" + "src": "34659:65:38" } ] }, "documentation": { - "id": 50538, + "id": 48202, "nodeType": "StructuredDocumentation", - "src": "34702:108:51", + "src": "34380:108:38", "text": " @dev scales a given collateral to be represented in 1e18\n @dev should never revert!" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_scaleCollateralToExpectedPrecision", - "nameLocation": "34824:35:51", + "nameLocation": "34502:35:38", "parameters": { - "id": 50544, + "id": 48208, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50541, + "id": 48205, "mutability": "mutable", "name": "_collateral", - "nameLocation": "34883:11:51", + "nameLocation": "34561:11:38", "nodeType": "VariableDeclaration", - "scope": 50557, - "src": "34860:34:51", + "scope": 48221, + "src": "34538:34:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 50540, + "id": 48204, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50539, + "id": 48203, "name": "CollateralInfo", - "nameLocations": ["34860:14:51"], + "nameLocations": ["34538:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "34860:14:51" + "referencedDeclaration": 46300, + "src": "34538:14:38" }, - "referencedDeclaration": 48954, - "src": "34860:14:51", + "referencedDeclaration": 46300, + "src": "34538:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, @@ -21521,13 +21043,13 @@ }, { "constant": false, - "id": 50543, + "id": 48207, "mutability": "mutable", "name": "amount", - "nameLocation": "34904:6:51", + "nameLocation": "34582:6:38", "nodeType": "VariableDeclaration", - "scope": 50557, - "src": "34896:14:51", + "scope": 48221, + "src": "34574:14:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -21535,10 +21057,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50542, + "id": 48206, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "34896:7:51", + "src": "34574:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21547,21 +21069,21 @@ "visibility": "internal" } ], - "src": "34859:52:51" + "src": "34537:52:38" }, "returnParameters": { - "id": 50547, + "id": 48211, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50546, + "id": 48210, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 50557, - "src": "34959:7:51", + "scope": 48221, + "src": "34636:7:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -21569,10 +21091,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50545, + "id": 48209, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "34959:7:51", + "src": "34636:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21581,22 +21103,22 @@ "visibility": "internal" } ], - "src": "34958:9:51" + "src": "34635:9:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "view", "virtual": false, - "visibility": "internal" + "visibility": "private" }, { - "id": 50579, + "id": 48243, "nodeType": "FunctionDefinition", - "src": "35155:284:51", + "src": "34832:283:38", "nodes": [], "body": { - "id": 50578, + "id": 48242, "nodeType": "Block", - "src": "35314:125:51", + "src": "34990:125:38", "nodes": [], "statements": [ { @@ -21605,7 +21127,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50573, + "id": 48237, "isConstant": false, "isLValue": false, "isPure": false, @@ -21613,26 +21135,26 @@ "leftExpression": { "arguments": [ { - "id": 50568, + "id": 48232, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50561, - "src": "35348:11:51", + "referencedDeclaration": 48225, + "src": "35024:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, { - "id": 50569, + "id": 48233, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50564, - "src": "35361:6:51", + "referencedDeclaration": 48228, + "src": "35037:6:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } } @@ -21640,26 +21162,26 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" }, { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo storage pointer" } ], - "id": 50567, + "id": 48231, "name": "_getCollateralRatio", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50384, - "src": "35328:19:51", + "referencedDeclaration": 48099, + "src": "35004:19:38", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$48954_storage_ptr_$_t_struct$_VaultInfo_$48963_storage_ptr_$returns$_t_uint256_$", + "typeIdentifier": "t_function_internal_view$_t_struct$_CollateralInfo_$46300_storage_ptr_$_t_struct$_VaultInfo_$46309_storage_ptr_$returns$_t_uint256_$", "typeString": "function (struct IVault.CollateralInfo storage pointer,struct IVault.VaultInfo storage pointer) view returns (uint256)" } }, - "id": 50570, + "id": 48234, "isConstant": false, "isLValue": false, "isPure": false, @@ -21668,7 +21190,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "35328:40:51", + "src": "35004:40:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -21679,58 +21201,58 @@ "operator": ">", "rightExpression": { "expression": { - "id": 50571, + "id": 48235, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50561, - "src": "35371:11:51", + "referencedDeclaration": 48225, + "src": "35047:11:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo storage pointer" } }, - "id": 50572, + "id": 48236, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "35383:20:51", + "memberLocation": "35059:20:38", "memberName": "liquidationThreshold", "nodeType": "MemberAccess", - "referencedDeclaration": 48936, - "src": "35371:32:51", + "referencedDeclaration": 46286, + "src": "35047:32:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "35328:75:51", + "src": "35004:75:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 50577, + "id": 48241, "nodeType": "IfStatement", - "src": "35324:108:51", + "src": "35000:108:38", "trueBody": { "errorCall": { "arguments": [], "expression": { "argumentTypes": [], - "id": 50574, + "id": 48238, "name": "BadCollateralRatio", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 48859, - "src": "35412:18:51", + "referencedDeclaration": 46199, + "src": "35088:18:38", "typeDescriptions": { "typeIdentifier": "t_function_error_pure$__$returns$__$", "typeString": "function () pure" } }, - "id": 50575, + "id": 48239, "isConstant": false, "isLValue": false, "isPure": false, @@ -21739,65 +21261,65 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "35412:20:51", + "src": "35088:20:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 50576, + "id": 48240, "nodeType": "RevertStatement", - "src": "35405:27:51" + "src": "35081:27:38" } } ] }, "documentation": { - "id": 50558, + "id": 48222, "nodeType": "StructuredDocumentation", - "src": "35060:90:51", + "src": "34737:90:38", "text": " @dev reverts if the collateral ratio is above the liquidation threshold" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_revertIfCollateralRatioIsAboveLiquidationThreshold", - "nameLocation": "35164:51:51", + "nameLocation": "34841:51:38", "parameters": { - "id": 50565, + "id": 48229, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50561, + "id": 48225, "mutability": "mutable", "name": "_collateral", - "nameLocation": "35248:11:51", + "nameLocation": "34925:11:38", "nodeType": "VariableDeclaration", - "scope": 50579, - "src": "35225:34:51", + "scope": 48243, + "src": "34902:34:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 50560, + "id": 48224, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50559, + "id": 48223, "name": "CollateralInfo", - "nameLocations": ["35225:14:51"], + "nameLocations": ["34902:14:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48954, - "src": "35225:14:51" + "referencedDeclaration": 46300, + "src": "34902:14:38" }, - "referencedDeclaration": 48954, - "src": "35225:14:51", + "referencedDeclaration": 46300, + "src": "34902:14:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$48954_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46300_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, @@ -21805,62 +21327,62 @@ }, { "constant": false, - "id": 50564, + "id": 48228, "mutability": "mutable", "name": "_vault", - "nameLocation": "35287:6:51", + "nameLocation": "34964:6:38", "nodeType": "VariableDeclaration", - "scope": 50579, - "src": "35269:24:51", + "scope": 48243, + "src": "34946:24:38", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 50563, + "id": 48227, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 50562, + "id": 48226, "name": "VaultInfo", - "nameLocations": ["35269:9:51"], + "nameLocations": ["34946:9:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48963, - "src": "35269:9:51" + "referencedDeclaration": 46309, + "src": "34946:9:38" }, - "referencedDeclaration": 48963, - "src": "35269:9:51", + "referencedDeclaration": 46309, + "src": "34946:9:38", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$48963_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46309_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "src": "35215:84:51" + "src": "34892:84:38" }, "returnParameters": { - "id": 50566, + "id": 48230, "nodeType": "ParameterList", "parameters": [], - "src": "35314:0:51" + "src": "34990:0:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "view", "virtual": false, - "visibility": "internal" + "visibility": "private" }, { - "id": 50615, + "id": 48279, "nodeType": "FunctionDefinition", - "src": "35698:178:51", + "src": "35374:178:38", "nodes": [], "body": { - "id": 50614, + "id": 48278, "nodeType": "Block", - "src": "35772:104:51", + "src": "35448:104:38", "nodes": [], "statements": [ { @@ -21869,18 +21391,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50591, + "id": 48255, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 50589, + "id": 48253, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50584, - "src": "35786:2:51", + "referencedDeclaration": 48248, + "src": "35462:2:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21890,46 +21412,46 @@ "operator": "==", "rightExpression": { "hexValue": "30", - "id": 50590, + "id": 48254, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "35792:1:51", + "src": "35468:1:38", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "35786:7:51", + "src": "35462:7:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 50595, + "id": 48259, "nodeType": "IfStatement", - "src": "35782:21:51", + "src": "35458:21:38", "trueBody": { "expression": { "arguments": [], "expression": { "argumentTypes": [], - "id": 50592, + "id": 48256, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [-19, -19], "referencedDeclaration": -19, - "src": "35795:6:51", + "src": "35471:6:38", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$__$returns$__$", "typeString": "function () pure" } }, - "id": 50593, + "id": 48257, "isConstant": false, "isLValue": false, "isPure": false, @@ -21938,16 +21460,16 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "35795:8:51", + "src": "35471:8:38", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 50594, + "id": 48258, "nodeType": "ExpressionStatement", - "src": "35795:8:51" + "src": "35471:8:38" } }, { @@ -21956,18 +21478,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50598, + "id": 48262, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 50596, + "id": 48260, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50582, - "src": "35817:2:51", + "referencedDeclaration": 48246, + "src": "35493:2:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21977,66 +21499,66 @@ "operator": "==", "rightExpression": { "hexValue": "30", - "id": 50597, + "id": 48261, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "35823:1:51", + "src": "35499:1:38", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "35817:7:51", + "src": "35493:7:38", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 50601, + "id": 48265, "nodeType": "IfStatement", - "src": "35813:21:51", + "src": "35489:21:38", "trueBody": { "expression": { "hexValue": "30", - "id": 50599, + "id": 48263, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "35833:1:51", + "src": "35509:1:38", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "functionReturnParameters": 50588, - "id": 50600, + "functionReturnParameters": 48252, + "id": 48264, "nodeType": "Return", - "src": "35826:8:51" + "src": "35502:8:38" } }, { "expression": { - "id": 50612, + "id": 48276, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 50602, + "id": 48266, "name": "_c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50587, - "src": "35845:2:51", + "referencedDeclaration": 48251, + "src": "35521:2:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22049,21 +21571,21 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50611, + "id": 48275, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "hexValue": "31", - "id": 50603, + "id": 48267, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "35850:1:51", + "src": "35526:1:38", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" @@ -22079,7 +21601,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50609, + "id": 48273, "isConstant": false, "isLValue": false, "isPure": false, @@ -22091,18 +21613,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 50606, + "id": 48270, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 50604, + "id": 48268, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50582, - "src": "35856:2:51", + "referencedDeclaration": 48246, + "src": "35532:2:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22112,35 +21634,35 @@ "operator": "-", "rightExpression": { "hexValue": "31", - "id": 50605, + "id": 48269, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "35861:1:51", + "src": "35537:1:38", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, - "src": "35856:6:51", + "src": "35532:6:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 50607, + "id": 48271, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "35855:8:51", + "src": "35531:8:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22149,79 +21671,79 @@ "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { - "id": 50608, + "id": 48272, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50584, - "src": "35866:2:51", + "referencedDeclaration": 48248, + "src": "35542:2:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "35855:13:51", + "src": "35531:13:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 50610, + "id": 48274, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "35854:15:51", + "src": "35530:15:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "35850:19:51", + "src": "35526:19:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "35845:24:51", + "src": "35521:24:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 50613, + "id": 48277, "nodeType": "ExpressionStatement", - "src": "35845:24:51" + "src": "35521:24:38" } ] }, "documentation": { - "id": 50580, + "id": 48244, "nodeType": "StructuredDocumentation", - "src": "35445:248:51", + "src": "35121:248:38", "text": " @dev divides `_a` by `_b` and rounds the result `_c` up to the next whole number\n @dev if `_a` is 0, return 0 early as it will revert with underflow error when calculating divUp below\n @dev reverts if `_b` is 0" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_divUp", - "nameLocation": "35707:6:51", + "nameLocation": "35383:6:38", "parameters": { - "id": 50585, + "id": 48249, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50582, + "id": 48246, "mutability": "mutable", "name": "_a", - "nameLocation": "35722:2:51", + "nameLocation": "35398:2:38", "nodeType": "VariableDeclaration", - "scope": 50615, - "src": "35714:10:51", + "scope": 48279, + "src": "35390:10:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -22229,10 +21751,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50581, + "id": 48245, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "35714:7:51", + "src": "35390:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22242,13 +21764,13 @@ }, { "constant": false, - "id": 50584, + "id": 48248, "mutability": "mutable", "name": "_b", - "nameLocation": "35734:2:51", + "nameLocation": "35410:2:38", "nodeType": "VariableDeclaration", - "scope": 50615, - "src": "35726:10:51", + "scope": 48279, + "src": "35402:10:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -22256,10 +21778,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50583, + "id": 48247, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "35726:7:51", + "src": "35402:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22268,21 +21790,21 @@ "visibility": "internal" } ], - "src": "35713:24:51" + "src": "35389:24:38" }, "returnParameters": { - "id": 50588, + "id": 48252, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 50587, + "id": 48251, "mutability": "mutable", "name": "_c", - "nameLocation": "35768:2:51", + "nameLocation": "35444:2:38", "nodeType": "VariableDeclaration", - "scope": 50615, - "src": "35760:10:51", + "scope": 48279, + "src": "35436:10:38", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -22290,10 +21812,10 @@ "typeString": "uint256" }, "typeName": { - "id": 50586, + "id": 48250, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "35760:7:51", + "src": "35436:7:38", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22302,9 +21824,9 @@ "visibility": "internal" } ], - "src": "35759:12:51" + "src": "35435:12:38" }, - "scope": 50616, + "scope": 48280, "stateMutability": "pure", "virtual": false, "visibility": "private" @@ -22314,60 +21836,60 @@ "baseContracts": [ { "baseName": { - "id": 48984, - "name": "AccessControl", - "nameLocations": ["497:13:51"], + "id": 46667, + "name": "IVault", + "nameLocations": ["524:6:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 43683, - "src": "497:13:51" + "referencedDeclaration": 46316, + "src": "524:6:38" }, - "id": 48985, + "id": 46668, "nodeType": "InheritanceSpecifier", - "src": "497:13:51" + "src": "524:6:38" }, { "baseName": { - "id": 48986, - "name": "Pausable", - "nameLocations": ["512:8:51"], + "id": 46669, + "name": "Ownable", + "nameLocations": ["532:7:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48772, - "src": "512:8:51" + "referencedDeclaration": 44381, + "src": "532:7:38" }, - "id": 48987, + "id": 46670, "nodeType": "InheritanceSpecifier", - "src": "512:8:51" + "src": "532:7:38" }, { "baseName": { - "id": 48988, - "name": "IVault", - "nameLocations": ["522:6:51"], + "id": 46671, + "name": "Pausable", + "nameLocations": ["541:8:38"], "nodeType": "IdentifierPath", - "referencedDeclaration": 48969, - "src": "522:6:51" + "referencedDeclaration": 46103, + "src": "541:8:38" }, - "id": 48989, + "id": 46672, "nodeType": "InheritanceSpecifier", - "src": "522:6:51" + "src": "541:8:38" } ], "canonicalName": "Vault", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, - "linearizedBaseContracts": [50616, 48969, 48772, 43683, 46625, 46637, 43766, 45302], + "linearizedBaseContracts": [48280, 46103, 44381, 46316], "name": "Vault", - "nameLocation": "488:5:51", - "scope": 50617, + "nameLocation": "515:5:38", + "scope": 48281, "usedErrors": [ - 43693, 43696, 44754, 45035, 45040, 45043, 48715, 48717, 48855, 48857, 48859, 48861, 48863, - 48865, 48867, 48869, 48871, 48873, 48875, 48877 + 44193, 44196, 44199, 44202, 46046, 46048, 46195, 46197, 46199, 46201, 46203, 46205, 46207, + 46209, 46211, 46213, 46215, 46217, 46219, 46221, 46223, 46225, 46227 ], - "usedEvents": [43705, 43714, 43723, 48881, 48887, 48895, 48901, 48907, 48913, 48923] + "usedEvents": [44209, 44214, 44219, 46231, 46237, 46245, 46251, 46257, 46263, 46273] } ], "license": "GPL-3.0" }, - "id": 51 + "id": 38 } diff --git a/src/contracts/abis/VaultGetters.json b/src/contracts/abis/VaultGetters.json index af0ec27..d187d20 100644 --- a/src/contracts/abis/VaultGetters.json +++ b/src/contracts/abis/VaultGetters.json @@ -8,7 +8,7 @@ "type": "address" }, { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" } @@ -62,7 +62,7 @@ "type": "address" }, { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -91,7 +91,7 @@ "type": "address" }, { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -120,7 +120,7 @@ "type": "address" }, { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -149,7 +149,7 @@ "type": "address" }, { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -178,7 +178,7 @@ "type": "address" }, { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -240,13 +240,13 @@ } ], "bytecode": { - "object": "0x608060405234801561001057600080fd5b50610e72806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a6e91adf1161005b578063a6e91adf14610120578063b09758f014610141578063c03d887114610154578063f44364c51461016757600080fd5b8063347c5d431461008257806354510b9d146100b55780635d242b97146100d8575b600080fd5b610095610090366004610aae565b61017a565b604080519384526020840192909252908201526060015b60405180910390f35b6100c86100c3366004610aae565b6101d7565b60405190151581526020016100ac565b6100eb6100e6366004610af9565b61022d565b604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e0016100ac565b61013361012e366004610aae565b6102b4565b6040519081526020016100ac565b6100c861014f366004610aae565b610376565b610133610162366004610aae565b6103f4565b610133610175366004610aae565b6104e3565b60008060008061018b87878761052b565b9050600061019988886105fb565b905060006101a88983856106f8565b50905060008184604001516101bd9190610b48565b8451602090950151949b949a509850929650505050505050565b6000806101e585858561052b565b905060006101f386866105fb565b905080610140015161020a57600192505050610226565b6000610217878385610757565b60409092015190911115925050505b9392505050565b6000806000806000806000806102438a8a6105fb565b905060006102508b6107e1565b80516080840151519192506000916102689190610b48565b610276906301e13380610b5b565b61010084015184516020860151604087015160e088015160c090980151929e50909c509a509498509096509450919250505092959891949750929550565b6000806102c285858561052b565b905060006102d086866105fb565b90508061014001516102e757600092505050610226565b60006102f48783856106f8565b5090506000818460400151856020015161030e9190610b48565b6103189190610b48565b90506000610326848361088e565b905060006103586103396012600a610c56565b610344906001610b5b565b61034e9084610b5b565b86604001516108e7565b8651909150610368908290610c62565b9a9950505050505050505050565b604051635881fc3360e01b81526001600160a01b038381166004830152828116602483015260009190851690635881fc3390604401602060405180830381865afa1580156103c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ec9190610c9e565b949350505050565b60008061040285858561052b565b9050600061041086866105fb565b825190915015806104245750806101400151155b1561043457600092505050610226565b60006104408284610927565b905060006104506012600a610c56565b61045b906001610b5b565b604084015161046a9084610b5b565b6104749190610cb9565b905060006104838985876106f8565b5090506000818660400151876020015161049d9190610b48565b6104a79190610b48565b905060006104b58285610c62565b90506000811380156104ca5750808660e00151105b15610368575060e08501519a9950505050505050505050565b6000806104f185858561052b565b905060006104ff86866105fb565b905080610140015161051657600092505050610226565b610521868284610757565b9695505050505050565b6105566040518060800160405280600081526020016000815260200160008152602001600081525090565b60405163e2c7283f60e01b81526001600160a01b038481166004830152838116602483015260009182918291829189169063e2c7283f90604401608060405180830381865afa1580156105ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d19190610cdb565b60408051608081018252948552602085019390935291830152606082015298975050505050505050565b610603610a18565b60008060008060008060008060008060008d6001600160a01b031663c665471f8e6040518263ffffffff1660e01b815260040161064f91906001600160a01b0391909116815260200190565b6101a060405180830381865afa15801561066d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106919190610d11565b60408051610160810182529b8c5260208c019a909a52988a01979097526060890195909552608088019390935260a087019190915260c086015260e085015261010084015261012083015215156101408201529b5050505050505050505050505b92915050565b60008060006107078686610978565b905060006107176012600a610c56565b610722906001610b5b565b602086015160608701516107369085610dfb565b6107409190610b5b565b61074a9190610cb9565b9791965090945050505050565b6000806107658585856106f8565b5090506000818460400151856020015161077f9190610b48565b6107899190610b48565b90508060000361079e57600092505050610226565b60006107aa8686610927565b90506107d66107bb6012600a610c56565b6107c6906001610b5b565b6107d09084610b5b565b826108e7565b979650505050505050565b61080560405180606001604052806000815260200160008152602001600081525090565b6000806000846001600160a01b03166313f60c9a6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610848573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086c9190610e0e565b6040805160608101825293845260208401929092529082015295945050505050565b6000806108cf6108a06012600a610c56565b6108ab906001610b5b565b6108b59085610b5b565b64e8d4a510008660c001516108ca9190610b5b565b6108e7565b90506103ec81856101200151600a6108ca9190610c56565b6000816000036108f657600080fd5b82600003610906575060006106f2565b81610912600185610dfb565b61091c9190610cb9565b610226906001610b48565b6000806109366012600a610c56565b610941906001610b5b565b64e8d4a510008560c0015161095a8787600001516109fa565b6109649190610b5b565b61096e9190610b5b565b6103ec9190610cb9565b6000808260800151604001514261098f9190610dfb565b60808401515161099f9190610b5b565b8360800151602001516109b29190610b48565b905060006109bf856107e1565b905060008160400151426109d39190610dfb565b82516109df9190610b5b565b82602001516109ee9190610b48565b90506105218184610b48565b6000826101200151600a610a0e9190610c56565b6102269083610b5b565b60405180610160016040528060008152602001600081526020016000815260200160008152602001610a6460405180606001604052806000815260200160008152602001600081525090565b815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b6001600160a01b0381168114610aab57600080fd5b50565b600080600060608486031215610ac357600080fd5b8335610ace81610a96565b92506020840135610ade81610a96565b91506040840135610aee81610a96565b809150509250925092565b60008060408385031215610b0c57600080fd5b8235610b1781610a96565b91506020830135610b2781610a96565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b808201808211156106f2576106f2610b32565b80820281158282048414176106f2576106f2610b32565b600181815b80851115610bad578160001904821115610b9357610b93610b32565b80851615610ba057918102915b93841c9390800290610b77565b509250929050565b600082610bc4575060016106f2565b81610bd1575060006106f2565b8160018114610be75760028114610bf157610c0d565b60019150506106f2565b60ff841115610c0257610c02610b32565b50506001821b6106f2565b5060208310610133831016604e8410600b8410161715610c30575081810a6106f2565b610c3a8383610b72565b8060001904821115610c4e57610c4e610b32565b029392505050565b60006102268383610bb5565b8181036000831280158383131683831282161715610c8257610c82610b32565b5092915050565b80518015158114610c9957600080fd5b919050565b600060208284031215610cb057600080fd5b61022682610c89565b600082610cd657634e487b7160e01b600052601260045260246000fd5b500490565b60008060008060808587031215610cf157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60008060008060008060008060008060008b8d036101a0811215610d3457600080fd5b8c519b5060208d01519a5060408d0151995060608d015198506060607f1982011215610d5f57600080fd5b506040516060810181811067ffffffffffffffff82111715610d9157634e487b7160e01b600052604160045260246000fd5b806040525060808d0151815260a08d0151602082015260c08d015160408201528097505060e08c015195506101008c015194506101208c015193506101408c015192506101608c01519150610de96101808d01610c89565b90509295989b509295989b9093969950565b818103818111156106f2576106f2610b32565b600080600060608486031215610e2357600080fd5b835192506020840151915060408401519050925092509256fea264697066735822122041488375584208ff5ee08a1c8377342d6861e7290ac51da794fda4c0ec337c5464736f6c63430008150033", - "sourceMap": "391:14746:53:-:0;;;;;;;;;;;;;;;;;;;", + "object": "0x608060405234801561001057600080fd5b50610f1e806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a6e91adf1161005b578063a6e91adf14610120578063b09758f014610141578063c03d887114610154578063f44364c51461016757600080fd5b8063347c5d431461008257806354510b9d146100b55780635d242b97146100d8575b600080fd5b610095610090366004610b16565b61017a565b604080519384526020840192909252908201526060015b60405180910390f35b6100c86100c3366004610b16565b6101d7565b60405190151581526020016100ac565b6100eb6100e6366004610b61565b610231565b604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e0016100ac565b61013361012e366004610b16565b6102b7565b6040519081526020016100ac565b6100c861014f366004610b16565b61037d565b610133610162366004610b16565b6103fb565b610133610175366004610b16565b61050b565b60008060008061018b878787610557565b905060006101998888610627565b905060006101a889838561070e565b50905060008184604001516101bd9190610bb0565b8451602090950151949b949a509850929650505050505050565b6000806101e5858585610557565b905060006101f38686610627565b60808101515190915060000361020e5760019250505061022a565b600061021b87838561083f565b60409092015190911115925050505b9392505050565b6000806000806000806000806102478a8a610627565b905060006102548b6108de565b805160808401515191925060009161026c9190610bb0565b61027a906301e13380610bc3565b60e084015184516020860151604087015160c088015160a090980151929e50909c509a509498509096509450919250505092959891949750929550565b6000806102c5858585610557565b905060006102d38686610627565b6080810151519091506000036102ee5760009250505061022a565b60006102fb87838561070e565b509050600081846040015185602001516103159190610bb0565b61031f9190610bb0565b9050600061032d848361098b565b9050600061035f6103406012600a610cbe565b61034b906064610bc3565b6103559084610bc3565b86604001516109e1565b865190915061036f908290610cca565b9a9950505050505050505050565b604051635881fc3360e01b81526001600160a01b038381166004830152828116602483015260009190851690635881fc3390604401602060405180830381865afa1580156103cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f39190610cf1565b949350505050565b600080610409858585610557565b905060006104178686610627565b8251909150158061042b5750608081015151155b1561043b5760009250505061022a565b60006104478284610a21565b905060006104576012600a610cbe565b610462906064610bc3565b60408401516104719084610bc3565b61047b9190610d13565b9050600061048a89858761070e565b509050600081866040015187602001516104a49190610bb0565b6104ae9190610bb0565b905060006104bc8285610cca565b90506000811380156104d15750808660c00151105b1561036f576001600160ff1b038660c0015111156104f757506001600160ff1b0361036f565b5060c08501519a9950505050505050505050565b600080610519858585610557565b905060006105278686610627565b6080810151519091506000036105425760009250505061022a565b61054d86828461083f565b9695505050505050565b6105826040518060800160405280600081526020016000815260200160008152602001600081525090565b60405163e2c7283f60e01b81526001600160a01b038481166004830152838116602483015260009182918291829189169063e2c7283f90604401608060405180830381865afa1580156105d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fd9190610d35565b60408051608081018252948552602085019390935291830152606082015298975050505050505050565b61062f610a90565b60008060008060008060008060008b6001600160a01b031663c665471f8c6040518263ffffffff1660e01b815260040161067891906001600160a01b0391909116815260200190565b61016060405180830381865afa158015610696573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ba9190610d6b565b6040805161012081018252998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e083015261010082015299505050505050505050505b92915050565b6000806000856001600160a01b031663336d391e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610751573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107759190610e38565b6001600160a01b031663cf5696cb61078c886108de565b87608001516040518363ffffffff1660e01b81526004016107ae929190610e55565b602060405180830381865afa1580156107cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ef9190610e8e565b905060006107ff6012600a610cbe565b61080a906064610bc3565b6020860151606087015161081e9085610ea7565b6108289190610bc3565b6108329190610d13565b9791965090945050505050565b60008061084d85858561070e565b509050600081846040015185602001516108679190610bb0565b6108719190610bb0565b9050806000036108865760009250505061022a565b835160000361089b576000199250505061022a565b60006108a78686610a21565b90506108d36108b86012600a610cbe565b6108c3906064610bc3565b6108cd9084610bc3565b826109e1565b979650505050505050565b61090260405180606001604052806000815260200160008152602001600081525090565b6000806000846001600160a01b03166313f60c9a6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610945573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109699190610eba565b6040805160608101825293845260208401929092529082015295945050505050565b600061022a61099c6012600a610cbe565b6109a7906001610bc3565b6109b19084610bc3565b6101008501516109c290600a610cbe565b64e8d4a510008660a001516109d79190610bc3565b6109e19190610bc3565b6000816000036109f057600080fd5b82600003610a0057506000610708565b81610a0c600185610ea7565b610a169190610d13565b61022a906001610bb0565b600080610a306012600a610cbe565b610a3b906001610bc3565b64e8d4a510008560a00151610a54878760000151610a72565b610a5e9190610bc3565b610a689190610bc3565b6103f39190610d13565b6000826101000151600a610a869190610cbe565b61022a9083610bc3565b60405180610120016040528060008152602001600081526020016000815260200160008152602001610adc60405180606001604052806000815260200160008152602001600081525090565b8152602001600081526020016000815260200160008152602001600081525090565b6001600160a01b0381168114610b1357600080fd5b50565b600080600060608486031215610b2b57600080fd5b8335610b3681610afe565b92506020840135610b4681610afe565b91506040840135610b5681610afe565b809150509250925092565b60008060408385031215610b7457600080fd5b8235610b7f81610afe565b91506020830135610b8f81610afe565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561070857610708610b9a565b808202811582820484141761070857610708610b9a565b600181815b80851115610c15578160001904821115610bfb57610bfb610b9a565b80851615610c0857918102915b93841c9390800290610bdf565b509250929050565b600082610c2c57506001610708565b81610c3957506000610708565b8160018114610c4f5760028114610c5957610c75565b6001915050610708565b60ff841115610c6a57610c6a610b9a565b50506001821b610708565b5060208310610133831016604e8410600b8410161715610c98575081810a610708565b610ca28383610bda565b8060001904821115610cb657610cb6610b9a565b029392505050565b600061022a8383610c1d565b8181036000831280158383131683831282161715610cea57610cea610b9a565b5092915050565b600060208284031215610d0357600080fd5b8151801515811461022a57600080fd5b600082610d3057634e487b7160e01b600052601260045260246000fd5b500490565b60008060008060808587031215610d4b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b6000806000806000806000806000898b03610160811215610d8b57600080fd5b8a51995060208b0151985060408b0151975060608b015196506060607f1982011215610db657600080fd5b506040516060810181811067ffffffffffffffff82111715610de857634e487b7160e01b600052604160045260246000fd5b806040525060808b0151815260a08b0151602082015260c08b015160408201528095505060e08a015193506101008a015192506101208a015191506101408a015190509295985092959850929598565b600060208284031215610e4a57600080fd5b815161022a81610afe565b8251815260208084015181830152604080850151818401528351606084015290830151608083015282015160a082015260c0810161022a565b600060208284031215610ea057600080fd5b5051919050565b8181038181111561070857610708610b9a565b600080600060608486031215610ecf57600080fd5b835192506020840151915060408401519050925092509256fea264697066735822122088a8bbf0e50731659250053affd0c6fd68855ae8488831075089108d8fcb0b1864736f6c63430008150033", + "sourceMap": "262:15248:47:-:0;;;;;;;;;;;;;;;;;;;", "linkReferences": {} }, "deployedBytecode": { - "object": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a6e91adf1161005b578063a6e91adf14610120578063b09758f014610141578063c03d887114610154578063f44364c51461016757600080fd5b8063347c5d431461008257806354510b9d146100b55780635d242b97146100d8575b600080fd5b610095610090366004610aae565b61017a565b604080519384526020840192909252908201526060015b60405180910390f35b6100c86100c3366004610aae565b6101d7565b60405190151581526020016100ac565b6100eb6100e6366004610af9565b61022d565b604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e0016100ac565b61013361012e366004610aae565b6102b4565b6040519081526020016100ac565b6100c861014f366004610aae565b610376565b610133610162366004610aae565b6103f4565b610133610175366004610aae565b6104e3565b60008060008061018b87878761052b565b9050600061019988886105fb565b905060006101a88983856106f8565b50905060008184604001516101bd9190610b48565b8451602090950151949b949a509850929650505050505050565b6000806101e585858561052b565b905060006101f386866105fb565b905080610140015161020a57600192505050610226565b6000610217878385610757565b60409092015190911115925050505b9392505050565b6000806000806000806000806102438a8a6105fb565b905060006102508b6107e1565b80516080840151519192506000916102689190610b48565b610276906301e13380610b5b565b61010084015184516020860151604087015160e088015160c090980151929e50909c509a509498509096509450919250505092959891949750929550565b6000806102c285858561052b565b905060006102d086866105fb565b90508061014001516102e757600092505050610226565b60006102f48783856106f8565b5090506000818460400151856020015161030e9190610b48565b6103189190610b48565b90506000610326848361088e565b905060006103586103396012600a610c56565b610344906001610b5b565b61034e9084610b5b565b86604001516108e7565b8651909150610368908290610c62565b9a9950505050505050505050565b604051635881fc3360e01b81526001600160a01b038381166004830152828116602483015260009190851690635881fc3390604401602060405180830381865afa1580156103c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ec9190610c9e565b949350505050565b60008061040285858561052b565b9050600061041086866105fb565b825190915015806104245750806101400151155b1561043457600092505050610226565b60006104408284610927565b905060006104506012600a610c56565b61045b906001610b5b565b604084015161046a9084610b5b565b6104749190610cb9565b905060006104838985876106f8565b5090506000818660400151876020015161049d9190610b48565b6104a79190610b48565b905060006104b58285610c62565b90506000811380156104ca5750808660e00151105b15610368575060e08501519a9950505050505050505050565b6000806104f185858561052b565b905060006104ff86866105fb565b905080610140015161051657600092505050610226565b610521868284610757565b9695505050505050565b6105566040518060800160405280600081526020016000815260200160008152602001600081525090565b60405163e2c7283f60e01b81526001600160a01b038481166004830152838116602483015260009182918291829189169063e2c7283f90604401608060405180830381865afa1580156105ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d19190610cdb565b60408051608081018252948552602085019390935291830152606082015298975050505050505050565b610603610a18565b60008060008060008060008060008060008d6001600160a01b031663c665471f8e6040518263ffffffff1660e01b815260040161064f91906001600160a01b0391909116815260200190565b6101a060405180830381865afa15801561066d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106919190610d11565b60408051610160810182529b8c5260208c019a909a52988a01979097526060890195909552608088019390935260a087019190915260c086015260e085015261010084015261012083015215156101408201529b5050505050505050505050505b92915050565b60008060006107078686610978565b905060006107176012600a610c56565b610722906001610b5b565b602086015160608701516107369085610dfb565b6107409190610b5b565b61074a9190610cb9565b9791965090945050505050565b6000806107658585856106f8565b5090506000818460400151856020015161077f9190610b48565b6107899190610b48565b90508060000361079e57600092505050610226565b60006107aa8686610927565b90506107d66107bb6012600a610c56565b6107c6906001610b5b565b6107d09084610b5b565b826108e7565b979650505050505050565b61080560405180606001604052806000815260200160008152602001600081525090565b6000806000846001600160a01b03166313f60c9a6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610848573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086c9190610e0e565b6040805160608101825293845260208401929092529082015295945050505050565b6000806108cf6108a06012600a610c56565b6108ab906001610b5b565b6108b59085610b5b565b64e8d4a510008660c001516108ca9190610b5b565b6108e7565b90506103ec81856101200151600a6108ca9190610c56565b6000816000036108f657600080fd5b82600003610906575060006106f2565b81610912600185610dfb565b61091c9190610cb9565b610226906001610b48565b6000806109366012600a610c56565b610941906001610b5b565b64e8d4a510008560c0015161095a8787600001516109fa565b6109649190610b5b565b61096e9190610b5b565b6103ec9190610cb9565b6000808260800151604001514261098f9190610dfb565b60808401515161099f9190610b5b565b8360800151602001516109b29190610b48565b905060006109bf856107e1565b905060008160400151426109d39190610dfb565b82516109df9190610b5b565b82602001516109ee9190610b48565b90506105218184610b48565b6000826101200151600a610a0e9190610c56565b6102269083610b5b565b60405180610160016040528060008152602001600081526020016000815260200160008152602001610a6460405180606001604052806000815260200160008152602001600081525090565b815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b6001600160a01b0381168114610aab57600080fd5b50565b600080600060608486031215610ac357600080fd5b8335610ace81610a96565b92506020840135610ade81610a96565b91506040840135610aee81610a96565b809150509250925092565b60008060408385031215610b0c57600080fd5b8235610b1781610a96565b91506020830135610b2781610a96565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b808201808211156106f2576106f2610b32565b80820281158282048414176106f2576106f2610b32565b600181815b80851115610bad578160001904821115610b9357610b93610b32565b80851615610ba057918102915b93841c9390800290610b77565b509250929050565b600082610bc4575060016106f2565b81610bd1575060006106f2565b8160018114610be75760028114610bf157610c0d565b60019150506106f2565b60ff841115610c0257610c02610b32565b50506001821b6106f2565b5060208310610133831016604e8410600b8410161715610c30575081810a6106f2565b610c3a8383610b72565b8060001904821115610c4e57610c4e610b32565b029392505050565b60006102268383610bb5565b8181036000831280158383131683831282161715610c8257610c82610b32565b5092915050565b80518015158114610c9957600080fd5b919050565b600060208284031215610cb057600080fd5b61022682610c89565b600082610cd657634e487b7160e01b600052601260045260246000fd5b500490565b60008060008060808587031215610cf157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60008060008060008060008060008060008b8d036101a0811215610d3457600080fd5b8c519b5060208d01519a5060408d0151995060608d015198506060607f1982011215610d5f57600080fd5b506040516060810181811067ffffffffffffffff82111715610d9157634e487b7160e01b600052604160045260246000fd5b806040525060808d0151815260a08d0151602082015260c08d015160408201528097505060e08c015195506101008c015194506101208c015193506101408c015192506101608c01519150610de96101808d01610c89565b90509295989b509295989b9093969950565b818103818111156106f2576106f2610b32565b600080600060608486031215610e2357600080fd5b835192506020840151915060408401519050925092509256fea264697066735822122041488375584208ff5ee08a1c8377342d6861e7290ac51da794fda4c0ec337c5464736f6c63430008150033", - "sourceMap": "391:14746:53:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8089:667;;;;;;:::i;:::-;;:::i;:::-;;;;944:25:56;;;1000:2;985:18;;978:34;;;;1028:18;;;1021:34;932:2;917:18;8089:667:53;;;;;;;;2616:571;;;;;;:::i;:::-;;:::i;:::-;;;1231:14:56;;1224:22;1206:41;;1194:2;1179:18;2616:571:53;1066:187:56;8835:820:53;;;;;;:::i;:::-;;:::i;:::-;;;;2010:25:56;;;2066:2;2051:18;;2044:34;;;;2094:18;;;2087:34;;;;2152:2;2137:18;;2130:34;;;;2195:3;2180:19;;2173:35;2239:3;2224:19;;2217:35;2283:3;2268:19;;2261:35;1997:3;1982:19;8835:820:53;1695:607:56;6652:1200:53;;;;;;:::i;:::-;;:::i;:::-;;;2451:25:56;;;2439:2;2424:18;6652:1200:53;2307:175:56;9780:181:53;;;;;;:::i;:::-;;:::i;4145:1927::-;;;;;;:::i;:::-;;:::i;3261:484::-;;;;;;:::i;:::-;;:::i;8089:667::-;8216:7;8225;8234;8257:30;8290:58;8307:14;8323:16;8341:6;8290:16;:58::i;:::-;8257:91;;8358:40;8401:55;8423:14;8439:16;8401:21;:55::i;:::-;8358:98;;8503:27;8535:58;8557:14;8573:11;8586:6;8535:21;:58::i;:::-;8502:91;;;8603:20;8647:19;8626:6;:18;;;:40;;;;:::i;:::-;8685:26;;8713:21;;;;;8685:26;;8713:21;;-1:-1:-1;8713:21:53;-1:-1:-1;8089:667:53;;-1:-1:-1;;;;;;;8089:667:53:o;2616:571::-;2750:4;2770:30;2803:58;2820:14;2836:16;2854:6;2803:16;:58::i;:::-;2770:91;;2871:40;2914:55;2936:14;2952:16;2914:21;:55::i;:::-;2871:98;;2985:11;:18;;;2980:36;;3012:4;3005:11;;;;;;2980:36;3027:24;3054:56;3074:14;3090:11;3103:6;3054:19;:56::i;:::-;3148:32;;;;;3128:52;;;;;-1:-1:-1;;;2616:571:53;;;;;;:::o;8835:820::-;8955:7;8964;8973;8982;8991;9000;9009;9032:40;9075:55;9097:14;9113:16;9075:21;:55::i;:::-;9032:98;;9141:36;9180:32;9197:14;9180:16;:32::i;:::-;9267:18;;9239:20;;;;:25;9141:71;;-1:-1:-1;9222:13:53;;9239:46;;9267:18;9239:46;:::i;:::-;9238:59;;9289:8;9238:59;:::i;:::-;9329:38;;;;9399:36;;9449:31;;;;9494:32;;;;9540:23;;;;9621:17;;;;;9399:36;;-1:-1:-1;9449:31:53;;-1:-1:-1;9494:32:53;-1:-1:-1;9540:23:53;;-1:-1:-1;9222:75:53;;-1:-1:-1;9329:38:53;-1:-1:-1;9621:17:53;;-1:-1:-1;;;8835:820:53;;;;;;;;;;:::o;6652:1200::-;6789:6;6811:30;6844:58;6861:14;6877:16;6895:6;6844:16;:58::i;:::-;6811:91;;6912:40;6955:55;6977:14;6993:16;6955:21;:55::i;:::-;6912:98;;7026:11;:18;;;7021:33;;7053:1;7046:8;;;;;;7021:33;7102:27;7134:58;7156:14;7172:11;7185:6;7134:21;:58::i;:::-;7101:91;;;7202:23;7273:19;7252:6;:18;;;7228:6;:21;;;:42;;;;:::i;:::-;:64;;;;:::i;:::-;7202:90;;7359:42;7404:67;7442:11;7455:15;7404:37;:67::i;:::-;7359:112;-1:-1:-1;7522:50:53;7587:90;513:22;463:2;513;:22;:::i;:::-;508:28;;:1;:28;:::i;:::-;7595:46;;:34;:46;:::i;:::-;7644:11;:32;;;7587:6;:90::i;:::-;7765:26;;7522:155;;-1:-1:-1;7758:87:53;;7522:155;;7758:87;:::i;:::-;7751:94;6652:1200;-1:-1:-1;;;;;;;;;;6652:1200:53:o;9780:181::-;9907:47;;-1:-1:-1;;;9907:47:53;;-1:-1:-1;;;;;5483:15:56;;;9907:47:53;;;5465:34:56;5535:15;;;5515:18;;;5508:43;9884:4:53;;9907:26;;;;;;5400:18:56;;9907:47:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9900:54;9780:181;-1:-1:-1;;;;9780:181:53:o;4145:1927::-;4280:6;4302:30;4335:58;4352:14;4368:16;4386:6;4335:16;:58::i;:::-;4302:91;;4403:40;4446:55;4468:14;4484:16;4446:21;:55::i;:::-;4563:26;;4403:98;;-1:-1:-1;4563:31:53;;:54;;;4599:11;:18;;;4598:19;4563:54;4559:68;;;4626:1;4619:8;;;;;;4559:68;4673:34;4710:50;4740:11;4753:6;4710:29;:50::i;:::-;4673:87;-1:-1:-1;4824:42:53;513:22;463:2;513;:22;:::i;:::-;508:28;;:1;:28;:::i;:::-;4911:32;;;;4882:61;;:26;:61;:::i;:::-;4881:75;;;;:::i;:::-;4824:132;;5004:27;5036:58;5058:14;5074:11;5087:6;5036:21;:58::i;:::-;5003:91;;;5104:23;5175:19;5154:6;:18;;;5130:6;:21;;;:42;;;;:::i;:::-;:64;;;;:::i;:::-;5104:90;-1:-1:-1;5205:26:53;5234:68;5104:90;5241:34;5234:68;:::i;:::-;5205:97;;5544:1;5522:19;:23;:81;;;;;5583:19;5549:11;:23;;;:54;5522:81;5518:278;;;-1:-1:-1;5761:23:53;;;;6046:19;4145:1927;-1:-1:-1;;;;;;;;;;4145:1927:53:o;3261:484::-;3398:7;3421:30;3454:58;3471:14;3487:16;3505:6;3454:16;:58::i;:::-;3421:91;;3522:40;3565:55;3587:14;3603:16;3565:21;:55::i;:::-;3522:98;;3636:11;:18;;;3631:33;;3663:1;3656:8;;;;;;3631:33;3682:56;3702:14;3718:11;3731:6;3682:19;:56::i;:::-;3675:63;3261:484;-1:-1:-1;;;;;;3261:484:53:o;606:466::-;740:23;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;740:23:53;902:53;;-1:-1:-1;;;902:53:53;;-1:-1:-1;;;;;5483:15:56;;;902:53:53;;;5465:34:56;5535:15;;;5515:18;;;5508:43;780:27:53;;;;;;;;902;;;;;5400:18:56;;902:53:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;973:92;;;;;;;;;;;;;;;;;;;;;;;;;;;606:466;-1:-1:-1;;;;;;;;606:466:53:o;1362:1037::-;1485:28;;:::i;:::-;1543:32;1589:27;1630:28;1672:24;1710:30;1754:16;1784:13;1811:19;1844:34;1892:37;1943:11;1967:14;-1:-1:-1;;;;;1967:32:53;;2000:16;1967:50;;;;;;;;;;;;;;-1:-1:-1;;;;;7036:32:56;;;;7018:51;;7006:2;6991:18;;6857:218;1967:50:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2035:357;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;1362:1037:53;;;;;:::o;12670:530::-;12850:7;12859;12878:36;12917:66;12955:14;12971:11;12917:37;:66::i;:::-;12878:105;-1:-1:-1;12994:20:53;513:22;463:2;513;:22;:::i;:::-;508:28;;:1;:28;:::i;:::-;13097:21;;;;13062:31;;;;13031:62;;:28;:62;:::i;:::-;13030:88;;;;:::i;:::-;13029:102;;;;:::i;:::-;12994:137;13164:28;;-1:-1:-1;12670:530:53;;-1:-1:-1;;;;;12670:530:53:o;10235:1132::-;10413:7;10779:31;10815:58;10837:14;10853:11;10866:6;10815:21;:58::i;:::-;10778:95;;;10883:22;10953:23;10932:6;:18;;;10908:6;:21;;;:42;;;;:::i;:::-;:68;;;;:::i;:::-;10883:93;;10990:14;11008:1;10990:19;10986:33;;11018:1;11011:8;;;;;;10986:33;11144:34;11181:50;11211:11;11224:6;11181:29;:50::i;:::-;11144:87;-1:-1:-1;11296:64:53;513:22;463:2;513;:22;:::i;:::-;508:28;;:1;:28;:::i;:::-;11304:26;;:14;:26;:::i;:::-;11333;11296:6;:64::i;:::-;11289:71;10235:1132;-1:-1:-1;;;;;;;10235:1132:53:o;1078:278::-;1148:22;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;1148:22:53;1183:12;1197:23;1222:22;1248:14;-1:-1:-1;;;;;1248:27:53;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1295:54;;;;;;;;;;;;;;;;;;;;;;;1078:278;-1:-1:-1;;;;;1078:278:53:o;12107:423::-;12260:7;;12338:78;513:22;463:2;513;:22;:::i;:::-;508:28;;:1;:28;:::i;:::-;12346:19;;:7;:19;:::i;:::-;595:4;12369:11;:17;;;:45;;;;:::i;:::-;12338:6;:78::i;:::-;12283:133;;12434:89;12441:32;12481:11;:41;;;12475:2;:47;;;;:::i;14957:178::-;15019:10;15045:2;15051:1;15045:7;15041:21;;15054:8;;;15041:21;15076:2;15082:1;15076:7;15072:21;;-1:-1:-1;15092:1:53;15085:8;;15072:21;15125:2;15115:6;15120:1;15115:2;:6;:::i;:::-;15114:13;;;;:::i;:::-;15109:19;;:1;:19;:::i;11514:446::-;11674:7;;513:22;463:2;513;:22;:::i;:::-;508:28;;:1;:28;:::i;:::-;595:4;11827:11;:17;;;11748:76;11784:11;11797:6;:26;;;11748:35;:76::i;:::-;:96;;;;:::i;:::-;:140;;;;:::i;:::-;11734:176;;;;:::i;13406:928::-;13564:7;13680:41;13823:11;:20;;;:35;;;13805:15;:53;;;;:::i;:::-;13776:20;;;;:25;:83;;;;:::i;:::-;13724:11;:20;;;:36;;;:136;;;;:::i;:::-;13680:180;;13871:36;13910:32;13927:14;13910:16;:32::i;:::-;13871:71;;14034:35;14157:13;:28;;;14139:15;:46;;;;:::i;:::-;14117:18;;:69;;;;:::i;:::-;14084:13;:29;;;:103;;;;:::i;:::-;14034:153;-1:-1:-1;14264:63:53;14034:153;14264:33;:63;:::i;14453:245::-;14603:7;14649:11;:41;;;14643:2;:47;;;;:::i;:::-;14633:58;;:6;:58;:::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:138:56:-;-1:-1:-1;;;;;96:31:56;;86:42;;76:70;;142:1;139;132:12;76:70;14:138;:::o;157:580::-;264:6;272;280;333:2;321:9;312:7;308:23;304:32;301:52;;;349:1;346;339:12;301:52;388:9;375:23;407:38;439:5;407:38;:::i;:::-;464:5;-1:-1:-1;521:2:56;506:18;;493:32;534:40;493:32;534:40;:::i;:::-;593:7;-1:-1:-1;652:2:56;637:18;;624:32;665:40;624:32;665:40;:::i;:::-;724:7;714:17;;;157:580;;;;;:::o;1258:432::-;1356:6;1364;1417:2;1405:9;1396:7;1392:23;1388:32;1385:52;;;1433:1;1430;1423:12;1385:52;1472:9;1459:23;1491:38;1523:5;1491:38;:::i;:::-;1548:5;-1:-1:-1;1605:2:56;1590:18;;1577:32;1618:40;1577:32;1618:40;:::i;:::-;1677:7;1667:17;;;1258:432;;;;;:::o;3239:127::-;3300:10;3295:3;3291:20;3288:1;3281:31;3331:4;3328:1;3321:15;3355:4;3352:1;3345:15;3371:125;3436:9;;;3457:10;;;3454:36;;;3470:18;;:::i;3501:168::-;3574:9;;;3605;;3622:15;;;3616:22;;3602:37;3592:71;;3643:18;;:::i;3674:422::-;3763:1;3806:5;3763:1;3820:270;3841:7;3831:8;3828:21;3820:270;;;3900:4;3896:1;3892:6;3888:17;3882:4;3879:27;3876:53;;;3909:18;;:::i;:::-;3959:7;3949:8;3945:22;3942:55;;;3979:16;;;;3942:55;4058:22;;;;4018:15;;;;3820:270;;;3824:3;3674:422;;;;;:::o;4101:806::-;4150:5;4180:8;4170:80;;-1:-1:-1;4221:1:56;4235:5;;4170:80;4269:4;4259:76;;-1:-1:-1;4306:1:56;4320:5;;4259:76;4351:4;4369:1;4364:59;;;;4437:1;4432:130;;;;4344:218;;4364:59;4394:1;4385:10;;4408:5;;;4432:130;4469:3;4459:8;4456:17;4453:43;;;4476:18;;:::i;:::-;-1:-1:-1;;4532:1:56;4518:16;;4547:5;;4344:218;;4646:2;4636:8;4633:16;4627:3;4621:4;4618:13;4614:36;4608:2;4598:8;4595:16;4590:2;4584:4;4581:12;4577:35;4574:77;4571:159;;;-1:-1:-1;4683:19:56;;;4715:5;;4571:159;4762:34;4787:8;4781:4;4762:34;:::i;:::-;4832:6;4828:1;4824:6;4820:19;4811:7;4808:32;4805:58;;;4843:18;;:::i;:::-;4881:20;;4101:806;-1:-1:-1;;;4101:806:56:o;4912:131::-;4972:5;5001:36;5028:8;5022:4;5001:36;:::i;5048:200::-;5114:9;;;5087:4;5142:9;;5170:10;;5182:12;;;5166:29;5205:12;;;5197:21;;5163:56;5160:82;;;5222:18;;:::i;:::-;5160:82;5048:200;;;;:::o;5562:164::-;5638:13;;5687;;5680:21;5670:32;;5660:60;;5716:1;5713;5706:12;5660:60;5562:164;;;:::o;5731:202::-;5798:6;5851:2;5839:9;5830:7;5826:23;5822:32;5819:52;;;5867:1;5864;5857:12;5819:52;5890:37;5917:9;5890:37;:::i;5938:217::-;5978:1;6004;5994:132;;6048:10;6043:3;6039:20;6036:1;6029:31;6083:4;6080:1;6073:15;6111:4;6108:1;6101:15;5994:132;-1:-1:-1;6140:9:56;;5938:217::o;6484:368::-;6581:6;6589;6597;6605;6658:3;6646:9;6637:7;6633:23;6629:33;6626:53;;;6675:1;6672;6665:12;6626:53;-1:-1:-1;;6698:16:56;;6754:2;6739:18;;6733:25;6798:2;6783:18;;6777:25;6842:2;6827:18;;;6821:25;6698:16;;6733:25;;-1:-1:-1;6821:25:56;;-1:-1:-1;6484:368:56;-1:-1:-1;6484:368:56:o;7080:1375::-;7264:6;7272;7280;7288;7296;7304;7312;7320;7328;7336;7344:7;7389:9;7380:7;7376:23;7419:3;7415:2;7411:12;7408:32;;;7436:1;7433;7426:12;7408:32;7465:9;7459:16;7449:26;;7515:2;7504:9;7500:18;7494:25;7484:35;;7559:2;7548:9;7544:18;7538:25;7528:35;;7603:2;7592:9;7588:18;7582:25;7572:35;;7642:2;7635:3;7631:8;7627:2;7623:17;7619:26;7616:46;;;7658:1;7655;7648:12;7616:46;;7691:2;7685:9;7733:2;7725:6;7721:15;7802:6;7790:10;7787:22;7766:18;7754:10;7751:34;7748:62;7745:185;;;7852:10;7847:3;7843:20;7840:1;7833:31;7887:4;7884:1;7877:15;7915:4;7912:1;7905:15;7745:185;7950:10;7946:2;7939:22;;8006:3;7995:9;7991:19;7985:26;7977:6;7970:42;8066:3;8055:9;8051:19;8045:26;8040:2;8032:6;8028:15;8021:51;8126:3;8115:9;8111:19;8105:26;8100:2;8092:6;8088:15;8081:51;8151:6;8141:16;;;8197:3;8186:9;8182:19;8176:26;8166:36;;8242:3;8231:9;8227:19;8221:26;8211:36;;8287:3;8276:9;8272:19;8266:26;8256:36;;8332:3;8321:9;8317:19;8311:26;8301:36;;8377:3;8366:9;8362:19;8356:26;8346:36;;8402:47;8444:3;8433:9;8429:19;8402:47;:::i;:::-;8391:58;;7080:1375;;;;;;;;;;;;;;:::o;8460:128::-;8527:9;;;8548:11;;;8545:37;;;8562:18;;:::i;8593:306::-;8681:6;8689;8697;8750:2;8738:9;8729:7;8725:23;8721:32;8718:52;;;8766:1;8763;8756:12;8718:52;8795:9;8789:16;8779:26;;8845:2;8834:9;8830:18;8824:25;8814:35;;8889:2;8878:9;8874:18;8868:25;8858:35;;8593:306;;;;;:::o", + "object": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a6e91adf1161005b578063a6e91adf14610120578063b09758f014610141578063c03d887114610154578063f44364c51461016757600080fd5b8063347c5d431461008257806354510b9d146100b55780635d242b97146100d8575b600080fd5b610095610090366004610b16565b61017a565b604080519384526020840192909252908201526060015b60405180910390f35b6100c86100c3366004610b16565b6101d7565b60405190151581526020016100ac565b6100eb6100e6366004610b61565b610231565b604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e0016100ac565b61013361012e366004610b16565b6102b7565b6040519081526020016100ac565b6100c861014f366004610b16565b61037d565b610133610162366004610b16565b6103fb565b610133610175366004610b16565b61050b565b60008060008061018b878787610557565b905060006101998888610627565b905060006101a889838561070e565b50905060008184604001516101bd9190610bb0565b8451602090950151949b949a509850929650505050505050565b6000806101e5858585610557565b905060006101f38686610627565b60808101515190915060000361020e5760019250505061022a565b600061021b87838561083f565b60409092015190911115925050505b9392505050565b6000806000806000806000806102478a8a610627565b905060006102548b6108de565b805160808401515191925060009161026c9190610bb0565b61027a906301e13380610bc3565b60e084015184516020860151604087015160c088015160a090980151929e50909c509a509498509096509450919250505092959891949750929550565b6000806102c5858585610557565b905060006102d38686610627565b6080810151519091506000036102ee5760009250505061022a565b60006102fb87838561070e565b509050600081846040015185602001516103159190610bb0565b61031f9190610bb0565b9050600061032d848361098b565b9050600061035f6103406012600a610cbe565b61034b906064610bc3565b6103559084610bc3565b86604001516109e1565b865190915061036f908290610cca565b9a9950505050505050505050565b604051635881fc3360e01b81526001600160a01b038381166004830152828116602483015260009190851690635881fc3390604401602060405180830381865afa1580156103cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f39190610cf1565b949350505050565b600080610409858585610557565b905060006104178686610627565b8251909150158061042b5750608081015151155b1561043b5760009250505061022a565b60006104478284610a21565b905060006104576012600a610cbe565b610462906064610bc3565b60408401516104719084610bc3565b61047b9190610d13565b9050600061048a89858761070e565b509050600081866040015187602001516104a49190610bb0565b6104ae9190610bb0565b905060006104bc8285610cca565b90506000811380156104d15750808660c00151105b1561036f576001600160ff1b038660c0015111156104f757506001600160ff1b0361036f565b5060c08501519a9950505050505050505050565b600080610519858585610557565b905060006105278686610627565b6080810151519091506000036105425760009250505061022a565b61054d86828461083f565b9695505050505050565b6105826040518060800160405280600081526020016000815260200160008152602001600081525090565b60405163e2c7283f60e01b81526001600160a01b038481166004830152838116602483015260009182918291829189169063e2c7283f90604401608060405180830381865afa1580156105d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fd9190610d35565b60408051608081018252948552602085019390935291830152606082015298975050505050505050565b61062f610a90565b60008060008060008060008060008b6001600160a01b031663c665471f8c6040518263ffffffff1660e01b815260040161067891906001600160a01b0391909116815260200190565b61016060405180830381865afa158015610696573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ba9190610d6b565b6040805161012081018252998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e083015261010082015299505050505050505050505b92915050565b6000806000856001600160a01b031663336d391e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610751573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107759190610e38565b6001600160a01b031663cf5696cb61078c886108de565b87608001516040518363ffffffff1660e01b81526004016107ae929190610e55565b602060405180830381865afa1580156107cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ef9190610e8e565b905060006107ff6012600a610cbe565b61080a906064610bc3565b6020860151606087015161081e9085610ea7565b6108289190610bc3565b6108329190610d13565b9791965090945050505050565b60008061084d85858561070e565b509050600081846040015185602001516108679190610bb0565b6108719190610bb0565b9050806000036108865760009250505061022a565b835160000361089b576000199250505061022a565b60006108a78686610a21565b90506108d36108b86012600a610cbe565b6108c3906064610bc3565b6108cd9084610bc3565b826109e1565b979650505050505050565b61090260405180606001604052806000815260200160008152602001600081525090565b6000806000846001600160a01b03166313f60c9a6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610945573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109699190610eba565b6040805160608101825293845260208401929092529082015295945050505050565b600061022a61099c6012600a610cbe565b6109a7906001610bc3565b6109b19084610bc3565b6101008501516109c290600a610cbe565b64e8d4a510008660a001516109d79190610bc3565b6109e19190610bc3565b6000816000036109f057600080fd5b82600003610a0057506000610708565b81610a0c600185610ea7565b610a169190610d13565b61022a906001610bb0565b600080610a306012600a610cbe565b610a3b906001610bc3565b64e8d4a510008560a00151610a54878760000151610a72565b610a5e9190610bc3565b610a689190610bc3565b6103f39190610d13565b6000826101000151600a610a869190610cbe565b61022a9083610bc3565b60405180610120016040528060008152602001600081526020016000815260200160008152602001610adc60405180606001604052806000815260200160008152602001600081525090565b8152602001600081526020016000815260200160008152602001600081525090565b6001600160a01b0381168114610b1357600080fd5b50565b600080600060608486031215610b2b57600080fd5b8335610b3681610afe565b92506020840135610b4681610afe565b91506040840135610b5681610afe565b809150509250925092565b60008060408385031215610b7457600080fd5b8235610b7f81610afe565b91506020830135610b8f81610afe565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561070857610708610b9a565b808202811582820484141761070857610708610b9a565b600181815b80851115610c15578160001904821115610bfb57610bfb610b9a565b80851615610c0857918102915b93841c9390800290610bdf565b509250929050565b600082610c2c57506001610708565b81610c3957506000610708565b8160018114610c4f5760028114610c5957610c75565b6001915050610708565b60ff841115610c6a57610c6a610b9a565b50506001821b610708565b5060208310610133831016604e8410600b8410161715610c98575081810a610708565b610ca28383610bda565b8060001904821115610cb657610cb6610b9a565b029392505050565b600061022a8383610c1d565b8181036000831280158383131683831282161715610cea57610cea610b9a565b5092915050565b600060208284031215610d0357600080fd5b8151801515811461022a57600080fd5b600082610d3057634e487b7160e01b600052601260045260246000fd5b500490565b60008060008060808587031215610d4b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b6000806000806000806000806000898b03610160811215610d8b57600080fd5b8a51995060208b0151985060408b0151975060608b015196506060607f1982011215610db657600080fd5b506040516060810181811067ffffffffffffffff82111715610de857634e487b7160e01b600052604160045260246000fd5b806040525060808b0151815260a08b0151602082015260c08b015160408201528095505060e08a015193506101008a015192506101208a015191506101408a015190509295985092959850929598565b600060208284031215610e4a57600080fd5b815161022a81610afe565b8251815260208084015181830152604080850151818401528351606084015290830151608083015282015160a082015260c0810161022a565b600060208284031215610ea057600080fd5b5051919050565b8181038181111561070857610708610b9a565b600080600060608486031215610ecf57600080fd5b835192506020840151915060408401519050925092509256fea264697066735822122088a8bbf0e50731659250053affd0c6fd68855ae8488831075089108d8fcb0b1864736f6c63430008150033", + "sourceMap": "262:15248:47:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8151:672;;;;;;:::i;:::-;;:::i;:::-;;;;949:25:51;;;1005:2;990:18;;983:34;;;;1033:18;;;1026:34;937:2;922:18;8151:672:47;;;;;;;;2482:587;;;;;;:::i;:::-;;:::i;:::-;;;1236:14:51;;1229:22;1211:41;;1199:2;1184:18;2482:587:47;1071:187:51;8902:825:47;;;;;;:::i;:::-;;:::i;:::-;;;;2020:25:51;;;2076:2;2061:18;;2054:34;;;;2104:18;;;2097:34;;;;2162:2;2147:18;;2140:34;;;;2205:3;2190:19;;2183:35;2249:3;2234:19;;2227:35;2293:3;2278:19;;2271:35;2007:3;1992:19;8902:825:47;1705:607:51;6689:1225:47;;;;;;:::i;:::-;;:::i;:::-;;;2461:25:51;;;2449:2;2434:18;6689:1225:47;2317:175:51;9852:181:47;;;;;;:::i;:::-;;:::i;4043:2066::-;;;;;;:::i;:::-;;:::i;3143:500::-;;;;;;:::i;:::-;;:::i;8151:672::-;8283:7;8292;8301;8324:30;8357:58;8374:14;8390:16;8408:6;8357:16;:58::i;:::-;8324:91;;8425:40;8468:55;8490:14;8506:16;8468:21;:55::i;:::-;8425:98;;8570:27;8602:58;8624:14;8640:11;8653:6;8602:21;:58::i;:::-;8569:91;;;8670:20;8714:19;8693:6;:18;;;:40;;;;:::i;:::-;8752:26;;8780:21;;;;;8752:26;;8780:21;;-1:-1:-1;8780:21:47;-1:-1:-1;8151:672:47;;-1:-1:-1;;;;;;;8151:672:47:o;2482:587::-;2621:4;2641:30;2674:58;2691:14;2707:16;2725:6;2674:16;:58::i;:::-;2641:91;;2742:40;2785:55;2807:14;2823:16;2785:21;:55::i;:::-;2855:20;;;;:25;2742:98;;-1:-1:-1;2855:25:47;:30;2851:47;;2894:4;2887:11;;;;;;2851:47;2909:24;2936:56;2956:14;2972:11;2985:6;2936:19;:56::i;:::-;3030:32;;;;;3010:52;;;;;-1:-1:-1;;;2482:587:47;;;;;;:::o;8902:825::-;9027:7;9036;9045;9054;9063;9072;9081;9104:40;9147:55;9169:14;9185:16;9147:21;:55::i;:::-;9104:98;;9213:36;9252:32;9269:14;9252:16;:32::i;:::-;9339:18;;9311:20;;;;:25;9213:71;;-1:-1:-1;9294:13:47;;9311:46;;9339:18;9311:46;:::i;:::-;9310:59;;9361:8;9310:59;:::i;:::-;9401:38;;;;9471:36;;9521:31;;;;9566:32;;;;9612:23;;;;9693:17;;;;;9471:36;;-1:-1:-1;9521:31:47;;-1:-1:-1;9566:32:47;-1:-1:-1;9612:23:47;;-1:-1:-1;9294:75:47;;-1:-1:-1;9401:38:47;-1:-1:-1;9693:17:47;;-1:-1:-1;;;8902:825:47;;;;;;;;;;:::o;6689:1225::-;6831:6;6853:30;6886:58;6903:14;6919:16;6937:6;6886:16;:58::i;:::-;6853:91;;6954:40;6997:55;7019:14;7035:16;6997:21;:55::i;:::-;7067:20;;;;:25;6954:98;;-1:-1:-1;7067:25:47;:30;7063:44;;7106:1;7099:8;;;;;;7063:44;7155:27;7187:58;7209:14;7225:11;7238:6;7187:21;:58::i;:::-;7154:91;;;7255:23;7326:19;7305:6;:18;;;7281:6;:21;;;:42;;;;:::i;:::-;:64;;;;:::i;:::-;7255:90;;7412:42;7457:67;7495:11;7508:15;7457:37;:67::i;:::-;7412:112;-1:-1:-1;7575:50:47;7640:99;466:22;334:2;466;:22;:::i;:::-;459:30;;:3;:30;:::i;:::-;7648:55;;:34;:55;:::i;:::-;7706:11;:32;;;7640:6;:99::i;:::-;7827:26;;7575:164;;-1:-1:-1;7820:87:47;;7575:164;;7820:87;:::i;:::-;7813:94;6689:1225;-1:-1:-1;;;;;;;;;;6689:1225:47:o;9852:181::-;9979:47;;-1:-1:-1;;;9979:47:47;;-1:-1:-1;;;;;5493:15:51;;;9979:47:47;;;5475:34:51;5545:15;;;5525:18;;;5518:43;9956:4:47;;9979:26;;;;;;5410:18:51;;9979:47:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9972:54;9852:181;-1:-1:-1;;;;9852:181:47:o;4043:2066::-;4183:6;4205:30;4238:58;4255:14;4271:16;4289:6;4238:16;:58::i;:::-;4205:91;;4306:40;4349:55;4371:14;4387:16;4349:21;:55::i;:::-;4466:26;;4306:98;;-1:-1:-1;4466:31:47;;:65;;-1:-1:-1;4501:20:47;;;;:25;:30;4466:65;4462:79;;;4540:1;4533:8;;;;;;4462:79;4587:34;4624:50;4654:11;4667:6;4624:29;:50::i;:::-;4587:87;-1:-1:-1;4738:42:47;466:22;334:2;466;:22;:::i;:::-;459:30;;:3;:30;:::i;:::-;4825:32;;;;4796:61;;:26;:61;:::i;:::-;4795:84;;;;:::i;:::-;4738:141;;4927:27;4959:58;4981:14;4997:11;5010:6;4959:21;:58::i;:::-;4926:91;;;5027:23;5098:19;5077:6;:18;;;5053:6;:21;;;:42;;;;:::i;:::-;:64;;;;:::i;:::-;5027:90;-1:-1:-1;5128:26:47;5157:68;5027:90;5164:34;5157:68;:::i;:::-;5128:97;;5467:1;5445:19;:23;:81;;;;;5506:19;5472:11;:23;;;:54;5445:81;5441:392;;;-1:-1:-1;;;;;5546:11:47;:23;;;:51;5542:280;;;-1:-1:-1;;;;;;5542:280:47;;;-1:-1:-1;5798:23:47;;;;6083:19;4043:2066;-1:-1:-1;;;;;;;;;;4043:2066:47:o;3143:500::-;3285:7;3308:30;3341:58;3358:14;3374:16;3392:6;3341:16;:58::i;:::-;3308:91;;3409:40;3452:55;3474:14;3490:16;3452:21;:55::i;:::-;3522:20;;;;:25;3409:98;;-1:-1:-1;3522:25:47;:30;3518:44;;3561:1;3554:8;;;;;;3518:44;3580:56;3600:14;3616:11;3629:6;3580:19;:56::i;:::-;3573:63;3143:500;-1:-1:-1;;;;;;3143:500:47:o;559:471::-;698:23;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;698:23:47;860:53;;-1:-1:-1;;;860:53:47;;-1:-1:-1;;;;;5493:15:51;;;860:53:47;;;5475:34:51;5545:15;;;5525:18;;;5518:43;738:27:47;;;;;;;;860;;;;;5410:18:51;;860:53:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;931:92;;;;;;;;;;;;;;;;;;;;;;;;;;;559:471;-1:-1:-1;;;;;;;;559:471:47:o;1320:945::-;1448:28;;:::i;:::-;1506:32;1552:27;1593:28;1635:24;1673:30;1717:13;1744:19;1777:34;1825:37;1875:14;-1:-1:-1;;;;;1875:32:47;;1908:16;1875:50;;;;;;;;;;;;;;-1:-1:-1;;;;;6962:32:51;;;;6944:51;;6932:2;6917:18;;6778:223;1875:50:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1943:315;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;1320:945:47;;;;;:::o;12948:625::-;13128:7;13137;13156:36;13195:14;-1:-1:-1;;;;;13195:25:47;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;13195:64:47;;13273:32;13290:14;13273:16;:32::i;:::-;13307:11;:20;;;13195:142;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;13156:181;-1:-1:-1;13348:20:47;466:22;334:2;466;:22;:::i;:::-;459:30;;:3;:30;:::i;:::-;13452:21;;;;13417:31;;;;13386:62;;:28;:62;:::i;:::-;13385:88;;;;:::i;:::-;13371:133;;;;:::i;:::-;13348:156;13537:28;;-1:-1:-1;12948:625:47;;-1:-1:-1;;;;;12948:625:47:o;10307:1407::-;10485:7;10851:31;10887:58;10909:14;10925:11;10938:6;10887:21;:58::i;:::-;10850:95;;;10955:22;11025:23;11004:6;:18;;;10980:6;:21;;;:42;;;;:::i;:::-;:68;;;;:::i;:::-;10955:93;;11102:14;11120:1;11102:19;11098:33;;11130:1;11123:8;;;;;;11098:33;11300:26;;;:31;11296:61;;-1:-1:-1;;11333:24:47;;;;;;11296:61;11482:34;11519:50;11549:11;11562:6;11519:29;:50::i;:::-;11482:87;-1:-1:-1;11634:73:47;466:22;334:2;466;:22;:::i;:::-;459:30;;:3;:30;:::i;:::-;11642:35;;:14;:35;:::i;:::-;11680:26;11634:6;:73::i;:::-;11627:80;10307:1407;-1:-1:-1;;;;;;;10307:1407:47:o;1036:278::-;1106:22;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;1106:22:47;1141:12;1155:23;1180:22;1206:14;-1:-1:-1;;;;;1206:27:47;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1253:54;;;;;;;;;;;;;;;;;;;;;;;1036:278;-1:-1:-1;;;;;1036:278:47:o;12454:354::-;12607:7;12637:164;384:22;334:2;384;:22;:::i;:::-;379:28;;:1;:28;:::i;:::-;12658:19;;:7;:19;:::i;:::-;12748:41;;;;12742:47;;:2;:47;:::i;:::-;548:4;12693:11;:17;;;:45;;;;:::i;:::-;:97;;;;:::i;:::-;15392:10;15418:2;15424:1;15418:7;15414:21;;15427:8;;;15414:21;15449:2;15455:1;15449:7;15445:21;;-1:-1:-1;15465:1:47;15458:8;;15445:21;15498:2;15488:6;15493:1;15488:2;:6;:::i;:::-;15487:13;;;;:::i;:::-;15482:19;;:1;:19;:::i;11861:446::-;12021:7;;384:22;334:2;384;:22;:::i;:::-;379:28;;:1;:28;:::i;:::-;548:4;12174:11;:17;;;12095:76;12131:11;12144:6;:26;;;12095:35;:76::i;:::-;:96;;;;:::i;:::-;:140;;;;:::i;:::-;12081:176;;;;:::i;14826:245::-;14976:7;15022:11;:41;;;15016:2;:47;;;;:::i;:::-;15006:58;;:6;:58;:::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:138:51:-;-1:-1:-1;;;;;96:31:51;;86:42;;76:70;;142:1;139;132:12;76:70;14:138;:::o;157:585::-;269:6;277;285;338:2;326:9;317:7;313:23;309:32;306:52;;;354:1;351;344:12;306:52;393:9;380:23;412:38;444:5;412:38;:::i;:::-;469:5;-1:-1:-1;526:2:51;511:18;;498:32;539:40;498:32;539:40;:::i;:::-;598:7;-1:-1:-1;657:2:51;642:18;;629:32;670:40;629:32;670:40;:::i;:::-;729:7;719:17;;;157:585;;;;;:::o;1263:437::-;1366:6;1374;1427:2;1415:9;1406:7;1402:23;1398:32;1395:52;;;1443:1;1440;1433:12;1395:52;1482:9;1469:23;1501:38;1533:5;1501:38;:::i;:::-;1558:5;-1:-1:-1;1615:2:51;1600:18;;1587:32;1628:40;1587:32;1628:40;:::i;:::-;1687:7;1677:17;;;1263:437;;;;;:::o;3249:127::-;3310:10;3305:3;3301:20;3298:1;3291:31;3341:4;3338:1;3331:15;3365:4;3362:1;3355:15;3381:125;3446:9;;;3467:10;;;3464:36;;;3480:18;;:::i;3511:168::-;3584:9;;;3615;;3632:15;;;3626:22;;3612:37;3602:71;;3653:18;;:::i;3684:422::-;3773:1;3816:5;3773:1;3830:270;3851:7;3841:8;3838:21;3830:270;;;3910:4;3906:1;3902:6;3898:17;3892:4;3889:27;3886:53;;;3919:18;;:::i;:::-;3969:7;3959:8;3955:22;3952:55;;;3989:16;;;;3952:55;4068:22;;;;4028:15;;;;3830:270;;;3834:3;3684:422;;;;;:::o;4111:806::-;4160:5;4190:8;4180:80;;-1:-1:-1;4231:1:51;4245:5;;4180:80;4279:4;4269:76;;-1:-1:-1;4316:1:51;4330:5;;4269:76;4361:4;4379:1;4374:59;;;;4447:1;4442:130;;;;4354:218;;4374:59;4404:1;4395:10;;4418:5;;;4442:130;4479:3;4469:8;4466:17;4463:43;;;4486:18;;:::i;:::-;-1:-1:-1;;4542:1:51;4528:16;;4557:5;;4354:218;;4656:2;4646:8;4643:16;4637:3;4631:4;4628:13;4624:36;4618:2;4608:8;4605:16;4600:2;4594:4;4591:12;4587:35;4584:77;4581:159;;;-1:-1:-1;4693:19:51;;;4725:5;;4581:159;4772:34;4797:8;4791:4;4772:34;:::i;:::-;4842:6;4838:1;4834:6;4830:19;4821:7;4818:32;4815:58;;;4853:18;;:::i;:::-;4891:20;;4111:806;-1:-1:-1;;;4111:806:51:o;4922:131::-;4982:5;5011:36;5038:8;5032:4;5011:36;:::i;5058:200::-;5124:9;;;5097:4;5152:9;;5180:10;;5192:12;;;5176:29;5215:12;;;5207:21;;5173:56;5170:82;;;5232:18;;:::i;:::-;5170:82;5058:200;;;;:::o;5572:277::-;5639:6;5692:2;5680:9;5671:7;5667:23;5663:32;5660:52;;;5708:1;5705;5698:12;5660:52;5740:9;5734:16;5793:5;5786:13;5779:21;5772:5;5769:32;5759:60;;5815:1;5812;5805:12;5854:217;5894:1;5920;5910:132;;5964:10;5959:3;5955:20;5952:1;5945:31;5999:4;5996:1;5989:15;6027:4;6024:1;6017:15;5910:132;-1:-1:-1;6056:9:51;;5854:217::o;6405:368::-;6502:6;6510;6518;6526;6579:3;6567:9;6558:7;6554:23;6550:33;6547:53;;;6596:1;6593;6586:12;6547:53;-1:-1:-1;;6619:16:51;;6675:2;6660:18;;6654:25;6719:2;6704:18;;6698:25;6763:2;6748:18;;;6742:25;6619:16;;6654:25;;-1:-1:-1;6742:25:51;;-1:-1:-1;6405:368:51;-1:-1:-1;6405:368:51:o;7006:1231::-;7175:6;7183;7191;7199;7207;7215;7223;7231;7239;7283:9;7274:7;7270:23;7313:3;7309:2;7305:12;7302:32;;;7330:1;7327;7320:12;7302:32;7359:9;7353:16;7343:26;;7409:2;7398:9;7394:18;7388:25;7378:35;;7453:2;7442:9;7438:18;7432:25;7422:35;;7497:2;7486:9;7482:18;7476:25;7466:35;;7536:2;7529:3;7525:8;7521:2;7517:17;7513:26;7510:46;;;7552:1;7549;7542:12;7510:46;;7585:2;7579:9;7627:2;7619:6;7615:15;7696:6;7684:10;7681:22;7660:18;7648:10;7645:34;7642:62;7639:185;;;7746:10;7741:3;7737:20;7734:1;7727:31;7781:4;7778:1;7771:15;7809:4;7806:1;7799:15;7639:185;7844:10;7840:2;7833:22;;7900:3;7889:9;7885:19;7879:26;7871:6;7864:42;7960:3;7949:9;7945:19;7939:26;7934:2;7926:6;7922:15;7915:51;8020:3;8009:9;8005:19;7999:26;7994:2;7986:6;7982:15;7975:51;8045:6;8035:16;;;8091:3;8080:9;8076:19;8070:26;8060:36;;8136:3;8125:9;8121:19;8115:26;8105:36;;8181:3;8170:9;8166:19;8160:26;8150:36;;8226:3;8215:9;8211:19;8205:26;8195:36;;7006:1231;;;;;;;;;;;:::o;8242:273::-;8327:6;8380:2;8368:9;8359:7;8355:23;8351:32;8348:52;;;8396:1;8393;8386:12;8348:52;8428:9;8422:16;8447:38;8479:5;8447:38;:::i;8730:397::-;8594:12;;8582:25;;8656:4;8645:16;;;8639:23;8623:14;;;8616:47;8712:4;8701:16;;;8695:23;8679:14;;;8672:47;8594:12;;9117:2;9102:18;;8582:25;8645:16;;;8639:23;8623:14;;;8616:47;8701:16;;8695:23;8679:14;;;8672:47;9000:3;8985:19;;9067:54;8520:205;9132:184;9202:6;9255:2;9243:9;9234:7;9230:23;9226:32;9223:52;;;9271:1;9268;9261:12;9223:52;-1:-1:-1;9294:16:51;;9132:184;-1:-1:-1;9132:184:51:o;9321:128::-;9388:9;;;9409:11;;;9406:37;;;9423:18;;:::i;9454:306::-;9542:6;9550;9558;9611:2;9599:9;9590:7;9586:23;9582:32;9579:52;;;9627:1;9624;9617:12;9579:52;9656:9;9650:16;9640:26;;9706:2;9695:9;9691:18;9685:25;9675:35;;9750:2;9739:9;9735:18;9729:25;9719:35;;9454:306;;;;;:::o", "linkReferences": {} }, "methodIdentifiers": { @@ -258,7 +258,7 @@ "getVault(address,address,address)": "347c5d43", "isReliedUpon(address,address,address)": "b09758f0" }, - "rawMetadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vaultContract\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"}],\"name\":\"getCollateralInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vaultContract\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getCollateralRatio\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vaultContract\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getHealthFactor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vaultContract\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getMaxBorrowable\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vaultContract\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getMaxWithdrawable\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vaultContract\",\"type\":\"address\"},{\"internalType\":\"contract ERC20\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getVault\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vaultContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_reliedUpon\",\"type\":\"address\"}],\"name\":\"isReliedUpon\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getCollateralInfo(address,address)\":{\"details\":\"returns a the relevant info for a collateral\"},\"getCollateralRatio(address,address,address)\":{\"details\":\"returns the collateral ratio of a vault\"},\"getHealthFactor(address,address,address)\":{\"details\":\"returns health factor (if a vault is liquidatable or not) of a vault\"},\"getMaxBorrowable(address,address,address)\":{\"details\":\"returns the max amount of currency a vault owner can mint for that vault without the tx reverting due to the vault's health factor falling below the min health factorif it's a negative number then the vault is below the min health factor already and paying back the additive inverse of the result will pay back both borrowed amount and interest accrued\"},\"getMaxWithdrawable(address,address,address)\":{\"details\":\"returns the max amount of collateral a vault owner can withdraw from a vault without the tx reverting due to the vault's health factor falling below the min health factorif it's a negative number then the vault is below the min health factor already and depositing the additive inverse will put the position at the min health factor saving it from liquidation.the recommended way to do this is to burn/pay back the additive inverse of the result of `getMaxBorrowable()` that way interest would not accrue after payment.\"},\"getVault(address,address,address)\":{\"details\":\"returns a vault's relevant info i.e the depositedCollateral, borrowedAmount, and updated accruedFeesrecommended to read the accrued fees from here as it'll be updated before being returned.\"},\"isReliedUpon(address,address,address)\":{\"details\":\"returns if _owner has approved _reliedUpon to interact with _owner's vault on their behalf\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/vaultGetters.sol\":\"VaultGetters\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/protocol-core/lib/openzeppelin-contracts/\",\":@openzeppelin/contracts/=lib/protocol-core/lib/openzeppelin-contracts/contracts/\",\":descent-collective/protocol-core/=lib/protocol-core/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/protocol-core/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/protocol-core/lib/openzeppelin-contracts/\",\":protocol-core/=lib/protocol-core/\"]},\"sources\":{\"lib/protocol-core/lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"keccak256\":\"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80\",\"dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol\":{\"keccak256\":\"0x92aa1df62dc3d33f1656d63bede0923e0df0b706ad4137c8b10b0a8fe549fd92\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5c0f29195ad64cbe556da8e257dac8f05f78c53f90323c0d2accf8e6922d33a\",\"dweb:/ipfs/QmQ61TED8uaCZwcbh8KkgRSsCav7x7HbcGHwHts3U4DmUP\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229\",\"dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Permit.sol\":{\"keccak256\":\"0xc858a86a35701004d89022a5e98819aac46ccbdc4072fc9dd43928a676b1a2ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://18acebb483c512c0eaafcb437f09c839972c3f0d36f0201ea7baa2926b987dd2\",\"dweb:/ipfs/Qmd9bf2noaDSYDtf6FMSzKu7LPhuf91jsVNmcoCuTCuGic\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f5196ec75139918c6c7bb4251b36395e668f1fa6d206beba7e7520e74913940d\",\"dweb:/ipfs/QmSyqjksXxmm2mCG6qRd1yuwLykypkSVBbnBnGqJRcuJMi\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3036b3a83b7c48f96641f2a9002b9f2dcb6a5958dd670894ada21ae8229b3d0\",\"dweb:/ipfs/QmUNfSBdoVtjhETaUJCYcaC7pTMgbhht926tJ2uXJbiVd3\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7bd24e224f67f65bfadf85dc2929fa965456bb2415478bd0125471b5ce35245\",\"dweb:/ipfs/QmRaydGr8BTHs1kvaZfsNU69pKzUAGFrvABn1KiRSbE51y\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0c4e6cb30d3601e2f7af5af09e265508147cb275a8dcd99d6f7363645cc56867\",\"dweb:/ipfs/QmNgFkoXNWoUbAyw71rr1sKQ95Rj2GfvYiWg79xEYDn2NY\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Nonces.sol\":{\"keccak256\":\"0x0082767004fca261c332e9ad100868327a863a88ef724e844857128845ab350f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://132dce9686a54e025eb5ba5d2e48208f847a1ec3e60a3e527766d7bf53fb7f9e\",\"dweb:/ipfs/QmXn1a2nUZMpu2z6S88UoTfMVtY2YNh86iGrzJDYmMkKeZ\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol\":{\"keccak256\":\"0x18a7171df639a934592915a520ecb97c5bbc9675a1105607aac8a94e72bf62c6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7478e1f13da69a2867ccd883001d836b75620362e743f196376d63ed0c422a1c\",\"dweb:/ipfs/QmWywcQ9TNfwtoqAxbn25d8C5VrV12PrPS9UjtGe6pL2BA\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0x32ba59b4b7299237c8ba56319110989d7978a039faf754793064e967e5894418\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1ae50c8b562427df610cc4540c9bf104acca7ef8e2dcae567ae7e52272281e9c\",\"dweb:/ipfs/QmTHiadFCSJUPpRjNegc5SahmeU8bAoY8i9Aq6tVscbcKR\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba80ba06c8e6be852847e4c5f4492cef801feb6558ae09ed705ff2e04ea8b13c\",\"dweb:/ipfs/QmXRJDv3xHLVQCVXg1ZvR35QS9sij5y9NDWYzMfUfAdTHF\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol\":{\"keccak256\":\"0x999f705a027ed6dc2d4e0df2cc4a509852c6bfd11de1c8161bf88832d0503fd0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0798def67258d9a3cc20b2b4da7ebf351a5cefe0abfdd665d2d81f8e32f89b21\",\"dweb:/ipfs/QmPEvJosnPfzHNjKvCv2D3891mA2Ww8eUwkqrxBjuYdHCt\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol\":{\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2ceacff44c0fdc81e48e0e0b1db87a2076d3c1fb497341de077bf1da9f6b406c\",\"dweb:/ipfs/QmRUo1muMRAewxrKQ7TkXUtknyRoR57AyEkoPpiuZQ8FzX\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"lib/protocol-core/src/currency.sol\":{\"keccak256\":\"0xcff030c4bad135b27acbe405aba19da1184c406c30fe6839b17ffcb8548938d4\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://8ca7791099d9f9851622964e2668477dbe07441c4d687621eaff725c7e25d48b\",\"dweb:/ipfs/QmdsMzD9aVqBym5bS4QnYnGtN8872iBck94NFeyfLirJ8Y\"]},\"lib/protocol-core/src/helpers/pausable.sol\":{\"keccak256\":\"0x8acce52dcd450c73da0f77d9539962826da23aca05aa7d0c7568614e89aed997\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://35e2f674e01c0d6107f31d1c32bb2780d442420b7d26636f560a4eb1007f4a8b\",\"dweb:/ipfs/QmWwVLUGiJq6Q3fK6Zhx4pc6kaqC73pkZ1ntfVA3QCHTpd\"]},\"lib/protocol-core/src/interfaces/ICurrency.sol\":{\"keccak256\":\"0x3b7adace3df08c34906612358d435ffff3b90b5eec0eae34b6335cc8dcd0e7ed\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://370c80ec5636bd95342256d4116f703e633e6b0467ee530397e9b5cada37f998\",\"dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz\"]},\"lib/protocol-core/src/interfaces/IVault.sol\":{\"keccak256\":\"0x0b07e90c8de2bb57e62990839bdc52077d067d9e38db6fd2a8c684dbaf74f1b4\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://50a4e4b3745f623e7ea99800c1472b5d2fdbc3332ceecc1e4eb1cb2546d6b7b5\",\"dweb:/ipfs/Qma91VRTUw3bJzxanpErFXze7R3N9gHE9pnmWm3oFwcC6g\"]},\"lib/protocol-core/src/vault.sol\":{\"keccak256\":\"0xb42eb135923431b43ccd78a05d5937dc7faf98717fabd0b3a50a030b15db7977\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://7a1cadec603bec32da036fc3f095454601105ed00b90def95fa0912ac2ea7d6d\",\"dweb:/ipfs/QmYLDswPYNPuG2RguyZbtD7cWumTZXhPmNfvwsJDr3vGyv\"]},\"src/vaultGetters.sol\":{\"keccak256\":\"0xb6f2f70700f22e9752ee52c12718c566ce93cc01b69a56858d40b664ef79ad42\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://10f7cbaed62b4ecc9a350f739fd0f7921df08779e175b6807532257636053115\",\"dweb:/ipfs/QmcWMbbrrdxY6aw1PJ4uxPMcYu7cLjaC6jcKzCigkvXZED\"]}},\"version\":1}", + "rawMetadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vaultContract\",\"type\":\"address\"},{\"internalType\":\"contract ERC20Token\",\"name\":\"_collateralToken\",\"type\":\"address\"}],\"name\":\"getCollateralInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vaultContract\",\"type\":\"address\"},{\"internalType\":\"contract ERC20Token\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getCollateralRatio\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vaultContract\",\"type\":\"address\"},{\"internalType\":\"contract ERC20Token\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getHealthFactor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vaultContract\",\"type\":\"address\"},{\"internalType\":\"contract ERC20Token\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getMaxBorrowable\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vaultContract\",\"type\":\"address\"},{\"internalType\":\"contract ERC20Token\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getMaxWithdrawable\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vaultContract\",\"type\":\"address\"},{\"internalType\":\"contract ERC20Token\",\"name\":\"_collateralToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getVault\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Vault\",\"name\":\"_vaultContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_reliedUpon\",\"type\":\"address\"}],\"name\":\"isReliedUpon\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getCollateralInfo(address,address)\":{\"details\":\"returns a the relevant info for a collateral\"},\"getCollateralRatio(address,address,address)\":{\"details\":\"returns the collateral ratio of a vault\"},\"getHealthFactor(address,address,address)\":{\"details\":\"returns health factor (if a vault is liquidatable or not) of a vault\"},\"getMaxBorrowable(address,address,address)\":{\"details\":\"returns the max amount of currency a vault owner can mint for that vault without the tx reverting due to the vault's health factor falling below the min health factorif it's a negative number then the vault is below the min health factor already and paying back the additive inverse of the result will pay back both borrowed amount and interest accrued\"},\"getMaxWithdrawable(address,address,address)\":{\"details\":\"returns the max amount of collateral a vault owner can withdraw from a vault without the tx reverting due to the vault's health factor falling below the min health factorif it's a negative number then the vault is below the min health factor already and depositing the additive inverse will put the position at the min health factor saving it from liquidation.the recommended way to do this is to burn/pay back the additive inverse of the result of `getMaxBorrowable()` that way interest would not accrue after payment.\"},\"getVault(address,address,address)\":{\"details\":\"returns a vault's relevant info i.e the depositedCollateral, borrowedAmount, and updated accruedFeesrecommended to read the accrued fees from here as it'll be updated before being returned.\"},\"isReliedUpon(address,address,address)\":{\"details\":\"returns if _owner has approved _reliedUpon to interact with _owner's vault on their behalf\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/vaultGetters.sol\":\"VaultGetters\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/contracts/=lib/protocol-core/lib/openzeppelin-contracts/contracts/\",\":descent-collective/oracle-module/=lib/protocol-core/lib/oracle-module/src/\",\":descent-collective/protocol-core/=lib/protocol-core/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/protocol-core/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/protocol-core/lib/openzeppelin-contracts/\",\":oracle-module/=lib/protocol-core/lib/oracle-module/\",\":permit2/=lib/permit2/src/\",\":protocol-core/=lib/protocol-core/\",\":solady/=lib/protocol-core/lib/solady/src/\",\":solmate/=lib/permit2/lib/solmate/\"]},\"sources\":{\"lib/protocol-core/lib/solady/src/auth/Ownable.sol\":{\"keccak256\":\"0xc208cdd9de02bbf4b5edad18b88e23a2be7ff56d2287d5649329dc7cda64b9a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e8fba079cc7230c617f7493a2e97873f88e59a53a5018fcb2e2b6ac42d8aa5a3\",\"dweb:/ipfs/QmTXg8GSt8hsK2cZhbPFrund1mrwVdkLQmEPoQaFy4fhjs\"]},\"lib/protocol-core/lib/solady/src/tokens/ERC20.sol\":{\"keccak256\":\"0xb4a3f9ba8a05107f7370de42cff57f3ad26dafd438712c11531a5892de2f59e0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f0a9ca06e3cf6dea1f9a4c5599581573b7d81cd64dc3afb582f325ccf5fdd6dc\",\"dweb:/ipfs/Qmb9r5dDceNF4W8S5u6i85RsNTgE5XG9HbTXkyS25ad3C6\"]},\"lib/protocol-core/lib/solady/src/utils/SafeTransferLib.sol\":{\"keccak256\":\"0xf98506fade18a92e3d8d0a0ca0bdaeaa099d7620aac2a9d76b5f3d0bcd10691c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a3495c9d108bc69951a12c5ce9f05851cc921f0bb69e2505756e79f3ddab4e1a\",\"dweb:/ipfs/QmT3XwbmdbQCxw7iNcF7DoiypDd5vs2ETFWirXqmJ86Meg\"]},\"lib/protocol-core/src/currency.sol\":{\"keccak256\":\"0xc266e97010a71e6ac755dce3e51a5a5844663b355e20ab40bf2020fd9308369b\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://d2660220b8a14c6d06351765dd7accec03e350e7fa9ae960c1505bea1e5d8d2d\",\"dweb:/ipfs/QmdYdPSnQC2nym38Fca4vRLKU4A78AQkgYasdg3TaRLGNY\"]},\"lib/protocol-core/src/helpers/pausable.sol\":{\"keccak256\":\"0x8acce52dcd450c73da0f77d9539962826da23aca05aa7d0c7568614e89aed997\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://35e2f674e01c0d6107f31d1c32bb2780d442420b7d26636f560a4eb1007f4a8b\",\"dweb:/ipfs/QmWwVLUGiJq6Q3fK6Zhx4pc6kaqC73pkZ1ntfVA3QCHTpd\"]},\"lib/protocol-core/src/interfaces/ICurrency.sol\":{\"keccak256\":\"0x3b7adace3df08c34906612358d435ffff3b90b5eec0eae34b6335cc8dcd0e7ed\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://370c80ec5636bd95342256d4116f703e633e6b0467ee530397e9b5cada37f998\",\"dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz\"]},\"lib/protocol-core/src/interfaces/IRate.sol\":{\"keccak256\":\"0x166dc423b74b60302197a27fb64557ee8ef6bafe416deb08fe7ecf94f0ede1d1\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://123ef521857e33b10b6f92b743831b26dd5100e57271353bf5c1882fc41c6a2e\",\"dweb:/ipfs/QmdK5y8SntLHAVoNRq6isddmNYunrpv1JxAxyEgRiHdAAj\"]},\"lib/protocol-core/src/interfaces/IVault.sol\":{\"keccak256\":\"0x5684f59679e090ebe583d31fda6d8882469436e71670a4873151793675c7c6c4\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b265c21b1ff01a8c5cf9b1120feb6b5419a96a0e2a6d1ff4bdd89934c7869c9c\",\"dweb:/ipfs/QmdbCgiYE763cAHZ6nevhf7EzF8BzEkfwsbw4qWuxBkm8f\"]},\"lib/protocol-core/src/mocks/ERC20Token.sol\":{\"keccak256\":\"0x62b878fb4dde1f455866e0c1290cc50714805d02c2848a4a9bb33c5dfbc8464d\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://7af3f5638d366abfbca3186813449259a33ed43e7c13ec983d389d73df1ad204\",\"dweb:/ipfs/QmeMdoEVTGqdcgSicTTcmycSQjToT7Sn5ZTgZdVFH9E6HA\"]},\"lib/protocol-core/src/vault.sol\":{\"keccak256\":\"0x5dc74b51eb4f221c7a6e78f7557819a8f0087ffa27cac805557bd886b806f584\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://37dc93c378f13a42a21cd3a4718cade7ef3627d5d0d187819010cfefb1387b3a\",\"dweb:/ipfs/QmTn3XKb5q4oQ1AdiVvJ4HMF8Vh9STxv9xyBgFT8jF7riC\"]},\"src/vaultGetters.sol\":{\"keccak256\":\"0xefed495a592a80cba0995a919d2f72a92f4ae176208b4775fd57a354657c78b0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6f340f53cd7374e82143c022a991a9617d8c4558ebcc678654b38bde6a2874d1\",\"dweb:/ipfs/Qmbr5wF8d9oRiEDj92MreZBgMwf1nZKbkEQgTGRVs7cbX5\"]}},\"version\":1}", "metadata": { "compiler": { "version": "0.8.21+commit.d9974bed" @@ -274,7 +274,7 @@ "type": "address" }, { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" } @@ -328,7 +328,7 @@ "type": "address" }, { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -357,7 +357,7 @@ "type": "address" }, { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -386,7 +386,7 @@ "type": "address" }, { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -415,7 +415,7 @@ "type": "address" }, { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -444,7 +444,7 @@ "type": "address" }, { - "internalType": "contract ERC20", + "internalType": "contract ERC20Token", "name": "_collateralToken", "type": "address" }, @@ -540,14 +540,19 @@ }, "settings": { "remappings": [ - "@openzeppelin/=lib/protocol-core/lib/openzeppelin-contracts/", "@openzeppelin/contracts/=lib/protocol-core/lib/openzeppelin-contracts/contracts/", + "descent-collective/oracle-module/=lib/protocol-core/lib/oracle-module/src/", "descent-collective/protocol-core/=lib/protocol-core/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/protocol-core/lib/openzeppelin-contracts/lib/erc4626-tests/", + "forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/protocol-core/lib/openzeppelin-contracts/", - "protocol-core/=lib/protocol-core/" + "oracle-module/=lib/protocol-core/lib/oracle-module/", + "permit2/=lib/permit2/src/", + "protocol-core/=lib/protocol-core/", + "solady/=lib/protocol-core/lib/solady/src/", + "solmate/=lib/permit2/lib/solmate/" ], "optimizer": { "enabled": true, @@ -562,195 +567,35 @@ "libraries": {} }, "sources": { - "lib/protocol-core/lib/openzeppelin-contracts/contracts/access/AccessControl.sol": { - "keccak256": "0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308", + "lib/protocol-core/lib/solady/src/auth/Ownable.sol": { + "keccak256": "0xc208cdd9de02bbf4b5edad18b88e23a2be7ff56d2287d5649329dc7cda64b9a3", "urls": [ - "bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80", - "dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z" + "bzz-raw://e8fba079cc7230c617f7493a2e97873f88e59a53a5018fcb2e2b6ac42d8aa5a3", + "dweb:/ipfs/QmTXg8GSt8hsK2cZhbPFrund1mrwVdkLQmEPoQaFy4fhjs" ], "license": "MIT" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/access/IAccessControl.sol": { - "keccak256": "0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41", + "lib/protocol-core/lib/solady/src/tokens/ERC20.sol": { + "keccak256": "0xb4a3f9ba8a05107f7370de42cff57f3ad26dafd438712c11531a5892de2f59e0", "urls": [ - "bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26", - "dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH" + "bzz-raw://f0a9ca06e3cf6dea1f9a4c5599581573b7d81cd64dc3afb582f325ccf5fdd6dc", + "dweb:/ipfs/Qmb9r5dDceNF4W8S5u6i85RsNTgE5XG9HbTXkyS25ad3C6" ], "license": "MIT" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol": { - "keccak256": "0x92aa1df62dc3d33f1656d63bede0923e0df0b706ad4137c8b10b0a8fe549fd92", + "lib/protocol-core/lib/solady/src/utils/SafeTransferLib.sol": { + "keccak256": "0xf98506fade18a92e3d8d0a0ca0bdaeaa099d7620aac2a9d76b5f3d0bcd10691c", "urls": [ - "bzz-raw://c5c0f29195ad64cbe556da8e257dac8f05f78c53f90323c0d2accf8e6922d33a", - "dweb:/ipfs/QmQ61TED8uaCZwcbh8KkgRSsCav7x7HbcGHwHts3U4DmUP" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol": { - "keccak256": "0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7", - "urls": [ - "bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f", - "dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol": { - "keccak256": "0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80", - "urls": [ - "bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229", - "dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol": { - "keccak256": "0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70", - "urls": [ - "bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c", - "dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Permit.sol": { - "keccak256": "0xc858a86a35701004d89022a5e98819aac46ccbdc4072fc9dd43928a676b1a2ee", - "urls": [ - "bzz-raw://18acebb483c512c0eaafcb437f09c839972c3f0d36f0201ea7baa2926b987dd2", - "dweb:/ipfs/Qmd9bf2noaDSYDtf6FMSzKu7LPhuf91jsVNmcoCuTCuGic" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "keccak256": "0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2", - "urls": [ - "bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850", - "dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol": { - "keccak256": "0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff", - "urls": [ - "bzz-raw://f5196ec75139918c6c7bb4251b36395e668f1fa6d206beba7e7520e74913940d", - "dweb:/ipfs/QmSyqjksXxmm2mCG6qRd1yuwLykypkSVBbnBnGqJRcuJMi" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol": { - "keccak256": "0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386", - "urls": [ - "bzz-raw://b3036b3a83b7c48f96641f2a9002b9f2dcb6a5958dd670894ada21ae8229b3d0", - "dweb:/ipfs/QmUNfSBdoVtjhETaUJCYcaC7pTMgbhht926tJ2uXJbiVd3" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Address.sol": { - "keccak256": "0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721", - "urls": [ - "bzz-raw://b7bd24e224f67f65bfadf85dc2929fa965456bb2415478bd0125471b5ce35245", - "dweb:/ipfs/QmRaydGr8BTHs1kvaZfsNU69pKzUAGFrvABn1KiRSbE51y" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Context.sol": { - "keccak256": "0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3", - "urls": [ - "bzz-raw://0c4e6cb30d3601e2f7af5af09e265508147cb275a8dcd99d6f7363645cc56867", - "dweb:/ipfs/QmNgFkoXNWoUbAyw71rr1sKQ95Rj2GfvYiWg79xEYDn2NY" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Nonces.sol": { - "keccak256": "0x0082767004fca261c332e9ad100868327a863a88ef724e844857128845ab350f", - "urls": [ - "bzz-raw://132dce9686a54e025eb5ba5d2e48208f847a1ec3e60a3e527766d7bf53fb7f9e", - "dweb:/ipfs/QmXn1a2nUZMpu2z6S88UoTfMVtY2YNh86iGrzJDYmMkKeZ" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol": { - "keccak256": "0x18a7171df639a934592915a520ecb97c5bbc9675a1105607aac8a94e72bf62c6", - "urls": [ - "bzz-raw://7478e1f13da69a2867ccd883001d836b75620362e743f196376d63ed0c422a1c", - "dweb:/ipfs/QmWywcQ9TNfwtoqAxbn25d8C5VrV12PrPS9UjtGe6pL2BA" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol": { - "keccak256": "0x32ba59b4b7299237c8ba56319110989d7978a039faf754793064e967e5894418", - "urls": [ - "bzz-raw://1ae50c8b562427df610cc4540c9bf104acca7ef8e2dcae567ae7e52272281e9c", - "dweb:/ipfs/QmTHiadFCSJUPpRjNegc5SahmeU8bAoY8i9Aq6tVscbcKR" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Strings.sol": { - "keccak256": "0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792", - "urls": [ - "bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453", - "dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol": { - "keccak256": "0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf", - "urls": [ - "bzz-raw://ba80ba06c8e6be852847e4c5f4492cef801feb6558ae09ed705ff2e04ea8b13c", - "dweb:/ipfs/QmXRJDv3xHLVQCVXg1ZvR35QS9sij5y9NDWYzMfUfAdTHF" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol": { - "keccak256": "0x999f705a027ed6dc2d4e0df2cc4a509852c6bfd11de1c8161bf88832d0503fd0", - "urls": [ - "bzz-raw://0798def67258d9a3cc20b2b4da7ebf351a5cefe0abfdd665d2d81f8e32f89b21", - "dweb:/ipfs/QmPEvJosnPfzHNjKvCv2D3891mA2Ww8eUwkqrxBjuYdHCt" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol": { - "keccak256": "0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435", - "urls": [ - "bzz-raw://2ceacff44c0fdc81e48e0e0b1db87a2076d3c1fb497341de077bf1da9f6b406c", - "dweb:/ipfs/QmRUo1muMRAewxrKQ7TkXUtknyRoR57AyEkoPpiuZQ8FzX" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol": { - "keccak256": "0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133", - "urls": [ - "bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8", - "dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol": { - "keccak256": "0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b", - "urls": [ - "bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df", - "dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/math/Math.sol": { - "keccak256": "0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d", - "urls": [ - "bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875", - "dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol": { - "keccak256": "0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72", - "urls": [ - "bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc", - "dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT" + "bzz-raw://a3495c9d108bc69951a12c5ce9f05851cc921f0bb69e2505756e79f3ddab4e1a", + "dweb:/ipfs/QmT3XwbmdbQCxw7iNcF7DoiypDd5vs2ETFWirXqmJ86Meg" ], "license": "MIT" }, "lib/protocol-core/src/currency.sol": { - "keccak256": "0xcff030c4bad135b27acbe405aba19da1184c406c30fe6839b17ffcb8548938d4", + "keccak256": "0xc266e97010a71e6ac755dce3e51a5a5844663b355e20ab40bf2020fd9308369b", "urls": [ - "bzz-raw://8ca7791099d9f9851622964e2668477dbe07441c4d687621eaff725c7e25d48b", - "dweb:/ipfs/QmdsMzD9aVqBym5bS4QnYnGtN8872iBck94NFeyfLirJ8Y" + "bzz-raw://d2660220b8a14c6d06351765dd7accec03e350e7fa9ae960c1505bea1e5d8d2d", + "dweb:/ipfs/QmdYdPSnQC2nym38Fca4vRLKU4A78AQkgYasdg3TaRLGNY" ], "license": "GPL-3.0" }, @@ -770,27 +615,43 @@ ], "license": "GPL-3.0" }, + "lib/protocol-core/src/interfaces/IRate.sol": { + "keccak256": "0x166dc423b74b60302197a27fb64557ee8ef6bafe416deb08fe7ecf94f0ede1d1", + "urls": [ + "bzz-raw://123ef521857e33b10b6f92b743831b26dd5100e57271353bf5c1882fc41c6a2e", + "dweb:/ipfs/QmdK5y8SntLHAVoNRq6isddmNYunrpv1JxAxyEgRiHdAAj" + ], + "license": "GPL-3.0" + }, "lib/protocol-core/src/interfaces/IVault.sol": { - "keccak256": "0x0b07e90c8de2bb57e62990839bdc52077d067d9e38db6fd2a8c684dbaf74f1b4", + "keccak256": "0x5684f59679e090ebe583d31fda6d8882469436e71670a4873151793675c7c6c4", + "urls": [ + "bzz-raw://b265c21b1ff01a8c5cf9b1120feb6b5419a96a0e2a6d1ff4bdd89934c7869c9c", + "dweb:/ipfs/QmdbCgiYE763cAHZ6nevhf7EzF8BzEkfwsbw4qWuxBkm8f" + ], + "license": "GPL-3.0" + }, + "lib/protocol-core/src/mocks/ERC20Token.sol": { + "keccak256": "0x62b878fb4dde1f455866e0c1290cc50714805d02c2848a4a9bb33c5dfbc8464d", "urls": [ - "bzz-raw://50a4e4b3745f623e7ea99800c1472b5d2fdbc3332ceecc1e4eb1cb2546d6b7b5", - "dweb:/ipfs/Qma91VRTUw3bJzxanpErFXze7R3N9gHE9pnmWm3oFwcC6g" + "bzz-raw://7af3f5638d366abfbca3186813449259a33ed43e7c13ec983d389d73df1ad204", + "dweb:/ipfs/QmeMdoEVTGqdcgSicTTcmycSQjToT7Sn5ZTgZdVFH9E6HA" ], "license": "GPL-3.0" }, "lib/protocol-core/src/vault.sol": { - "keccak256": "0xb42eb135923431b43ccd78a05d5937dc7faf98717fabd0b3a50a030b15db7977", + "keccak256": "0x5dc74b51eb4f221c7a6e78f7557819a8f0087ffa27cac805557bd886b806f584", "urls": [ - "bzz-raw://7a1cadec603bec32da036fc3f095454601105ed00b90def95fa0912ac2ea7d6d", - "dweb:/ipfs/QmYLDswPYNPuG2RguyZbtD7cWumTZXhPmNfvwsJDr3vGyv" + "bzz-raw://37dc93c378f13a42a21cd3a4718cade7ef3627d5d0d187819010cfefb1387b3a", + "dweb:/ipfs/QmTn3XKb5q4oQ1AdiVvJ4HMF8Vh9STxv9xyBgFT8jF7riC" ], "license": "GPL-3.0" }, "src/vaultGetters.sol": { - "keccak256": "0xb6f2f70700f22e9752ee52c12718c566ce93cc01b69a56858d40b664ef79ad42", + "keccak256": "0xefed495a592a80cba0995a919d2f72a92f4ae176208b4775fd57a354657c78b0", "urls": [ - "bzz-raw://10f7cbaed62b4ecc9a350f739fd0f7921df08779e175b6807532257636053115", - "dweb:/ipfs/QmcWMbbrrdxY6aw1PJ4uxPMcYu7cLjaC6jcKzCigkvXZED" + "bzz-raw://6f340f53cd7374e82143c022a991a9617d8c4558ebcc678654b38bde6a2874d1", + "dweb:/ipfs/Qmbr5wF8d9oRiEDj92MreZBgMwf1nZKbkEQgTGRVs7cbX5" ], "license": "MIT" } @@ -799,69 +660,42 @@ }, "ast": { "absolutePath": "src/vaultGetters.sol", - "id": 52268, + "id": 50775, "exportedSymbols": { - "Currency": [49246], - "ERC20": [45675], - "IVault": [49450], - "Vault": [51097], - "VaultGetters": [52267] + "ERC20Token": [46273], + "IVault": [46151], + "Vault": [48108], + "VaultGetters": [50774] }, "nodeType": "SourceUnit", - "src": "32:15106:53", + "src": "32:15479:47", "nodes": [ { - "id": 51378, + "id": 49845, "nodeType": "PragmaDirective", - "src": "32:23:53", + "src": "32:23:47", "nodes": [], "literals": ["solidity", "0.8", ".21"] }, { - "id": 51380, - "nodeType": "ImportDirective", - "src": "104:68:53", - "nodes": [], - "absolutePath": "lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "nameLocation": "-1:-1:-1", - "scope": 52268, - "sourceUnit": 45676, - "symbolAliases": [ - { - "foreign": { - "id": 51379, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 45675, - "src": "112:5:53", - "typeDescriptions": {} - }, - "nameLocation": "-1:-1:-1" - } - ], - "unitAlias": "" - }, - { - "id": 51382, + "id": 49847, "nodeType": "ImportDirective", - "src": "173:78:53", + "src": "104:78:47", "nodes": [], "absolutePath": "lib/protocol-core/src/interfaces/IVault.sol", "file": "descent-collective/protocol-core/interfaces/IVault.sol", "nameLocation": "-1:-1:-1", - "scope": 52268, - "sourceUnit": 49451, + "scope": 50775, + "sourceUnit": 46152, "symbolAliases": [ { "foreign": { - "id": 51381, + "id": 49846, "name": "IVault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49450, - "src": "181:6:53", + "referencedDeclaration": 46151, + "src": "112:6:47", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -870,50 +704,36 @@ "unitAlias": "" }, { - "id": 51384, + "id": 49850, "nodeType": "ImportDirective", - "src": "252:71:53", + "src": "183:77:47", "nodes": [], - "absolutePath": "lib/protocol-core/src/currency.sol", - "file": "descent-collective/protocol-core/currency.sol", + "absolutePath": "lib/protocol-core/src/vault.sol", + "file": "descent-collective/protocol-core/vault.sol", "nameLocation": "-1:-1:-1", - "scope": 52268, - "sourceUnit": 49247, + "scope": 50775, + "sourceUnit": 48109, "symbolAliases": [ { "foreign": { - "id": 51383, - "name": "Currency", + "id": 49848, + "name": "Vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49246, - "src": "260:8:53", + "referencedDeclaration": 48108, + "src": "191:5:47", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" - } - ], - "unitAlias": "" - }, - { - "id": 51386, - "nodeType": "ImportDirective", - "src": "324:65:53", - "nodes": [], - "absolutePath": "lib/protocol-core/src/vault.sol", - "file": "descent-collective/protocol-core/vault.sol", - "nameLocation": "-1:-1:-1", - "scope": 52268, - "sourceUnit": 51098, - "symbolAliases": [ + }, { "foreign": { - "id": 51385, - "name": "Vault", + "id": 49849, + "name": "ERC20Token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51097, - "src": "332:5:53", + "referencedDeclaration": 46273, + "src": "198:10:47", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -922,20 +742,20 @@ "unitAlias": "" }, { - "id": 52267, + "id": 50774, "nodeType": "ContractDefinition", - "src": "391:14746:53", + "src": "262:15248:47", "nodes": [ { - "id": 51389, + "id": 49853, "nodeType": "VariableDeclaration", - "src": "419:46:53", + "src": "290:46:47", "nodes": [], "constant": true, "mutability": "constant", "name": "PRECISION_DEGREE", - "nameLocation": "444:16:53", - "scope": 52267, + "nameLocation": "315:16:47", + "scope": 50774, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -943,10 +763,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51387, + "id": 49851, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "419:7:53", + "src": "290:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -954,14 +774,14 @@ }, "value": { "hexValue": "3138", - "id": 51388, + "id": 49852, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "463:2:53", + "src": "334:2:47", "typeDescriptions": { "typeIdentifier": "t_rational_18_by_1", "typeString": "int_const 18" @@ -971,15 +791,15 @@ "visibility": "private" }, { - "id": 51397, + "id": 49861, "nodeType": "VariableDeclaration", - "src": "471:65:53", + "src": "342:65:47", "nodes": [], "constant": true, "mutability": "constant", "name": "PRECISION", - "nameLocation": "496:9:53", - "scope": 52267, + "nameLocation": "367:9:47", + "scope": 50774, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -987,10 +807,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51390, + "id": 49854, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "471:7:53", + "src": "342:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1001,21 +821,21 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51396, + "id": 49860, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "hexValue": "31", - "id": 51391, + "id": 49855, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "508:1:53", + "src": "379:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" @@ -1031,21 +851,145 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51394, + "id": 49858, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 49856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "384:2:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "id": 49857, + "name": "PRECISION_DEGREE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 49853, + "src": "390:16:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "384:22:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 49859, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "383:24:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "379:28:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "id": 49869, + "nodeType": "VariableDeclaration", + "src": "413:76:47", + "nodes": [], + "constant": true, + "mutability": "constant", + "name": "HUNDRED_PERCENTAGE", + "nameLocation": "438:18:47", + "scope": 50774, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 49862, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "413:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 49868, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "313030", + "id": 49863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "459:3:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "value": "100" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 49866, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "hexValue": "3130", - "id": 51392, + "id": 49864, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "513:2:53", + "src": "466:2:47", "typeDescriptions": { "typeIdentifier": "t_rational_10_by_1", "typeString": "int_const 10" @@ -1055,38 +999,38 @@ "nodeType": "BinaryOperation", "operator": "**", "rightExpression": { - "id": 51393, + "id": 49865, "name": "PRECISION_DEGREE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51389, - "src": "519:16:53", + "referencedDeclaration": 49853, + "src": "472:16:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "513:22:53", + "src": "466:22:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 51395, + "id": 49867, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "512:24:53", + "src": "465:24:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "508:28:53", + "src": "459:30:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1095,15 +1039,15 @@ "visibility": "private" }, { - "id": 51400, + "id": 49872, "nodeType": "VariableDeclaration", - "src": "542:57:53", + "src": "495:57:47", "nodes": [], "constant": true, "mutability": "constant", "name": "ADDITIONAL_FEED_PRECISION", - "nameLocation": "567:25:53", - "scope": 52267, + "nameLocation": "520:25:47", + "scope": 50774, "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1111,10 +1055,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51398, + "id": 49870, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "542:7:53", + "src": "495:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1122,14 +1066,14 @@ }, "value": { "hexValue": "31653132", - "id": 51399, + "id": 49871, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "595:4:53", + "src": "548:4:47", "typeDescriptions": { "typeIdentifier": "t_rational_1000000000000_by_1", "typeString": "int_const 1000000000000" @@ -1139,28 +1083,28 @@ "visibility": "private" }, { - "id": 51437, + "id": 49909, "nodeType": "FunctionDefinition", - "src": "606:466:53", + "src": "559:471:47", "nodes": [], "body": { - "id": 51436, + "id": 49908, "nodeType": "Block", - "src": "769:303:53", + "src": "727:303:47", "nodes": [], "statements": [ { - "assignments": [51415, 51417, 51419, 51421], + "assignments": [49887, 49889, 49891, 49893], "declarations": [ { "constant": false, - "id": 51415, + "id": 49887, "mutability": "mutable", "name": "depositedCollateral", - "nameLocation": "788:19:53", + "nameLocation": "746:19:47", "nodeType": "VariableDeclaration", - "scope": 51436, - "src": "780:27:53", + "scope": 49908, + "src": "738:27:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1168,10 +1112,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51414, + "id": 49886, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "780:7:53", + "src": "738:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1181,13 +1125,13 @@ }, { "constant": false, - "id": 51417, + "id": 49889, "mutability": "mutable", "name": "borrowedAmount", - "nameLocation": "817:14:53", + "nameLocation": "775:14:47", "nodeType": "VariableDeclaration", - "scope": 51436, - "src": "809:22:53", + "scope": 49908, + "src": "767:22:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1195,10 +1139,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51416, + "id": 49888, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "809:7:53", + "src": "767:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1208,13 +1152,13 @@ }, { "constant": false, - "id": 51419, + "id": 49891, "mutability": "mutable", "name": "accruedFees", - "nameLocation": "841:11:53", + "nameLocation": "799:11:47", "nodeType": "VariableDeclaration", - "scope": 51436, - "src": "833:19:53", + "scope": 49908, + "src": "791:19:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1222,10 +1166,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51418, + "id": 49890, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "833:7:53", + "src": "791:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1235,13 +1179,13 @@ }, { "constant": false, - "id": 51421, + "id": 49893, "mutability": "mutable", "name": "lastTotalAccumulatedRate", - "nameLocation": "862:24:53", + "nameLocation": "820:24:47", "nodeType": "VariableDeclaration", - "scope": 51436, - "src": "854:32:53", + "scope": 49908, + "src": "812:32:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1249,10 +1193,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51420, + "id": 49892, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "854:7:53", + "src": "812:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1261,28 +1205,28 @@ "visibility": "internal" } ], - "id": 51427, + "id": 49899, "initialValue": { "arguments": [ { - "id": 51424, + "id": 49896, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51406, - "src": "930:16:53", + "referencedDeclaration": 49878, + "src": "888:16:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } }, { - "id": 51425, + "id": 49897, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51408, - "src": "948:6:53", + "referencedDeclaration": 49880, + "src": "906:6:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1292,8 +1236,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" }, { "typeIdentifier": "t_address", @@ -1301,33 +1245,33 @@ } ], "expression": { - "id": 51422, + "id": 49894, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51403, - "src": "902:14:53", + "referencedDeclaration": 49875, + "src": "860:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, - "id": 51423, + "id": 49895, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "917:12:53", + "memberLocation": "875:12:47", "memberName": "vaultMapping", "nodeType": "MemberAccess", - "referencedDeclaration": 49520, - "src": "902:27:53", + "referencedDeclaration": 46565, + "src": "860:27:47", "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_contract$_ERC20_$45675_$_t_address_$returns$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", - "typeString": "function (contract ERC20,address) view external returns (uint256,uint256,uint256,uint256)" + "typeIdentifier": "t_function_external_view$_t_contract$_ERC20Token_$46273_$_t_address_$returns$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "function (contract ERC20Token,address) view external returns (uint256,uint256,uint256,uint256)" } }, - "id": 51426, + "id": 49898, "isConstant": false, "isLValue": false, "isPure": false, @@ -1336,7 +1280,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "902:53:53", + "src": "860:53:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", @@ -1344,54 +1288,54 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "779:176:53" + "src": "737:176:47" }, { "expression": { "arguments": [ { - "id": 51430, + "id": 49902, "name": "depositedCollateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51415, - "src": "990:19:53", + "referencedDeclaration": 49887, + "src": "948:19:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51431, + "id": 49903, "name": "borrowedAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51417, - "src": "1011:14:53", + "referencedDeclaration": 49889, + "src": "969:14:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51432, + "id": 49904, "name": "accruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51419, - "src": "1027:11:53", + "referencedDeclaration": 49891, + "src": "985:11:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51433, + "id": 49905, "name": "lastTotalAccumulatedRate", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51421, - "src": "1040:24:53", + "referencedDeclaration": 49893, + "src": "998:24:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1418,33 +1362,33 @@ } ], "expression": { - "id": 51428, + "id": 49900, "name": "IVault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49450, - "src": "973:6:53", + "referencedDeclaration": 46151, + "src": "931:6:47", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IVault_$49450_$", + "typeIdentifier": "t_type$_t_contract$_IVault_$46151_$", "typeString": "type(contract IVault)" } }, - "id": 51429, + "id": 49901, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "980:9:53", + "memberLocation": "938:9:47", "memberName": "VaultInfo", "nodeType": "MemberAccess", - "referencedDeclaration": 49444, - "src": "973:16:53", + "referencedDeclaration": 46144, + "src": "931:16:47", "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_VaultInfo_$49444_storage_ptr_$", + "typeIdentifier": "t_type$_t_struct$_VaultInfo_$46144_storage_ptr_$", "typeString": "type(struct IVault.VaultInfo storage pointer)" } }, - "id": 51434, + "id": 49906, "isConstant": false, "isLValue": false, "isPure": false, @@ -1453,17 +1397,17 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "973:92:53", + "src": "931:92:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "functionReturnParameters": 51413, - "id": 51435, + "functionReturnParameters": 49885, + "id": 49907, "nodeType": "Return", - "src": "966:99:53" + "src": "924:99:47" } ] }, @@ -1471,41 +1415,41 @@ "kind": "function", "modifiers": [], "name": "_getVaultMapping", - "nameLocation": "615:16:53", + "nameLocation": "568:16:47", "parameters": { - "id": 51409, + "id": 49881, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51403, + "id": 49875, "mutability": "mutable", "name": "_vaultContract", - "nameLocation": "638:14:53", + "nameLocation": "591:14:47", "nodeType": "VariableDeclaration", - "scope": 51437, - "src": "632:20:53", + "scope": 49909, + "src": "585:20:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, "typeName": { - "id": 51402, + "id": 49874, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51401, + "id": 49873, "name": "Vault", - "nameLocations": ["632:5:53"], + "nameLocations": ["585:5:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 51097, - "src": "632:5:53" + "referencedDeclaration": 48108, + "src": "585:5:47" }, - "referencedDeclaration": 51097, - "src": "632:5:53", + "referencedDeclaration": 48108, + "src": "585:5:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, @@ -1513,48 +1457,48 @@ }, { "constant": false, - "id": 51406, + "id": 49878, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "660:16:53", + "nameLocation": "618:16:47", "nodeType": "VariableDeclaration", - "scope": 51437, - "src": "654:22:53", + "scope": 49909, + "src": "607:27:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 51405, + "id": 49877, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51404, - "name": "ERC20", - "nameLocations": ["654:5:53"], + "id": 49876, + "name": "ERC20Token", + "nameLocations": ["607:10:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 45675, - "src": "654:5:53" + "referencedDeclaration": 46273, + "src": "607:10:47" }, - "referencedDeclaration": 45675, - "src": "654:5:53", + "referencedDeclaration": 46273, + "src": "607:10:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 51408, + "id": 49880, "mutability": "mutable", "name": "_owner", - "nameLocation": "686:6:53", + "nameLocation": "644:6:47", "nodeType": "VariableDeclaration", - "scope": 51437, - "src": "678:14:53", + "scope": 49909, + "src": "636:14:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1562,10 +1506,10 @@ "typeString": "address" }, "typeName": { - "id": 51407, + "id": 49879, "name": "address", "nodeType": "ElementaryTypeName", - "src": "678:7:53", + "src": "636:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1575,78 +1519,78 @@ "visibility": "internal" } ], - "src": "631:62:53" + "src": "584:67:47" }, "returnParameters": { - "id": 51413, + "id": 49885, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51412, + "id": 49884, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51437, - "src": "740:23:53", + "scope": 49909, + "src": "698:23:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 51411, + "id": 49883, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51410, + "id": 49882, "name": "IVault.VaultInfo", - "nameLocations": ["740:6:53", "747:9:53"], + "nameLocations": ["698:6:47", "705:9:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49444, - "src": "740:16:53" + "referencedDeclaration": 46144, + "src": "698:16:47" }, - "referencedDeclaration": 49444, - "src": "740:16:53", + "referencedDeclaration": 46144, + "src": "698:16:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "src": "739:25:53" + "src": "697:25:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "view", "virtual": false, "visibility": "private" }, { - "id": 51464, + "id": 49936, "nodeType": "FunctionDefinition", - "src": "1078:278:53", + "src": "1036:278:47", "nodes": [], "body": { - "id": 51463, + "id": 49935, "nodeType": "Block", - "src": "1172:184:53", + "src": "1130:184:47", "nodes": [], "statements": [ { - "assignments": [51447, 51449, 51451], + "assignments": [49919, 49921, 49923], "declarations": [ { "constant": false, - "id": 51447, + "id": 49919, "mutability": "mutable", "name": "rate", - "nameLocation": "1191:4:53", + "nameLocation": "1149:4:47", "nodeType": "VariableDeclaration", - "scope": 51463, - "src": "1183:12:53", + "scope": 49935, + "src": "1141:12:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1654,10 +1598,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51446, + "id": 49918, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1183:7:53", + "src": "1141:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1667,13 +1611,13 @@ }, { "constant": false, - "id": 51449, + "id": 49921, "mutability": "mutable", "name": "accumulatedRate", - "nameLocation": "1205:15:53", + "nameLocation": "1163:15:47", "nodeType": "VariableDeclaration", - "scope": 51463, - "src": "1197:23:53", + "scope": 49935, + "src": "1155:23:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1681,10 +1625,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51448, + "id": 49920, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1197:7:53", + "src": "1155:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1694,13 +1638,13 @@ }, { "constant": false, - "id": 51451, + "id": 49923, "mutability": "mutable", "name": "lastUpdateTime", - "nameLocation": "1230:14:53", + "nameLocation": "1188:14:47", "nodeType": "VariableDeclaration", - "scope": 51463, - "src": "1222:22:53", + "scope": 49935, + "src": "1180:22:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1708,10 +1652,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51450, + "id": 49922, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1222:7:53", + "src": "1180:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1720,39 +1664,39 @@ "visibility": "internal" } ], - "id": 51455, + "id": 49927, "initialValue": { "arguments": [], "expression": { "argumentTypes": [], "expression": { - "id": 51452, + "id": 49924, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51440, - "src": "1248:14:53", + "referencedDeclaration": 49912, + "src": "1206:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, - "id": 51453, + "id": 49925, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "1263:12:53", + "memberLocation": "1221:12:47", "memberName": "baseRateInfo", "nodeType": "MemberAccess", - "referencedDeclaration": 49500, - "src": "1248:27:53", + "referencedDeclaration": 46545, + "src": "1206:27:47", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$_t_uint256_$_t_uint256_$", "typeString": "function () view external returns (uint256,uint256,uint256)" } }, - "id": 51454, + "id": 49926, "isConstant": false, "isLValue": false, "isPure": false, @@ -1761,7 +1705,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "1248:29:53", + "src": "1206:29:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", @@ -1769,42 +1713,42 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "1182:95:53" + "src": "1140:95:47" }, { "expression": { "arguments": [ { - "id": 51458, + "id": 49930, "name": "rate", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51447, - "src": "1311:4:53", + "referencedDeclaration": 49919, + "src": "1269:4:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51459, + "id": 49931, "name": "accumulatedRate", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51449, - "src": "1317:15:53", + "referencedDeclaration": 49921, + "src": "1275:15:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51460, + "id": 49932, "name": "lastUpdateTime", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51451, - "src": "1334:14:53", + "referencedDeclaration": 49923, + "src": "1292:14:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1827,33 +1771,33 @@ } ], "expression": { - "id": 51456, + "id": 49928, "name": "IVault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49450, - "src": "1295:6:53", + "referencedDeclaration": 46151, + "src": "1253:6:47", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IVault_$49450_$", + "typeIdentifier": "t_type$_t_contract$_IVault_$46151_$", "typeString": "type(contract IVault)" } }, - "id": 51457, + "id": 49929, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "1302:8:53", + "memberLocation": "1260:8:47", "memberName": "RateInfo", "nodeType": "MemberAccess", - "referencedDeclaration": 49411, - "src": "1295:15:53", + "referencedDeclaration": 46115, + "src": "1253:15:47", "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_RateInfo_$49411_storage_ptr_$", + "typeIdentifier": "t_type$_t_struct$_RateInfo_$46115_storage_ptr_$", "typeString": "type(struct IVault.RateInfo storage pointer)" } }, - "id": 51461, + "id": 49933, "isConstant": false, "isLValue": false, "isPure": false, @@ -1862,17 +1806,17 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "1295:54:53", + "src": "1253:54:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo memory" } }, - "functionReturnParameters": 51445, - "id": 51462, + "functionReturnParameters": 49917, + "id": 49934, "nodeType": "Return", - "src": "1288:61:53" + "src": "1246:61:47" } ] }, @@ -1880,121 +1824,119 @@ "kind": "function", "modifiers": [], "name": "_getBaseRateInfo", - "nameLocation": "1087:16:53", + "nameLocation": "1045:16:47", "parameters": { - "id": 51441, + "id": 49913, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51440, + "id": 49912, "mutability": "mutable", "name": "_vaultContract", - "nameLocation": "1110:14:53", + "nameLocation": "1068:14:47", "nodeType": "VariableDeclaration", - "scope": 51464, - "src": "1104:20:53", + "scope": 49936, + "src": "1062:20:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, "typeName": { - "id": 51439, + "id": 49911, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51438, + "id": 49910, "name": "Vault", - "nameLocations": ["1104:5:53"], + "nameLocations": ["1062:5:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 51097, - "src": "1104:5:53" + "referencedDeclaration": 48108, + "src": "1062:5:47" }, - "referencedDeclaration": 51097, - "src": "1104:5:53", + "referencedDeclaration": 48108, + "src": "1062:5:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, "visibility": "internal" } ], - "src": "1103:22:53" + "src": "1061:22:47" }, "returnParameters": { - "id": 51445, + "id": 49917, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51444, + "id": 49916, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51464, - "src": "1148:22:53", + "scope": 49936, + "src": "1106:22:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo" }, "typeName": { - "id": 51443, + "id": 49915, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51442, + "id": 49914, "name": "IVault.RateInfo", - "nameLocations": ["1148:6:53", "1155:8:53"], + "nameLocations": ["1106:6:47", "1113:8:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49411, - "src": "1148:15:53" + "referencedDeclaration": 46115, + "src": "1106:15:47" }, - "referencedDeclaration": 49411, - "src": "1148:15:53", + "referencedDeclaration": 46115, + "src": "1106:15:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_storage_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_storage_ptr", "typeString": "struct IVault.RateInfo" } }, "visibility": "internal" } ], - "src": "1147:24:53" + "src": "1105:24:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "view", "virtual": false, "visibility": "private" }, { - "id": 51520, + "id": 49986, "nodeType": "FunctionDefinition", - "src": "1362:1037:53", + "src": "1320:945:47", "nodes": [], "body": { - "id": 51519, + "id": 49985, "nodeType": "Block", - "src": "1519:880:53", + "src": "1482:783:47", "nodes": [], "statements": [ { - "assignments": [ - 51477, 51479, 51481, 51483, 51486, 51488, 51490, 51492, 51494, 51496, 51498 - ], + "assignments": [49949, 49951, 49953, 49955, 49958, 49960, 49962, 49964, 49966], "declarations": [ { "constant": false, - "id": 51477, + "id": 49949, "mutability": "mutable", "name": "totalDepositedCollateral", - "nameLocation": "1551:24:53", + "nameLocation": "1514:24:47", "nodeType": "VariableDeclaration", - "scope": 51519, - "src": "1543:32:53", + "scope": 49985, + "src": "1506:32:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2002,10 +1944,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51476, + "id": 49948, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1543:7:53", + "src": "1506:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2015,13 +1957,13 @@ }, { "constant": false, - "id": 51479, + "id": 49951, "mutability": "mutable", "name": "totalBorrowedAmount", - "nameLocation": "1597:19:53", + "nameLocation": "1560:19:47", "nodeType": "VariableDeclaration", - "scope": 51519, - "src": "1589:27:53", + "scope": 49985, + "src": "1552:27:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2029,10 +1971,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51478, + "id": 49950, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1589:7:53", + "src": "1552:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2042,13 +1984,13 @@ }, { "constant": false, - "id": 51481, + "id": 49953, "mutability": "mutable", "name": "liquidationThreshold", - "nameLocation": "1638:20:53", + "nameLocation": "1601:20:47", "nodeType": "VariableDeclaration", - "scope": 51519, - "src": "1630:28:53", + "scope": 49985, + "src": "1593:28:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2056,10 +1998,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51480, + "id": 49952, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1630:7:53", + "src": "1593:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2069,13 +2011,13 @@ }, { "constant": false, - "id": 51483, + "id": 49955, "mutability": "mutable", "name": "liquidationBonus", - "nameLocation": "1680:16:53", + "nameLocation": "1643:16:47", "nodeType": "VariableDeclaration", - "scope": 51519, - "src": "1672:24:53", + "scope": 49985, + "src": "1635:24:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2083,10 +2025,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51482, + "id": 49954, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1672:7:53", + "src": "1635:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2096,34 +2038,34 @@ }, { "constant": false, - "id": 51486, + "id": 49958, "mutability": "mutable", "name": "rateInfo", - "nameLocation": "1732:8:53", + "nameLocation": "1695:8:47", "nodeType": "VariableDeclaration", - "scope": 51519, - "src": "1710:30:53", + "scope": 49985, + "src": "1673:30:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo" }, "typeName": { - "id": 51485, + "id": 49957, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51484, + "id": 49956, "name": "Vault.RateInfo", - "nameLocations": ["1710:5:53", "1716:8:53"], + "nameLocations": ["1673:5:47", "1679:8:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49411, - "src": "1710:14:53" + "referencedDeclaration": 46115, + "src": "1673:14:47" }, - "referencedDeclaration": 49411, - "src": "1710:14:53", + "referencedDeclaration": 46115, + "src": "1673:14:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_storage_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_storage_ptr", "typeString": "struct IVault.RateInfo" } }, @@ -2131,40 +2073,13 @@ }, { "constant": false, - "id": 51488, - "mutability": "mutable", - "name": "paidFees", - "nameLocation": "1762:8:53", - "nodeType": "VariableDeclaration", - "scope": 51519, - "src": "1754:16:53", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 51487, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1754:7:53", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 51490, + "id": 49960, "mutability": "mutable", "name": "price", - "nameLocation": "1792:5:53", + "nameLocation": "1725:5:47", "nodeType": "VariableDeclaration", - "scope": 51519, - "src": "1784:13:53", + "scope": 49985, + "src": "1717:13:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2172,10 +2087,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51489, + "id": 49959, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1784:7:53", + "src": "1717:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2185,13 +2100,13 @@ }, { "constant": false, - "id": 51492, + "id": 49962, "mutability": "mutable", "name": "debtCeiling", - "nameLocation": "1819:11:53", + "nameLocation": "1752:11:47", "nodeType": "VariableDeclaration", - "scope": 51519, - "src": "1811:19:53", + "scope": 49985, + "src": "1744:19:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2199,10 +2114,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51491, + "id": 49961, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1811:7:53", + "src": "1744:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2212,13 +2127,13 @@ }, { "constant": false, - "id": 51494, + "id": 49964, "mutability": "mutable", "name": "collateralFloorPerPosition", - "nameLocation": "1852:26:53", + "nameLocation": "1785:26:47", "nodeType": "VariableDeclaration", - "scope": 51519, - "src": "1844:34:53", + "scope": 49985, + "src": "1777:34:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2226,10 +2141,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51493, + "id": 49963, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1844:7:53", + "src": "1777:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2239,13 +2154,13 @@ }, { "constant": false, - "id": 51496, + "id": 49966, "mutability": "mutable", "name": "additionalCollateralPercision", - "nameLocation": "1900:29:53", + "nameLocation": "1833:29:47", "nodeType": "VariableDeclaration", - "scope": 51519, - "src": "1892:37:53", + "scope": 49985, + "src": "1825:37:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2253,96 +2168,69 @@ "typeString": "uint256" }, "typeName": { - "id": 51495, + "id": 49965, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1892:7:53", + "src": "1825:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" - }, - { - "constant": false, - "id": 51498, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1948:6:53", - "nodeType": "VariableDeclaration", - "scope": 51519, - "src": "1943:11:53", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 51497, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1943:4:53", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" } ], - "id": 51503, + "id": 49971, "initialValue": { "arguments": [ { - "id": 51501, + "id": 49969, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51470, - "src": "2000:16:53", + "referencedDeclaration": 49942, + "src": "1908:16:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } ], "expression": { - "id": 51499, + "id": 49967, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51467, - "src": "1967:14:53", + "referencedDeclaration": 49939, + "src": "1875:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, - "id": 51500, + "id": 49968, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "1982:17:53", + "memberLocation": "1890:17:47", "memberName": "collateralMapping", "nodeType": "MemberAccess", - "referencedDeclaration": 49512, - "src": "1967:32:53", + "referencedDeclaration": 46557, + "src": "1875:32:47", "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_contract$_ERC20_$45675_$returns$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_struct$_RateInfo_$49411_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bool_$", - "typeString": "function (contract ERC20) view external returns (uint256,uint256,uint256,uint256,struct IVault.RateInfo memory,uint256,uint256,uint256,uint256,uint256,bool)" + "typeIdentifier": "t_function_external_view$_t_contract$_ERC20Token_$46273_$returns$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_struct$_RateInfo_$46115_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "function (contract ERC20Token) view external returns (uint256,uint256,uint256,uint256,struct IVault.RateInfo memory,uint256,uint256,uint256,uint256)" } }, - "id": 51502, + "id": 49970, "isConstant": false, "isLValue": false, "isPure": false, @@ -2351,150 +2239,126 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "1967:50:53", + "src": "1875:50:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_struct$_RateInfo_$49411_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bool_$", - "typeString": "tuple(uint256,uint256,uint256,uint256,struct IVault.RateInfo memory,uint256,uint256,uint256,uint256,uint256,bool)" + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_struct$_RateInfo_$46115_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256,uint256,struct IVault.RateInfo memory,uint256,uint256,uint256,uint256)" } }, "nodeType": "VariableDeclarationStatement", - "src": "1529:488:53" + "src": "1492:433:47" }, { "expression": { "arguments": [ { - "id": 51506, + "id": 49974, "name": "totalDepositedCollateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51477, - "src": "2070:24:53", + "referencedDeclaration": 49949, + "src": "1978:24:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51507, + "id": 49975, "name": "totalBorrowedAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51479, - "src": "2108:19:53", + "referencedDeclaration": 49951, + "src": "2016:19:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51508, + "id": 49976, "name": "liquidationThreshold", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51481, - "src": "2141:20:53", + "referencedDeclaration": 49953, + "src": "2049:20:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51509, + "id": 49977, "name": "liquidationBonus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51483, - "src": "2175:16:53", + "referencedDeclaration": 49955, + "src": "2083:16:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51510, + "id": 49978, "name": "rateInfo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51486, - "src": "2205:8:53", + "referencedDeclaration": 49958, + "src": "2113:8:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo memory" } }, { - "id": 51511, - "name": "paidFees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 51488, - "src": "2227:8:53", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 51512, + "id": 49979, "name": "price", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51490, - "src": "2249:5:53", + "referencedDeclaration": 49960, + "src": "2135:5:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51513, + "id": 49980, "name": "debtCeiling", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51492, - "src": "2268:11:53", + "referencedDeclaration": 49962, + "src": "2154:11:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51514, + "id": 49981, "name": "collateralFloorPerPosition", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51494, - "src": "2293:26:53", + "referencedDeclaration": 49964, + "src": "2179:26:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51515, + "id": 49982, "name": "additionalCollateralPercision", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51496, - "src": "2333:29:53", + "referencedDeclaration": 49966, + "src": "2219:29:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } - }, - { - "id": 51516, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 51498, - "src": "2376:6:53", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } } ], "expression": { @@ -2516,7 +2380,7 @@ "typeString": "uint256" }, { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo memory" }, { @@ -2534,44 +2398,36 @@ { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" } ], "expression": { - "id": 51504, + "id": 49972, "name": "IVault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 49450, - "src": "2035:6:53", + "referencedDeclaration": 46151, + "src": "1943:6:47", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IVault_$49450_$", + "typeIdentifier": "t_type$_t_contract$_IVault_$46151_$", "typeString": "type(contract IVault)" } }, - "id": 51505, + "id": 49973, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "2042:14:53", + "memberLocation": "1950:14:47", "memberName": "CollateralInfo", "nodeType": "MemberAccess", - "referencedDeclaration": 49435, - "src": "2035:21:53", + "referencedDeclaration": 46135, + "src": "1943:21:47", "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_CollateralInfo_$49435_storage_ptr_$", + "typeIdentifier": "t_type$_t_struct$_CollateralInfo_$46135_storage_ptr_$", "typeString": "type(struct IVault.CollateralInfo storage pointer)" } }, - "id": 51517, + "id": 49983, "isConstant": false, "isLValue": false, "isPure": false, @@ -2580,17 +2436,17 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "2035:357:53", + "src": "1943:315:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "functionReturnParameters": 51475, - "id": 51518, + "functionReturnParameters": 49947, + "id": 49984, "nodeType": "Return", - "src": "2028:364:53" + "src": "1936:322:47" } ] }, @@ -2598,41 +2454,41 @@ "kind": "function", "modifiers": [], "name": "_getCollateralMapping", - "nameLocation": "1371:21:53", + "nameLocation": "1329:21:47", "parameters": { - "id": 51471, + "id": 49943, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51467, + "id": 49939, "mutability": "mutable", "name": "_vaultContract", - "nameLocation": "1399:14:53", + "nameLocation": "1357:14:47", "nodeType": "VariableDeclaration", - "scope": 51520, - "src": "1393:20:53", + "scope": 49986, + "src": "1351:20:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, "typeName": { - "id": 51466, + "id": 49938, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51465, + "id": 49937, "name": "Vault", - "nameLocations": ["1393:5:53"], + "nameLocations": ["1351:5:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 51097, - "src": "1393:5:53" + "referencedDeclaration": 48108, + "src": "1351:5:47" }, - "referencedDeclaration": 51097, - "src": "1393:5:53", + "referencedDeclaration": 48108, + "src": "1351:5:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, @@ -2640,173 +2496,173 @@ }, { "constant": false, - "id": 51470, + "id": 49942, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "1421:16:53", + "nameLocation": "1384:16:47", "nodeType": "VariableDeclaration", - "scope": 51520, - "src": "1415:22:53", + "scope": 49986, + "src": "1373:27:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 51469, + "id": 49941, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51468, - "name": "ERC20", - "nameLocations": ["1415:5:53"], + "id": 49940, + "name": "ERC20Token", + "nameLocations": ["1373:10:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 45675, - "src": "1415:5:53" + "referencedDeclaration": 46273, + "src": "1373:10:47" }, - "referencedDeclaration": 45675, - "src": "1415:5:53", + "referencedDeclaration": 46273, + "src": "1373:10:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } }, "visibility": "internal" } ], - "src": "1392:46:53" + "src": "1350:51:47" }, "returnParameters": { - "id": 51475, + "id": 49947, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51474, + "id": 49946, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51520, - "src": "1485:28:53", + "scope": 49986, + "src": "1448:28:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 51473, + "id": 49945, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51472, + "id": 49944, "name": "IVault.CollateralInfo", - "nameLocations": ["1485:6:53", "1492:14:53"], + "nameLocations": ["1448:6:47", "1455:14:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49435, - "src": "1485:21:53" + "referencedDeclaration": 46135, + "src": "1448:21:47" }, - "referencedDeclaration": 49435, - "src": "1485:21:53", + "referencedDeclaration": 46135, + "src": "1448:21:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, "visibility": "internal" } ], - "src": "1484:30:53" + "src": "1447:30:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "view", "virtual": false, "visibility": "private" }, { - "id": 51575, + "id": 50043, "nodeType": "FunctionDefinition", - "src": "2616:571:53", + "src": "2482:587:47", "nodes": [], "body": { - "id": 51574, + "id": 50042, "nodeType": "Block", - "src": "2760:427:53", + "src": "2631:438:47", "nodes": [], "statements": [ { - "assignments": [51538], + "assignments": [50004], "declarations": [ { "constant": false, - "id": 51538, + "id": 50004, "mutability": "mutable", "name": "_vault", - "nameLocation": "2794:6:53", + "nameLocation": "2665:6:47", "nodeType": "VariableDeclaration", - "scope": 51574, - "src": "2770:30:53", + "scope": 50042, + "src": "2641:30:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 51537, + "id": 50003, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51536, + "id": 50002, "name": "IVault.VaultInfo", - "nameLocations": ["2770:6:53", "2777:9:53"], + "nameLocations": ["2641:6:47", "2648:9:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49444, - "src": "2770:16:53" + "referencedDeclaration": 46144, + "src": "2641:16:47" }, - "referencedDeclaration": 49444, - "src": "2770:16:53", + "referencedDeclaration": 46144, + "src": "2641:16:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "id": 51544, + "id": 50010, "initialValue": { "arguments": [ { - "id": 51540, + "id": 50006, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51524, - "src": "2820:14:53", + "referencedDeclaration": 49990, + "src": "2691:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51541, + "id": 50007, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51527, - "src": "2836:16:53", + "referencedDeclaration": 49993, + "src": "2707:16:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } }, { - "id": 51542, + "id": 50008, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51529, - "src": "2854:6:53", + "referencedDeclaration": 49995, + "src": "2725:6:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2816,30 +2672,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" }, { "typeIdentifier": "t_address", "typeString": "address" } ], - "id": 51539, + "id": 50005, "name": "_getVaultMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51437, - "src": "2803:16:53", + "referencedDeclaration": 49909, + "src": "2674:16:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_contract$_ERC20_$45675_$_t_address_$returns$_t_struct$_VaultInfo_$49444_memory_ptr_$", - "typeString": "function (contract Vault,contract ERC20,address) view returns (struct IVault.VaultInfo memory)" + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_contract$_ERC20Token_$46273_$_t_address_$returns$_t_struct$_VaultInfo_$46144_memory_ptr_$", + "typeString": "function (contract Vault,contract ERC20Token,address) view returns (struct IVault.VaultInfo memory)" } }, - "id": 51543, + "id": 50009, "isConstant": false, "isLValue": false, "isPure": false, @@ -2848,106 +2704,106 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "2803:58:53", + "src": "2674:58:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "2770:91:53" + "src": "2641:91:47" }, { - "assignments": [51549], + "assignments": [50015], "declarations": [ { "constant": false, - "id": 51549, + "id": 50015, "mutability": "mutable", "name": "_collateral", - "nameLocation": "2900:11:53", + "nameLocation": "2771:11:47", "nodeType": "VariableDeclaration", - "scope": 51574, - "src": "2871:40:53", + "scope": 50042, + "src": "2742:40:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 51548, + "id": 50014, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51547, + "id": 50013, "name": "IVault.CollateralInfo", - "nameLocations": ["2871:6:53", "2878:14:53"], + "nameLocations": ["2742:6:47", "2749:14:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49435, - "src": "2871:21:53" + "referencedDeclaration": 46135, + "src": "2742:21:47" }, - "referencedDeclaration": 49435, - "src": "2871:21:53", + "referencedDeclaration": 46135, + "src": "2742:21:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, "visibility": "internal" } ], - "id": 51554, + "id": 50020, "initialValue": { "arguments": [ { - "id": 51551, + "id": 50017, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51524, - "src": "2936:14:53", + "referencedDeclaration": 49990, + "src": "2807:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51552, + "id": 50018, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51527, - "src": "2952:16:53", + "referencedDeclaration": 49993, + "src": "2823:16:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } ], - "id": 51550, + "id": 50016, "name": "_getCollateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51520, - "src": "2914:21:53", + "referencedDeclaration": 49986, + "src": "2785:21:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_contract$_ERC20_$45675_$returns$_t_struct$_CollateralInfo_$49435_memory_ptr_$", - "typeString": "function (contract Vault,contract ERC20) view returns (struct IVault.CollateralInfo memory)" + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_contract$_ERC20Token_$46273_$returns$_t_struct$_CollateralInfo_$46135_memory_ptr_$", + "typeString": "function (contract Vault,contract ERC20Token) view returns (struct IVault.CollateralInfo memory)" } }, - "id": 51553, + "id": 50019, "isConstant": false, "isLValue": false, "isPure": false, @@ -2956,98 +2812,133 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "2914:55:53", + "src": "2785:55:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "2871:98:53" + "src": "2742:98:47" }, { "condition": { - "id": 51557, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 50025, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "2984:19:53", - "subExpression": { + "leftExpression": { "expression": { - "id": 51555, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 51549, - "src": "2985:11:53", + "expression": { + "id": 50021, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50015, + "src": "2855:11:47", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", + "typeString": "struct IVault.CollateralInfo memory" + } + }, + "id": 50022, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2867:8:47", + "memberName": "rateInfo", + "nodeType": "MemberAccess", + "referencedDeclaration": 46126, + "src": "2855:20:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", - "typeString": "struct IVault.CollateralInfo memory" + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", + "typeString": "struct IVault.RateInfo memory" } }, - "id": 51556, + "id": 50023, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "2997:6:53", - "memberName": "exists", + "memberLocation": "2876:4:47", + "memberName": "rate", "nodeType": "MemberAccess", - "referencedDeclaration": 49434, - "src": "2985:18:53", + "referencedDeclaration": 46110, + "src": "2855:25:47", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 50024, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2884:1:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2855:30:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 51560, + "id": 50028, "nodeType": "IfStatement", - "src": "2980:36:53", + "src": "2851:47:47", "trueBody": { "expression": { "hexValue": "74727565", - "id": 51558, + "id": 50026, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "3012:4:53", + "src": "2894:4:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "functionReturnParameters": 51533, - "id": 51559, + "functionReturnParameters": 49999, + "id": 50027, "nodeType": "Return", - "src": "3005:11:53" + "src": "2887:11:47" } }, { - "assignments": [51562], + "assignments": [50030], "declarations": [ { "constant": false, - "id": 51562, + "id": 50030, "mutability": "mutable", "name": "_collateralRatio", - "nameLocation": "3035:16:53", + "nameLocation": "2917:16:47", "nodeType": "VariableDeclaration", - "scope": 51574, - "src": "3027:24:53", + "scope": 50042, + "src": "2909:24:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3055,10 +2946,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51561, + "id": 50029, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3027:7:53", + "src": "2909:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3067,42 +2958,42 @@ "visibility": "internal" } ], - "id": 51568, + "id": 50036, "initialValue": { "arguments": [ { - "id": 51564, + "id": 50032, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51524, - "src": "3074:14:53", + "referencedDeclaration": 49990, + "src": "2956:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51565, + "id": 50033, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51549, - "src": "3090:11:53", + "referencedDeclaration": 50015, + "src": "2972:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, { - "id": 51566, + "id": 50034, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51538, - "src": "3103:6:53", + "referencedDeclaration": 50004, + "src": "2985:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } } @@ -3110,30 +3001,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" }, { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } ], - "id": 51563, + "id": 50031, "name": "_getCollateralRatio", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52041, - "src": "3054:19:53", + "referencedDeclaration": 50546, + "src": "2936:19:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_struct$_CollateralInfo_$49435_memory_ptr_$_t_struct$_VaultInfo_$49444_memory_ptr_$returns$_t_uint256_$", + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_struct$_CollateralInfo_$46135_memory_ptr_$_t_struct$_VaultInfo_$46144_memory_ptr_$returns$_t_uint256_$", "typeString": "function (contract Vault,struct IVault.CollateralInfo memory,struct IVault.VaultInfo memory) view returns (uint256)" } }, - "id": 51567, + "id": 50035, "isConstant": false, "isLValue": false, "isPure": false, @@ -3142,7 +3033,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "3054:56:53", + "src": "2936:56:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -3150,7 +3041,7 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "3027:83:53" + "src": "2909:83:47" }, { "expression": { @@ -3158,18 +3049,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51572, + "id": 50040, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 51569, + "id": 50037, "name": "_collateralRatio", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51562, - "src": "3128:16:53", + "referencedDeclaration": 50030, + "src": "3010:16:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3179,49 +3070,49 @@ "operator": "<=", "rightExpression": { "expression": { - "id": 51570, + "id": 50038, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51549, - "src": "3148:11:53", + "referencedDeclaration": 50015, + "src": "3030:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 51571, + "id": 50039, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "3160:20:53", + "memberLocation": "3042:20:47", "memberName": "liquidationThreshold", "nodeType": "MemberAccess", - "referencedDeclaration": 49417, - "src": "3148:32:53", + "referencedDeclaration": 46121, + "src": "3030:32:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3128:52:53", + "src": "3010:52:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 51533, - "id": 51573, + "functionReturnParameters": 49999, + "id": 50041, "nodeType": "Return", - "src": "3121:59:53" + "src": "3003:59:47" } ] }, "documentation": { - "id": 51521, + "id": 49987, "nodeType": "StructuredDocumentation", - "src": "2519:92:53", + "src": "2385:92:47", "text": " @dev returns health factor (if a vault is liquidatable or not) of a vault" }, "functionSelector": "54510b9d", @@ -3229,41 +3120,41 @@ "kind": "function", "modifiers": [], "name": "getHealthFactor", - "nameLocation": "2625:15:53", + "nameLocation": "2491:15:47", "parameters": { - "id": 51530, + "id": 49996, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51524, + "id": 49990, "mutability": "mutable", "name": "_vaultContract", - "nameLocation": "2647:14:53", + "nameLocation": "2513:14:47", "nodeType": "VariableDeclaration", - "scope": 51575, - "src": "2641:20:53", + "scope": 50043, + "src": "2507:20:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, "typeName": { - "id": 51523, + "id": 49989, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51522, + "id": 49988, "name": "Vault", - "nameLocations": ["2641:5:53"], + "nameLocations": ["2507:5:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 51097, - "src": "2641:5:53" + "referencedDeclaration": 48108, + "src": "2507:5:47" }, - "referencedDeclaration": 51097, - "src": "2641:5:53", + "referencedDeclaration": 48108, + "src": "2507:5:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, @@ -3271,48 +3162,48 @@ }, { "constant": false, - "id": 51527, + "id": 49993, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "2669:16:53", + "nameLocation": "2540:16:47", "nodeType": "VariableDeclaration", - "scope": 51575, - "src": "2663:22:53", + "scope": 50043, + "src": "2529:27:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 51526, + "id": 49992, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51525, - "name": "ERC20", - "nameLocations": ["2663:5:53"], + "id": 49991, + "name": "ERC20Token", + "nameLocations": ["2529:10:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 45675, - "src": "2663:5:53" + "referencedDeclaration": 46273, + "src": "2529:10:47" }, - "referencedDeclaration": 45675, - "src": "2663:5:53", + "referencedDeclaration": 46273, + "src": "2529:10:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 51529, + "id": 49995, "mutability": "mutable", "name": "_owner", - "nameLocation": "2695:6:53", + "nameLocation": "2566:6:47", "nodeType": "VariableDeclaration", - "scope": 51575, - "src": "2687:14:53", + "scope": 50043, + "src": "2558:14:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3320,10 +3211,10 @@ "typeString": "address" }, "typeName": { - "id": 51528, + "id": 49994, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2687:7:53", + "src": "2558:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -3333,21 +3224,21 @@ "visibility": "internal" } ], - "src": "2640:62:53" + "src": "2506:67:47" }, "returnParameters": { - "id": 51533, + "id": 49999, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51532, + "id": 49998, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51575, - "src": "2750:4:53", + "scope": 50043, + "src": "2621:4:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3355,10 +3246,10 @@ "typeString": "bool" }, "typeName": { - "id": 51531, + "id": 49997, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2750:4:53", + "src": "2621:4:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3367,97 +3258,97 @@ "visibility": "internal" } ], - "src": "2749:6:53" + "src": "2620:6:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "view", "virtual": false, "visibility": "external" }, { - "id": 51623, + "id": 50093, "nodeType": "FunctionDefinition", - "src": "3261:484:53", + "src": "3143:500:47", "nodes": [], "body": { - "id": 51622, + "id": 50092, "nodeType": "Block", - "src": "3411:334:53", + "src": "3298:345:47", "nodes": [], "statements": [ { - "assignments": [51593], + "assignments": [50061], "declarations": [ { "constant": false, - "id": 51593, + "id": 50061, "mutability": "mutable", "name": "_vault", - "nameLocation": "3445:6:53", + "nameLocation": "3332:6:47", "nodeType": "VariableDeclaration", - "scope": 51622, - "src": "3421:30:53", + "scope": 50092, + "src": "3308:30:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 51592, + "id": 50060, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51591, + "id": 50059, "name": "IVault.VaultInfo", - "nameLocations": ["3421:6:53", "3428:9:53"], + "nameLocations": ["3308:6:47", "3315:9:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49444, - "src": "3421:16:53" + "referencedDeclaration": 46144, + "src": "3308:16:47" }, - "referencedDeclaration": 49444, - "src": "3421:16:53", + "referencedDeclaration": 46144, + "src": "3308:16:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "id": 51599, + "id": 50067, "initialValue": { "arguments": [ { - "id": 51595, + "id": 50063, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51579, - "src": "3471:14:53", + "referencedDeclaration": 50047, + "src": "3358:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51596, + "id": 50064, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51582, - "src": "3487:16:53", + "referencedDeclaration": 50050, + "src": "3374:16:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } }, { - "id": 51597, + "id": 50065, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51584, - "src": "3505:6:53", + "referencedDeclaration": 50052, + "src": "3392:6:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3467,30 +3358,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" }, { "typeIdentifier": "t_address", "typeString": "address" } ], - "id": 51594, + "id": 50062, "name": "_getVaultMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51437, - "src": "3454:16:53", + "referencedDeclaration": 49909, + "src": "3341:16:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_contract$_ERC20_$45675_$_t_address_$returns$_t_struct$_VaultInfo_$49444_memory_ptr_$", - "typeString": "function (contract Vault,contract ERC20,address) view returns (struct IVault.VaultInfo memory)" + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_contract$_ERC20Token_$46273_$_t_address_$returns$_t_struct$_VaultInfo_$46144_memory_ptr_$", + "typeString": "function (contract Vault,contract ERC20Token,address) view returns (struct IVault.VaultInfo memory)" } }, - "id": 51598, + "id": 50066, "isConstant": false, "isLValue": false, "isPure": false, @@ -3499,106 +3390,106 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "3454:58:53", + "src": "3341:58:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "3421:91:53" + "src": "3308:91:47" }, { - "assignments": [51604], + "assignments": [50072], "declarations": [ { "constant": false, - "id": 51604, + "id": 50072, "mutability": "mutable", "name": "_collateral", - "nameLocation": "3551:11:53", + "nameLocation": "3438:11:47", "nodeType": "VariableDeclaration", - "scope": 51622, - "src": "3522:40:53", + "scope": 50092, + "src": "3409:40:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 51603, + "id": 50071, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51602, + "id": 50070, "name": "IVault.CollateralInfo", - "nameLocations": ["3522:6:53", "3529:14:53"], + "nameLocations": ["3409:6:47", "3416:14:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49435, - "src": "3522:21:53" + "referencedDeclaration": 46135, + "src": "3409:21:47" }, - "referencedDeclaration": 49435, - "src": "3522:21:53", + "referencedDeclaration": 46135, + "src": "3409:21:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, "visibility": "internal" } ], - "id": 51609, + "id": 50077, "initialValue": { "arguments": [ { - "id": 51606, + "id": 50074, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51579, - "src": "3587:14:53", + "referencedDeclaration": 50047, + "src": "3474:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51607, + "id": 50075, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51582, - "src": "3603:16:53", + "referencedDeclaration": 50050, + "src": "3490:16:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } ], - "id": 51605, + "id": 50073, "name": "_getCollateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51520, - "src": "3565:21:53", + "referencedDeclaration": 49986, + "src": "3452:21:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_contract$_ERC20_$45675_$returns$_t_struct$_CollateralInfo_$49435_memory_ptr_$", - "typeString": "function (contract Vault,contract ERC20) view returns (struct IVault.CollateralInfo memory)" + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_contract$_ERC20Token_$46273_$returns$_t_struct$_CollateralInfo_$46135_memory_ptr_$", + "typeString": "function (contract Vault,contract ERC20Token) view returns (struct IVault.CollateralInfo memory)" } }, - "id": 51608, + "id": 50076, "isConstant": false, "isLValue": false, "isPure": false, @@ -3607,122 +3498,157 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "3565:55:53", + "src": "3452:55:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "3522:98:53" + "src": "3409:98:47" }, { "condition": { - "id": 51612, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 50082, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "3635:19:53", - "subExpression": { + "leftExpression": { "expression": { - "id": 51610, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 51604, - "src": "3636:11:53", + "expression": { + "id": 50078, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50072, + "src": "3522:11:47", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", + "typeString": "struct IVault.CollateralInfo memory" + } + }, + "id": 50079, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3534:8:47", + "memberName": "rateInfo", + "nodeType": "MemberAccess", + "referencedDeclaration": 46126, + "src": "3522:20:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", - "typeString": "struct IVault.CollateralInfo memory" + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", + "typeString": "struct IVault.RateInfo memory" } }, - "id": 51611, + "id": 50080, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "3648:6:53", - "memberName": "exists", + "memberLocation": "3543:4:47", + "memberName": "rate", "nodeType": "MemberAccess", - "referencedDeclaration": 49434, - "src": "3636:18:53", + "referencedDeclaration": 46110, + "src": "3522:25:47", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 50081, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3551:1:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3522:30:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 51615, + "id": 50085, "nodeType": "IfStatement", - "src": "3631:33:53", + "src": "3518:44:47", "trueBody": { "expression": { "hexValue": "30", - "id": 51613, + "id": 50083, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3663:1:53", + "src": "3561:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "functionReturnParameters": 51588, - "id": 51614, + "functionReturnParameters": 50056, + "id": 50084, "nodeType": "Return", - "src": "3656:8:53" + "src": "3554:8:47" } }, { "expression": { "arguments": [ { - "id": 51617, + "id": 50087, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51579, - "src": "3702:14:53", + "referencedDeclaration": 50047, + "src": "3600:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51618, + "id": 50088, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51604, - "src": "3718:11:53", + "referencedDeclaration": 50072, + "src": "3616:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, { - "id": 51619, + "id": 50089, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51593, - "src": "3731:6:53", + "referencedDeclaration": 50061, + "src": "3629:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } } @@ -3730,30 +3656,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" }, { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } ], - "id": 51616, + "id": 50086, "name": "_getCollateralRatio", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52041, - "src": "3682:19:53", + "referencedDeclaration": 50546, + "src": "3580:19:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_struct$_CollateralInfo_$49435_memory_ptr_$_t_struct$_VaultInfo_$49444_memory_ptr_$returns$_t_uint256_$", + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_struct$_CollateralInfo_$46135_memory_ptr_$_t_struct$_VaultInfo_$46144_memory_ptr_$returns$_t_uint256_$", "typeString": "function (contract Vault,struct IVault.CollateralInfo memory,struct IVault.VaultInfo memory) view returns (uint256)" } }, - "id": 51620, + "id": 50090, "isConstant": false, "isLValue": false, "isPure": false, @@ -3762,24 +3688,24 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "3682:56:53", + "src": "3580:56:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 51588, - "id": 51621, + "functionReturnParameters": 50056, + "id": 50091, "nodeType": "Return", - "src": "3675:63:53" + "src": "3573:63:47" } ] }, "documentation": { - "id": 51576, + "id": 50044, "nodeType": "StructuredDocumentation", - "src": "3193:63:53", + "src": "3075:63:47", "text": " @dev returns the collateral ratio of a vault" }, "functionSelector": "f44364c5", @@ -3787,41 +3713,41 @@ "kind": "function", "modifiers": [], "name": "getCollateralRatio", - "nameLocation": "3270:18:53", + "nameLocation": "3152:18:47", "parameters": { - "id": 51585, + "id": 50053, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51579, + "id": 50047, "mutability": "mutable", "name": "_vaultContract", - "nameLocation": "3295:14:53", + "nameLocation": "3177:14:47", "nodeType": "VariableDeclaration", - "scope": 51623, - "src": "3289:20:53", + "scope": 50093, + "src": "3171:20:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, "typeName": { - "id": 51578, + "id": 50046, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51577, + "id": 50045, "name": "Vault", - "nameLocations": ["3289:5:53"], + "nameLocations": ["3171:5:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 51097, - "src": "3289:5:53" + "referencedDeclaration": 48108, + "src": "3171:5:47" }, - "referencedDeclaration": 51097, - "src": "3289:5:53", + "referencedDeclaration": 48108, + "src": "3171:5:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, @@ -3829,48 +3755,48 @@ }, { "constant": false, - "id": 51582, + "id": 50050, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "3317:16:53", + "nameLocation": "3204:16:47", "nodeType": "VariableDeclaration", - "scope": 51623, - "src": "3311:22:53", + "scope": 50093, + "src": "3193:27:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 51581, + "id": 50049, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51580, - "name": "ERC20", - "nameLocations": ["3311:5:53"], + "id": 50048, + "name": "ERC20Token", + "nameLocations": ["3193:10:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 45675, - "src": "3311:5:53" + "referencedDeclaration": 46273, + "src": "3193:10:47" }, - "referencedDeclaration": 45675, - "src": "3311:5:53", + "referencedDeclaration": 46273, + "src": "3193:10:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 51584, + "id": 50052, "mutability": "mutable", "name": "_owner", - "nameLocation": "3343:6:53", + "nameLocation": "3230:6:47", "nodeType": "VariableDeclaration", - "scope": 51623, - "src": "3335:14:53", + "scope": 50093, + "src": "3222:14:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3878,10 +3804,10 @@ "typeString": "address" }, "typeName": { - "id": 51583, + "id": 50051, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3335:7:53", + "src": "3222:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -3891,21 +3817,21 @@ "visibility": "internal" } ], - "src": "3288:62:53" + "src": "3170:67:47" }, "returnParameters": { - "id": 51588, + "id": 50056, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51587, + "id": 50055, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51623, - "src": "3398:7:53", + "scope": 50093, + "src": "3285:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3913,10 +3839,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51586, + "id": 50054, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3398:7:53", + "src": "3285:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3925,97 +3851,97 @@ "visibility": "internal" } ], - "src": "3397:9:53" + "src": "3284:9:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "view", "virtual": false, "visibility": "external" }, { - "id": 51740, + "id": 50232, "nodeType": "FunctionDefinition", - "src": "4145:1927:53", + "src": "4043:2066:47", "nodes": [], "body": { - "id": 51739, + "id": 50231, "nodeType": "Block", - "src": "4292:1780:53", + "src": "4195:1914:47", "nodes": [], "statements": [ { - "assignments": [51641], + "assignments": [50111], "declarations": [ { "constant": false, - "id": 51641, + "id": 50111, "mutability": "mutable", "name": "_vault", - "nameLocation": "4326:6:53", + "nameLocation": "4229:6:47", "nodeType": "VariableDeclaration", - "scope": 51739, - "src": "4302:30:53", + "scope": 50231, + "src": "4205:30:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 51640, + "id": 50110, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51639, + "id": 50109, "name": "IVault.VaultInfo", - "nameLocations": ["4302:6:53", "4309:9:53"], + "nameLocations": ["4205:6:47", "4212:9:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49444, - "src": "4302:16:53" + "referencedDeclaration": 46144, + "src": "4205:16:47" }, - "referencedDeclaration": 49444, - "src": "4302:16:53", + "referencedDeclaration": 46144, + "src": "4205:16:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "id": 51647, + "id": 50117, "initialValue": { "arguments": [ { - "id": 51643, + "id": 50113, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51627, - "src": "4352:14:53", + "referencedDeclaration": 50097, + "src": "4255:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51644, + "id": 50114, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51630, - "src": "4368:16:53", + "referencedDeclaration": 50100, + "src": "4271:16:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } }, { - "id": 51645, + "id": 50115, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51632, - "src": "4386:6:53", + "referencedDeclaration": 50102, + "src": "4289:6:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4025,30 +3951,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" }, { "typeIdentifier": "t_address", "typeString": "address" } ], - "id": 51642, + "id": 50112, "name": "_getVaultMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51437, - "src": "4335:16:53", + "referencedDeclaration": 49909, + "src": "4238:16:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_contract$_ERC20_$45675_$_t_address_$returns$_t_struct$_VaultInfo_$49444_memory_ptr_$", - "typeString": "function (contract Vault,contract ERC20,address) view returns (struct IVault.VaultInfo memory)" + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_contract$_ERC20Token_$46273_$_t_address_$returns$_t_struct$_VaultInfo_$46144_memory_ptr_$", + "typeString": "function (contract Vault,contract ERC20Token,address) view returns (struct IVault.VaultInfo memory)" } }, - "id": 51646, + "id": 50116, "isConstant": false, "isLValue": false, "isPure": false, @@ -4057,106 +3983,106 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4335:58:53", + "src": "4238:58:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "4302:91:53" + "src": "4205:91:47" }, { - "assignments": [51652], + "assignments": [50122], "declarations": [ { "constant": false, - "id": 51652, + "id": 50122, "mutability": "mutable", "name": "_collateral", - "nameLocation": "4432:11:53", + "nameLocation": "4335:11:47", "nodeType": "VariableDeclaration", - "scope": 51739, - "src": "4403:40:53", + "scope": 50231, + "src": "4306:40:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 51651, + "id": 50121, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51650, + "id": 50120, "name": "IVault.CollateralInfo", - "nameLocations": ["4403:6:53", "4410:14:53"], + "nameLocations": ["4306:6:47", "4313:14:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49435, - "src": "4403:21:53" + "referencedDeclaration": 46135, + "src": "4306:21:47" }, - "referencedDeclaration": 49435, - "src": "4403:21:53", + "referencedDeclaration": 46135, + "src": "4306:21:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, "visibility": "internal" } ], - "id": 51657, + "id": 50127, "initialValue": { "arguments": [ { - "id": 51654, + "id": 50124, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51627, - "src": "4468:14:53", + "referencedDeclaration": 50097, + "src": "4371:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51655, + "id": 50125, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51630, - "src": "4484:16:53", + "referencedDeclaration": 50100, + "src": "4387:16:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } ], - "id": 51653, + "id": 50123, "name": "_getCollateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51520, - "src": "4446:21:53", + "referencedDeclaration": 49986, + "src": "4349:21:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_contract$_ERC20_$45675_$returns$_t_struct$_CollateralInfo_$49435_memory_ptr_$", - "typeString": "function (contract Vault,contract ERC20) view returns (struct IVault.CollateralInfo memory)" + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_contract$_ERC20Token_$46273_$returns$_t_struct$_CollateralInfo_$46135_memory_ptr_$", + "typeString": "function (contract Vault,contract ERC20Token) view returns (struct IVault.CollateralInfo memory)" } }, - "id": 51656, + "id": 50126, "isConstant": false, "isLValue": false, "isPure": false, @@ -4165,15 +4091,15 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4446:55:53", + "src": "4349:55:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "4403:98:53" + "src": "4306:98:47" }, { "condition": { @@ -4181,7 +4107,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 51665, + "id": 50137, "isConstant": false, "isLValue": false, "isPure": false, @@ -4191,34 +4117,34 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51661, + "id": 50131, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { - "id": 51658, + "id": 50128, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51641, - "src": "4563:6:53", + "referencedDeclaration": 50111, + "src": "4466:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "id": 51659, + "id": 50129, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "4570:19:53", + "memberLocation": "4473:19:47", "memberName": "depositedCollateral", "nodeType": "MemberAccess", - "referencedDeclaration": 49437, - "src": "4563:26:53", + "referencedDeclaration": 46137, + "src": "4466:26:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4228,21 +4154,21 @@ "operator": "==", "rightExpression": { "hexValue": "30", - "id": 51660, + "id": 50130, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4593:1:53", + "src": "4496:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "4563:31:53", + "src": "4466:31:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4251,92 +4177,127 @@ "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { - "id": 51664, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 50136, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "4598:19:53", - "subExpression": { + "leftExpression": { "expression": { - "id": 51662, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 51652, - "src": "4599:11:53", + "expression": { + "id": 50132, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50122, + "src": "4501:11:47", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", + "typeString": "struct IVault.CollateralInfo memory" + } + }, + "id": 50133, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4513:8:47", + "memberName": "rateInfo", + "nodeType": "MemberAccess", + "referencedDeclaration": 46126, + "src": "4501:20:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", - "typeString": "struct IVault.CollateralInfo memory" + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", + "typeString": "struct IVault.RateInfo memory" } }, - "id": 51663, + "id": 50134, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "4611:6:53", - "memberName": "exists", + "memberLocation": "4522:4:47", + "memberName": "rate", "nodeType": "MemberAccess", - "referencedDeclaration": 49434, - "src": "4599:18:53", + "referencedDeclaration": 46110, + "src": "4501:25:47", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 50135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4530:1:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4501:30:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "4563:54:53", + "src": "4466:65:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 51668, + "id": 50140, "nodeType": "IfStatement", - "src": "4559:68:53", + "src": "4462:79:47", "trueBody": { "expression": { "hexValue": "30", - "id": 51666, + "id": 50138, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4626:1:53", + "src": "4540:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "functionReturnParameters": 51636, - "id": 51667, + "functionReturnParameters": 50106, + "id": 50139, "nodeType": "Return", - "src": "4619:8:53" + "src": "4533:8:47" } }, { - "assignments": [51670], + "assignments": [50142], "declarations": [ { "constant": false, - "id": 51670, + "id": 50142, "mutability": "mutable", "name": "_collateralValueInCurrency", - "nameLocation": "4681:26:53", + "nameLocation": "4595:26:47", "nodeType": "VariableDeclaration", - "scope": 51739, - "src": "4673:34:53", + "scope": 50231, + "src": "4587:34:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4344,10 +4305,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51669, + "id": 50141, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4673:7:53", + "src": "4587:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4356,30 +4317,30 @@ "visibility": "internal" } ], - "id": 51675, + "id": 50147, "initialValue": { "arguments": [ { - "id": 51672, + "id": 50144, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51652, - "src": "4740:11:53", + "referencedDeclaration": 50122, + "src": "4654:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, { - "id": 51673, + "id": 50145, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51641, - "src": "4753:6:53", + "referencedDeclaration": 50111, + "src": "4667:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } } @@ -4387,26 +4348,26 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" }, { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } ], - "id": 51671, + "id": 50143, "name": "_getCurrencyValueOfCollateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52072, - "src": "4710:29:53", + "referencedDeclaration": 50577, + "src": "4624:29:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_struct$_CollateralInfo_$49435_memory_ptr_$_t_struct$_VaultInfo_$49444_memory_ptr_$returns$_t_uint256_$", + "typeIdentifier": "t_function_internal_pure$_t_struct$_CollateralInfo_$46135_memory_ptr_$_t_struct$_VaultInfo_$46144_memory_ptr_$returns$_t_uint256_$", "typeString": "function (struct IVault.CollateralInfo memory,struct IVault.VaultInfo memory) pure returns (uint256)" } }, - "id": 51674, + "id": 50146, "isConstant": false, "isLValue": false, "isPure": false, @@ -4415,7 +4376,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "4710:50:53", + "src": "4624:50:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -4423,20 +4384,20 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "4673:87:53" + "src": "4587:87:47" }, { - "assignments": [51677], + "assignments": [50149], "declarations": [ { "constant": false, - "id": 51677, + "id": 50149, "mutability": "mutable", "name": "_adjustedCollateralValueInCurrency", - "nameLocation": "4832:34:53", + "nameLocation": "4746:34:47", "nodeType": "VariableDeclaration", - "scope": 51739, - "src": "4824:42:53", + "scope": 50231, + "src": "4738:42:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4444,10 +4405,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51676, + "id": 50148, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4824:7:53", + "src": "4738:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4456,13 +4417,13 @@ "visibility": "internal" } ], - "id": 51685, + "id": 50157, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51684, + "id": 50156, "isConstant": false, "isLValue": false, "isPure": false, @@ -4474,18 +4435,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51681, + "id": 50153, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 51678, + "id": 50150, "name": "_collateralValueInCurrency", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51670, - "src": "4882:26:53", + "referencedDeclaration": 50142, + "src": "4796:26:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4495,47 +4456,47 @@ "operator": "*", "rightExpression": { "expression": { - "id": 51679, + "id": 50151, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51652, - "src": "4911:11:53", + "referencedDeclaration": 50122, + "src": "4825:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 51680, + "id": 50152, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "4923:20:53", + "memberLocation": "4837:20:47", "memberName": "liquidationThreshold", "nodeType": "MemberAccess", - "referencedDeclaration": 49417, - "src": "4911:32:53", + "referencedDeclaration": 46121, + "src": "4825:32:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4882:61:53", + "src": "4796:61:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 51682, + "id": 50154, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "4881:63:53", + "src": "4795:63:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4544,38 +4505,38 @@ "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { - "id": 51683, - "name": "PRECISION", + "id": 50155, + "name": "HUNDRED_PERCENTAGE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51397, - "src": "4947:9:53", + "referencedDeclaration": 49869, + "src": "4861:18:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4881:75:53", + "src": "4795:84:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "4824:132:53" + "src": "4738:141:47" }, { - "assignments": [51687, null], + "assignments": [50159, null], "declarations": [ { "constant": false, - "id": 51687, + "id": 50159, "mutability": "mutable", "name": "_currentAccruedFees", - "nameLocation": "5012:19:53", + "nameLocation": "4935:19:47", "nodeType": "VariableDeclaration", - "scope": 51739, - "src": "5004:27:53", + "scope": 50231, + "src": "4927:27:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4583,10 +4544,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51686, + "id": 50158, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5004:7:53", + "src": "4927:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4596,42 +4557,42 @@ }, null ], - "id": 51693, + "id": 50165, "initialValue": { "arguments": [ { - "id": 51689, + "id": 50161, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51627, - "src": "5058:14:53", + "referencedDeclaration": 50097, + "src": "4981:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51690, + "id": 50162, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51652, - "src": "5074:11:53", + "referencedDeclaration": 50122, + "src": "4997:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, { - "id": 51691, + "id": 50163, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51641, - "src": "5087:6:53", + "referencedDeclaration": 50111, + "src": "5010:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } } @@ -4639,30 +4600,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" }, { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } ], - "id": 51688, + "id": 50160, "name": "_calculateAccruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52149, - "src": "5036:21:53", + "referencedDeclaration": 50656, + "src": "4959:21:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_struct$_CollateralInfo_$49435_memory_ptr_$_t_struct$_VaultInfo_$49444_memory_ptr_$returns$_t_uint256_$_t_uint256_$", + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_struct$_CollateralInfo_$46135_memory_ptr_$_t_struct$_VaultInfo_$46144_memory_ptr_$returns$_t_uint256_$_t_uint256_$", "typeString": "function (contract Vault,struct IVault.CollateralInfo memory,struct IVault.VaultInfo memory) view returns (uint256,uint256)" } }, - "id": 51692, + "id": 50164, "isConstant": false, "isLValue": false, "isPure": false, @@ -4671,7 +4632,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5036:58:53", + "src": "4959:58:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", @@ -4679,20 +4640,20 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "5003:91:53" + "src": "4926:91:47" }, { - "assignments": [51695], + "assignments": [50167], "declarations": [ { "constant": false, - "id": 51695, + "id": 50167, "mutability": "mutable", "name": "_borrowedAmount", - "nameLocation": "5112:15:53", + "nameLocation": "5035:15:47", "nodeType": "VariableDeclaration", - "scope": 51739, - "src": "5104:23:53", + "scope": 50231, + "src": "5027:23:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4700,10 +4661,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51694, + "id": 50166, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5104:7:53", + "src": "5027:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4712,13 +4673,13 @@ "visibility": "internal" } ], - "id": 51703, + "id": 50175, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51702, + "id": 50174, "isConstant": false, "isLValue": false, "isPure": false, @@ -4728,34 +4689,34 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51700, + "id": 50172, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { - "id": 51696, + "id": 50168, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51641, - "src": "5130:6:53", + "referencedDeclaration": 50111, + "src": "5053:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "id": 51697, + "id": 50169, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "5137:14:53", + "memberLocation": "5060:14:47", "memberName": "borrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 49439, - "src": "5130:21:53", + "referencedDeclaration": 46139, + "src": "5053:21:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4765,33 +4726,33 @@ "operator": "+", "rightExpression": { "expression": { - "id": 51698, + "id": 50170, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51641, - "src": "5154:6:53", + "referencedDeclaration": 50111, + "src": "5077:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "id": 51699, + "id": 50171, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "5161:11:53", + "memberLocation": "5084:11:47", "memberName": "accruedFees", "nodeType": "MemberAccess", - "referencedDeclaration": 49441, - "src": "5154:18:53", + "referencedDeclaration": 46141, + "src": "5077:18:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5130:42:53", + "src": "5053:42:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4800,38 +4761,38 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "id": 51701, + "id": 50173, "name": "_currentAccruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51687, - "src": "5175:19:53", + "referencedDeclaration": 50159, + "src": "5098:19:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5130:64:53", + "src": "5053:64:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "5104:90:53" + "src": "5027:90:47" }, { - "assignments": [51705], + "assignments": [50177], "declarations": [ { "constant": false, - "id": 51705, + "id": 50177, "mutability": "mutable", "name": "maxBorrowableAmount", - "nameLocation": "5212:19:53", + "nameLocation": "5135:19:47", "nodeType": "VariableDeclaration", - "scope": 51739, - "src": "5205:26:53", + "scope": 50231, + "src": "5128:26:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4839,10 +4800,10 @@ "typeString": "int256" }, "typeName": { - "id": 51704, + "id": 50176, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "5205:6:53", + "src": "5128:6:47", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -4851,13 +4812,13 @@ "visibility": "internal" } ], - "id": 51715, + "id": 50187, "initialValue": { "commonType": { "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 51714, + "id": 50186, "isConstant": false, "isLValue": false, "isPure": false, @@ -4865,12 +4826,12 @@ "leftExpression": { "arguments": [ { - "id": 51708, + "id": 50180, "name": "_adjustedCollateralValueInCurrency", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51677, - "src": "5241:34:53", + "referencedDeclaration": 50149, + "src": "5164:34:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4884,26 +4845,26 @@ "typeString": "uint256" } ], - "id": 51707, + "id": 50179, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5234:6:53", + "src": "5157:6:47", "typeDescriptions": { "typeIdentifier": "t_type$_t_int256_$", "typeString": "type(int256)" }, "typeName": { - "id": 51706, + "id": 50178, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "5234:6:53", + "src": "5157:6:47", "typeDescriptions": {} } }, - "id": 51709, + "id": 50181, "isConstant": false, "isLValue": false, "isPure": false, @@ -4912,7 +4873,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5234:42:53", + "src": "5157:42:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_int256", @@ -4924,12 +4885,12 @@ "rightExpression": { "arguments": [ { - "id": 51712, + "id": 50184, "name": "_borrowedAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51695, - "src": "5286:15:53", + "referencedDeclaration": 50167, + "src": "5209:15:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4943,26 +4904,26 @@ "typeString": "uint256" } ], - "id": 51711, + "id": 50183, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5279:6:53", + "src": "5202:6:47", "typeDescriptions": { "typeIdentifier": "t_type$_t_int256_$", "typeString": "type(int256)" }, "typeName": { - "id": 51710, + "id": 50182, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "5279:6:53", + "src": "5202:6:47", "typeDescriptions": {} } }, - "id": 51713, + "id": 50185, "isConstant": false, "isLValue": false, "isPure": false, @@ -4971,21 +4932,21 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5279:23:53", + "src": "5202:23:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "5234:68:53", + "src": "5157:68:47", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "VariableDeclarationStatement", - "src": "5205:97:53" + "src": "5128:97:47" }, { "condition": { @@ -4993,7 +4954,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 51726, + "id": 50198, "isConstant": false, "isLValue": false, "isPure": false, @@ -5003,18 +4964,18 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 51718, + "id": 50190, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 51716, + "id": 50188, "name": "maxBorrowableAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51705, - "src": "5522:19:53", + "referencedDeclaration": 50177, + "src": "5445:19:47", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -5024,21 +4985,21 @@ "operator": ">", "rightExpression": { "hexValue": "30", - "id": 51717, + "id": 50189, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5544:1:53", + "src": "5467:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "5522:23:53", + "src": "5445:23:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5051,34 +5012,34 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51725, + "id": 50197, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { - "id": 51719, + "id": 50191, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51652, - "src": "5549:11:53", + "referencedDeclaration": 50122, + "src": "5472:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 51720, + "id": 50192, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "5561:11:53", + "memberLocation": "5484:11:47", "memberName": "debtCeiling", "nodeType": "MemberAccess", - "referencedDeclaration": 49428, - "src": "5549:23:53", + "referencedDeclaration": 46130, + "src": "5472:23:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5089,12 +5050,12 @@ "rightExpression": { "arguments": [ { - "id": 51723, + "id": 50195, "name": "maxBorrowableAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51705, - "src": "5583:19:53", + "referencedDeclaration": 50177, + "src": "5506:19:47", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -5108,26 +5069,26 @@ "typeString": "int256" } ], - "id": 51722, + "id": 50194, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5575:7:53", + "src": "5498:7:47", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { - "id": 51721, + "id": 50193, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5575:7:53", + "src": "5498:7:47", "typeDescriptions": {} } }, - "id": 51724, + "id": 50196, "isConstant": false, "isLValue": false, "isPure": false, @@ -5136,206 +5097,477 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5575:28:53", + "src": "5498:28:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5549:54:53", + "src": "5472:54:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "5522:81:53", + "src": "5445:81:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 51736, + "id": 50228, "nodeType": "IfStatement", - "src": "5518:278:53", + "src": "5441:392:47", "trueBody": { - "id": 51735, + "id": 50227, "nodeType": "Block", - "src": "5605:191:53", + "src": "5528:305:47", "statements": [ { - "expression": { - "id": 51733, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 50209, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftHandSide": { - "id": 51727, - "name": "maxBorrowableAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 51705, - "src": "5732:19:53", + "leftExpression": { + "expression": { + "id": 50199, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50122, + "src": "5546:11:47", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", + "typeString": "struct IVault.CollateralInfo memory" + } + }, + "id": 50200, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5558:11:47", + "memberName": "debtCeiling", + "nodeType": "MemberAccess", + "referencedDeclaration": 46130, + "src": "5546:23:47", "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { "arguments": [ { "expression": { - "id": 51730, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 51652, - "src": "5761:11:53", + "arguments": [ + { + "id": 50205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5585:6:47", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 50204, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "5585:6:47", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + } + ], + "id": 50203, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "5580:4:47", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 50206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5580:12:47", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", - "typeString": "struct IVault.CollateralInfo memory" + "typeIdentifier": "t_magic_meta_type_t_int256", + "typeString": "type(int256)" } }, - "id": 51731, + "id": 50207, "isConstant": false, - "isLValue": true, - "isPure": false, + "isLValue": false, + "isPure": true, "lValueRequested": false, - "memberLocation": "5773:11:53", - "memberName": "debtCeiling", + "memberLocation": "5593:3:47", + "memberName": "max", "nodeType": "MemberAccess", - "referencedDeclaration": 49428, - "src": "5761:23:53", + "src": "5580:16:47", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_int256", + "typeString": "int256" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_int256", + "typeString": "int256" } ], - "id": 51729, + "id": 50202, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5754:6:53", + "src": "5572:7:47", "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" }, "typeName": { - "id": 51728, - "name": "int256", + "id": 50201, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5754:6:53", + "src": "5572:7:47", "typeDescriptions": {} } }, - "id": 51732, + "id": 50208, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "5754:31:53", + "src": "5572:25:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "src": "5732:53:53", + "src": "5546:51:47", "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 51734, - "nodeType": "ExpressionStatement", - "src": "5732:53:53" - } - ] - } - }, - { - "expression": { - "id": 51737, - "name": "maxBorrowableAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 51705, - "src": "6046:19:53", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "functionReturnParameters": 51636, - "id": 51738, - "nodeType": "Return", - "src": "6039:26:53" - } - ] - }, - "documentation": { - "id": 51624, - "nodeType": "StructuredDocumentation", - "src": "3751:389:53", - "text": " @dev returns the max amount of currency a vault owner can mint for that vault without the tx reverting due to the vault's health factor falling below the min health factor\n @dev if it's a negative number then the vault is below the min health factor already and paying back the additive inverse of the result will pay back both borrowed amount and interest accrued" - }, - "functionSelector": "c03d8871", - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getMaxBorrowable", - "nameLocation": "4154:16:53", - "parameters": { - "id": 51633, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 51627, - "mutability": "mutable", - "name": "_vaultContract", - "nameLocation": "4177:14:53", - "nodeType": "VariableDeclaration", - "scope": 51740, - "src": "4171:20:53", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", - "typeString": "contract Vault" - }, - "typeName": { - "id": 51626, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 51625, - "name": "Vault", - "nameLocations": ["4171:5:53"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 51097, - "src": "4171:5:53" - }, - "referencedDeclaration": 51097, - "src": "4171:5:53", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "falseBody": { + "expression": { + "id": 50224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 50218, + "name": "maxBorrowableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50177, + "src": "5769:19:47", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 50221, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50122, + "src": "5798:11:47", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", + "typeString": "struct IVault.CollateralInfo memory" + } + }, + "id": 50222, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5810:11:47", + "memberName": "debtCeiling", + "nodeType": "MemberAccess", + "referencedDeclaration": 46130, + "src": "5798:23:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 50220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5791:6:47", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 50219, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "5791:6:47", + "typeDescriptions": {} + } + }, + "id": 50223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5791:31:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5769:53:47", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 50225, + "nodeType": "ExpressionStatement", + "src": "5769:53:47" + }, + "id": 50226, + "nodeType": "IfStatement", + "src": "5542:280:47", + "trueBody": { + "expression": { + "id": 50216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 50210, + "name": "maxBorrowableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50177, + "src": "5599:19:47", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "arguments": [ + { + "id": 50213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5626:6:47", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 50212, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "5626:6:47", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + } + ], + "id": 50211, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "5621:4:47", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 50214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5621:12:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_int256", + "typeString": "type(int256)" + } + }, + "id": 50215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5634:3:47", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "5621:16:47", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5599:38:47", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 50217, + "nodeType": "ExpressionStatement", + "src": "5599:38:47" + } + } + ] + } + }, + { + "expression": { + "id": 50229, + "name": "maxBorrowableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50177, + "src": "6083:19:47", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 50106, + "id": 50230, + "nodeType": "Return", + "src": "6076:26:47" + } + ] + }, + "documentation": { + "id": 50094, + "nodeType": "StructuredDocumentation", + "src": "3649:389:47", + "text": " @dev returns the max amount of currency a vault owner can mint for that vault without the tx reverting due to the vault's health factor falling below the min health factor\n @dev if it's a negative number then the vault is below the min health factor already and paying back the additive inverse of the result will pay back both borrowed amount and interest accrued" + }, + "functionSelector": "c03d8871", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMaxBorrowable", + "nameLocation": "4052:16:47", + "parameters": { + "id": 50103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 50097, + "mutability": "mutable", + "name": "_vaultContract", + "nameLocation": "4075:14:47", + "nodeType": "VariableDeclaration", + "scope": 50232, + "src": "4069:20:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48108", + "typeString": "contract Vault" + }, + "typeName": { + "id": 50096, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 50095, + "name": "Vault", + "nameLocations": ["4069:5:47"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48108, + "src": "4069:5:47" + }, + "referencedDeclaration": 48108, + "src": "4069:5:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, @@ -5343,48 +5575,48 @@ }, { "constant": false, - "id": 51630, + "id": 50100, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "4199:16:53", + "nameLocation": "4102:16:47", "nodeType": "VariableDeclaration", - "scope": 51740, - "src": "4193:22:53", + "scope": 50232, + "src": "4091:27:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 51629, + "id": 50099, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51628, - "name": "ERC20", - "nameLocations": ["4193:5:53"], + "id": 50098, + "name": "ERC20Token", + "nameLocations": ["4091:10:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 45675, - "src": "4193:5:53" + "referencedDeclaration": 46273, + "src": "4091:10:47" }, - "referencedDeclaration": 45675, - "src": "4193:5:53", + "referencedDeclaration": 46273, + "src": "4091:10:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 51632, + "id": 50102, "mutability": "mutable", "name": "_owner", - "nameLocation": "4225:6:53", + "nameLocation": "4128:6:47", "nodeType": "VariableDeclaration", - "scope": 51740, - "src": "4217:14:53", + "scope": 50232, + "src": "4120:14:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5392,10 +5624,10 @@ "typeString": "address" }, "typeName": { - "id": 51631, + "id": 50101, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4217:7:53", + "src": "4120:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -5405,21 +5637,21 @@ "visibility": "internal" } ], - "src": "4170:62:53" + "src": "4068:67:47" }, "returnParameters": { - "id": 51636, + "id": 50106, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51635, + "id": 50105, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51740, - "src": "4280:6:53", + "scope": 50232, + "src": "4183:6:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5427,10 +5659,10 @@ "typeString": "int256" }, "typeName": { - "id": 51634, + "id": 50104, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "4280:6:53", + "src": "4183:6:47", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -5439,97 +5671,97 @@ "visibility": "internal" } ], - "src": "4279:8:53" + "src": "4182:8:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "view", "virtual": false, "visibility": "external" }, { - "id": 51829, + "id": 50323, "nodeType": "FunctionDefinition", - "src": "6652:1200:53", + "src": "6689:1225:47", "nodes": [], "body": { - "id": 51828, + "id": 50322, "nodeType": "Block", - "src": "6801:1051:53", + "src": "6843:1071:47", "nodes": [], "statements": [ { - "assignments": [51758], + "assignments": [50250], "declarations": [ { "constant": false, - "id": 51758, + "id": 50250, "mutability": "mutable", "name": "_vault", - "nameLocation": "6835:6:53", + "nameLocation": "6877:6:47", "nodeType": "VariableDeclaration", - "scope": 51828, - "src": "6811:30:53", + "scope": 50322, + "src": "6853:30:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 51757, + "id": 50249, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51756, + "id": 50248, "name": "IVault.VaultInfo", - "nameLocations": ["6811:6:53", "6818:9:53"], + "nameLocations": ["6853:6:47", "6860:9:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49444, - "src": "6811:16:53" + "referencedDeclaration": 46144, + "src": "6853:16:47" }, - "referencedDeclaration": 49444, - "src": "6811:16:53", + "referencedDeclaration": 46144, + "src": "6853:16:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "id": 51764, + "id": 50256, "initialValue": { "arguments": [ { - "id": 51760, + "id": 50252, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51744, - "src": "6861:14:53", + "referencedDeclaration": 50236, + "src": "6903:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51761, + "id": 50253, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51747, - "src": "6877:16:53", + "referencedDeclaration": 50239, + "src": "6919:16:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } }, { - "id": 51762, + "id": 50254, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51749, - "src": "6895:6:53", + "referencedDeclaration": 50241, + "src": "6937:6:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5539,30 +5771,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" }, { "typeIdentifier": "t_address", "typeString": "address" } ], - "id": 51759, + "id": 50251, "name": "_getVaultMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51437, - "src": "6844:16:53", + "referencedDeclaration": 49909, + "src": "6886:16:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_contract$_ERC20_$45675_$_t_address_$returns$_t_struct$_VaultInfo_$49444_memory_ptr_$", - "typeString": "function (contract Vault,contract ERC20,address) view returns (struct IVault.VaultInfo memory)" + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_contract$_ERC20Token_$46273_$_t_address_$returns$_t_struct$_VaultInfo_$46144_memory_ptr_$", + "typeString": "function (contract Vault,contract ERC20Token,address) view returns (struct IVault.VaultInfo memory)" } }, - "id": 51763, + "id": 50255, "isConstant": false, "isLValue": false, "isPure": false, @@ -5571,106 +5803,106 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "6844:58:53", + "src": "6886:58:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "6811:91:53" + "src": "6853:91:47" }, { - "assignments": [51769], + "assignments": [50261], "declarations": [ { "constant": false, - "id": 51769, + "id": 50261, "mutability": "mutable", "name": "_collateral", - "nameLocation": "6941:11:53", + "nameLocation": "6983:11:47", "nodeType": "VariableDeclaration", - "scope": 51828, - "src": "6912:40:53", + "scope": 50322, + "src": "6954:40:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 51768, + "id": 50260, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51767, + "id": 50259, "name": "IVault.CollateralInfo", - "nameLocations": ["6912:6:53", "6919:14:53"], + "nameLocations": ["6954:6:47", "6961:14:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49435, - "src": "6912:21:53" + "referencedDeclaration": 46135, + "src": "6954:21:47" }, - "referencedDeclaration": 49435, - "src": "6912:21:53", + "referencedDeclaration": 46135, + "src": "6954:21:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, "visibility": "internal" } ], - "id": 51774, + "id": 50266, "initialValue": { "arguments": [ { - "id": 51771, + "id": 50263, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51744, - "src": "6977:14:53", + "referencedDeclaration": 50236, + "src": "7019:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51772, + "id": 50264, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51747, - "src": "6993:16:53", + "referencedDeclaration": 50239, + "src": "7035:16:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } ], - "id": 51770, + "id": 50262, "name": "_getCollateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51520, - "src": "6955:21:53", + "referencedDeclaration": 49986, + "src": "6997:21:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_contract$_ERC20_$45675_$returns$_t_struct$_CollateralInfo_$49435_memory_ptr_$", - "typeString": "function (contract Vault,contract ERC20) view returns (struct IVault.CollateralInfo memory)" + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_contract$_ERC20Token_$46273_$returns$_t_struct$_CollateralInfo_$46135_memory_ptr_$", + "typeString": "function (contract Vault,contract ERC20Token) view returns (struct IVault.CollateralInfo memory)" } }, - "id": 51773, + "id": 50265, "isConstant": false, "isLValue": false, "isPure": false, @@ -5679,98 +5911,133 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "6955:55:53", + "src": "6997:55:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "6912:98:53" + "src": "6954:98:47" }, { "condition": { - "id": 51777, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 50271, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "7025:19:53", - "subExpression": { + "leftExpression": { "expression": { - "id": 51775, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 51769, - "src": "7026:11:53", + "expression": { + "id": 50267, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50261, + "src": "7067:11:47", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", + "typeString": "struct IVault.CollateralInfo memory" + } + }, + "id": 50268, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7079:8:47", + "memberName": "rateInfo", + "nodeType": "MemberAccess", + "referencedDeclaration": 46126, + "src": "7067:20:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", - "typeString": "struct IVault.CollateralInfo memory" + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", + "typeString": "struct IVault.RateInfo memory" } }, - "id": 51776, + "id": 50269, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "7038:6:53", - "memberName": "exists", + "memberLocation": "7088:4:47", + "memberName": "rate", "nodeType": "MemberAccess", - "referencedDeclaration": 49434, - "src": "7026:18:53", + "referencedDeclaration": 46110, + "src": "7067:25:47", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 50270, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7096:1:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7067:30:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 51780, + "id": 50274, "nodeType": "IfStatement", - "src": "7021:33:53", + "src": "7063:44:47", "trueBody": { "expression": { "hexValue": "30", - "id": 51778, + "id": 50272, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7053:1:53", + "src": "7106:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "functionReturnParameters": 51753, - "id": 51779, + "functionReturnParameters": 50245, + "id": 50273, "nodeType": "Return", - "src": "7046:8:53" + "src": "7099:8:47" } }, { - "assignments": [51782, null], + "assignments": [50276, null], "declarations": [ { "constant": false, - "id": 51782, + "id": 50276, "mutability": "mutable", "name": "_currentAccruedFees", - "nameLocation": "7110:19:53", + "nameLocation": "7163:19:47", "nodeType": "VariableDeclaration", - "scope": 51828, - "src": "7102:27:53", + "scope": 50322, + "src": "7155:27:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5778,10 +6045,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51781, + "id": 50275, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "7102:7:53", + "src": "7155:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5791,42 +6058,42 @@ }, null ], - "id": 51788, + "id": 50282, "initialValue": { "arguments": [ { - "id": 51784, + "id": 50278, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51744, - "src": "7156:14:53", + "referencedDeclaration": 50236, + "src": "7209:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51785, + "id": 50279, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51769, - "src": "7172:11:53", + "referencedDeclaration": 50261, + "src": "7225:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, { - "id": 51786, + "id": 50280, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51758, - "src": "7185:6:53", + "referencedDeclaration": 50250, + "src": "7238:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } } @@ -5834,30 +6101,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" }, { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } ], - "id": 51783, + "id": 50277, "name": "_calculateAccruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52149, - "src": "7134:21:53", + "referencedDeclaration": 50656, + "src": "7187:21:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_struct$_CollateralInfo_$49435_memory_ptr_$_t_struct$_VaultInfo_$49444_memory_ptr_$returns$_t_uint256_$_t_uint256_$", + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_struct$_CollateralInfo_$46135_memory_ptr_$_t_struct$_VaultInfo_$46144_memory_ptr_$returns$_t_uint256_$_t_uint256_$", "typeString": "function (contract Vault,struct IVault.CollateralInfo memory,struct IVault.VaultInfo memory) view returns (uint256,uint256)" } }, - "id": 51787, + "id": 50281, "isConstant": false, "isLValue": false, "isPure": false, @@ -5866,7 +6133,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "7134:58:53", + "src": "7187:58:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", @@ -5874,20 +6141,20 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "7101:91:53" + "src": "7154:91:47" }, { - "assignments": [51790], + "assignments": [50284], "declarations": [ { "constant": false, - "id": 51790, + "id": 50284, "mutability": "mutable", "name": "_borrowedAmount", - "nameLocation": "7210:15:53", + "nameLocation": "7263:15:47", "nodeType": "VariableDeclaration", - "scope": 51828, - "src": "7202:23:53", + "scope": 50322, + "src": "7255:23:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5895,10 +6162,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51789, + "id": 50283, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "7202:7:53", + "src": "7255:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5907,13 +6174,13 @@ "visibility": "internal" } ], - "id": 51798, + "id": 50292, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51797, + "id": 50291, "isConstant": false, "isLValue": false, "isPure": false, @@ -5923,34 +6190,34 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51795, + "id": 50289, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { - "id": 51791, + "id": 50285, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51758, - "src": "7228:6:53", + "referencedDeclaration": 50250, + "src": "7281:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "id": 51792, + "id": 50286, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "7235:14:53", + "memberLocation": "7288:14:47", "memberName": "borrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 49439, - "src": "7228:21:53", + "referencedDeclaration": 46139, + "src": "7281:21:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5960,33 +6227,33 @@ "operator": "+", "rightExpression": { "expression": { - "id": 51793, + "id": 50287, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51758, - "src": "7252:6:53", + "referencedDeclaration": 50250, + "src": "7305:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "id": 51794, + "id": 50288, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "7259:11:53", + "memberLocation": "7312:11:47", "memberName": "accruedFees", "nodeType": "MemberAccess", - "referencedDeclaration": 49441, - "src": "7252:18:53", + "referencedDeclaration": 46141, + "src": "7305:18:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7228:42:53", + "src": "7281:42:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5995,38 +6262,38 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "id": 51796, + "id": 50290, "name": "_currentAccruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51782, - "src": "7273:19:53", + "referencedDeclaration": 50276, + "src": "7326:19:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7228:64:53", + "src": "7281:64:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "7202:90:53" + "src": "7255:90:47" }, { - "assignments": [51800], + "assignments": [50294], "declarations": [ { "constant": false, - "id": 51800, + "id": 50294, "mutability": "mutable", "name": "_collateralAmountFromCurrencyValue", - "nameLocation": "7367:34:53", + "nameLocation": "7420:34:47", "nodeType": "VariableDeclaration", - "scope": 51828, - "src": "7359:42:53", + "scope": 50322, + "src": "7412:42:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6034,10 +6301,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51799, + "id": 50293, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "7359:7:53", + "src": "7412:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6046,28 +6313,28 @@ "visibility": "internal" } ], - "id": 51805, + "id": 50299, "initialValue": { "arguments": [ { - "id": 51802, + "id": 50296, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51769, - "src": "7442:11:53", + "referencedDeclaration": 50261, + "src": "7495:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, { - "id": 51803, + "id": 50297, "name": "_borrowedAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51790, - "src": "7455:15:53", + "referencedDeclaration": 50284, + "src": "7508:15:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6077,7 +6344,7 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" }, { @@ -6085,18 +6352,18 @@ "typeString": "uint256" } ], - "id": 51801, + "id": 50295, "name": "_getCollateralAmountFromCurrencyValue", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52106, - "src": "7404:37:53", + "referencedDeclaration": 50607, + "src": "7457:37:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_struct$_CollateralInfo_$49435_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeIdentifier": "t_function_internal_pure$_t_struct$_CollateralInfo_$46135_memory_ptr_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (struct IVault.CollateralInfo memory,uint256) pure returns (uint256)" } }, - "id": 51804, + "id": 50298, "isConstant": false, "isLValue": false, "isPure": false, @@ -6105,7 +6372,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "7404:67:53", + "src": "7457:67:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -6113,20 +6380,20 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "7359:112:53" + "src": "7412:112:47" }, { - "assignments": [51807], + "assignments": [50301], "declarations": [ { "constant": false, - "id": 51807, + "id": 50301, "mutability": "mutable", "name": "_adjustedCollateralAmountFromCurrencyValue", - "nameLocation": "7530:42:53", + "nameLocation": "7583:42:47", "nodeType": "VariableDeclaration", - "scope": 51828, - "src": "7522:50:53", + "scope": 50322, + "src": "7575:50:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6134,10 +6401,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51806, + "id": 50300, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "7522:7:53", + "src": "7575:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6146,7 +6413,7 @@ "visibility": "internal" } ], - "id": 51816, + "id": 50310, "initialValue": { "arguments": [ { @@ -6156,18 +6423,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51811, + "id": 50305, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 51809, + "id": 50303, "name": "_collateralAmountFromCurrencyValue", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51800, - "src": "7595:34:53", + "referencedDeclaration": 50294, + "src": "7648:34:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6176,32 +6443,32 @@ "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { - "id": 51810, - "name": "PRECISION", + "id": 50304, + "name": "HUNDRED_PERCENTAGE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51397, - "src": "7632:9:53", + "referencedDeclaration": 49869, + "src": "7685:18:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7595:46:53", + "src": "7648:55:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 51812, + "id": 50306, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "7594:48:53", + "src": "7647:57:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6209,27 +6476,27 @@ }, { "expression": { - "id": 51813, + "id": 50307, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51769, - "src": "7644:11:53", + "referencedDeclaration": 50261, + "src": "7706:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 51814, + "id": 50308, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "7656:20:53", + "memberLocation": "7718:20:47", "memberName": "liquidationThreshold", "nodeType": "MemberAccess", - "referencedDeclaration": 49417, - "src": "7644:32:53", + "referencedDeclaration": 46121, + "src": "7706:32:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6247,18 +6514,18 @@ "typeString": "uint256" } ], - "id": 51808, + "id": 50302, "name": "_divUp", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52266, - "src": "7587:6:53", + "referencedDeclaration": 50773, + "src": "7640:6:47", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 51815, + "id": 50309, "isConstant": false, "isLValue": false, "isPure": false, @@ -6267,7 +6534,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "7587:90:53", + "src": "7640:99:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -6275,7 +6542,7 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "7522:155:53" + "src": "7575:164:47" }, { "expression": { @@ -6283,7 +6550,7 @@ "typeIdentifier": "t_int256", "typeString": "int256" }, - "id": 51826, + "id": 50320, "isConstant": false, "isLValue": false, "isPure": false, @@ -6292,27 +6559,27 @@ "arguments": [ { "expression": { - "id": 51819, + "id": 50313, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51758, - "src": "7765:6:53", + "referencedDeclaration": 50250, + "src": "7827:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "id": 51820, + "id": 50314, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "7772:19:53", + "memberLocation": "7834:19:47", "memberName": "depositedCollateral", "nodeType": "MemberAccess", - "referencedDeclaration": 49437, - "src": "7765:26:53", + "referencedDeclaration": 46137, + "src": "7827:26:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6326,26 +6593,26 @@ "typeString": "uint256" } ], - "id": 51818, + "id": 50312, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "7758:6:53", + "src": "7820:6:47", "typeDescriptions": { "typeIdentifier": "t_type$_t_int256_$", "typeString": "type(int256)" }, "typeName": { - "id": 51817, + "id": 50311, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "7758:6:53", + "src": "7820:6:47", "typeDescriptions": {} } }, - "id": 51821, + "id": 50315, "isConstant": false, "isLValue": false, "isPure": false, @@ -6354,7 +6621,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "7758:34:53", + "src": "7820:34:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_int256", @@ -6366,12 +6633,12 @@ "rightExpression": { "arguments": [ { - "id": 51824, + "id": 50318, "name": "_adjustedCollateralAmountFromCurrencyValue", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51807, - "src": "7802:42:53", + "referencedDeclaration": 50301, + "src": "7864:42:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6385,26 +6652,26 @@ "typeString": "uint256" } ], - "id": 51823, + "id": 50317, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "7795:6:53", + "src": "7857:6:47", "typeDescriptions": { "typeIdentifier": "t_type$_t_int256_$", "typeString": "type(int256)" }, "typeName": { - "id": 51822, + "id": 50316, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "7795:6:53", + "src": "7857:6:47", "typeDescriptions": {} } }, - "id": 51825, + "id": 50319, "isConstant": false, "isLValue": false, "isPure": false, @@ -6413,30 +6680,30 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "7795:50:53", + "src": "7857:50:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "src": "7758:87:53", + "src": "7820:87:47", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, - "functionReturnParameters": 51753, - "id": 51827, + "functionReturnParameters": 50245, + "id": 50321, "nodeType": "Return", - "src": "7751:94:53" + "src": "7813:94:47" } ] }, "documentation": { - "id": 51741, + "id": 50233, "nodeType": "StructuredDocumentation", - "src": "6078:569:53", + "src": "6115:569:47", "text": " @dev returns the max amount of collateral a vault owner can withdraw from a vault without the tx reverting due to the vault's health factor falling below the min health factor\n @dev if it's a negative number then the vault is below the min health factor already and depositing the additive inverse will put the position at the min health factor saving it from liquidation.\n @dev the recommended way to do this is to burn/pay back the additive inverse of the result of `getMaxBorrowable()` that way interest would not accrue after payment." }, "functionSelector": "a6e91adf", @@ -6444,41 +6711,41 @@ "kind": "function", "modifiers": [], "name": "getMaxWithdrawable", - "nameLocation": "6661:18:53", + "nameLocation": "6698:18:47", "parameters": { - "id": 51750, + "id": 50242, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51744, + "id": 50236, "mutability": "mutable", "name": "_vaultContract", - "nameLocation": "6686:14:53", + "nameLocation": "6723:14:47", "nodeType": "VariableDeclaration", - "scope": 51829, - "src": "6680:20:53", + "scope": 50323, + "src": "6717:20:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, "typeName": { - "id": 51743, + "id": 50235, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51742, + "id": 50234, "name": "Vault", - "nameLocations": ["6680:5:53"], + "nameLocations": ["6717:5:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 51097, - "src": "6680:5:53" + "referencedDeclaration": 48108, + "src": "6717:5:47" }, - "referencedDeclaration": 51097, - "src": "6680:5:53", + "referencedDeclaration": 48108, + "src": "6717:5:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, @@ -6486,48 +6753,48 @@ }, { "constant": false, - "id": 51747, + "id": 50239, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "6708:16:53", + "nameLocation": "6750:16:47", "nodeType": "VariableDeclaration", - "scope": 51829, - "src": "6702:22:53", + "scope": 50323, + "src": "6739:27:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 51746, + "id": 50238, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51745, - "name": "ERC20", - "nameLocations": ["6702:5:53"], + "id": 50237, + "name": "ERC20Token", + "nameLocations": ["6739:10:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 45675, - "src": "6702:5:53" + "referencedDeclaration": 46273, + "src": "6739:10:47" }, - "referencedDeclaration": 45675, - "src": "6702:5:53", + "referencedDeclaration": 46273, + "src": "6739:10:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 51749, + "id": 50241, "mutability": "mutable", "name": "_owner", - "nameLocation": "6734:6:53", + "nameLocation": "6776:6:47", "nodeType": "VariableDeclaration", - "scope": 51829, - "src": "6726:14:53", + "scope": 50323, + "src": "6768:14:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6535,10 +6802,10 @@ "typeString": "address" }, "typeName": { - "id": 51748, + "id": 50240, "name": "address", "nodeType": "ElementaryTypeName", - "src": "6726:7:53", + "src": "6768:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -6548,21 +6815,21 @@ "visibility": "internal" } ], - "src": "6679:62:53" + "src": "6716:67:47" }, "returnParameters": { - "id": 51753, + "id": 50245, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51752, + "id": 50244, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51829, - "src": "6789:6:53", + "scope": 50323, + "src": "6831:6:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6570,10 +6837,10 @@ "typeString": "int256" }, "typeName": { - "id": 51751, + "id": 50243, "name": "int256", "nodeType": "ElementaryTypeName", - "src": "6789:6:53", + "src": "6831:6:47", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" @@ -6582,97 +6849,97 @@ "visibility": "internal" } ], - "src": "6788:8:53" + "src": "6830:8:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "view", "virtual": false, "visibility": "external" }, { - "id": 51891, + "id": 50385, "nodeType": "FunctionDefinition", - "src": "8089:667:53", + "src": "8151:672:47", "nodes": [], "body": { - "id": 51890, + "id": 50384, "nodeType": "Block", - "src": "8247:509:53", + "src": "8314:509:47", "nodes": [], "statements": [ { - "assignments": [51851], + "assignments": [50345], "declarations": [ { "constant": false, - "id": 51851, + "id": 50345, "mutability": "mutable", "name": "_vault", - "nameLocation": "8281:6:53", + "nameLocation": "8348:6:47", "nodeType": "VariableDeclaration", - "scope": 51890, - "src": "8257:30:53", + "scope": 50384, + "src": "8324:30:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 51850, + "id": 50344, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51849, + "id": 50343, "name": "IVault.VaultInfo", - "nameLocations": ["8257:6:53", "8264:9:53"], + "nameLocations": ["8324:6:47", "8331:9:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49444, - "src": "8257:16:53" + "referencedDeclaration": 46144, + "src": "8324:16:47" }, - "referencedDeclaration": 49444, - "src": "8257:16:53", + "referencedDeclaration": 46144, + "src": "8324:16:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "id": 51857, + "id": 50351, "initialValue": { "arguments": [ { - "id": 51853, + "id": 50347, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51833, - "src": "8307:14:53", + "referencedDeclaration": 50327, + "src": "8374:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51854, + "id": 50348, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51836, - "src": "8323:16:53", + "referencedDeclaration": 50330, + "src": "8390:16:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } }, { - "id": 51855, + "id": 50349, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51838, - "src": "8341:6:53", + "referencedDeclaration": 50332, + "src": "8408:6:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -6682,30 +6949,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" }, { "typeIdentifier": "t_address", "typeString": "address" } ], - "id": 51852, + "id": 50346, "name": "_getVaultMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51437, - "src": "8290:16:53", + "referencedDeclaration": 49909, + "src": "8357:16:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_contract$_ERC20_$45675_$_t_address_$returns$_t_struct$_VaultInfo_$49444_memory_ptr_$", - "typeString": "function (contract Vault,contract ERC20,address) view returns (struct IVault.VaultInfo memory)" + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_contract$_ERC20Token_$46273_$_t_address_$returns$_t_struct$_VaultInfo_$46144_memory_ptr_$", + "typeString": "function (contract Vault,contract ERC20Token,address) view returns (struct IVault.VaultInfo memory)" } }, - "id": 51856, + "id": 50350, "isConstant": false, "isLValue": false, "isPure": false, @@ -6714,106 +6981,106 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "8290:58:53", + "src": "8357:58:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "8257:91:53" + "src": "8324:91:47" }, { - "assignments": [51862], + "assignments": [50356], "declarations": [ { "constant": false, - "id": 51862, + "id": 50356, "mutability": "mutable", "name": "_collateral", - "nameLocation": "8387:11:53", + "nameLocation": "8454:11:47", "nodeType": "VariableDeclaration", - "scope": 51890, - "src": "8358:40:53", + "scope": 50384, + "src": "8425:40:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 51861, + "id": 50355, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51860, + "id": 50354, "name": "IVault.CollateralInfo", - "nameLocations": ["8358:6:53", "8365:14:53"], + "nameLocations": ["8425:6:47", "8432:14:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49435, - "src": "8358:21:53" + "referencedDeclaration": 46135, + "src": "8425:21:47" }, - "referencedDeclaration": 49435, - "src": "8358:21:53", + "referencedDeclaration": 46135, + "src": "8425:21:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, "visibility": "internal" } ], - "id": 51867, + "id": 50361, "initialValue": { "arguments": [ { - "id": 51864, + "id": 50358, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51833, - "src": "8423:14:53", + "referencedDeclaration": 50327, + "src": "8490:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51865, + "id": 50359, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51836, - "src": "8439:16:53", + "referencedDeclaration": 50330, + "src": "8506:16:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } ], - "id": 51863, + "id": 50357, "name": "_getCollateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51520, - "src": "8401:21:53", + "referencedDeclaration": 49986, + "src": "8468:21:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_contract$_ERC20_$45675_$returns$_t_struct$_CollateralInfo_$49435_memory_ptr_$", - "typeString": "function (contract Vault,contract ERC20) view returns (struct IVault.CollateralInfo memory)" + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_contract$_ERC20Token_$46273_$returns$_t_struct$_CollateralInfo_$46135_memory_ptr_$", + "typeString": "function (contract Vault,contract ERC20Token) view returns (struct IVault.CollateralInfo memory)" } }, - "id": 51866, + "id": 50360, "isConstant": false, "isLValue": false, "isPure": false, @@ -6822,28 +7089,28 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "8401:55:53", + "src": "8468:55:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "8358:98:53" + "src": "8425:98:47" }, { - "assignments": [51869, null], + "assignments": [50363, null], "declarations": [ { "constant": false, - "id": 51869, + "id": 50363, "mutability": "mutable", "name": "_currentAccruedFees", - "nameLocation": "8511:19:53", + "nameLocation": "8578:19:47", "nodeType": "VariableDeclaration", - "scope": 51890, - "src": "8503:27:53", + "scope": 50384, + "src": "8570:27:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6851,10 +7118,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51868, + "id": 50362, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8503:7:53", + "src": "8570:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6864,42 +7131,42 @@ }, null ], - "id": 51875, + "id": 50369, "initialValue": { "arguments": [ { - "id": 51871, + "id": 50365, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51833, - "src": "8557:14:53", + "referencedDeclaration": 50327, + "src": "8624:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51872, + "id": 50366, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51862, - "src": "8573:11:53", + "referencedDeclaration": 50356, + "src": "8640:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, { - "id": 51873, + "id": 50367, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51851, - "src": "8586:6:53", + "referencedDeclaration": 50345, + "src": "8653:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } } @@ -6907,30 +7174,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" }, { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } ], - "id": 51870, + "id": 50364, "name": "_calculateAccruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52149, - "src": "8535:21:53", + "referencedDeclaration": 50656, + "src": "8602:21:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_struct$_CollateralInfo_$49435_memory_ptr_$_t_struct$_VaultInfo_$49444_memory_ptr_$returns$_t_uint256_$_t_uint256_$", + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_struct$_CollateralInfo_$46135_memory_ptr_$_t_struct$_VaultInfo_$46144_memory_ptr_$returns$_t_uint256_$_t_uint256_$", "typeString": "function (contract Vault,struct IVault.CollateralInfo memory,struct IVault.VaultInfo memory) view returns (uint256,uint256)" } }, - "id": 51874, + "id": 50368, "isConstant": false, "isLValue": false, "isPure": false, @@ -6939,7 +7206,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "8535:58:53", + "src": "8602:58:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", @@ -6947,20 +7214,20 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "8502:91:53" + "src": "8569:91:47" }, { - "assignments": [51877], + "assignments": [50371], "declarations": [ { "constant": false, - "id": 51877, + "id": 50371, "mutability": "mutable", "name": "_accruedFees", - "nameLocation": "8611:12:53", + "nameLocation": "8678:12:47", "nodeType": "VariableDeclaration", - "scope": 51890, - "src": "8603:20:53", + "scope": 50384, + "src": "8670:20:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6968,10 +7235,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51876, + "id": 50370, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8603:7:53", + "src": "8670:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6980,40 +7247,40 @@ "visibility": "internal" } ], - "id": 51882, + "id": 50376, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51881, + "id": 50375, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { - "id": 51878, + "id": 50372, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51851, - "src": "8626:6:53", + "referencedDeclaration": 50345, + "src": "8693:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "id": 51879, + "id": 50373, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "8633:11:53", + "memberLocation": "8700:11:47", "memberName": "accruedFees", "nodeType": "MemberAccess", - "referencedDeclaration": 49441, - "src": "8626:18:53", + "referencedDeclaration": 46141, + "src": "8693:18:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7022,52 +7289,52 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "id": 51880, + "id": 50374, "name": "_currentAccruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51869, - "src": "8647:19:53", + "referencedDeclaration": 50363, + "src": "8714:19:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8626:40:53", + "src": "8693:40:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "8603:63:53" + "src": "8670:63:47" }, { "expression": { "components": [ { "expression": { - "id": 51883, + "id": 50377, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51851, - "src": "8685:6:53", + "referencedDeclaration": 50345, + "src": "8752:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "id": 51884, + "id": 50378, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "8692:19:53", + "memberLocation": "8759:19:47", "memberName": "depositedCollateral", "nodeType": "MemberAccess", - "referencedDeclaration": 49437, - "src": "8685:26:53", + "referencedDeclaration": 46137, + "src": "8752:26:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7075,69 +7342,69 @@ }, { "expression": { - "id": 51885, + "id": 50379, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51851, - "src": "8713:6:53", + "referencedDeclaration": 50345, + "src": "8780:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "id": 51886, + "id": 50380, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "8720:14:53", + "memberLocation": "8787:14:47", "memberName": "borrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 49439, - "src": "8713:21:53", + "referencedDeclaration": 46139, + "src": "8780:21:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51887, + "id": 50381, "name": "_accruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51877, - "src": "8736:12:53", + "referencedDeclaration": 50371, + "src": "8803:12:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 51888, + "id": 50382, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "8684:65:53", + "src": "8751:65:47", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256,uint256)" } }, - "functionReturnParameters": 51846, - "id": 51889, + "functionReturnParameters": 50340, + "id": 50383, "nodeType": "Return", - "src": "8677:72:53" + "src": "8744:72:47" } ] }, "documentation": { - "id": 51830, + "id": 50324, "nodeType": "StructuredDocumentation", - "src": "7858:226:53", + "src": "7920:226:47", "text": " @dev returns a vault's relevant info i.e the depositedCollateral, borrowedAmount, and updated accruedFees\n @dev recommended to read the accrued fees from here as it'll be updated before being returned." }, "functionSelector": "347c5d43", @@ -7145,41 +7412,41 @@ "kind": "function", "modifiers": [], "name": "getVault", - "nameLocation": "8098:8:53", + "nameLocation": "8160:8:47", "parameters": { - "id": 51839, + "id": 50333, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51833, + "id": 50327, "mutability": "mutable", "name": "_vaultContract", - "nameLocation": "8113:14:53", + "nameLocation": "8175:14:47", "nodeType": "VariableDeclaration", - "scope": 51891, - "src": "8107:20:53", + "scope": 50385, + "src": "8169:20:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, "typeName": { - "id": 51832, + "id": 50326, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51831, + "id": 50325, "name": "Vault", - "nameLocations": ["8107:5:53"], + "nameLocations": ["8169:5:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 51097, - "src": "8107:5:53" + "referencedDeclaration": 48108, + "src": "8169:5:47" }, - "referencedDeclaration": 51097, - "src": "8107:5:53", + "referencedDeclaration": 48108, + "src": "8169:5:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, @@ -7187,48 +7454,48 @@ }, { "constant": false, - "id": 51836, + "id": 50330, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "8135:16:53", + "nameLocation": "8202:16:47", "nodeType": "VariableDeclaration", - "scope": 51891, - "src": "8129:22:53", + "scope": 50385, + "src": "8191:27:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 51835, + "id": 50329, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51834, - "name": "ERC20", - "nameLocations": ["8129:5:53"], + "id": 50328, + "name": "ERC20Token", + "nameLocations": ["8191:10:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 45675, - "src": "8129:5:53" + "referencedDeclaration": 46273, + "src": "8191:10:47" }, - "referencedDeclaration": 45675, - "src": "8129:5:53", + "referencedDeclaration": 46273, + "src": "8191:10:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } }, "visibility": "internal" }, { "constant": false, - "id": 51838, + "id": 50332, "mutability": "mutable", "name": "_owner", - "nameLocation": "8161:6:53", + "nameLocation": "8228:6:47", "nodeType": "VariableDeclaration", - "scope": 51891, - "src": "8153:14:53", + "scope": 50385, + "src": "8220:14:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7236,10 +7503,10 @@ "typeString": "address" }, "typeName": { - "id": 51837, + "id": 50331, "name": "address", "nodeType": "ElementaryTypeName", - "src": "8153:7:53", + "src": "8220:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -7249,21 +7516,21 @@ "visibility": "internal" } ], - "src": "8106:62:53" + "src": "8168:67:47" }, "returnParameters": { - "id": 51846, + "id": 50340, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51841, + "id": 50335, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51891, - "src": "8216:7:53", + "scope": 50385, + "src": "8283:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7271,10 +7538,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51840, + "id": 50334, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8216:7:53", + "src": "8283:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7284,13 +7551,13 @@ }, { "constant": false, - "id": 51843, + "id": 50337, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51891, - "src": "8225:7:53", + "scope": 50385, + "src": "8292:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7298,10 +7565,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51842, + "id": 50336, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8225:7:53", + "src": "8292:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7311,13 +7578,13 @@ }, { "constant": false, - "id": 51845, + "id": 50339, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51891, - "src": "8234:7:53", + "scope": 50385, + "src": "8301:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7325,10 +7592,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51844, + "id": 50338, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8234:7:53", + "src": "8301:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7337,114 +7604,114 @@ "visibility": "internal" } ], - "src": "8215:27:53" + "src": "8282:27:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "view", "virtual": false, "visibility": "external" }, { - "id": 51966, + "id": 50460, "nodeType": "FunctionDefinition", - "src": "8835:820:53", + "src": "8902:825:47", "nodes": [], "body": { - "id": 51965, + "id": 50459, "nodeType": "Block", - "src": "9022:633:53", + "src": "9094:633:47", "nodes": [], "statements": [ { - "assignments": [51919], + "assignments": [50413], "declarations": [ { "constant": false, - "id": 51919, + "id": 50413, "mutability": "mutable", "name": "_collateral", - "nameLocation": "9061:11:53", + "nameLocation": "9133:11:47", "nodeType": "VariableDeclaration", - "scope": 51965, - "src": "9032:40:53", + "scope": 50459, + "src": "9104:40:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 51918, + "id": 50412, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51917, + "id": 50411, "name": "IVault.CollateralInfo", - "nameLocations": ["9032:6:53", "9039:14:53"], + "nameLocations": ["9104:6:47", "9111:14:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49435, - "src": "9032:21:53" + "referencedDeclaration": 46135, + "src": "9104:21:47" }, - "referencedDeclaration": 49435, - "src": "9032:21:53", + "referencedDeclaration": 46135, + "src": "9104:21:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, "visibility": "internal" } ], - "id": 51924, + "id": 50418, "initialValue": { "arguments": [ { - "id": 51921, + "id": 50415, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51895, - "src": "9097:14:53", + "referencedDeclaration": 50389, + "src": "9169:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 51922, + "id": 50416, "name": "_collateralToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51898, - "src": "9113:16:53", + "referencedDeclaration": 50392, + "src": "9185:16:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } ], - "id": 51920, + "id": 50414, "name": "_getCollateralMapping", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51520, - "src": "9075:21:53", + "referencedDeclaration": 49986, + "src": "9147:21:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_contract$_ERC20_$45675_$returns$_t_struct$_CollateralInfo_$49435_memory_ptr_$", - "typeString": "function (contract Vault,contract ERC20) view returns (struct IVault.CollateralInfo memory)" + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_contract$_ERC20Token_$46273_$returns$_t_struct$_CollateralInfo_$46135_memory_ptr_$", + "typeString": "function (contract Vault,contract ERC20Token) view returns (struct IVault.CollateralInfo memory)" } }, - "id": 51923, + "id": 50417, "isConstant": false, "isLValue": false, "isPure": false, @@ -7453,67 +7720,67 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "9075:55:53", + "src": "9147:55:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "9032:98:53" + "src": "9104:98:47" }, { - "assignments": [51929], + "assignments": [50423], "declarations": [ { "constant": false, - "id": 51929, + "id": 50423, "mutability": "mutable", "name": "_baseRateInfo", - "nameLocation": "9164:13:53", + "nameLocation": "9236:13:47", "nodeType": "VariableDeclaration", - "scope": 51965, - "src": "9141:36:53", + "scope": 50459, + "src": "9213:36:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo" }, "typeName": { - "id": 51928, + "id": 50422, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51927, + "id": 50421, "name": "IVault.RateInfo", - "nameLocations": ["9141:6:53", "9148:8:53"], + "nameLocations": ["9213:6:47", "9220:8:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49411, - "src": "9141:15:53" + "referencedDeclaration": 46115, + "src": "9213:15:47" }, - "referencedDeclaration": 49411, - "src": "9141:15:53", + "referencedDeclaration": 46115, + "src": "9213:15:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_storage_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_storage_ptr", "typeString": "struct IVault.RateInfo" } }, "visibility": "internal" } ], - "id": 51933, + "id": 50427, "initialValue": { "arguments": [ { - "id": 51931, + "id": 50425, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51895, - "src": "9197:14:53", + "referencedDeclaration": 50389, + "src": "9269:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } } @@ -7521,22 +7788,22 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } ], - "id": 51930, + "id": 50424, "name": "_getBaseRateInfo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51464, - "src": "9180:16:53", + "referencedDeclaration": 49936, + "src": "9252:16:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$returns$_t_struct$_RateInfo_$49411_memory_ptr_$", + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$returns$_t_struct$_RateInfo_$46115_memory_ptr_$", "typeString": "function (contract Vault) view returns (struct IVault.RateInfo memory)" } }, - "id": 51932, + "id": 50426, "isConstant": false, "isLValue": false, "isPure": false, @@ -7545,28 +7812,28 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "9180:32:53", + "src": "9252:32:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "9141:71:53" + "src": "9213:71:47" }, { - "assignments": [51935], + "assignments": [50429], "declarations": [ { "constant": false, - "id": 51935, + "id": 50429, "mutability": "mutable", "name": "_rate", - "nameLocation": "9230:5:53", + "nameLocation": "9302:5:47", "nodeType": "VariableDeclaration", - "scope": 51965, - "src": "9222:13:53", + "scope": 50459, + "src": "9294:13:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7574,10 +7841,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51934, + "id": 50428, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "9222:7:53", + "src": "9294:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7586,13 +7853,13 @@ "visibility": "internal" } ], - "id": 51945, + "id": 50439, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51944, + "id": 50438, "isConstant": false, "isLValue": false, "isPure": false, @@ -7604,7 +7871,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 51941, + "id": 50435, "isConstant": false, "isLValue": false, "isPure": false, @@ -7612,42 +7879,42 @@ "leftExpression": { "expression": { "expression": { - "id": 51936, + "id": 50430, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51919, - "src": "9239:11:53", + "referencedDeclaration": 50413, + "src": "9311:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 51937, + "id": 50431, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "9251:8:53", + "memberLocation": "9323:8:47", "memberName": "rateInfo", "nodeType": "MemberAccess", - "referencedDeclaration": 49422, - "src": "9239:20:53", + "referencedDeclaration": 46126, + "src": "9311:20:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo memory" } }, - "id": 51938, + "id": 50432, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "9260:4:53", + "memberLocation": "9332:4:47", "memberName": "rate", "nodeType": "MemberAccess", - "referencedDeclaration": 49406, - "src": "9239:25:53", + "referencedDeclaration": 46110, + "src": "9311:25:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7657,47 +7924,47 @@ "operator": "+", "rightExpression": { "expression": { - "id": 51939, + "id": 50433, "name": "_baseRateInfo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51929, - "src": "9267:13:53", + "referencedDeclaration": 50423, + "src": "9339:13:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo memory" } }, - "id": 51940, + "id": 50434, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "9281:4:53", + "memberLocation": "9353:4:47", "memberName": "rate", "nodeType": "MemberAccess", - "referencedDeclaration": 49406, - "src": "9267:18:53", + "referencedDeclaration": 46110, + "src": "9339:18:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "9239:46:53", + "src": "9311:46:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 51942, + "id": 50436, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "9238:48:53", + "src": "9310:48:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7707,14 +7974,14 @@ "operator": "*", "rightExpression": { "hexValue": "333635", - "id": 51943, + "id": 50437, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "9289:8:53", + "src": "9361:8:47", "subdenomination": "days", "typeDescriptions": { "typeIdentifier": "t_rational_31536000_by_1", @@ -7722,27 +7989,27 @@ }, "value": "365" }, - "src": "9238:59:53", + "src": "9310:59:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "9222:75:53" + "src": "9294:75:47" }, { - "assignments": [51947], + "assignments": [50441], "declarations": [ { "constant": false, - "id": 51947, + "id": 50441, "mutability": "mutable", "name": "_minDeposit", - "nameLocation": "9315:11:53", + "nameLocation": "9387:11:47", "nodeType": "VariableDeclaration", - "scope": 51965, - "src": "9307:19:53", + "scope": 50459, + "src": "9379:19:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7750,10 +8017,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51946, + "id": 50440, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "9307:7:53", + "src": "9379:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7762,64 +8029,64 @@ "visibility": "internal" } ], - "id": 51950, + "id": 50444, "initialValue": { "expression": { - "id": 51948, + "id": 50442, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51919, - "src": "9329:11:53", + "referencedDeclaration": 50413, + "src": "9401:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 51949, + "id": 50443, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "9341:26:53", + "memberLocation": "9413:26:47", "memberName": "collateralFloorPerPosition", "nodeType": "MemberAccess", - "referencedDeclaration": 49430, - "src": "9329:38:53", + "referencedDeclaration": 46132, + "src": "9401:38:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "9307:60:53" + "src": "9379:60:47" }, { "expression": { "components": [ { "expression": { - "id": 51951, + "id": 50445, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51919, - "src": "9399:11:53", + "referencedDeclaration": 50413, + "src": "9471:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 51952, + "id": 50446, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "9411:24:53", + "memberLocation": "9483:24:47", "memberName": "totalDepositedCollateral", "nodeType": "MemberAccess", - "referencedDeclaration": 49413, - "src": "9399:36:53", + "referencedDeclaration": 46117, + "src": "9471:36:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7827,27 +8094,27 @@ }, { "expression": { - "id": 51953, + "id": 50447, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51919, - "src": "9449:11:53", + "referencedDeclaration": 50413, + "src": "9521:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 51954, + "id": 50448, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "9461:19:53", + "memberLocation": "9533:19:47", "memberName": "totalBorrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 49415, - "src": "9449:31:53", + "referencedDeclaration": 46119, + "src": "9521:31:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7855,27 +8122,27 @@ }, { "expression": { - "id": 51955, + "id": 50449, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51919, - "src": "9494:11:53", + "referencedDeclaration": 50413, + "src": "9566:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 51956, + "id": 50450, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "9506:20:53", + "memberLocation": "9578:20:47", "memberName": "liquidationThreshold", "nodeType": "MemberAccess", - "referencedDeclaration": 49417, - "src": "9494:32:53", + "referencedDeclaration": 46121, + "src": "9566:32:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7883,51 +8150,51 @@ }, { "expression": { - "id": 51957, + "id": 50451, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51919, - "src": "9540:11:53", + "referencedDeclaration": 50413, + "src": "9612:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 51958, + "id": 50452, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "9552:11:53", + "memberLocation": "9624:11:47", "memberName": "debtCeiling", "nodeType": "MemberAccess", - "referencedDeclaration": 49428, - "src": "9540:23:53", + "referencedDeclaration": 46130, + "src": "9612:23:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51959, + "id": 50453, "name": "_rate", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51935, - "src": "9577:5:53", + "referencedDeclaration": 50429, + "src": "9649:5:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 51960, + "id": 50454, "name": "_minDeposit", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51947, - "src": "9596:11:53", + "referencedDeclaration": 50441, + "src": "9668:11:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7935,57 +8202,57 @@ }, { "expression": { - "id": 51961, + "id": 50455, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51919, - "src": "9621:11:53", + "referencedDeclaration": 50413, + "src": "9693:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 51962, + "id": 50456, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "9633:5:53", + "memberLocation": "9705:5:47", "memberName": "price", "nodeType": "MemberAccess", - "referencedDeclaration": 49426, - "src": "9621:17:53", + "referencedDeclaration": 46128, + "src": "9693:17:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 51963, + "id": 50457, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "9385:263:53", + "src": "9457:263:47", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256,uint256,uint256,uint256,uint256,uint256)" } }, - "functionReturnParameters": 51914, - "id": 51964, + "functionReturnParameters": 50408, + "id": 50458, "nodeType": "Return", - "src": "9378:270:53" + "src": "9450:270:47" } ] }, "documentation": { - "id": 51892, + "id": 50386, "nodeType": "StructuredDocumentation", - "src": "8762:68:53", + "src": "8829:68:47", "text": " @dev returns a the relevant info for a collateral" }, "functionSelector": "5d242b97", @@ -7993,41 +8260,41 @@ "kind": "function", "modifiers": [], "name": "getCollateralInfo", - "nameLocation": "8844:17:53", + "nameLocation": "8911:17:47", "parameters": { - "id": 51899, + "id": 50393, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51895, + "id": 50389, "mutability": "mutable", "name": "_vaultContract", - "nameLocation": "8868:14:53", + "nameLocation": "8935:14:47", "nodeType": "VariableDeclaration", - "scope": 51966, - "src": "8862:20:53", + "scope": 50460, + "src": "8929:20:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, "typeName": { - "id": 51894, + "id": 50388, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51893, + "id": 50387, "name": "Vault", - "nameLocations": ["8862:5:53"], + "nameLocations": ["8929:5:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 51097, - "src": "8862:5:53" + "referencedDeclaration": 48108, + "src": "8929:5:47" }, - "referencedDeclaration": 51097, - "src": "8862:5:53", + "referencedDeclaration": 48108, + "src": "8929:5:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, @@ -8035,55 +8302,55 @@ }, { "constant": false, - "id": 51898, + "id": 50392, "mutability": "mutable", "name": "_collateralToken", - "nameLocation": "8890:16:53", + "nameLocation": "8962:16:47", "nodeType": "VariableDeclaration", - "scope": 51966, - "src": "8884:22:53", + "scope": 50460, + "src": "8951:27:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" }, "typeName": { - "id": 51897, + "id": 50391, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51896, - "name": "ERC20", - "nameLocations": ["8884:5:53"], + "id": 50390, + "name": "ERC20Token", + "nameLocations": ["8951:10:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 45675, - "src": "8884:5:53" + "referencedDeclaration": 46273, + "src": "8951:10:47" }, - "referencedDeclaration": 45675, - "src": "8884:5:53", + "referencedDeclaration": 46273, + "src": "8951:10:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45675", - "typeString": "contract ERC20" + "typeIdentifier": "t_contract$_ERC20Token_$46273", + "typeString": "contract ERC20Token" } }, "visibility": "internal" } ], - "src": "8861:46:53" + "src": "8928:51:47" }, "returnParameters": { - "id": 51914, + "id": 50408, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51901, + "id": 50395, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51966, - "src": "8955:7:53", + "scope": 50460, + "src": "9027:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8091,10 +8358,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51900, + "id": 50394, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8955:7:53", + "src": "9027:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8104,13 +8371,13 @@ }, { "constant": false, - "id": 51903, + "id": 50397, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51966, - "src": "8964:7:53", + "scope": 50460, + "src": "9036:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8118,10 +8385,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51902, + "id": 50396, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8964:7:53", + "src": "9036:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8131,13 +8398,13 @@ }, { "constant": false, - "id": 51905, + "id": 50399, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51966, - "src": "8973:7:53", + "scope": 50460, + "src": "9045:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8145,10 +8412,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51904, + "id": 50398, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8973:7:53", + "src": "9045:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8158,13 +8425,13 @@ }, { "constant": false, - "id": 51907, + "id": 50401, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51966, - "src": "8982:7:53", + "scope": 50460, + "src": "9054:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8172,10 +8439,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51906, + "id": 50400, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8982:7:53", + "src": "9054:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8185,13 +8452,13 @@ }, { "constant": false, - "id": 51909, + "id": 50403, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51966, - "src": "8991:7:53", + "scope": 50460, + "src": "9063:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8199,10 +8466,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51908, + "id": 50402, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8991:7:53", + "src": "9063:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8212,13 +8479,13 @@ }, { "constant": false, - "id": 51911, + "id": 50405, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51966, - "src": "9000:7:53", + "scope": 50460, + "src": "9072:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8226,10 +8493,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51910, + "id": 50404, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "9000:7:53", + "src": "9072:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8239,13 +8506,13 @@ }, { "constant": false, - "id": 51913, + "id": 50407, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51966, - "src": "9009:7:53", + "scope": 50460, + "src": "9081:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8253,10 +8520,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51912, + "id": 50406, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "9009:7:53", + "src": "9081:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8265,46 +8532,46 @@ "visibility": "internal" } ], - "src": "8954:63:53" + "src": "9026:63:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "view", "virtual": false, "visibility": "external" }, { - "id": 51986, + "id": 50480, "nodeType": "FunctionDefinition", - "src": "9780:181:53", + "src": "9852:181:47", "nodes": [], "body": { - "id": 51985, + "id": 50479, "nodeType": "Block", - "src": "9890:71:53", + "src": "9962:71:47", "nodes": [], "statements": [ { "expression": { "arguments": [ { - "id": 51981, + "id": 50475, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51972, - "src": "9934:6:53", + "referencedDeclaration": 50466, + "src": "10006:6:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 51982, + "id": 50476, "name": "_reliedUpon", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51974, - "src": "9942:11:53", + "referencedDeclaration": 50468, + "src": "10014:11:47", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -8323,33 +8590,33 @@ } ], "expression": { - "id": 51979, + "id": 50473, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51970, - "src": "9907:14:53", + "referencedDeclaration": 50464, + "src": "9979:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, - "id": 51980, + "id": 50474, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "9922:11:53", + "memberLocation": "9994:11:47", "memberName": "relyMapping", "nodeType": "MemberAccess", - "referencedDeclaration": 49526, - "src": "9907:26:53", + "referencedDeclaration": 46571, + "src": "9979:26:47", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_bool_$", "typeString": "function (address,address) view external returns (bool)" } }, - "id": 51983, + "id": 50477, "isConstant": false, "isLValue": false, "isPure": false, @@ -8358,24 +8625,24 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "9907:47:53", + "src": "9979:47:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 51978, - "id": 51984, + "functionReturnParameters": 50472, + "id": 50478, "nodeType": "Return", - "src": "9900:54:53" + "src": "9972:54:47" } ] }, "documentation": { - "id": 51967, + "id": 50461, "nodeType": "StructuredDocumentation", - "src": "9661:114:53", + "src": "9733:114:47", "text": " @dev returns if _owner has approved _reliedUpon to interact with _owner's vault on their behalf" }, "functionSelector": "b09758f0", @@ -8383,41 +8650,41 @@ "kind": "function", "modifiers": [], "name": "isReliedUpon", - "nameLocation": "9789:12:53", + "nameLocation": "9861:12:47", "parameters": { - "id": 51975, + "id": 50469, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51970, + "id": 50464, "mutability": "mutable", "name": "_vaultContract", - "nameLocation": "9808:14:53", + "nameLocation": "9880:14:47", "nodeType": "VariableDeclaration", - "scope": 51986, - "src": "9802:20:53", + "scope": 50480, + "src": "9874:20:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, "typeName": { - "id": 51969, + "id": 50463, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51968, + "id": 50462, "name": "Vault", - "nameLocations": ["9802:5:53"], + "nameLocations": ["9874:5:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 51097, - "src": "9802:5:53" + "referencedDeclaration": 48108, + "src": "9874:5:47" }, - "referencedDeclaration": 51097, - "src": "9802:5:53", + "referencedDeclaration": 48108, + "src": "9874:5:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, @@ -8425,13 +8692,13 @@ }, { "constant": false, - "id": 51972, + "id": 50466, "mutability": "mutable", "name": "_owner", - "nameLocation": "9832:6:53", + "nameLocation": "9904:6:47", "nodeType": "VariableDeclaration", - "scope": 51986, - "src": "9824:14:53", + "scope": 50480, + "src": "9896:14:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8439,10 +8706,10 @@ "typeString": "address" }, "typeName": { - "id": 51971, + "id": 50465, "name": "address", "nodeType": "ElementaryTypeName", - "src": "9824:7:53", + "src": "9896:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -8453,13 +8720,13 @@ }, { "constant": false, - "id": 51974, + "id": 50468, "mutability": "mutable", "name": "_reliedUpon", - "nameLocation": "9848:11:53", + "nameLocation": "9920:11:47", "nodeType": "VariableDeclaration", - "scope": 51986, - "src": "9840:19:53", + "scope": 50480, + "src": "9912:19:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8467,10 +8734,10 @@ "typeString": "address" }, "typeName": { - "id": 51973, + "id": 50467, "name": "address", "nodeType": "ElementaryTypeName", - "src": "9840:7:53", + "src": "9912:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -8480,21 +8747,21 @@ "visibility": "internal" } ], - "src": "9801:59:53" + "src": "9873:59:47" }, "returnParameters": { - "id": 51978, + "id": 50472, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51977, + "id": 50471, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 51986, - "src": "9884:4:53", + "scope": 50480, + "src": "9956:4:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8502,10 +8769,10 @@ "typeString": "bool" }, "typeName": { - "id": 51976, + "id": 50470, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "9884:4:53", + "src": "9956:4:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -8514,36 +8781,36 @@ "visibility": "internal" } ], - "src": "9883:6:53" + "src": "9955:6:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "view", "virtual": false, "visibility": "external" }, { - "id": 52041, + "id": 50546, "nodeType": "FunctionDefinition", - "src": "10235:1132:53", + "src": "10307:1407:47", "nodes": [], "body": { - "id": 52040, + "id": 50545, "nodeType": "Block", - "src": "10422:945:53", + "src": "10494:1220:47", "nodes": [], "statements": [ { - "assignments": [52002, null], + "assignments": [50496, null], "declarations": [ { "constant": false, - "id": 52002, + "id": 50496, "mutability": "mutable", "name": "_unaccountedAccruedFees", - "nameLocation": "10787:23:53", + "nameLocation": "10859:23:47", "nodeType": "VariableDeclaration", - "scope": 52040, - "src": "10779:31:53", + "scope": 50545, + "src": "10851:31:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8551,10 +8818,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52001, + "id": 50495, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "10779:7:53", + "src": "10851:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8564,42 +8831,42 @@ }, null ], - "id": 52008, + "id": 50502, "initialValue": { "arguments": [ { - "id": 52004, + "id": 50498, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51990, - "src": "10837:14:53", + "referencedDeclaration": 50484, + "src": "10909:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, { - "id": 52005, + "id": 50499, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51993, - "src": "10853:11:53", + "referencedDeclaration": 50487, + "src": "10925:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, { - "id": 52006, + "id": 50500, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51996, - "src": "10866:6:53", + "referencedDeclaration": 50490, + "src": "10938:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } } @@ -8607,30 +8874,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" }, { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } ], - "id": 52003, + "id": 50497, "name": "_calculateAccruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52149, - "src": "10815:21:53", + "referencedDeclaration": 50656, + "src": "10887:21:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_struct$_CollateralInfo_$49435_memory_ptr_$_t_struct$_VaultInfo_$49444_memory_ptr_$returns$_t_uint256_$_t_uint256_$", + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$_t_struct$_CollateralInfo_$46135_memory_ptr_$_t_struct$_VaultInfo_$46144_memory_ptr_$returns$_t_uint256_$_t_uint256_$", "typeString": "function (contract Vault,struct IVault.CollateralInfo memory,struct IVault.VaultInfo memory) view returns (uint256,uint256)" } }, - "id": 52007, + "id": 50501, "isConstant": false, "isLValue": false, "isPure": false, @@ -8639,7 +8906,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "10815:58:53", + "src": "10887:58:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", @@ -8647,20 +8914,20 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "10778:95:53" + "src": "10850:95:47" }, { - "assignments": [52010], + "assignments": [50504], "declarations": [ { "constant": false, - "id": 52010, + "id": 50504, "mutability": "mutable", "name": "_totalUserDebt", - "nameLocation": "10891:14:53", + "nameLocation": "10963:14:47", "nodeType": "VariableDeclaration", - "scope": 52040, - "src": "10883:22:53", + "scope": 50545, + "src": "10955:22:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8668,10 +8935,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52009, + "id": 50503, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "10883:7:53", + "src": "10955:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8680,13 +8947,13 @@ "visibility": "internal" } ], - "id": 52018, + "id": 50512, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52017, + "id": 50511, "isConstant": false, "isLValue": false, "isPure": false, @@ -8696,34 +8963,34 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52015, + "id": 50509, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { - "id": 52011, + "id": 50505, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51996, - "src": "10908:6:53", + "referencedDeclaration": 50490, + "src": "10980:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "id": 52012, + "id": 50506, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "10915:14:53", + "memberLocation": "10987:14:47", "memberName": "borrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 49439, - "src": "10908:21:53", + "referencedDeclaration": 46139, + "src": "10980:21:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8733,33 +9000,33 @@ "operator": "+", "rightExpression": { "expression": { - "id": 52013, + "id": 50507, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51996, - "src": "10932:6:53", + "referencedDeclaration": 50490, + "src": "11004:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "id": 52014, + "id": 50508, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "10939:11:53", + "memberLocation": "11011:11:47", "memberName": "accruedFees", "nodeType": "MemberAccess", - "referencedDeclaration": 49441, - "src": "10932:18:53", + "referencedDeclaration": 46141, + "src": "11004:18:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "10908:42:53", + "src": "10980:42:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8768,25 +9035,25 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "id": 52016, + "id": 50510, "name": "_unaccountedAccruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52002, - "src": "10953:23:53", + "referencedDeclaration": 50496, + "src": "11025:23:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "10908:68:53", + "src": "10980:68:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "10883:93:53" + "src": "10955:93:47" }, { "condition": { @@ -8794,18 +9061,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52021, + "id": 50515, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 52019, + "id": 50513, "name": "_totalUserDebt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52010, - "src": "10990:14:53", + "referencedDeclaration": 50504, + "src": "11102:14:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8815,134 +9082,279 @@ "operator": "==", "rightExpression": { "hexValue": "30", - "id": 52020, + "id": 50514, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "11008:1:53", + "src": "11120:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "10990:19:53", + "src": "11102:19:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 52024, + "id": 50518, "nodeType": "IfStatement", - "src": "10986:33:53", + "src": "11098:33:47", "trueBody": { "expression": { "hexValue": "30", - "id": 52022, + "id": 50516, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "11018:1:53", + "src": "11130:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "functionReturnParameters": 52000, - "id": 52023, + "functionReturnParameters": 50494, + "id": 50517, "nodeType": "Return", - "src": "11011:8:53" + "src": "11123:8:47" } }, { - "assignments": [52026], - "declarations": [ - { - "constant": false, - "id": 52026, - "mutability": "mutable", - "name": "_collateralValueInCurrency", - "nameLocation": "11152:26:53", - "nodeType": "VariableDeclaration", - "scope": 52040, - "src": "11144:34:53", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 52025, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11144:7:53", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 52031, - "initialValue": { - "arguments": [ - { - "id": 52028, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 51993, - "src": "11211:11:53", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", - "typeString": "struct IVault.CollateralInfo memory" - } - }, - { - "id": 52029, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 50522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 50519, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51996, - "src": "11224:6:53", + "referencedDeclaration": 50490, + "src": "11300:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } + }, + "id": 50520, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11307:19:47", + "memberName": "depositedCollateral", + "nodeType": "MemberAccess", + "referencedDeclaration": 46137, + "src": "11300:26:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "expression": { + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 50521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11330:1:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11300:31:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 50529, + "nodeType": "IfStatement", + "src": "11296:61:47", + "trueBody": { + "expression": { + "expression": { + "arguments": [ + { + "id": 50525, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11345:7:47", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 50524, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11345:7:47", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 50523, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "11340:4:47", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 50526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11340:13:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 50527, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11354:3:47", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "11340:17:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 50494, + "id": 50528, + "nodeType": "Return", + "src": "11333:24:47" + } + }, + { + "assignments": [50531], + "declarations": [ + { + "constant": false, + "id": 50531, + "mutability": "mutable", + "name": "_collateralValueInCurrency", + "nameLocation": "11490:26:47", + "nodeType": "VariableDeclaration", + "scope": 50545, + "src": "11482:34:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 50530, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11482:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 50536, + "initialValue": { + "arguments": [ + { + "id": 50533, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50487, + "src": "11549:11:47", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", + "typeString": "struct IVault.CollateralInfo memory" + } + }, + { + "id": 50534, + "name": "_vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50490, + "src": "11562:6:47", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", + "typeString": "struct IVault.VaultInfo memory" + } + } + ], + "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" }, { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } ], - "id": 52027, + "id": 50532, "name": "_getCurrencyValueOfCollateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52072, - "src": "11181:29:53", + "referencedDeclaration": 50577, + "src": "11519:29:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_struct$_CollateralInfo_$49435_memory_ptr_$_t_struct$_VaultInfo_$49444_memory_ptr_$returns$_t_uint256_$", + "typeIdentifier": "t_function_internal_pure$_t_struct$_CollateralInfo_$46135_memory_ptr_$_t_struct$_VaultInfo_$46144_memory_ptr_$returns$_t_uint256_$", "typeString": "function (struct IVault.CollateralInfo memory,struct IVault.VaultInfo memory) pure returns (uint256)" } }, - "id": 52030, + "id": 50535, "isConstant": false, "isLValue": false, "isPure": false, @@ -8951,7 +9363,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "11181:50:53", + "src": "11519:50:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -8959,7 +9371,7 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "11144:87:53" + "src": "11482:87:47" }, { "expression": { @@ -8971,18 +9383,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52035, + "id": 50540, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 52033, + "id": 50538, "name": "_totalUserDebt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52010, - "src": "11304:14:53", + "referencedDeclaration": 50504, + "src": "11642:14:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8991,44 +9403,44 @@ "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { - "id": 52034, - "name": "PRECISION", + "id": 50539, + "name": "HUNDRED_PERCENTAGE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51397, - "src": "11321:9:53", + "referencedDeclaration": 49869, + "src": "11659:18:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "11304:26:53", + "src": "11642:35:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 52036, + "id": 50541, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "11303:28:53", + "src": "11641:37:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 52037, + "id": 50542, "name": "_collateralValueInCurrency", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52026, - "src": "11333:26:53", + "referencedDeclaration": 50531, + "src": "11680:26:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9046,18 +9458,18 @@ "typeString": "uint256" } ], - "id": 52032, + "id": 50537, "name": "_divUp", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52266, - "src": "11296:6:53", + "referencedDeclaration": 50773, + "src": "11634:6:47", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 52038, + "id": 50543, "isConstant": false, "isLValue": false, "isPure": false, @@ -9066,65 +9478,65 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "11296:64:53", + "src": "11634:73:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 52000, - "id": 52039, + "functionReturnParameters": 50494, + "id": 50544, "nodeType": "Return", - "src": "11289:71:53" + "src": "11627:80:47" } ] }, "documentation": { - "id": 51987, + "id": 50481, "nodeType": "StructuredDocumentation", - "src": "10092:138:53", + "src": "10164:138:47", "text": " @dev returns the collateral ratio of a vault where anything below 1e18 is liquidatable\n @dev should never revert!" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_getCollateralRatio", - "nameLocation": "10244:19:53", + "nameLocation": "10316:19:47", "parameters": { - "id": 51997, + "id": 50491, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51990, + "id": 50484, "mutability": "mutable", "name": "_vaultContract", - "nameLocation": "10279:14:53", + "nameLocation": "10351:14:47", "nodeType": "VariableDeclaration", - "scope": 52041, - "src": "10273:20:53", + "scope": 50546, + "src": "10345:20:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, "typeName": { - "id": 51989, + "id": 50483, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51988, + "id": 50482, "name": "Vault", - "nameLocations": ["10273:5:53"], + "nameLocations": ["10345:5:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 51097, - "src": "10273:5:53" + "referencedDeclaration": 48108, + "src": "10345:5:47" }, - "referencedDeclaration": 51097, - "src": "10273:5:53", + "referencedDeclaration": 48108, + "src": "10345:5:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, @@ -9132,34 +9544,34 @@ }, { "constant": false, - "id": 51993, + "id": 50487, "mutability": "mutable", "name": "_collateral", - "nameLocation": "10332:11:53", + "nameLocation": "10404:11:47", "nodeType": "VariableDeclaration", - "scope": 52041, - "src": "10303:40:53", + "scope": 50546, + "src": "10375:40:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 51992, + "id": 50486, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51991, + "id": 50485, "name": "IVault.CollateralInfo", - "nameLocations": ["10303:6:53", "10310:14:53"], + "nameLocations": ["10375:6:47", "10382:14:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49435, - "src": "10303:21:53" + "referencedDeclaration": 46135, + "src": "10375:21:47" }, - "referencedDeclaration": 49435, - "src": "10303:21:53", + "referencedDeclaration": 46135, + "src": "10375:21:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, @@ -9167,55 +9579,55 @@ }, { "constant": false, - "id": 51996, + "id": 50490, "mutability": "mutable", "name": "_vault", - "nameLocation": "10377:6:53", + "nameLocation": "10449:6:47", "nodeType": "VariableDeclaration", - "scope": 52041, - "src": "10353:30:53", + "scope": 50546, + "src": "10425:30:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 51995, + "id": 50489, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 51994, + "id": 50488, "name": "IVault.VaultInfo", - "nameLocations": ["10353:6:53", "10360:9:53"], + "nameLocations": ["10425:6:47", "10432:9:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49444, - "src": "10353:16:53" + "referencedDeclaration": 46144, + "src": "10425:16:47" }, - "referencedDeclaration": 49444, - "src": "10353:16:53", + "referencedDeclaration": 46144, + "src": "10425:16:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "src": "10263:126:53" + "src": "10335:126:47" }, "returnParameters": { - "id": 52000, + "id": 50494, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51999, + "id": 50493, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 52041, - "src": "10413:7:53", + "scope": 50546, + "src": "10485:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9223,10 +9635,10 @@ "typeString": "uint256" }, "typeName": { - "id": 51998, + "id": 50492, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "10413:7:53", + "src": "10485:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9235,36 +9647,36 @@ "visibility": "internal" } ], - "src": "10412:9:53" + "src": "10484:9:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "view", "virtual": false, "visibility": "internal" }, { - "id": 52072, + "id": 50577, "nodeType": "FunctionDefinition", - "src": "11514:446:53", + "src": "11861:446:47", "nodes": [], "body": { - "id": 52071, + "id": 50576, "nodeType": "Block", - "src": "11687:273:53", + "src": "12034:273:47", "nodes": [], "statements": [ { - "assignments": [52054], + "assignments": [50559], "declarations": [ { "constant": false, - "id": 52054, + "id": 50559, "mutability": "mutable", "name": "_currencyValueOfCollateral", - "nameLocation": "11705:26:53", + "nameLocation": "12052:26:47", "nodeType": "VariableDeclaration", - "scope": 52071, - "src": "11697:34:53", + "scope": 50576, + "src": "12044:34:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9272,10 +9684,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52053, + "id": 50558, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "11697:7:53", + "src": "12044:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9284,13 +9696,13 @@ "visibility": "internal" } ], - "id": 52068, + "id": 50573, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52067, + "id": 50572, "isConstant": false, "isLValue": false, "isPure": false, @@ -9302,7 +9714,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52064, + "id": 50569, "isConstant": false, "isLValue": false, "isPure": false, @@ -9312,7 +9724,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52062, + "id": 50567, "isConstant": false, "isLValue": false, "isPure": false, @@ -9320,40 +9732,40 @@ "leftExpression": { "arguments": [ { - "id": 52056, + "id": 50561, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52045, - "src": "11784:11:53", + "referencedDeclaration": 50550, + "src": "12131:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, { "expression": { - "id": 52057, + "id": 50562, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52048, - "src": "11797:6:53", + "referencedDeclaration": 50553, + "src": "12144:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "id": 52058, + "id": 50563, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "11804:19:53", + "memberLocation": "12151:19:47", "memberName": "depositedCollateral", "nodeType": "MemberAccess", - "referencedDeclaration": 49437, - "src": "11797:26:53", + "referencedDeclaration": 46137, + "src": "12144:26:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9363,7 +9775,7 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" }, { @@ -9371,18 +9783,18 @@ "typeString": "uint256" } ], - "id": 52055, + "id": 50560, "name": "_scaleCollateralToExpectedPrecision", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52230, - "src": "11748:35:53", + "referencedDeclaration": 50737, + "src": "12095:35:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_struct$_CollateralInfo_$49435_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeIdentifier": "t_function_internal_pure$_t_struct$_CollateralInfo_$46135_memory_ptr_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (struct IVault.CollateralInfo memory,uint256) pure returns (uint256)" } }, - "id": 52059, + "id": 50564, "isConstant": false, "isLValue": false, "isPure": false, @@ -9391,7 +9803,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "11748:76:53", + "src": "12095:76:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -9402,33 +9814,33 @@ "operator": "*", "rightExpression": { "expression": { - "id": 52060, + "id": 50565, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52045, - "src": "11827:11:53", + "referencedDeclaration": 50550, + "src": "12174:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 52061, + "id": 50566, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "11839:5:53", + "memberLocation": "12186:5:47", "memberName": "price", "nodeType": "MemberAccess", - "referencedDeclaration": 49426, - "src": "11827:17:53", + "referencedDeclaration": 46128, + "src": "12174:17:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "11748:96:53", + "src": "12095:96:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9437,32 +9849,32 @@ "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { - "id": 52063, + "id": 50568, "name": "ADDITIONAL_FEED_PRECISION", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51400, - "src": "11863:25:53", + "referencedDeclaration": 49872, + "src": "12210:25:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "11748:140:53", + "src": "12095:140:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 52065, + "id": 50570, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "11734:164:53", + "src": "12081:164:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9471,91 +9883,91 @@ "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { - "id": 52066, + "id": 50571, "name": "PRECISION", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51397, - "src": "11901:9:53", + "referencedDeclaration": 49861, + "src": "12248:9:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "11734:176:53", + "src": "12081:176:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "11697:213:53" + "src": "12044:213:47" }, { "expression": { - "id": 52069, + "id": 50574, "name": "_currencyValueOfCollateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52054, - "src": "11927:26:53", + "referencedDeclaration": 50559, + "src": "12274:26:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 52052, - "id": 52070, + "functionReturnParameters": 50557, + "id": 50575, "nodeType": "Return", - "src": "11920:33:53" + "src": "12267:33:47" } ] }, "documentation": { - "id": 52042, + "id": 50547, "nodeType": "StructuredDocumentation", - "src": "11373:136:53", + "src": "11720:136:47", "text": " @dev returns the conversion of a vaults deposited collateral to the vault's currency\n @dev should never revert!" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_getCurrencyValueOfCollateral", - "nameLocation": "11523:29:53", + "nameLocation": "11870:29:47", "parameters": { - "id": 52049, + "id": 50554, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 52045, + "id": 50550, "mutability": "mutable", "name": "_collateral", - "nameLocation": "11582:11:53", + "nameLocation": "11929:11:47", "nodeType": "VariableDeclaration", - "scope": 52072, - "src": "11553:40:53", + "scope": 50577, + "src": "11900:40:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 52044, + "id": 50549, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 52043, + "id": 50548, "name": "IVault.CollateralInfo", - "nameLocations": ["11553:6:53", "11560:14:53"], + "nameLocations": ["11900:6:47", "11907:14:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49435, - "src": "11553:21:53" + "referencedDeclaration": 46135, + "src": "11900:21:47" }, - "referencedDeclaration": 49435, - "src": "11553:21:53", + "referencedDeclaration": 46135, + "src": "11900:21:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, @@ -9563,55 +9975,55 @@ }, { "constant": false, - "id": 52048, + "id": 50553, "mutability": "mutable", "name": "_vault", - "nameLocation": "11619:6:53", + "nameLocation": "11966:6:47", "nodeType": "VariableDeclaration", - "scope": 52072, - "src": "11595:30:53", + "scope": 50577, + "src": "11942:30:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 52047, + "id": 50552, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 52046, + "id": 50551, "name": "IVault.VaultInfo", - "nameLocations": ["11595:6:53", "11602:9:53"], + "nameLocations": ["11942:6:47", "11949:9:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49444, - "src": "11595:16:53" + "referencedDeclaration": 46144, + "src": "11942:16:47" }, - "referencedDeclaration": 49444, - "src": "11595:16:53", + "referencedDeclaration": 46144, + "src": "11942:16:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "src": "11552:74:53" + "src": "11899:74:47" }, "returnParameters": { - "id": 52052, + "id": 50557, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 52051, + "id": 50556, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 52072, - "src": "11674:7:53", + "scope": 50577, + "src": "12021:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9619,10 +10031,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52050, + "id": 50555, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "11674:7:53", + "src": "12021:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9631,57 +10043,26 @@ "visibility": "internal" } ], - "src": "11673:9:53" + "src": "12020:9:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { - "id": 52106, + "id": 50607, "nodeType": "FunctionDefinition", - "src": "12107:423:53", + "src": "12454:354:47", "nodes": [], "body": { - "id": 52105, + "id": 50606, "nodeType": "Block", - "src": "12273:257:53", + "src": "12620:188:47", "nodes": [], "statements": [ { - "assignments": [52084], - "declarations": [ - { - "constant": false, - "id": 52084, - "mutability": "mutable", - "name": "_collateralAmountOfCurrencyValue", - "nameLocation": "12291:32:53", - "nodeType": "VariableDeclaration", - "scope": 52105, - "src": "12283:40:53", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 52083, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12283:7:53", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 52096, - "initialValue": { + "expression": { "arguments": [ { "components": [ @@ -9690,18 +10071,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52088, + "id": 50591, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 52086, + "id": 50589, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52078, - "src": "12346:7:53", + "referencedDeclaration": 50583, + "src": "12658:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9710,32 +10091,32 @@ "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { - "id": 52087, + "id": 50590, "name": "PRECISION", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51397, - "src": "12356:9:53", + "referencedDeclaration": 49861, + "src": "12668:9:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "12346:19:53", + "src": "12658:19:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 52089, + "id": 50592, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "12345:21:53", + "src": "12657:21:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9748,34 +10129,64 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52093, + "id": 50602, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "expression": { - "id": 52090, - "name": "_collateral", + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 50596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 50593, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50581, + "src": "12693:11:47", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", + "typeString": "struct IVault.CollateralInfo memory" + } + }, + "id": 50594, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12705:5:47", + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 46128, + "src": "12693:17:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 50595, + "name": "ADDITIONAL_FEED_PRECISION", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52076, - "src": "12369:11:53", + "referencedDeclaration": 49872, + "src": "12713:25:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", - "typeString": "struct IVault.CollateralInfo memory" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 52091, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12381:5:53", - "memberName": "price", - "nodeType": "MemberAccess", - "referencedDeclaration": 49426, - "src": "12369:17:53", + "src": "12693:45:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9784,151 +10195,98 @@ "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { - "id": 52092, - "name": "ADDITIONAL_FEED_PRECISION", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 51400, - "src": "12389:25:53", + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 50600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 50597, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12742:2:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "expression": { + "id": 50598, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50581, + "src": "12748:11:47", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", + "typeString": "struct IVault.CollateralInfo memory" + } + }, + "id": 50599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12760:29:47", + "memberName": "additionalCollateralPrecision", + "nodeType": "MemberAccess", + "referencedDeclaration": 46134, + "src": "12748:41:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12742:47:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 50601, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12741:49:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "12369:45:53", + "src": "12693:97:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 52094, + "id": 50603, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "12368:47:53", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 52085, - "name": "_divUp", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52266, - "src": "12338:6:53", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 52095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "12338:78:53", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12283:133:53" - }, - { - "expression": { - "arguments": [ - { - "id": 52098, - "name": "_collateralAmountOfCurrencyValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52084, - "src": "12441:32:53", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 52102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "hexValue": "3130", - "id": 52099, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12475:2:53", - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "expression": { - "id": 52100, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52076, - "src": "12481:11:53", - "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", - "typeString": "struct IVault.CollateralInfo memory" - } - }, - "id": 52101, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "12493:29:53", - "memberName": "additionalCollateralPrecision", - "nodeType": "MemberAccess", - "referencedDeclaration": 49432, - "src": "12481:41:53", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "12475:47:53", + "src": "12692:99:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9946,18 +10304,18 @@ "typeString": "uint256" } ], - "id": 52097, + "id": 50588, "name": "_divUp", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52266, - "src": "12434:6:53", + "referencedDeclaration": 50773, + "src": "12637:6:47", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 52103, + "id": 50604, "isConstant": false, "isLValue": false, "isPure": false, @@ -9966,65 +10324,65 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "12434:89:53", + "src": "12637:164:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 52082, - "id": 52104, + "functionReturnParameters": 50587, + "id": 50605, "nodeType": "Return", - "src": "12427:96:53" + "src": "12630:171:47" } ] }, "documentation": { - "id": 52073, + "id": 50578, "nodeType": "StructuredDocumentation", - "src": "11966:136:53", + "src": "12313:136:47", "text": " @dev returns the conversion of an amount of currency to a given supported collateral\n @dev should never revert!" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_getCollateralAmountFromCurrencyValue", - "nameLocation": "12116:37:53", + "nameLocation": "12463:37:47", "parameters": { - "id": 52079, + "id": 50584, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 52076, + "id": 50581, "mutability": "mutable", "name": "_collateral", - "nameLocation": "12183:11:53", + "nameLocation": "12530:11:47", "nodeType": "VariableDeclaration", - "scope": 52106, - "src": "12154:40:53", + "scope": 50607, + "src": "12501:40:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 52075, + "id": 50580, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 52074, + "id": 50579, "name": "IVault.CollateralInfo", - "nameLocations": ["12154:6:53", "12161:14:53"], + "nameLocations": ["12501:6:47", "12508:14:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49435, - "src": "12154:21:53" + "referencedDeclaration": 46135, + "src": "12501:21:47" }, - "referencedDeclaration": 49435, - "src": "12154:21:53", + "referencedDeclaration": 46135, + "src": "12501:21:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, @@ -10032,13 +10390,13 @@ }, { "constant": false, - "id": 52078, + "id": 50583, "mutability": "mutable", "name": "_amount", - "nameLocation": "12204:7:53", + "nameLocation": "12551:7:47", "nodeType": "VariableDeclaration", - "scope": 52106, - "src": "12196:15:53", + "scope": 50607, + "src": "12543:15:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -10046,10 +10404,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52077, + "id": 50582, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "12196:7:53", + "src": "12543:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10058,21 +10416,21 @@ "visibility": "internal" } ], - "src": "12153:59:53" + "src": "12500:59:47" }, "returnParameters": { - "id": 52082, + "id": 50587, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 52081, + "id": 50586, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 52106, - "src": "12260:7:53", + "scope": 50607, + "src": "12607:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -10080,10 +10438,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52080, + "id": 50585, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "12260:7:53", + "src": "12607:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10092,36 +10450,36 @@ "visibility": "internal" } ], - "src": "12259:9:53" + "src": "12606:9:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { - "id": 52149, + "id": 50656, "nodeType": "FunctionDefinition", - "src": "12670:530:53", + "src": "12948:625:47", "nodes": [], "body": { - "id": 52148, + "id": 50655, "nodeType": "Block", - "src": "12868:332:53", + "src": "13146:427:47", "nodes": [], "statements": [ { - "assignments": [52124], + "assignments": [50625], "declarations": [ { "constant": false, - "id": 52124, + "id": 50625, "mutability": "mutable", "name": "_totalCurrentAccumulatedRate", - "nameLocation": "12886:28:53", + "nameLocation": "13164:28:47", "nodeType": "VariableDeclaration", - "scope": 52148, - "src": "12878:36:53", + "scope": 50655, + "src": "13156:36:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -10129,10 +10487,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52123, + "id": 50624, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "12878:7:53", + "src": "13156:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10141,57 +10499,161 @@ "visibility": "internal" } ], - "id": 52129, + "id": 50636, "initialValue": { "arguments": [ { - "id": 52126, - "name": "_vaultContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52110, - "src": "12955:14:53", + "arguments": [ + { + "id": 50631, + "name": "_vaultContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50611, + "src": "13290:14:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48108", + "typeString": "contract Vault" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Vault_$48108", + "typeString": "contract Vault" + } + ], + "id": 50630, + "name": "_getBaseRateInfo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 49936, + "src": "13273:16:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$returns$_t_struct$_RateInfo_$46115_memory_ptr_$", + "typeString": "function (contract Vault) view returns (struct IVault.RateInfo memory)" + } + }, + "id": 50632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13273:32:47", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", - "typeString": "contract Vault" + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", + "typeString": "struct IVault.RateInfo memory" } }, { - "id": 52127, - "name": "_collateral", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52113, - "src": "12971:11:53", + "expression": { + "id": 50633, + "name": "_collateral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50614, + "src": "13307:11:47", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", + "typeString": "struct IVault.CollateralInfo memory" + } + }, + "id": 50634, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13319:8:47", + "memberName": "rateInfo", + "nodeType": "MemberAccess", + "referencedDeclaration": 46126, + "src": "13307:20:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", - "typeString": "struct IVault.CollateralInfo memory" + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", + "typeString": "struct IVault.RateInfo memory" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", - "typeString": "contract Vault" + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", + "typeString": "struct IVault.RateInfo memory" }, { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", - "typeString": "struct IVault.CollateralInfo memory" + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", + "typeString": "struct IVault.RateInfo memory" } ], - "id": 52125, - "name": "_calculateCurrentTotalAccumulatedRate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52210, - "src": "12917:37:53", + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 50626, + "name": "_vaultContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50611, + "src": "13195:14:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48108", + "typeString": "contract Vault" + } + }, + "id": 50627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13210:10:47", + "memberName": "rateModule", + "nodeType": "MemberAccess", + "referencedDeclaration": 46542, + "src": "13195:25:47", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IRate_$46026_$", + "typeString": "function () view external returns (contract IRate)" + } + }, + "id": 50628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13195:27:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IRate_$46026", + "typeString": "contract IRate" + } + }, + "id": 50629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13223:36:47", + "memberName": "calculateCurrentTotalAccumulatedRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 46017, + "src": "13195:64:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$_t_struct$_CollateralInfo_$49435_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (contract Vault,struct IVault.CollateralInfo memory) view returns (uint256)" + "typeIdentifier": "t_function_external_view$_t_struct$_RateInfo_$46115_memory_ptr_$_t_struct$_RateInfo_$46115_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (struct IVault.RateInfo memory,struct IVault.RateInfo memory) view external returns (uint256)" } }, - "id": 52128, + "id": 50635, "isConstant": false, "isLValue": false, "isPure": false, @@ -10200,7 +10662,7 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "12917:66:53", + "src": "13195:142:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -10208,20 +10670,20 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "12878:105:53" + "src": "13156:181:47" }, { - "assignments": [52131], + "assignments": [50638], "declarations": [ { "constant": false, - "id": 52131, + "id": 50638, "mutability": "mutable", "name": "_accruedFees", - "nameLocation": "13002:12:53", + "nameLocation": "13356:12:47", "nodeType": "VariableDeclaration", - "scope": 52148, - "src": "12994:20:53", + "scope": 50655, + "src": "13348:20:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -10229,10 +10691,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52130, + "id": 50637, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "12994:7:53", + "src": "13348:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10241,13 +10703,13 @@ "visibility": "internal" } ], - "id": 52143, + "id": 50650, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52142, + "id": 50649, "isConstant": false, "isLValue": false, "isPure": false, @@ -10259,7 +10721,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52139, + "id": 50646, "isConstant": false, "isLValue": false, "isPure": false, @@ -10271,18 +10733,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52135, + "id": 50642, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 52132, + "id": 50639, "name": "_totalCurrentAccumulatedRate", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52124, - "src": "13031:28:53", + "referencedDeclaration": 50625, + "src": "13386:28:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10292,47 +10754,47 @@ "operator": "-", "rightExpression": { "expression": { - "id": 52133, + "id": 50640, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52116, - "src": "13062:6:53", + "referencedDeclaration": 50617, + "src": "13417:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "id": 52134, + "id": 50641, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "13069:24:53", + "memberLocation": "13424:24:47", "memberName": "lastTotalAccumulatedRate", "nodeType": "MemberAccess", - "referencedDeclaration": 49443, - "src": "13062:31:53", + "referencedDeclaration": 46143, + "src": "13417:31:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "13031:62:53", + "src": "13386:62:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 52136, + "id": 50643, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "13030:64:53", + "src": "13385:64:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10342,47 +10804,47 @@ "operator": "*", "rightExpression": { "expression": { - "id": 52137, + "id": 50644, "name": "_vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52116, - "src": "13097:6:53", + "referencedDeclaration": 50617, + "src": "13452:6:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo memory" } }, - "id": 52138, + "id": 50645, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "13104:14:53", + "memberLocation": "13459:14:47", "memberName": "borrowedAmount", "nodeType": "MemberAccess", - "referencedDeclaration": 49439, - "src": "13097:21:53", + "referencedDeclaration": 46139, + "src": "13452:21:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "13030:88:53", + "src": "13385:88:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 52140, + "id": 50647, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "13029:90:53", + "src": "13371:112:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10391,119 +10853,119 @@ "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { - "id": 52141, - "name": "PRECISION", + "id": 50648, + "name": "HUNDRED_PERCENTAGE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51397, - "src": "13122:9:53", + "referencedDeclaration": 49869, + "src": "13486:18:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "13029:102:53", + "src": "13371:133:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "12994:137:53" + "src": "13348:156:47" }, { "expression": { "components": [ { - "id": 52144, + "id": 50651, "name": "_accruedFees", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52131, - "src": "13150:12:53", + "referencedDeclaration": 50638, + "src": "13523:12:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 52145, + "id": 50652, "name": "_totalCurrentAccumulatedRate", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52124, - "src": "13164:28:53", + "referencedDeclaration": 50625, + "src": "13537:28:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 52146, + "id": 50653, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "13149:44:53", + "src": "13522:44:47", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, - "functionReturnParameters": 52122, - "id": 52147, + "functionReturnParameters": 50623, + "id": 50654, "nodeType": "Return", - "src": "13142:51:53" + "src": "13515:51:47" } ] }, "documentation": { - "id": 52107, + "id": 50608, "nodeType": "StructuredDocumentation", - "src": "12536:129:53", + "src": "12814:129:47", "text": " @dev returns the fees accrued by a user's vault since `_vault.lastUpdateTime`\n @dev should never revert!" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_calculateAccruedFees", - "nameLocation": "12679:21:53", + "nameLocation": "12957:21:47", "parameters": { - "id": 52117, + "id": 50618, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 52110, + "id": 50611, "mutability": "mutable", "name": "_vaultContract", - "nameLocation": "12716:14:53", + "nameLocation": "12994:14:47", "nodeType": "VariableDeclaration", - "scope": 52149, - "src": "12710:20:53", + "scope": 50656, + "src": "12988:20:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, "typeName": { - "id": 52109, + "id": 50610, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 52108, + "id": 50609, "name": "Vault", - "nameLocations": ["12710:5:53"], + "nameLocations": ["12988:5:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 51097, - "src": "12710:5:53" + "referencedDeclaration": 48108, + "src": "12988:5:47" }, - "referencedDeclaration": 51097, - "src": "12710:5:53", + "referencedDeclaration": 48108, + "src": "12988:5:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, @@ -10511,34 +10973,34 @@ }, { "constant": false, - "id": 52113, + "id": 50614, "mutability": "mutable", "name": "_collateral", - "nameLocation": "12769:11:53", + "nameLocation": "13047:11:47", "nodeType": "VariableDeclaration", - "scope": 52149, - "src": "12740:40:53", + "scope": 50656, + "src": "13018:40:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 52112, + "id": 50613, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 52111, + "id": 50612, "name": "IVault.CollateralInfo", - "nameLocations": ["12740:6:53", "12747:14:53"], + "nameLocations": ["13018:6:47", "13025:14:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49435, - "src": "12740:21:53" + "referencedDeclaration": 46135, + "src": "13018:21:47" }, - "referencedDeclaration": 49435, - "src": "12740:21:53", + "referencedDeclaration": 46135, + "src": "13018:21:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, @@ -10546,55 +11008,55 @@ }, { "constant": false, - "id": 52116, + "id": 50617, "mutability": "mutable", "name": "_vault", - "nameLocation": "12814:6:53", + "nameLocation": "13092:6:47", "nodeType": "VariableDeclaration", - "scope": 52149, - "src": "12790:30:53", + "scope": 50656, + "src": "13068:30:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_memory_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_memory_ptr", "typeString": "struct IVault.VaultInfo" }, "typeName": { - "id": 52115, + "id": 50616, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 52114, + "id": 50615, "name": "IVault.VaultInfo", - "nameLocations": ["12790:6:53", "12797:9:53"], + "nameLocations": ["13068:6:47", "13075:9:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49444, - "src": "12790:16:53" + "referencedDeclaration": 46144, + "src": "13068:16:47" }, - "referencedDeclaration": 49444, - "src": "12790:16:53", + "referencedDeclaration": 46144, + "src": "13068:16:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_VaultInfo_$49444_storage_ptr", + "typeIdentifier": "t_struct$_VaultInfo_$46144_storage_ptr", "typeString": "struct IVault.VaultInfo" } }, "visibility": "internal" } ], - "src": "12700:126:53" + "src": "12978:126:47" }, "returnParameters": { - "id": 52122, + "id": 50623, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 52119, + "id": 50620, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 52149, - "src": "12850:7:53", + "scope": 50656, + "src": "13128:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -10602,10 +11064,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52118, + "id": 50619, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "12850:7:53", + "src": "13128:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10615,13 +11077,13 @@ }, { "constant": false, - "id": 52121, + "id": 50622, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 52149, - "src": "12859:7:53", + "scope": 50656, + "src": "13137:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -10629,10 +11091,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52120, + "id": 50621, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "12859:7:53", + "src": "13137:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10641,36 +11103,36 @@ "visibility": "internal" } ], - "src": "12849:18:53" + "src": "13127:18:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "view", "virtual": false, "visibility": "internal" }, { - "id": 52210, + "id": 50717, "nodeType": "FunctionDefinition", - "src": "13406:928:53", + "src": "13779:928:47", "nodes": [], "body": { - "id": 52209, + "id": 50716, "nodeType": "Block", - "src": "13577:757:53", + "src": "13950:757:47", "nodes": [], "statements": [ { - "assignments": [52162], + "assignments": [50669], "declarations": [ { "constant": false, - "id": 52162, + "id": 50669, "mutability": "mutable", "name": "_collateralCurrentAccumulatedRate", - "nameLocation": "13688:33:53", + "nameLocation": "14061:33:47", "nodeType": "VariableDeclaration", - "scope": 52209, - "src": "13680:41:53", + "scope": 50716, + "src": "14053:41:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -10678,10 +11140,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52161, + "id": 50668, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "13680:7:53", + "src": "14053:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10690,13 +11152,13 @@ "visibility": "internal" } ], - "id": 52179, + "id": 50686, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52178, + "id": 50685, "isConstant": false, "isLValue": false, "isPure": false, @@ -10704,42 +11166,42 @@ "leftExpression": { "expression": { "expression": { - "id": 52163, + "id": 50670, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52156, - "src": "13724:11:53", + "referencedDeclaration": 50663, + "src": "14097:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 52164, + "id": 50671, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "13736:8:53", + "memberLocation": "14109:8:47", "memberName": "rateInfo", "nodeType": "MemberAccess", - "referencedDeclaration": 49422, - "src": "13724:20:53", + "referencedDeclaration": 46126, + "src": "14097:20:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo memory" } }, - "id": 52165, + "id": 50672, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "13745:15:53", + "memberLocation": "14118:15:47", "memberName": "accumulatedRate", "nodeType": "MemberAccess", - "referencedDeclaration": 49408, - "src": "13724:36:53", + "referencedDeclaration": 46112, + "src": "14097:36:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10754,7 +11216,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52176, + "id": 50683, "isConstant": false, "isLValue": false, "isPure": false, @@ -10762,42 +11224,42 @@ "leftExpression": { "expression": { "expression": { - "id": 52166, + "id": 50673, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52156, - "src": "13776:11:53", + "referencedDeclaration": 50663, + "src": "14149:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 52167, + "id": 50674, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "13788:8:53", + "memberLocation": "14161:8:47", "memberName": "rateInfo", "nodeType": "MemberAccess", - "referencedDeclaration": 49422, - "src": "13776:20:53", + "referencedDeclaration": 46126, + "src": "14149:20:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo memory" } }, - "id": 52168, + "id": 50675, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "13797:4:53", + "memberLocation": "14170:4:47", "memberName": "rate", "nodeType": "MemberAccess", - "referencedDeclaration": 49406, - "src": "13776:25:53", + "referencedDeclaration": 46110, + "src": "14149:25:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10812,33 +11274,33 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52174, + "id": 50681, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { - "id": 52169, + "id": 50676, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "13805:5:53", + "src": "14178:5:47", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 52170, + "id": 50677, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "13811:9:53", + "memberLocation": "14184:9:47", "memberName": "timestamp", "nodeType": "MemberAccess", - "src": "13805:15:53", + "src": "14178:15:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10849,147 +11311,147 @@ "rightExpression": { "expression": { "expression": { - "id": 52171, + "id": 50678, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52156, - "src": "13823:11:53", + "referencedDeclaration": 50663, + "src": "14196:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 52172, + "id": 50679, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "13835:8:53", + "memberLocation": "14208:8:47", "memberName": "rateInfo", "nodeType": "MemberAccess", - "referencedDeclaration": 49422, - "src": "13823:20:53", + "referencedDeclaration": 46126, + "src": "14196:20:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo memory" } }, - "id": 52173, + "id": 50680, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "13844:14:53", + "memberLocation": "14217:14:47", "memberName": "lastUpdateTime", "nodeType": "MemberAccess", - "referencedDeclaration": 49410, - "src": "13823:35:53", + "referencedDeclaration": 46114, + "src": "14196:35:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "13805:53:53", + "src": "14178:53:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 52175, + "id": 50682, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "13804:55:53", + "src": "14177:55:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "13776:83:53", + "src": "14149:83:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 52177, + "id": 50684, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "13775:85:53", + "src": "14148:85:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "13724:136:53", + "src": "14097:136:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "13680:180:53" + "src": "14053:180:47" }, { - "assignments": [52184], + "assignments": [50691], "declarations": [ { "constant": false, - "id": 52184, + "id": 50691, "mutability": "mutable", "name": "_baseRateInfo", - "nameLocation": "13894:13:53", + "nameLocation": "14267:13:47", "nodeType": "VariableDeclaration", - "scope": 52209, - "src": "13871:36:53", + "scope": 50716, + "src": "14244:36:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo" }, "typeName": { - "id": 52183, + "id": 50690, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 52182, + "id": 50689, "name": "IVault.RateInfo", - "nameLocations": ["13871:6:53", "13878:8:53"], + "nameLocations": ["14244:6:47", "14251:8:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49411, - "src": "13871:15:53" + "referencedDeclaration": 46115, + "src": "14244:15:47" }, - "referencedDeclaration": 49411, - "src": "13871:15:53", + "referencedDeclaration": 46115, + "src": "14244:15:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_storage_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_storage_ptr", "typeString": "struct IVault.RateInfo" } }, "visibility": "internal" } ], - "id": 52188, + "id": 50695, "initialValue": { "arguments": [ { - "id": 52186, + "id": 50693, "name": "_vaultContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52153, - "src": "13927:14:53", + "referencedDeclaration": 50660, + "src": "14300:14:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } } @@ -10997,22 +11459,22 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } ], - "id": 52185, + "id": 50692, "name": "_getBaseRateInfo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51464, - "src": "13910:16:53", + "referencedDeclaration": 49936, + "src": "14283:16:47", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$51097_$returns$_t_struct$_RateInfo_$49411_memory_ptr_$", + "typeIdentifier": "t_function_internal_view$_t_contract$_Vault_$48108_$returns$_t_struct$_RateInfo_$46115_memory_ptr_$", "typeString": "function (contract Vault) view returns (struct IVault.RateInfo memory)" } }, - "id": 52187, + "id": 50694, "isConstant": false, "isLValue": false, "isPure": false, @@ -11021,28 +11483,28 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "13910:32:53", + "src": "14283:32:47", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "13871:71:53" + "src": "14244:71:47" }, { - "assignments": [52190], + "assignments": [50697], "declarations": [ { "constant": false, - "id": 52190, + "id": 50697, "mutability": "mutable", "name": "_baseCurrentAccumulatedRate", - "nameLocation": "14042:27:53", + "nameLocation": "14415:27:47", "nodeType": "VariableDeclaration", - "scope": 52209, - "src": "14034:35:53", + "scope": 50716, + "src": "14407:35:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11050,10 +11512,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52189, + "id": 50696, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "14034:7:53", + "src": "14407:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11062,40 +11524,40 @@ "visibility": "internal" } ], - "id": 52204, + "id": 50711, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52203, + "id": 50710, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { - "id": 52191, + "id": 50698, "name": "_baseRateInfo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52184, - "src": "14084:13:53", + "referencedDeclaration": 50691, + "src": "14457:13:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo memory" } }, - "id": 52192, + "id": 50699, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "14098:15:53", + "memberLocation": "14471:15:47", "memberName": "accumulatedRate", "nodeType": "MemberAccess", - "referencedDeclaration": 49408, - "src": "14084:29:53", + "referencedDeclaration": 46112, + "src": "14457:29:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11110,34 +11572,34 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52201, + "id": 50708, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { - "id": 52193, + "id": 50700, "name": "_baseRateInfo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52184, - "src": "14117:13:53", + "referencedDeclaration": 50691, + "src": "14490:13:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo memory" } }, - "id": 52194, + "id": 50701, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "14131:4:53", + "memberLocation": "14504:4:47", "memberName": "rate", "nodeType": "MemberAccess", - "referencedDeclaration": 49406, - "src": "14117:18:53", + "referencedDeclaration": 46110, + "src": "14490:18:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11152,33 +11614,33 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52199, + "id": 50706, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { - "id": 52195, + "id": 50702, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "14139:5:53", + "src": "14512:5:47", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 52196, + "id": 50703, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberLocation": "14145:9:53", + "memberLocation": "14518:9:47", "memberName": "timestamp", "nodeType": "MemberAccess", - "src": "14139:15:53", + "src": "14512:15:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11188,80 +11650,80 @@ "operator": "-", "rightExpression": { "expression": { - "id": 52197, + "id": 50704, "name": "_baseRateInfo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52184, - "src": "14157:13:53", + "referencedDeclaration": 50691, + "src": "14530:13:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_RateInfo_$49411_memory_ptr", + "typeIdentifier": "t_struct$_RateInfo_$46115_memory_ptr", "typeString": "struct IVault.RateInfo memory" } }, - "id": 52198, + "id": 50705, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "14171:14:53", + "memberLocation": "14544:14:47", "memberName": "lastUpdateTime", "nodeType": "MemberAccess", - "referencedDeclaration": 49410, - "src": "14157:28:53", + "referencedDeclaration": 46114, + "src": "14530:28:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "14139:46:53", + "src": "14512:46:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 52200, + "id": 50707, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "14138:48:53", + "src": "14511:48:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "14117:69:53", + "src": "14490:69:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 52202, + "id": 50709, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "14116:71:53", + "src": "14489:71:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "14084:103:53", + "src": "14457:103:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "14034:153:53" + "src": "14407:153:47" }, { "expression": { @@ -11269,18 +11731,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52207, + "id": 50714, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 52205, + "id": 50712, "name": "_collateralCurrentAccumulatedRate", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52162, - "src": "14264:33:53", + "referencedDeclaration": 50669, + "src": "14637:33:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11289,75 +11751,75 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "id": 52206, + "id": 50713, "name": "_baseCurrentAccumulatedRate", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52190, - "src": "14300:27:53", + "referencedDeclaration": 50697, + "src": "14673:27:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "14264:63:53", + "src": "14637:63:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 52160, - "id": 52208, + "functionReturnParameters": 50667, + "id": 50715, "nodeType": "Return", - "src": "14257:70:53" + "src": "14630:70:47" } ] }, "documentation": { - "id": 52150, + "id": 50657, "nodeType": "StructuredDocumentation", - "src": "13206:195:53", + "src": "13579:195:47", "text": " @dev returns the current total accumulated rate i.e current accumulated base rate + current accumulated collateral rate of the given collateral\n @dev should never revert!" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_calculateCurrentTotalAccumulatedRate", - "nameLocation": "13415:37:53", + "nameLocation": "13788:37:47", "parameters": { - "id": 52157, + "id": 50664, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 52153, + "id": 50660, "mutability": "mutable", "name": "_vaultContract", - "nameLocation": "13459:14:53", + "nameLocation": "13832:14:47", "nodeType": "VariableDeclaration", - "scope": 52210, - "src": "13453:20:53", + "scope": 50717, + "src": "13826:20:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" }, "typeName": { - "id": 52152, + "id": 50659, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 52151, + "id": 50658, "name": "Vault", - "nameLocations": ["13453:5:53"], + "nameLocations": ["13826:5:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 51097, - "src": "13453:5:53" + "referencedDeclaration": 48108, + "src": "13826:5:47" }, - "referencedDeclaration": 51097, - "src": "13453:5:53", + "referencedDeclaration": 48108, + "src": "13826:5:47", "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51097", + "typeIdentifier": "t_contract$_Vault_$48108", "typeString": "contract Vault" } }, @@ -11365,55 +11827,55 @@ }, { "constant": false, - "id": 52156, + "id": 50663, "mutability": "mutable", "name": "_collateral", - "nameLocation": "13504:11:53", + "nameLocation": "13877:11:47", "nodeType": "VariableDeclaration", - "scope": 52210, - "src": "13475:40:53", + "scope": 50717, + "src": "13848:40:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 52155, + "id": 50662, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 52154, + "id": 50661, "name": "IVault.CollateralInfo", - "nameLocations": ["13475:6:53", "13482:14:53"], + "nameLocations": ["13848:6:47", "13855:14:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49435, - "src": "13475:21:53" + "referencedDeclaration": 46135, + "src": "13848:21:47" }, - "referencedDeclaration": 49435, - "src": "13475:21:53", + "referencedDeclaration": 46135, + "src": "13848:21:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, "visibility": "internal" } ], - "src": "13452:64:53" + "src": "13825:64:47" }, "returnParameters": { - "id": 52160, + "id": 50667, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 52159, + "id": 50666, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 52210, - "src": "13564:7:53", + "scope": 50717, + "src": "13937:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11421,10 +11883,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52158, + "id": 50665, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "13564:7:53", + "src": "13937:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11433,22 +11895,22 @@ "visibility": "internal" } ], - "src": "13563:9:53" + "src": "13936:9:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "view", "virtual": false, "visibility": "internal" }, { - "id": 52230, + "id": 50737, "nodeType": "FunctionDefinition", - "src": "14453:245:53", + "src": "14826:245:47", "nodes": [], "body": { - "id": 52229, + "id": 50736, "nodeType": "Block", - "src": "14616:82:53", + "src": "14989:82:47", "nodes": [], "statements": [ { @@ -11457,18 +11919,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52227, + "id": 50734, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 52221, + "id": 50728, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52216, - "src": "14633:6:53", + "referencedDeclaration": 50723, + "src": "15006:6:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11483,21 +11945,21 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52225, + "id": 50732, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "hexValue": "3130", - "id": 52222, + "id": 50729, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "14643:2:53", + "src": "15016:2:47", "typeDescriptions": { "typeIdentifier": "t_rational_10_by_1", "typeString": "int_const 10" @@ -11508,110 +11970,110 @@ "operator": "**", "rightExpression": { "expression": { - "id": 52223, + "id": 50730, "name": "_collateral", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52214, - "src": "14649:11:53", + "referencedDeclaration": 50721, + "src": "15022:11:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo memory" } }, - "id": 52224, + "id": 50731, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberLocation": "14661:29:53", + "memberLocation": "15034:29:47", "memberName": "additionalCollateralPrecision", "nodeType": "MemberAccess", - "referencedDeclaration": 49432, - "src": "14649:41:53", + "referencedDeclaration": 46134, + "src": "15022:41:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "14643:47:53", + "src": "15016:47:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 52226, + "id": 50733, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "14642:49:53", + "src": "15015:49:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "14633:58:53", + "src": "15006:58:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 52220, - "id": 52228, + "functionReturnParameters": 50727, + "id": 50735, "nodeType": "Return", - "src": "14626:65:53" + "src": "14999:65:47" } ] }, "documentation": { - "id": 52211, + "id": 50718, "nodeType": "StructuredDocumentation", - "src": "14340:108:53", + "src": "14713:108:47", "text": " @dev scales a given collateral to be represented in 1e18\n @dev should never revert!" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_scaleCollateralToExpectedPrecision", - "nameLocation": "14462:35:53", + "nameLocation": "14835:35:47", "parameters": { - "id": 52217, + "id": 50724, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 52214, + "id": 50721, "mutability": "mutable", "name": "_collateral", - "nameLocation": "14527:11:53", + "nameLocation": "14900:11:47", "nodeType": "VariableDeclaration", - "scope": 52230, - "src": "14498:40:53", + "scope": 50737, + "src": "14871:40:47", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_memory_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_memory_ptr", "typeString": "struct IVault.CollateralInfo" }, "typeName": { - "id": 52213, + "id": 50720, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 52212, + "id": 50719, "name": "IVault.CollateralInfo", - "nameLocations": ["14498:6:53", "14505:14:53"], + "nameLocations": ["14871:6:47", "14878:14:47"], "nodeType": "IdentifierPath", - "referencedDeclaration": 49435, - "src": "14498:21:53" + "referencedDeclaration": 46135, + "src": "14871:21:47" }, - "referencedDeclaration": 49435, - "src": "14498:21:53", + "referencedDeclaration": 46135, + "src": "14871:21:47", "typeDescriptions": { - "typeIdentifier": "t_struct$_CollateralInfo_$49435_storage_ptr", + "typeIdentifier": "t_struct$_CollateralInfo_$46135_storage_ptr", "typeString": "struct IVault.CollateralInfo" } }, @@ -11619,13 +12081,13 @@ }, { "constant": false, - "id": 52216, + "id": 50723, "mutability": "mutable", "name": "amount", - "nameLocation": "14548:6:53", + "nameLocation": "14921:6:47", "nodeType": "VariableDeclaration", - "scope": 52230, - "src": "14540:14:53", + "scope": 50737, + "src": "14913:14:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11633,10 +12095,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52215, + "id": 50722, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "14540:7:53", + "src": "14913:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11645,21 +12107,21 @@ "visibility": "internal" } ], - "src": "14497:58:53" + "src": "14870:58:47" }, "returnParameters": { - "id": 52220, + "id": 50727, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 52219, + "id": 50726, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 52230, - "src": "14603:7:53", + "scope": 50737, + "src": "14976:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11667,10 +12129,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52218, + "id": 50725, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "14603:7:53", + "src": "14976:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11679,22 +12141,22 @@ "visibility": "internal" } ], - "src": "14602:9:53" + "src": "14975:9:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { - "id": 52266, + "id": 50773, "nodeType": "FunctionDefinition", - "src": "14957:178:53", + "src": "15330:178:47", "nodes": [], "body": { - "id": 52265, + "id": 50772, "nodeType": "Block", - "src": "15031:104:53", + "src": "15404:104:47", "nodes": [], "statements": [ { @@ -11703,18 +12165,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52242, + "id": 50749, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 52240, + "id": 50747, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52235, - "src": "15045:2:53", + "referencedDeclaration": 50742, + "src": "15418:2:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11724,46 +12186,46 @@ "operator": "==", "rightExpression": { "hexValue": "30", - "id": 52241, + "id": 50748, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "15051:1:53", + "src": "15424:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "15045:7:53", + "src": "15418:7:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 52246, + "id": 50753, "nodeType": "IfStatement", - "src": "15041:21:53", + "src": "15414:21:47", "trueBody": { "expression": { "arguments": [], "expression": { "argumentTypes": [], - "id": 52243, + "id": 50750, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [-19, -19], "referencedDeclaration": -19, - "src": "15054:6:53", + "src": "15427:6:47", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$__$returns$__$", "typeString": "function () pure" } }, - "id": 52244, + "id": 50751, "isConstant": false, "isLValue": false, "isPure": false, @@ -11772,16 +12234,16 @@ "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "15054:8:53", + "src": "15427:8:47", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 52245, + "id": 50752, "nodeType": "ExpressionStatement", - "src": "15054:8:53" + "src": "15427:8:47" } }, { @@ -11790,18 +12252,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52249, + "id": 50756, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 52247, + "id": 50754, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52233, - "src": "15076:2:53", + "referencedDeclaration": 50740, + "src": "15449:2:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11811,66 +12273,66 @@ "operator": "==", "rightExpression": { "hexValue": "30", - "id": 52248, + "id": 50755, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "15082:1:53", + "src": "15455:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "15076:7:53", + "src": "15449:7:47", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 52252, + "id": 50759, "nodeType": "IfStatement", - "src": "15072:21:53", + "src": "15445:21:47", "trueBody": { "expression": { "hexValue": "30", - "id": 52250, + "id": 50757, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "15092:1:53", + "src": "15465:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "functionReturnParameters": 52239, - "id": 52251, + "functionReturnParameters": 50746, + "id": 50758, "nodeType": "Return", - "src": "15085:8:53" + "src": "15458:8:47" } }, { "expression": { - "id": 52263, + "id": 50770, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 52253, + "id": 50760, "name": "_c", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52238, - "src": "15104:2:53", + "referencedDeclaration": 50745, + "src": "15477:2:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11883,21 +12345,21 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52262, + "id": 50769, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "hexValue": "31", - "id": 52254, + "id": 50761, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "15109:1:53", + "src": "15482:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" @@ -11913,7 +12375,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52260, + "id": 50767, "isConstant": false, "isLValue": false, "isPure": false, @@ -11925,18 +12387,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52257, + "id": 50764, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 52255, + "id": 50762, "name": "_a", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52233, - "src": "15115:2:53", + "referencedDeclaration": 50740, + "src": "15488:2:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11946,35 +12408,35 @@ "operator": "-", "rightExpression": { "hexValue": "31", - "id": 52256, + "id": 50763, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "15120:1:53", + "src": "15493:1:47", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, - "src": "15115:6:53", + "src": "15488:6:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 52258, + "id": 50765, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "15114:8:53", + "src": "15487:8:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11983,79 +12445,79 @@ "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { - "id": 52259, + "id": 50766, "name": "_b", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52235, - "src": "15125:2:53", + "referencedDeclaration": 50742, + "src": "15498:2:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "15114:13:53", + "src": "15487:13:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 52261, + "id": 50768, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "15113:15:53", + "src": "15486:15:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "15109:19:53", + "src": "15482:19:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "15104:24:53", + "src": "15477:24:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 52264, + "id": 50771, "nodeType": "ExpressionStatement", - "src": "15104:24:53" + "src": "15477:24:47" } ] }, "documentation": { - "id": 52231, + "id": 50738, "nodeType": "StructuredDocumentation", - "src": "14704:248:53", + "src": "15077:248:47", "text": " @dev divides `_a` by `_b` and rounds the result `_c` up to the next whole number\n @dev if `_a` is 0, return 0 early as it will revert with underflow error when calculating divUp below\n @dev reverts if `_b` is 0" }, "implemented": true, "kind": "function", "modifiers": [], "name": "_divUp", - "nameLocation": "14966:6:53", + "nameLocation": "15339:6:47", "parameters": { - "id": 52236, + "id": 50743, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 52233, + "id": 50740, "mutability": "mutable", "name": "_a", - "nameLocation": "14981:2:53", + "nameLocation": "15354:2:47", "nodeType": "VariableDeclaration", - "scope": 52266, - "src": "14973:10:53", + "scope": 50773, + "src": "15346:10:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -12063,10 +12525,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52232, + "id": 50739, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "14973:7:53", + "src": "15346:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12076,13 +12538,13 @@ }, { "constant": false, - "id": 52235, + "id": 50742, "mutability": "mutable", "name": "_b", - "nameLocation": "14993:2:53", + "nameLocation": "15366:2:47", "nodeType": "VariableDeclaration", - "scope": 52266, - "src": "14985:10:53", + "scope": 50773, + "src": "15358:10:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -12090,10 +12552,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52234, + "id": 50741, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "14985:7:53", + "src": "15358:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12102,21 +12564,21 @@ "visibility": "internal" } ], - "src": "14972:24:53" + "src": "15345:24:47" }, "returnParameters": { - "id": 52239, + "id": 50746, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 52238, + "id": 50745, "mutability": "mutable", "name": "_c", - "nameLocation": "15027:2:53", + "nameLocation": "15400:2:47", "nodeType": "VariableDeclaration", - "scope": 52266, - "src": "15019:10:53", + "scope": 50773, + "src": "15392:10:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -12124,10 +12586,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52237, + "id": 50744, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "15019:7:53", + "src": "15392:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12136,9 +12598,9 @@ "visibility": "internal" } ], - "src": "15018:12:53" + "src": "15391:12:47" }, - "scope": 52267, + "scope": 50774, "stateMutability": "pure", "virtual": false, "visibility": "private" @@ -12150,15 +12612,15 @@ "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, - "linearizedBaseContracts": [52267], + "linearizedBaseContracts": [50774], "name": "VaultGetters", - "nameLocation": "400:12:53", - "scope": 52268, + "nameLocation": "271:12:47", + "scope": 50775, "usedErrors": [], "usedEvents": [] } ], "license": "MIT" }, - "id": 53 + "id": 47 } diff --git a/src/contracts/abis/VaultRouter.json b/src/contracts/abis/VaultRouter.json index 3f9528b..c4dcf9f 100644 --- a/src/contracts/abis/VaultRouter.json +++ b/src/contracts/abis/VaultRouter.json @@ -1,64 +1,244 @@ { "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, { "inputs": [ { "internalType": "uint256", - "name": "parameterIndex", + "name": "expectedLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "length", "type": "uint256" } ], + "name": "InvalidEncodedParameterLength", + "type": "error" + }, + { + "inputs": [], "name": "MisMatchedInputsLength", "type": "error" }, { + "inputs": [], + "name": "NewOwnerIsZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "NoHandoverRequest", + "type": "error" + }, + { + "inputs": [], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "UnsafeCast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pendingOwner", + "type": "address" + } + ], + "name": "OwnershipHandoverCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pendingOwner", + "type": "address" + } + ], + "name": "OwnershipHandoverRequested", + "type": "event" + }, + { + "anonymous": false, "inputs": [ { - "internalType": "contract Vault[]", - "name": "_vaultContracts", - "type": "address[]" + "indexed": true, + "internalType": "address", + "name": "oldOwner", + "type": "address" }, { - "internalType": "enum VaultRouter.Operations[]", - "name": "_operations", - "type": "uint8[]" + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" }, { - "internalType": "contract ERC20[]", - "name": "_collateralTokens", - "type": "address[]" + "internalType": "address", + "name": "_vaultAddress", + "type": "address" }, { - "internalType": "address[]", - "name": "_tos", - "type": "address[]" + "internalType": "bool", + "name": "isMax", + "type": "bool" + } + ], + "name": "approveTokenForVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cancelOwnershipHandover", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pendingOwner", + "type": "address" + } + ], + "name": "completeOwnershipHandover", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_packedOperations", + "type": "bytes" }, { - "internalType": "uint256[]", - "name": "_amounts", - "type": "uint256[]" + "internalType": "bytes[]", + "name": "_encodedParameters", + "type": "bytes[]" } ], "name": "multiInteract", "outputs": [], "stateMutability": "nonpayable", "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "result", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pendingOwner", + "type": "address" + } + ], + "name": "ownershipHandoverExpiresAt", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "requestOwnershipHandover", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "payable", + "type": "function" } ], "bytecode": { - "object": "0x608060405234801561001057600080fd5b5061070b806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063b54fb88e14610030575b600080fd5b61004361003e366004610534565b610045565b005b8887811461006e57604051638aa3abdb60e01b8152600160048201526024015b60405180910390fd5b80861461009157604051638aa3abdb60e01b815260026004820152602401610065565b8084146100b457604051638aa3abdb60e01b815260036004820152602401610065565b8082146100d657604051638aa3abdb60e01b8152600481810152602401610065565b3360005b828110156104d95760008b8b838181106100f6576100f661063b565b905060200201602081019061010b9190610651565b600381111561011c5761011c610625565b03610205578c8c828181106101335761013361063b565b90506020020160208101906101489190610691565b6001600160a01b031663f970c3b78a8a848181106101685761016861063b565b905060200201602081019061017d9190610691565b848888868181106101905761019061063b565b6040516001600160e01b031960e088901b1681526001600160a01b039586166004820152949093166024850152506020909102013560448201526064015b600060405180830381600087803b1580156101e857600080fd5b505af11580156101fc573d6000803e3d6000fd5b505050506104c9565b60018b8b838181106102195761021961063b565b905060200201602081019061022e9190610651565b600381111561023f5761023f610625565b03610325578c8c828181106102565761025661063b565b905060200201602081019061026b9190610691565b6001600160a01b0316635820ba638a8a8481811061028b5761028b61063b565b90506020020160208101906102a09190610691565b848a8a868181106102b3576102b361063b565b90506020020160208101906102c89190610691565b8989878181106102da576102da61063b565b60405160e088901b6001600160e01b03191681526001600160a01b039687166004820152948616602486015292909416604484015260209091020135606482015260840190506101ce565b60028b8b838181106103395761033961063b565b905060200201602081019061034e9190610651565b600381111561035f5761035f610625565b036103ab578c8c828181106103765761037661063b565b905060200201602081019061038b9190610691565b6001600160a01b03166349a66ca38a8a8481811061028b5761028b61063b565b60038b8b838181106103bf576103bf61063b565b90506020020160208101906103d49190610651565b60038111156103e5576103e5610625565b036104c9578c8c828181106103fc576103fc61063b565b90506020020160208101906104119190610691565b6001600160a01b0316634fa739198a8a848181106104315761043161063b565b90506020020160208101906104469190610691565b848888868181106104595761045961063b565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b1580156104b057600080fd5b505af11580156104c4573d6000803e3d6000fd5b505050505b6104d2816106ae565b90506100da565b50505050505050505050505050565b60008083601f8401126104fa57600080fd5b50813567ffffffffffffffff81111561051257600080fd5b6020830191508360208260051b850101111561052d57600080fd5b9250929050565b60008060008060008060008060008060a08b8d03121561055357600080fd5b8a3567ffffffffffffffff8082111561056b57600080fd5b6105778e838f016104e8565b909c509a5060208d013591508082111561059057600080fd5b61059c8e838f016104e8565b909a50985060408d01359150808211156105b557600080fd5b6105c18e838f016104e8565b909850965060608d01359150808211156105da57600080fd5b6105e68e838f016104e8565b909650945060808d01359150808211156105ff57600080fd5b5061060c8d828e016104e8565b915080935050809150509295989b9194979a5092959850565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561066357600080fd5b81356004811061067257600080fd5b9392505050565b6001600160a01b038116811461068e57600080fd5b50565b6000602082840312156106a357600080fd5b813561067281610679565b6000600182016106ce57634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220806b08789d39a4ca103e0821f09ca0454dfa8a6b48de5c9d2049eaf104c3249464736f6c63430008150033", - "sourceMap": "240:2145:54:-:0;;;;;;;;;;;;;;;;;;;", + "object": "0x608060405234801561001057600080fd5b5061001a3361001f565b61005b565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b61146e8061006a6000396000f3fe6080604052600436106100865760003560e01c8063715018a611610059578063715018a6146100dd5780638da5cb5b146100e5578063f04e283e14610116578063f2fde38b14610129578063fee81cf41461013c57600080fd5b8063256929621461008b5780632b492640146100955780633f7d7bc9146100b557806354d1f13d146100d5575b600080fd5b61009361017d565b005b3480156100a157600080fd5b506100936100b0366004610e5e565b6101cd565b3480156100c157600080fd5b506100936100d0366004610f38565b610c36565b610093610c5c565b610093610c98565b3480156100f157600080fd5b50638b78c6d819546040516001600160a01b0390911681526020015b60405180910390f35b610093610124366004610f88565b610cac565b610093610137366004610f88565b610cec565b34801561014857600080fd5b5061016f610157366004610f88565b63389a75e1600c908152600091909152602090205490565b60405190815260200161010d565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b8281146101ed57604051633a89615b60e01b815260040160405180910390fd5b6000805b82811015610c2e5785858281811061020b5761020b610fac565b919091013560f81c92506000905082600981111561022b5761022b610fc2565b600981111561023c5761023c610fc2565b14610c2e5760058260ff16600981111561025857610258610fc2565b600981111561026957610269610fc2565b036103975761029d84848381811061028357610283610fac565b90506020028101906102959190610fd8565b610120610d13565b60008060008060008888878181106102b7576102b7610fac565b90506020028101906102c99190610fd8565b8101906102d691906110c9565b6040805160a0810182526001600160a01b03871660608201908152608082018790528152602080820186905281830185905282518084018452308152908101879052915163187945bd60e11b8152969b5094995092975090955093506e22d473030f116ddee9f6b43ac78ba3926330f28b7a9261035b9290913390879060040161117c565b600060405180830381600087803b15801561037557600080fd5b505af1158015610389573d6000803e3d6000fd5b505050505050505050610c26565b60068260ff1660098111156103ae576103ae610fc2565b60098111156103bf576103bf610fc2565b03610546576103f38484838181106103d9576103d9610fac565b90506020028101906103eb9190610fd8565b610140610d13565b60008060008060008089898881811061040e5761040e610fac565b90506020028101906104209190610fd8565b81019061042d9190611200565b9550955095509550955095506e22d473030f116ddee9f6b43ac78ba36001600160a01b0316632b67b57033604051806060016040528060405180608001604052808c6001600160a01b031681526020016104908c6001600160a01b038016610d41565b6001600160a01b031681526020016104ae8b65ffffffffffff610d41565b65ffffffffffff1681526020016104cd8a65ffffffffffff8016610d41565b65ffffffffffff16905281523060208201526040908101879052516001600160e01b031960e085901b1681526105099291908690600401611275565b600060405180830381600087803b15801561052357600080fd5b505af1158015610537573d6000803e3d6000fd5b50505050505050505050610c26565b60078260ff16600981111561055d5761055d610fc2565b600981111561056e5761056e610fc2565b03610679576105a184848381811061058857610588610fac565b905060200281019061059a9190610fd8565b6040610d13565b6000808585848181106105b6576105b6610fac565b90506020028101906105c89190610fd8565b8101906105d591906112f3565b90925090506e22d473030f116ddee9f6b43ac78ba36336c785163330610602856001600160a01b03610d41565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529183166024830152821660448201529085166064820152608401600060405180830381600087803b15801561065a57600080fd5b505af115801561066e573d6000803e3d6000fd5b505050505050610c26565b60018260ff16600981111561069057610690610fc2565b60098111156106a1576106a1610fc2565b03610784576106d48484838181106106bb576106bb610fac565b90506020028101906106cd9190610fd8565b6060610d13565b60008060008686858181106106eb576106eb610fac565b90506020028101906106fd9190610fd8565b81019061070a919061131f565b60405163f970c3b760e01b81526001600160a01b0380841660048301523360248301526044820183905293965091945092509084169063f970c3b7906064015b600060405180830381600087803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b50505050505050610c26565b60028260ff16600981111561079b5761079b610fc2565b60098111156107ac576107ac610fc2565b0361089c576107df8484838181106107c6576107c6610fac565b90506020028101906107d89190610fd8565b6080610d13565b6000806000808787868181106107f7576107f7610fac565b90506020028101906108099190610fd8565b8101906108169190611360565b604051635820ba6360e01b81526001600160a01b038085166004830152336024830152808416604483015260648201839052949850929650909450925090851690635820ba63906084015b600060405180830381600087803b15801561087b57600080fd5b505af115801561088f573d6000803e3d6000fd5b5050505050505050610c26565b60038260ff1660098111156108b3576108b3610fc2565b60098111156108c4576108c4610fc2565b03610964576108de8484838181106107c6576107c6610fac565b6000806000808787868181106108f6576108f6610fac565b90506020028101906109089190610fd8565b8101906109159190611360565b6040516349a66ca360e01b81526001600160a01b0380851660048301523360248301528084166044830152606482018390529498509296509094509250908516906349a66ca390608401610861565b60048260ff16600981111561097b5761097b610fc2565b600981111561098c5761098c610fc2565b03610a20576109a68484838181106106bb576106bb610fac565b60008060008686858181106109bd576109bd610fac565b90506020028101906109cf9190610fd8565b8101906109dc919061131f565b604051634fa7391960e01b81526001600160a01b03808416600483015233602483015260448201839052939650919450925090841690634fa739199060640161074a565b60088260ff166009811115610a3757610a37610fc2565b6009811115610a4857610a48610fc2565b03610b8657610a7c848483818110610a6257610a62610fac565b9050602002810190610a749190610fd8565b610100610d13565b600080600080878786818110610a9457610a94610fac565b9050602002810190610aa69190610fd8565b810190610ab391906113b1565b935093509350935060008082806020019051810190610ad29190611414565b91509150600083604081518110610aeb57610aeb610fac565b016020015160405163d505accf60e01b8152336004820152306024820152604481018890526064810187905260f89190911c6084820181905260a4820185905260c4820184905291506001600160a01b0388169063d505accf9060e401600060405180830381600087803b158015610b6257600080fd5b505af1158015610b76573d6000803e3d6000fd5b5050505050505050505050610c26565b60098260ff166009811115610b9d57610b9d610fc2565b6009811115610bae57610bae610fc2565b03610c2657610bc884848381811061058857610588610fac565b600080858584818110610bdd57610bdd610fac565b9050602002810190610bef9190610fd8565b810190610bfc91906112f3565b91509150816001600160a01b03163b600003610c1757600080fd5b610c2382333084610d6b565b50505b6001016101f1565b505050505050565b610c3e610dbf565b610c57838383610c4f576000610dda565b600019610dda565b505050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b610ca0610dbf565b610caa6000610e20565b565b610cb4610dbf565b63389a75e1600c52806000526020600c208054421115610cdc57636f5e88186000526004601cfd5b60009055610ce981610e20565b50565b610cf4610dbf565b8060601b610d0a57637448fbae6000526004601cfd5b610ce981610e20565b808214610c575760405163582379b960e11b8152600481018290526024810183905260440160405180910390fd5b600082821015610d645760405163c4bd89a960e01b815260040160405180910390fd5b5090919050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af13d156001600051141716610db157637939f4246000526004601cfd5b600060605260405250505050565b638b78c6d819543314610caa576382b429006000526004601cfd5b816014528060345263095ea7b360601b60005260206000604460106000875af13d156001600051141716610e1657633e3f8f736000526004601cfd5b6000603452505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b60008060008060408587031215610e7457600080fd5b843567ffffffffffffffff80821115610e8c57600080fd5b818701915087601f830112610ea057600080fd5b813581811115610eaf57600080fd5b886020828501011115610ec157600080fd5b602092830196509450908601359080821115610edc57600080fd5b818701915087601f830112610ef057600080fd5b813581811115610eff57600080fd5b8860208260051b8501011115610f1457600080fd5b95989497505060200194505050565b6001600160a01b0381168114610ce957600080fd5b600080600060608486031215610f4d57600080fd5b8335610f5881610f23565b92506020840135610f6881610f23565b915060408401358015158114610f7d57600080fd5b809150509250925092565b600060208284031215610f9a57600080fd5b8135610fa581610f23565b9392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b6000808335601e19843603018112610fef57600080fd5b83018035915067ffffffffffffffff82111561100a57600080fd5b60200191503681900382131561101f57600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261104d57600080fd5b813567ffffffffffffffff8082111561106857611068611026565b604051601f8301601f19908116603f0116810190828211818310171561109057611090611026565b816040528381528660208588010111156110a957600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a086880312156110e157600080fd5b85356110ec81610f23565b9450602086013593506040860135925060608601359150608086013567ffffffffffffffff81111561111d57600080fd5b6111298882890161103c565b9150509295509295909350565b6000815180845260005b8181101561115c57602081850181015186830182015201611140565b506000602082860101526020601f19601f83011685010191505092915050565b600061010061119f83885180516001600160a01b03168252602090810151910152565b60208701516040840152604087015160608401526111d3608084018780516001600160a01b03168252602090810151910152565b6001600160a01b03851660c084015260e083018190526111f581840185611136565b979650505050505050565b60008060008060008060c0878903121561121957600080fd5b863561122481610f23565b95506020870135945060408701359350606087013592506080870135915060a087013567ffffffffffffffff81111561125c57600080fd5b61126889828a0161103c565b9150509295509295509295565b600061010060018060a01b0380871684528551818151166020860152816020820151166040860152604081015165ffffffffffff80821660608801528060608401511660808801525050508060208701511660a085015250604085015160c08401528060e08401526112e981840185611136565b9695505050505050565b6000806040838503121561130657600080fd5b823561131181610f23565b946020939093013593505050565b60008060006060848603121561133457600080fd5b833561133f81610f23565b9250602084013561134f81610f23565b929592945050506040919091013590565b6000806000806080858703121561137657600080fd5b843561138181610f23565b9350602085013561139181610f23565b925060408501356113a181610f23565b9396929550929360600135925050565b600080600080608085870312156113c757600080fd5b84356113d281610f23565b93506020850135925060408501359150606085013567ffffffffffffffff8111156113fc57600080fd5b6114088782880161103c565b91505092959194509250565b6000806040838503121561142757600080fd5b50508051602090910151909290915056fea264697066735822122002d0219beb8676a13f2c86e79246f9b974b7fc22b9374067fa3536150410ae3c64736f6c63430008150033", + "sourceMap": "464:7332:50:-:0;;;731:59;;;;;;;;;-1:-1:-1;755:28:50;772:10;755:16;:28::i;:::-;464:7332;;4883:1190:28;-1:-1:-1;;;;;5793:26:28;-1:-1:-1;;5876:29:28;;;5793:26;6031:1;5991:38;6031:1;;5980:63;4883:1190;:::o;464:7332:50:-;;;;;;;", "linkReferences": {} }, "deployedBytecode": { - "object": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063b54fb88e14610030575b600080fd5b61004361003e366004610534565b610045565b005b8887811461006e57604051638aa3abdb60e01b8152600160048201526024015b60405180910390fd5b80861461009157604051638aa3abdb60e01b815260026004820152602401610065565b8084146100b457604051638aa3abdb60e01b815260036004820152602401610065565b8082146100d657604051638aa3abdb60e01b8152600481810152602401610065565b3360005b828110156104d95760008b8b838181106100f6576100f661063b565b905060200201602081019061010b9190610651565b600381111561011c5761011c610625565b03610205578c8c828181106101335761013361063b565b90506020020160208101906101489190610691565b6001600160a01b031663f970c3b78a8a848181106101685761016861063b565b905060200201602081019061017d9190610691565b848888868181106101905761019061063b565b6040516001600160e01b031960e088901b1681526001600160a01b039586166004820152949093166024850152506020909102013560448201526064015b600060405180830381600087803b1580156101e857600080fd5b505af11580156101fc573d6000803e3d6000fd5b505050506104c9565b60018b8b838181106102195761021961063b565b905060200201602081019061022e9190610651565b600381111561023f5761023f610625565b03610325578c8c828181106102565761025661063b565b905060200201602081019061026b9190610691565b6001600160a01b0316635820ba638a8a8481811061028b5761028b61063b565b90506020020160208101906102a09190610691565b848a8a868181106102b3576102b361063b565b90506020020160208101906102c89190610691565b8989878181106102da576102da61063b565b60405160e088901b6001600160e01b03191681526001600160a01b039687166004820152948616602486015292909416604484015260209091020135606482015260840190506101ce565b60028b8b838181106103395761033961063b565b905060200201602081019061034e9190610651565b600381111561035f5761035f610625565b036103ab578c8c828181106103765761037661063b565b905060200201602081019061038b9190610691565b6001600160a01b03166349a66ca38a8a8481811061028b5761028b61063b565b60038b8b838181106103bf576103bf61063b565b90506020020160208101906103d49190610651565b60038111156103e5576103e5610625565b036104c9578c8c828181106103fc576103fc61063b565b90506020020160208101906104119190610691565b6001600160a01b0316634fa739198a8a848181106104315761043161063b565b90506020020160208101906104469190610691565b848888868181106104595761045961063b565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b1580156104b057600080fd5b505af11580156104c4573d6000803e3d6000fd5b505050505b6104d2816106ae565b90506100da565b50505050505050505050505050565b60008083601f8401126104fa57600080fd5b50813567ffffffffffffffff81111561051257600080fd5b6020830191508360208260051b850101111561052d57600080fd5b9250929050565b60008060008060008060008060008060a08b8d03121561055357600080fd5b8a3567ffffffffffffffff8082111561056b57600080fd5b6105778e838f016104e8565b909c509a5060208d013591508082111561059057600080fd5b61059c8e838f016104e8565b909a50985060408d01359150808211156105b557600080fd5b6105c18e838f016104e8565b909850965060608d01359150808211156105da57600080fd5b6105e68e838f016104e8565b909650945060808d01359150808211156105ff57600080fd5b5061060c8d828e016104e8565b915080935050809150509295989b9194979a5092959850565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561066357600080fd5b81356004811061067257600080fd5b9392505050565b6001600160a01b038116811461068e57600080fd5b50565b6000602082840312156106a357600080fd5b813561067281610679565b6000600182016106ce57634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220806b08789d39a4ca103e0821f09ca0454dfa8a6b48de5c9d2049eaf104c3249464736f6c63430008150033", - "sourceMap": "240:2145:54:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;453:1930;;;;;;:::i;:::-;;:::i;:::-;;;796:15;833:37;;;829:75;;879:25;;-1:-1:-1;;;879:25:54;;902:1;879:25;;;2353::56;2326:18;;879:25:54;;;;;;;;829:75;987:43;;;983:81;;1039:25;;-1:-1:-1;;;1039:25:54;;1062:1;1039:25;;;2353::56;2326:18;;1039:25:54;2199:185:56;983:81:54;1147:30;;;1143:68;;1186:25;;-1:-1:-1;;;1186:25:54;;1209:1;1186:25;;;2353::56;2326:18;;1186:25:54;2199:185:56;1143:68:54;1294:34;;;1290:72;;1337:25;;-1:-1:-1;;;1337:25:54;;1360:1;1337:25;;;2353::56;2326:18;;1337:25:54;2199:185:56;1290:72:54;1616:10;1599:14;1637:740;1657:15;1653:1;:19;1637:740;;;1715:28;1697:11;;1709:1;1697:14;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;:46;;;;;;;;:::i;:::-;;1693:674;;1763:15;;1779:1;1763:18;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;1763:36:54;;1800:17;;1818:1;1800:20;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;1822:6;1830:8;;1839:1;1830:11;;;;;;;:::i;:::-;1763:79;;-1:-1:-1;;;;;;1763:79:54;;;;;;;-1:-1:-1;;;;;4464:15:56;;;1763:79:54;;;4446:34:56;4516:15;;;;4496:18;;;4489:43;-1:-1:-1;1830:11:54;;;;;;4548:18:56;;;4541:34;4381:18;;1763:79:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1693:674;;;1885:29;1867:11;;1879:1;1867:14;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;:47;;;;;;;;:::i;:::-;;1863:504;;1934:15;;1950:1;1934:18;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;1934:37:54;;1972:17;;1990:1;1972:20;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;1994:6;2002:4;;2007:1;2002:7;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;2011:8;;2020:1;2011:11;;;;;;;:::i;:::-;1934:89;;;;;;-1:-1:-1;;;;;;1934:89:54;;;-1:-1:-1;;;;;5147:15:56;;;1934:89:54;;;5129:34:56;5199:15;;;5179:18;;;5172:43;5251:15;;;;5231:18;;;5224:43;2011:11:54;;;;;;5283:18:56;;;5276:34;5063:19;;;-1:-1:-1;1934:89:54;4845:471:56;1863:504:54;2066:23;2048:11;;2060:1;2048:14;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;:41;;;;;;;;:::i;:::-;;2044:323;;2109:15;;2125:1;2109:18;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;2109:31:54;;2141:17;;2159:1;2141:20;;;;;;;:::i;2044:323::-;2235:23;2217:11;;2229:1;2217:14;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;:41;;;;;;;;:::i;:::-;;2213:154;;2278:15;;2294:1;2278:18;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;2278:31:54;;2310:17;;2328:1;2310:20;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;2332:6;2340:8;;2349:1;2340:11;;;;;;;:::i;:::-;2278:74;;-1:-1:-1;;;;;;2278:74:54;;;;;;;-1:-1:-1;;;;;4464:15:56;;;2278:74:54;;;4446:34:56;4516:15;;;;4496:18;;;4489:43;-1:-1:-1;2340:11:54;;;;;;4548:18:56;;;4541:34;4381:18;;2278:74:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2213:154;1674:3;;;:::i;:::-;;;1637:740;;;;690:1693;;453:1930;;;;;;;;;;:::o;14:374:56:-;84:8;94:6;148:3;141:4;133:6;129:17;125:27;115:55;;166:1;163;156:12;115:55;-1:-1:-1;189:20:56;;232:18;221:30;;218:50;;;264:1;261;254:12;218:50;301:4;293:6;289:17;277:29;;361:3;354:4;344:6;341:1;337:14;329:6;325:27;321:38;318:47;315:67;;;378:1;375;368:12;315:67;14:374;;;;;:::o;393:1801::-;669:6;677;685;693;701;709;717;725;733;741;794:3;782:9;773:7;769:23;765:33;762:53;;;811:1;808;801:12;762:53;851:9;838:23;880:18;921:2;913:6;910:14;907:34;;;937:1;934;927:12;907:34;976:77;1045:7;1036:6;1025:9;1021:22;976:77;:::i;:::-;1072:8;;-1:-1:-1;950:103:56;-1:-1:-1;1160:2:56;1145:18;;1132:32;;-1:-1:-1;1176:16:56;;;1173:36;;;1205:1;1202;1195:12;1173:36;1244:79;1315:7;1304:8;1293:9;1289:24;1244:79;:::i;:::-;1342:8;;-1:-1:-1;1218:105:56;-1:-1:-1;1430:2:56;1415:18;;1402:32;;-1:-1:-1;1446:16:56;;;1443:36;;;1475:1;1472;1465:12;1443:36;1514:79;1585:7;1574:8;1563:9;1559:24;1514:79;:::i;:::-;1612:8;;-1:-1:-1;1488:105:56;-1:-1:-1;1700:2:56;1685:18;;1672:32;;-1:-1:-1;1716:16:56;;;1713:36;;;1745:1;1742;1735:12;1713:36;1784:79;1855:7;1844:8;1833:9;1829:24;1784:79;:::i;:::-;1882:8;;-1:-1:-1;1758:105:56;-1:-1:-1;1970:3:56;1955:19;;1942:33;;-1:-1:-1;1987:16:56;;;1984:36;;;2016:1;2013;2006:12;1984:36;;2055:79;2126:7;2115:8;2104:9;2100:24;2055:79;:::i;:::-;2029:105;;2153:8;2143:18;;;2180:8;2170:18;;;393:1801;;;;;;;;;;;;;:::o;2959:127::-;3020:10;3015:3;3011:20;3008:1;3001:31;3051:4;3048:1;3041:15;3075:4;3072:1;3065:15;3091:127;3152:10;3147:3;3143:20;3140:1;3133:31;3183:4;3180:1;3173:15;3207:4;3204:1;3197:15;3223:272;3298:6;3351:2;3339:9;3330:7;3326:23;3322:32;3319:52;;;3367:1;3364;3357:12;3319:52;3406:9;3393:23;3445:1;3438:5;3435:12;3425:40;;3461:1;3458;3451:12;3425:40;3484:5;3223:272;-1:-1:-1;;;3223:272:56:o;3500:138::-;-1:-1:-1;;;;;3582:31:56;;3572:42;;3562:70;;3628:1;3625;3618:12;3562:70;3500:138;:::o;3643:269::-;3717:6;3770:2;3758:9;3749:7;3745:23;3741:32;3738:52;;;3786:1;3783;3776:12;3738:52;3825:9;3812:23;3844:38;3876:5;3844:38;:::i;5321:232::-;5360:3;5381:17;;;5378:140;;5440:10;5435:3;5431:20;5428:1;5421:31;5475:4;5472:1;5465:15;5503:4;5500:1;5493:15;5378:140;-1:-1:-1;5545:1:56;5534:13;;5321:232::o", + "object": "0x6080604052600436106100865760003560e01c8063715018a611610059578063715018a6146100dd5780638da5cb5b146100e5578063f04e283e14610116578063f2fde38b14610129578063fee81cf41461013c57600080fd5b8063256929621461008b5780632b492640146100955780633f7d7bc9146100b557806354d1f13d146100d5575b600080fd5b61009361017d565b005b3480156100a157600080fd5b506100936100b0366004610e5e565b6101cd565b3480156100c157600080fd5b506100936100d0366004610f38565b610c36565b610093610c5c565b610093610c98565b3480156100f157600080fd5b50638b78c6d819546040516001600160a01b0390911681526020015b60405180910390f35b610093610124366004610f88565b610cac565b610093610137366004610f88565b610cec565b34801561014857600080fd5b5061016f610157366004610f88565b63389a75e1600c908152600091909152602090205490565b60405190815260200161010d565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b8281146101ed57604051633a89615b60e01b815260040160405180910390fd5b6000805b82811015610c2e5785858281811061020b5761020b610fac565b919091013560f81c92506000905082600981111561022b5761022b610fc2565b600981111561023c5761023c610fc2565b14610c2e5760058260ff16600981111561025857610258610fc2565b600981111561026957610269610fc2565b036103975761029d84848381811061028357610283610fac565b90506020028101906102959190610fd8565b610120610d13565b60008060008060008888878181106102b7576102b7610fac565b90506020028101906102c99190610fd8565b8101906102d691906110c9565b6040805160a0810182526001600160a01b03871660608201908152608082018790528152602080820186905281830185905282518084018452308152908101879052915163187945bd60e11b8152969b5094995092975090955093506e22d473030f116ddee9f6b43ac78ba3926330f28b7a9261035b9290913390879060040161117c565b600060405180830381600087803b15801561037557600080fd5b505af1158015610389573d6000803e3d6000fd5b505050505050505050610c26565b60068260ff1660098111156103ae576103ae610fc2565b60098111156103bf576103bf610fc2565b03610546576103f38484838181106103d9576103d9610fac565b90506020028101906103eb9190610fd8565b610140610d13565b60008060008060008089898881811061040e5761040e610fac565b90506020028101906104209190610fd8565b81019061042d9190611200565b9550955095509550955095506e22d473030f116ddee9f6b43ac78ba36001600160a01b0316632b67b57033604051806060016040528060405180608001604052808c6001600160a01b031681526020016104908c6001600160a01b038016610d41565b6001600160a01b031681526020016104ae8b65ffffffffffff610d41565b65ffffffffffff1681526020016104cd8a65ffffffffffff8016610d41565b65ffffffffffff16905281523060208201526040908101879052516001600160e01b031960e085901b1681526105099291908690600401611275565b600060405180830381600087803b15801561052357600080fd5b505af1158015610537573d6000803e3d6000fd5b50505050505050505050610c26565b60078260ff16600981111561055d5761055d610fc2565b600981111561056e5761056e610fc2565b03610679576105a184848381811061058857610588610fac565b905060200281019061059a9190610fd8565b6040610d13565b6000808585848181106105b6576105b6610fac565b90506020028101906105c89190610fd8565b8101906105d591906112f3565b90925090506e22d473030f116ddee9f6b43ac78ba36336c785163330610602856001600160a01b03610d41565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529183166024830152821660448201529085166064820152608401600060405180830381600087803b15801561065a57600080fd5b505af115801561066e573d6000803e3d6000fd5b505050505050610c26565b60018260ff16600981111561069057610690610fc2565b60098111156106a1576106a1610fc2565b03610784576106d48484838181106106bb576106bb610fac565b90506020028101906106cd9190610fd8565b6060610d13565b60008060008686858181106106eb576106eb610fac565b90506020028101906106fd9190610fd8565b81019061070a919061131f565b60405163f970c3b760e01b81526001600160a01b0380841660048301523360248301526044820183905293965091945092509084169063f970c3b7906064015b600060405180830381600087803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b50505050505050610c26565b60028260ff16600981111561079b5761079b610fc2565b60098111156107ac576107ac610fc2565b0361089c576107df8484838181106107c6576107c6610fac565b90506020028101906107d89190610fd8565b6080610d13565b6000806000808787868181106107f7576107f7610fac565b90506020028101906108099190610fd8565b8101906108169190611360565b604051635820ba6360e01b81526001600160a01b038085166004830152336024830152808416604483015260648201839052949850929650909450925090851690635820ba63906084015b600060405180830381600087803b15801561087b57600080fd5b505af115801561088f573d6000803e3d6000fd5b5050505050505050610c26565b60038260ff1660098111156108b3576108b3610fc2565b60098111156108c4576108c4610fc2565b03610964576108de8484838181106107c6576107c6610fac565b6000806000808787868181106108f6576108f6610fac565b90506020028101906109089190610fd8565b8101906109159190611360565b6040516349a66ca360e01b81526001600160a01b0380851660048301523360248301528084166044830152606482018390529498509296509094509250908516906349a66ca390608401610861565b60048260ff16600981111561097b5761097b610fc2565b600981111561098c5761098c610fc2565b03610a20576109a68484838181106106bb576106bb610fac565b60008060008686858181106109bd576109bd610fac565b90506020028101906109cf9190610fd8565b8101906109dc919061131f565b604051634fa7391960e01b81526001600160a01b03808416600483015233602483015260448201839052939650919450925090841690634fa739199060640161074a565b60088260ff166009811115610a3757610a37610fc2565b6009811115610a4857610a48610fc2565b03610b8657610a7c848483818110610a6257610a62610fac565b9050602002810190610a749190610fd8565b610100610d13565b600080600080878786818110610a9457610a94610fac565b9050602002810190610aa69190610fd8565b810190610ab391906113b1565b935093509350935060008082806020019051810190610ad29190611414565b91509150600083604081518110610aeb57610aeb610fac565b016020015160405163d505accf60e01b8152336004820152306024820152604481018890526064810187905260f89190911c6084820181905260a4820185905260c4820184905291506001600160a01b0388169063d505accf9060e401600060405180830381600087803b158015610b6257600080fd5b505af1158015610b76573d6000803e3d6000fd5b5050505050505050505050610c26565b60098260ff166009811115610b9d57610b9d610fc2565b6009811115610bae57610bae610fc2565b03610c2657610bc884848381811061058857610588610fac565b600080858584818110610bdd57610bdd610fac565b9050602002810190610bef9190610fd8565b810190610bfc91906112f3565b91509150816001600160a01b03163b600003610c1757600080fd5b610c2382333084610d6b565b50505b6001016101f1565b505050505050565b610c3e610dbf565b610c57838383610c4f576000610dda565b600019610dda565b505050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b610ca0610dbf565b610caa6000610e20565b565b610cb4610dbf565b63389a75e1600c52806000526020600c208054421115610cdc57636f5e88186000526004601cfd5b60009055610ce981610e20565b50565b610cf4610dbf565b8060601b610d0a57637448fbae6000526004601cfd5b610ce981610e20565b808214610c575760405163582379b960e11b8152600481018290526024810183905260440160405180910390fd5b600082821015610d645760405163c4bd89a960e01b815260040160405180910390fd5b5090919050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af13d156001600051141716610db157637939f4246000526004601cfd5b600060605260405250505050565b638b78c6d819543314610caa576382b429006000526004601cfd5b816014528060345263095ea7b360601b60005260206000604460106000875af13d156001600051141716610e1657633e3f8f736000526004601cfd5b6000603452505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b60008060008060408587031215610e7457600080fd5b843567ffffffffffffffff80821115610e8c57600080fd5b818701915087601f830112610ea057600080fd5b813581811115610eaf57600080fd5b886020828501011115610ec157600080fd5b602092830196509450908601359080821115610edc57600080fd5b818701915087601f830112610ef057600080fd5b813581811115610eff57600080fd5b8860208260051b8501011115610f1457600080fd5b95989497505060200194505050565b6001600160a01b0381168114610ce957600080fd5b600080600060608486031215610f4d57600080fd5b8335610f5881610f23565b92506020840135610f6881610f23565b915060408401358015158114610f7d57600080fd5b809150509250925092565b600060208284031215610f9a57600080fd5b8135610fa581610f23565b9392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b6000808335601e19843603018112610fef57600080fd5b83018035915067ffffffffffffffff82111561100a57600080fd5b60200191503681900382131561101f57600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261104d57600080fd5b813567ffffffffffffffff8082111561106857611068611026565b604051601f8301601f19908116603f0116810190828211818310171561109057611090611026565b816040528381528660208588010111156110a957600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a086880312156110e157600080fd5b85356110ec81610f23565b9450602086013593506040860135925060608601359150608086013567ffffffffffffffff81111561111d57600080fd5b6111298882890161103c565b9150509295509295909350565b6000815180845260005b8181101561115c57602081850181015186830182015201611140565b506000602082860101526020601f19601f83011685010191505092915050565b600061010061119f83885180516001600160a01b03168252602090810151910152565b60208701516040840152604087015160608401526111d3608084018780516001600160a01b03168252602090810151910152565b6001600160a01b03851660c084015260e083018190526111f581840185611136565b979650505050505050565b60008060008060008060c0878903121561121957600080fd5b863561122481610f23565b95506020870135945060408701359350606087013592506080870135915060a087013567ffffffffffffffff81111561125c57600080fd5b61126889828a0161103c565b9150509295509295509295565b600061010060018060a01b0380871684528551818151166020860152816020820151166040860152604081015165ffffffffffff80821660608801528060608401511660808801525050508060208701511660a085015250604085015160c08401528060e08401526112e981840185611136565b9695505050505050565b6000806040838503121561130657600080fd5b823561131181610f23565b946020939093013593505050565b60008060006060848603121561133457600080fd5b833561133f81610f23565b9250602084013561134f81610f23565b929592945050506040919091013590565b6000806000806080858703121561137657600080fd5b843561138181610f23565b9350602085013561139181610f23565b925060408501356113a181610f23565b9396929550929360600135925050565b600080600080608085870312156113c757600080fd5b84356113d281610f23565b93506020850135925060408501359150606085013567ffffffffffffffff8111156113fc57600080fd5b6114088782880161103c565b91505092959194509250565b6000806040838503121561142757600080fd5b50508051602090910151909290915056fea264697066735822122002d0219beb8676a13f2c86e79246f9b974b7fc22b9374067fa3536150410ae3c64736f6c63430008150033", + "sourceMap": "464:7332:50:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9021:617:28;;;:::i;:::-;;1167:5973:50;;;;;;;;;;-1:-1:-1;1167:5973:50;;;;;:::i;:::-;;:::i;7146:198::-;;;;;;;;;;-1:-1:-1;7146:198:50;;;;;:::i;:::-;;:::i;9720:456:28:-;;;:::i;8762:100::-;;;:::i;11408:182::-;;;;;;;;;;-1:-1:-1;;;11556:18:28;11408:182;;-1:-1:-1;;;;;1973:32:53;;;1955:51;;1943:2;1928:18;11408:182:28;;;;;;;;10363:708;;;;;;:::i;:::-;;:::i;8348:349::-;;;;;;:::i;:::-;;:::i;11693:435::-;;;;;;;;;;-1:-1:-1;11693:435:28;;;;;:::i;:::-;11963:19;11957:4;11950:33;;;11812:14;11996:26;;;;12106:4;12090:21;;12084:28;;11693:435;;;;2415:25:53;;;2403:2;2388:18;11693:435:28;2269:177:53;9021:617:28;9114:15;7972:9;9132:46;;:15;:46;9114:64;;9346:19;9340:4;9333:33;9396:8;9390:4;9383:22;9452:7;9445:4;9439;9429:21;9422:38;9599:8;9552:45;9549:1;9546;9541:67;9248:374;9021:617::o;1167:5973:50:-;1308:53;;;1304:90;;1370:24;;-1:-1:-1;;;1370:24:50;;;;;;;;;;;1304:90;1408:16;1443:9;1438:5686;1454:29;;;1438:5686;;;1527:17;;1545:1;1527:20;;;;;;;:::i;:::-;;;;;;;;;-1:-1:-1;1596:18:50;;-1:-1:-1;1527:20:50;1570:22;;;;;;;;:::i;:::-;:44;;;;;;;;:::i;:::-;1566:5544;1638:5;1566:5544;1698:37;1683:10;1672:22;;;;;;;;;;:::i;:::-;:63;;;;;;;;:::i;:::-;;1668:5442;;1759:54;1786:18;;1805:1;1786:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;1809:3;1759:26;:54::i;:::-;1836:14;1852:15;1869:14;1885:17;1904:23;1966:18;;1985:1;1966:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;1955:78;;;;;;;:::i;:::-;2107:267;;;2186:69;;;;;-1:-1:-1;;;;;2186:69:50;;2107:267;;;2186:69;;;;;;;;;2107:267;;2186:69;2107:267;;;;;;;;;;;;2400:90;;;;;;;2457:4;2400:90;;;;;;;;2055:529;;-1:-1:-1;;;2055:529:50;;1835:198;;-1:-1:-1;1835:198:50;;-1:-1:-1;1835:198:50;;-1:-1:-1;1835:198:50;;-1:-1:-1;1835:198:50;-1:-1:-1;539:42:50;;2055:26;;:529;;2107:267;;2516:10;;1835:198;;2055:529;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1737:866;;;;;1668:5442;;;2639:25;2624:10;2613:22;;;;;;;;;;:::i;:::-;:51;;;;;;;;:::i;:::-;;2609:4501;;2688:54;2715:18;;2734:1;2715:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;2738:3;2688:26;:54::i;:::-;2790:14;2830:15;2871:19;2916:14;2956:17;2999:23;3058:18;;3077:1;3058:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;3047:87;;;;;;;:::i;:::-;2764:370;;;;;;;;;;;;539:42;-1:-1:-1;;;;;3156:14:50;;3196:10;3232:603;;;;;;;;3303:401;;;;;;;;3377:6;-1:-1:-1;;;;;3303:401:50;;;;;3433:45;3451:7;-1:-1:-1;;;;;3433:45:50;;:17;:45::i;:::-;-1:-1:-1;;;;;3303:401:50;;;;;3532:48;3550:11;3563:16;3532:17;:48::i;:::-;3303:401;;;;;;3629:43;3647:6;3655:16;3629:43;;:17;:43::i;:::-;3303:401;;;;3232:603;;3751:4;3232:603;;;;;;;;;;;3156:737;-1:-1:-1;;;;;;3156:737:50;;;;;;;;;;;3861:10;;3156:737;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2666:1246;;;;;;2609:4501;;;3948:31;3933:10;3922:22;;;;;;;;;;:::i;:::-;:57;;;;;;;;:::i;:::-;;3918:3192;;4003:53;4030:18;;4049:1;4030:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;4053:2;4003:26;:53::i;:::-;4079:14;4095:15;4125:18;;4144:1;4125:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;4114:53;;;;;;;:::i;:::-;4078:89;;-1:-1:-1;4078:89:50;-1:-1:-1;539:42:50;4189:20;4235:10;4255:4;4270:45;4078:89;-1:-1:-1;;;;;4270:17:50;:45::i;:::-;4189:157;;-1:-1:-1;;;;;;4189:157:50;;;;;;;-1:-1:-1;;;;;8514:15:53;;;4189:157:50;;;8496:34:53;8566:15;;;8546:18;;;8539:43;8618:15;;8598:18;;;8591:43;8670:15;;;8650:18;;;8643:43;8430:19;;4189:157:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3981:384;;3918:3192;;;4401:28;4386:10;4375:22;;;;;;;;;;:::i;:::-;:54;;;;;;;;:::i;:::-;;4371:2739;;4453:53;4480:18;;4499:1;4480:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;4503:2;4453:26;:53::i;:::-;4529:20;4551:22;4575:15;4629:18;;4648:1;4629:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;4618:58;;;;;;;:::i;:::-;4698:71;;-1:-1:-1;;;4698:71:50;;-1:-1:-1;;;;;9471:15:53;;;4698:71:50;;;9453:34:53;4749:10:50;9503:18:53;;;9496:43;9555:18;;;9548:34;;;4528:148:50;;-1:-1:-1;4528:148:50;;-1:-1:-1;4528:148:50;-1:-1:-1;4698:32:50;;;;;;9388:18:53;;4698:71:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4431:357;;;4371:2739;;;4824:29;4809:10;4798:22;;;;;;;;;;:::i;:::-;:55;;;;;;;;:::i;:::-;;4794:2316;;4877:54;4904:18;;4923:1;4904:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;4927:3;4877:26;:54::i;:::-;4954:20;4976:22;5000:11;5013:15;5067:18;;5086:1;5067:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;5056:67;;;;;;;:::i;:::-;5145:77;;-1:-1:-1;;;5145:77:50;;-1:-1:-1;;;;;10546:15:53;;;5145:77:50;;;10528:34:53;5197:10:50;10578:18:53;;;10571:43;10650:15;;;10630:18;;;10623:43;10682:18;;;10675:34;;;4953:170:50;;-1:-1:-1;4953:170:50;;-1:-1:-1;4953:170:50;;-1:-1:-1;4953:170:50;-1:-1:-1;5145:33:50;;;;;;10462:19:53;;5145:77:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4855:386;;;;4794:2316;;;5277:23;5262:10;5251:22;;;;;;;;;;:::i;:::-;:49;;;;;;;;:::i;:::-;;5247:1863;;5324:54;5351:18;;5370:1;5351:21;;;;;;;:::i;5324:54::-;5401:20;5423:22;5447:11;5460:15;5514:18;;5533:1;5514:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;5503:67;;;;;;;:::i;:::-;5592:71;;-1:-1:-1;;;5592:71:50;;-1:-1:-1;;;;;10546:15:53;;;5592:71:50;;;10528:34:53;5638:10:50;10578:18:53;;;10571:43;10650:15;;;10630:18;;;10623:43;10682:18;;;10675:34;;;5400:170:50;;-1:-1:-1;5400:170:50;;-1:-1:-1;5400:170:50;;-1:-1:-1;5400:170:50;-1:-1:-1;5592:27:50;;;;;;10462:19:53;;5592:71:50;10239:476:53;5247:1863:50;5718:23;5703:10;5692:22;;;;;;;;;;:::i;:::-;:49;;;;;;;;:::i;:::-;;5688:1422;;5765:53;5792:18;;5811:1;5792:21;;;;;;;:::i;5765:53::-;5841:20;5863:22;5887:15;5941:18;;5960:1;5941:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;5930:58;;;;;;;:::i;:::-;6010:66;;-1:-1:-1;;;6010:66:50;;-1:-1:-1;;;;;9471:15:53;;;6010:66:50;;;9453:34:53;6056:10:50;9503:18:53;;;9496:43;9555:18;;;9548:34;;;5840:148:50;;-1:-1:-1;5840:148:50;;-1:-1:-1;5840:148:50;-1:-1:-1;6010:27:50;;;;;;9388:18:53;;6010:66:50;9193:395:53;5688:1422:50;6131:23;6116:10;6105:22;;;;;;;;;;:::i;:::-;:49;;;;;;;;:::i;:::-;;6101:1009;;6178:54;6205:18;;6224:1;6205:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;6228:3;6178:26;:54::i;:::-;6255:12;6269:15;6286:17;6305:23;6367:18;;6386:1;6367:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;6356:67;;;;;;;:::i;:::-;6254:169;;;;;;;;6446:10;6458;6483;6472:42;;;;;;;;;;;;:::i;:::-;6445:69;;;;6536:8;6553:10;6564:2;6553:14;;;;;;;;:::i;:::-;;;;;6590:72;;-1:-1:-1;;;6590:72:50;;6604:10;6590:72;;;11936:34:53;6624:4:50;11986:18:53;;;11979:43;12038:18;;;12031:34;;;12081:18;;;12074:34;;;6553:14:50;;;;;12124:19:53;;;12117:46;;;12179:19;;;12172:35;;;12223:19;;;12216:35;;;6553:14:50;-1:-1:-1;;;;;;6590:13:50;;;;;11870:19:53;;6590:72:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6156:525;;;;;;;6101:1009;;;6717:29;6702:10;6691:22;;;;;;;;;;:::i;:::-;:55;;;;;;;;:::i;:::-;;6687:423;;6770:53;6797:18;;6816:1;6797:21;;;;;;;:::i;6770:53::-;6846:14;6862:15;6892:18;;6911:1;6892:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;6881:53;;;;;;;:::i;:::-;6845:89;;;;6960:6;-1:-1:-1;;;;;6960:18:50;;6982:1;6960:23;6956:37;;6985:8;;;6956:37;7015:76;7048:6;7056:10;7076:4;7083:7;7015:32;:76::i;:::-;6748:362;;6687:423;1485:3;;1438:5686;;;;1280:5854;1167:5973;;;;:::o;7146:198::-;12517:13:28;:11;:13::i;:::-;7256:81:50::1;7284:6;7292:13;7307:5;:29;;7335:1;7256:27;:81::i;7307:29::-;-1:-1:-1::0;;7256:27:50::1;:81::i;:::-;7146:198:::0;;;:::o;9720:456:28:-;9922:19;9916:4;9909:33;9968:8;9962:4;9955:22;10020:1;10013:4;10007;9997:21;9990:32;10151:8;10105:44;10102:1;10099;10094:66;9720:456::o;8762:100::-;12517:13;:11;:13::i;:::-;8834:21:::1;8852:1;8834:9;:21::i;:::-;8762:100::o:0;10363:708::-;12517:13;:11;:13::i;:::-;10597:19:::1;10591:4;10584:33;10643:12;10637:4;10630:26;10705:4;10699;10689:21;10811:12;10805:19;10792:11;10789:36;10786:157;;;10857:10;10851:4;10844:24;10924:4;10918;10911:18;10786:157;11020:1;10999:23:::0;;11041::::1;11051:12:::0;11041:9:::1;:23::i;:::-;10363:708:::0;:::o;8348:349::-;12517:13;:11;:13::i;:::-;8520:8:::1;8516:2;8512:17;8502:150;;8562:10;8556:4;8549:24;8633:4;8627;8620:18;8502:150;8671:19;8681:8;8671:9;:19::i;7350:277:50:-:0;7472:43;;;7468:153;;7538:72;;-1:-1:-1;;;7538:72:50;;;;;12436:25:53;;;12477:18;;;12470:34;;;12409:18;;7538:72:50;;;;;;;7633:161;7711:7;7743:3;7734:6;:12;7730:37;;;7755:12;;-1:-1:-1;;;7755:12:50;;;;;;;;;;;7730:37;-1:-1:-1;7784:3:50;;7633:161;-1:-1:-1;7633:161:50:o;8181:1139:30:-;8364:4;8358:11;8429:6;8423:4;8416:20;8494:2;8488:4;8481:16;8559:4;8555:2;8551:13;8545:4;8538:27;-1:-1:-1;;;8615:4:30;8608:48;9022:4;9016;9010;9004;9001:1;8994:5;8987;8982:45;8916:16;8909:24;8905:1;8898:4;8892:11;8889:18;8886:48;8801:244;8774:404;;9091:10;9085:4;9078:24;9159:4;9153;9146:18;8774:404;9204:1;9198:4;9191:15;9260:4;9253:15;-1:-1:-1;;;;8181:1139:30:o;7292:355:28:-;-1:-1:-1;;7498:18:28;7488:8;7485:32;7475:156;;7550:10;7544:4;7537:24;7612:4;7606;7599:18;14171:936:30;14333:2;14327:4;14320:16;14390:6;14384:4;14377:20;-1:-1:-1;;;14449:4:30;14442:48;14843:4;14837;14831;14825;14822:1;14815:5;14808;14803:45;14737:16;14730:24;14726:1;14719:4;14713:11;14710:18;14707:48;14622:244;14595:399;;14912:10;14906:4;14899:24;14975:4;14969;14962:18;14595:399;15020:1;15014:4;15007:15;14171:936;;;:::o;6145:1089:28:-;-1:-1:-1;;7093:16:28;;-1:-1:-1;;;;;6941:26:28;;;;;;7053:38;7050:1;;7042:78;7177:27;6145:1089::o;14:1092:53:-;131:6;139;147;155;208:2;196:9;187:7;183:23;179:32;176:52;;;224:1;221;214:12;176:52;264:9;251:23;293:18;334:2;326:6;323:14;320:34;;;350:1;347;340:12;320:34;388:6;377:9;373:22;363:32;;433:7;426:4;422:2;418:13;414:27;404:55;;455:1;452;445:12;404:55;495:2;482:16;521:2;513:6;510:14;507:34;;;537:1;534;527:12;507:34;584:7;577:4;568:6;564:2;560:15;556:26;553:39;550:59;;;605:1;602;595:12;550:59;636:4;628:13;;;;-1:-1:-1;660:6:53;-1:-1:-1;704:20:53;;;691:34;;737:16;;;734:36;;;766:1;763;756:12;734:36;804:8;793:9;789:24;779:34;;851:7;844:4;840:2;836:13;832:27;822:55;;873:1;870;863:12;822:55;915:2;902:16;943:2;933:8;930:16;927:36;;;959:1;956;949:12;927:36;1016:7;1009:4;997:8;994:1;990:16;986:2;982:25;978:36;975:49;972:69;;;1037:1;1034;1027:12;972:69;14:1092;;;;-1:-1:-1;;1068:4:53;1060:13;;-1:-1:-1;;;14:1092:53:o;1111:131::-;-1:-1:-1;;;;;1186:31:53;;1176:42;;1166:70;;1232:1;1229;1222:12;1247:557;1321:6;1329;1337;1390:2;1378:9;1369:7;1365:23;1361:32;1358:52;;;1406:1;1403;1396:12;1358:52;1445:9;1432:23;1464:31;1489:5;1464:31;:::i;:::-;1514:5;-1:-1:-1;1571:2:53;1556:18;;1543:32;1584:33;1543:32;1584:33;:::i;:::-;1636:7;-1:-1:-1;1695:2:53;1680:18;;1667:32;1737:15;;1730:23;1718:36;;1708:64;;1768:1;1765;1758:12;1708:64;1791:7;1781:17;;;1247:557;;;;;:::o;2017:247::-;2076:6;2129:2;2117:9;2108:7;2104:23;2100:32;2097:52;;;2145:1;2142;2135:12;2097:52;2184:9;2171:23;2203:31;2228:5;2203:31;:::i;:::-;2253:5;2017:247;-1:-1:-1;;;2017:247:53:o;2451:127::-;2512:10;2507:3;2503:20;2500:1;2493:31;2543:4;2540:1;2533:15;2567:4;2564:1;2557:15;2583:127;2644:10;2639:3;2635:20;2632:1;2625:31;2675:4;2672:1;2665:15;2699:4;2696:1;2689:15;2715:521;2792:4;2798:6;2858:11;2845:25;2952:2;2948:7;2937:8;2921:14;2917:29;2913:43;2893:18;2889:68;2879:96;;2971:1;2968;2961:12;2879:96;2998:33;;3050:20;;;-1:-1:-1;3093:18:53;3082:30;;3079:50;;;3125:1;3122;3115:12;3079:50;3158:4;3146:17;;-1:-1:-1;3189:14:53;3185:27;;;3175:38;;3172:58;;;3226:1;3223;3216:12;3172:58;2715:521;;;;;:::o;3241:127::-;3302:10;3297:3;3293:20;3290:1;3283:31;3333:4;3330:1;3323:15;3357:4;3354:1;3347:15;3373:718;3415:5;3468:3;3461:4;3453:6;3449:17;3445:27;3435:55;;3486:1;3483;3476:12;3435:55;3522:6;3509:20;3548:18;3585:2;3581;3578:10;3575:36;;;3591:18;;:::i;:::-;3666:2;3660:9;3634:2;3720:13;;-1:-1:-1;;3716:22:53;;;3740:2;3712:31;3708:40;3696:53;;;3764:18;;;3784:22;;;3761:46;3758:72;;;3810:18;;:::i;:::-;3850:10;3846:2;3839:22;3885:2;3877:6;3870:18;3931:3;3924:4;3919:2;3911:6;3907:15;3903:26;3900:35;3897:55;;;3948:1;3945;3938:12;3897:55;4012:2;4005:4;3997:6;3993:17;3986:4;3978:6;3974:17;3961:54;4059:1;4052:4;4047:2;4039:6;4035:15;4031:26;4024:37;4079:6;4070:15;;;;;;3373:718;;;;:::o;4096:669::-;4208:6;4216;4224;4232;4240;4293:3;4281:9;4272:7;4268:23;4264:33;4261:53;;;4310:1;4307;4300:12;4261:53;4349:9;4336:23;4368:31;4393:5;4368:31;:::i;:::-;4418:5;-1:-1:-1;4470:2:53;4455:18;;4442:32;;-1:-1:-1;4521:2:53;4506:18;;4493:32;;-1:-1:-1;4572:2:53;4557:18;;4544:32;;-1:-1:-1;4627:3:53;4612:19;;4599:33;4655:18;4644:30;;4641:50;;;4687:1;4684;4677:12;4641:50;4710:49;4751:7;4742:6;4731:9;4727:22;4710:49;:::i;:::-;4700:59;;;4096:669;;;;;;;;:::o;4958:422::-;4999:3;5037:5;5031:12;5064:6;5059:3;5052:19;5089:1;5099:162;5113:6;5110:1;5107:13;5099:162;;;5175:4;5231:13;;;5227:22;;5221:29;5203:11;;;5199:20;;5192:59;5128:12;5099:162;;;5103:3;5306:1;5299:4;5290:6;5285:3;5281:16;5277:27;5270:38;5369:4;5362:2;5358:7;5353:2;5345:6;5341:15;5337:29;5332:3;5328:39;5324:50;5317:57;;;4958:422;;;;:::o;5385:830::-;5739:4;5768:3;5780:60;5830:9;5821:6;5815:13;4856:12;;-1:-1:-1;;;;;4852:38:53;4840:51;;4940:4;4929:16;;;4923:23;4907:14;;4900:47;4770:183;5780:60;5896:4;5888:6;5884:17;5878:24;5871:4;5860:9;5856:20;5849:54;5959:4;5951:6;5947:17;5941:24;5934:4;5923:9;5919:20;5912:54;5975:63;6033:3;6022:9;6018:19;6010:6;4856:12;;-1:-1:-1;;;;;4852:38:53;4840:51;;4940:4;4929:16;;;4923:23;4907:14;;4900:47;4770:183;5975:63;-1:-1:-1;;;;;6075:32:53;;6069:3;6054:19;;6047:61;6139:3;6124:19;;6117:31;;;6165:44;6190:18;;;6182:6;6165:44;:::i;:::-;6157:52;5385:830;-1:-1:-1;;;;;;;5385:830:53:o;6220:738::-;6341:6;6349;6357;6365;6373;6381;6434:3;6422:9;6413:7;6409:23;6405:33;6402:53;;;6451:1;6448;6441:12;6402:53;6490:9;6477:23;6509:31;6534:5;6509:31;:::i;:::-;6559:5;-1:-1:-1;6611:2:53;6596:18;;6583:32;;-1:-1:-1;6662:2:53;6647:18;;6634:32;;-1:-1:-1;6713:2:53;6698:18;;6685:32;;-1:-1:-1;6764:3:53;6749:19;;6736:33;;-1:-1:-1;6820:3:53;6805:19;;6792:33;6848:18;6837:30;;6834:50;;;6880:1;6877;6870:12;6834:50;6903:49;6944:7;6935:6;6924:9;6920:22;6903:49;:::i;:::-;6893:59;;;6220:738;;;;;;;;:::o;6963:931::-;7191:4;7220:3;7259:1;7255;7250:3;7246:11;7242:19;7300:2;7292:6;7288:15;7277:9;7270:34;7329:6;7323:13;7387:2;7382;7376:9;7372:18;7367:2;7356:9;7352:18;7345:46;7451:2;7445;7441;7437:11;7431:18;7427:27;7422:2;7411:9;7407:18;7400:55;7498:2;7494;7490:11;7484:18;7521:14;7589:2;7575:12;7571:21;7566:2;7555:9;7551:18;7544:49;7654:2;7648;7644;7640:11;7634:18;7630:27;7624:3;7613:9;7609:19;7602:56;;;;7723:2;7717;7709:6;7705:15;7699:22;7695:31;7689:3;7678:9;7674:19;7667:60;;7782:2;7774:6;7770:15;7764:22;7758:3;7747:9;7743:19;7736:51;7824:2;7818:3;7807:9;7803:19;7796:31;7844:44;7884:2;7873:9;7869:18;7861:6;7844:44;:::i;:::-;7836:52;6963:931;-1:-1:-1;;;;;;6963:931:53:o;7899:323::-;7975:6;7983;8036:2;8024:9;8015:7;8011:23;8007:32;8004:52;;;8052:1;8049;8042:12;8004:52;8091:9;8078:23;8110:31;8135:5;8110:31;:::i;:::-;8160:5;8212:2;8197:18;;;;8184:32;;-1:-1:-1;;;7899:323:53:o;8697:491::-;8809:6;8817;8825;8878:2;8866:9;8857:7;8853:23;8849:32;8846:52;;;8894:1;8891;8884:12;8846:52;8933:9;8920:23;8952:31;8977:5;8952:31;:::i;:::-;9002:5;-1:-1:-1;9059:2:53;9044:18;;9031:32;9072:33;9031:32;9072:33;:::i;:::-;8697:491;;9124:7;;-1:-1:-1;;;9178:2:53;9163:18;;;;9150:32;;8697:491::o;9593:641::-;9722:6;9730;9738;9746;9799:3;9787:9;9778:7;9774:23;9770:33;9767:53;;;9816:1;9813;9806:12;9767:53;9855:9;9842:23;9874:31;9899:5;9874:31;:::i;:::-;9924:5;-1:-1:-1;9981:2:53;9966:18;;9953:32;9994:33;9953:32;9994:33;:::i;:::-;10046:7;-1:-1:-1;10105:2:53;10090:18;;10077:32;10118:33;10077:32;10118:33;:::i;:::-;9593:641;;;;-1:-1:-1;10170:7:53;;10224:2;10209:18;10196:32;;-1:-1:-1;;9593:641:53:o;10720:612::-;10835:6;10843;10851;10859;10912:3;10900:9;10891:7;10887:23;10883:33;10880:53;;;10929:1;10926;10919:12;10880:53;10968:9;10955:23;10987:31;11012:5;10987:31;:::i;:::-;11037:5;-1:-1:-1;11089:2:53;11074:18;;11061:32;;-1:-1:-1;11140:2:53;11125:18;;11112:32;;-1:-1:-1;11195:2:53;11180:18;;11167:32;11222:18;11211:30;;11208:50;;;11254:1;11251;11244:12;11208:50;11277:49;11318:7;11309:6;11298:9;11294:22;11277:49;:::i;:::-;11267:59;;;10720:612;;;;;;;:::o;11337:245::-;11416:6;11424;11477:2;11465:9;11456:7;11452:23;11448:32;11445:52;;;11493:1;11490;11483:12;11445:52;-1:-1:-1;;11516:16:53;;11572:2;11557:18;;;11551:25;11516:16;;11551:25;;-1:-1:-1;11337:245:53:o", "linkReferences": {} }, "methodIdentifiers": { - "multiInteract(address[],uint8[],address[],address[],uint256[])": "b54fb88e" + "approveTokenForVault(address,address,bool)": "3f7d7bc9", + "cancelOwnershipHandover()": "54d1f13d", + "completeOwnershipHandover(address)": "f04e283e", + "multiInteract(bytes,bytes[])": "2b492640", + "owner()": "8da5cb5b", + "ownershipHandoverExpiresAt(address)": "fee81cf4", + "renounceOwnership()": "715018a6", + "requestOwnershipHandover()": "25692962", + "transferOwnership(address)": "f2fde38b" }, - "rawMetadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"parameterIndex\",\"type\":\"uint256\"}],\"name\":\"MisMatchedInputsLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"contract Vault[]\",\"name\":\"_vaultContracts\",\"type\":\"address[]\"},{\"internalType\":\"enum VaultRouter.Operations[]\",\"name\":\"_operations\",\"type\":\"uint8[]\"},{\"internalType\":\"contract ERC20[]\",\"name\":\"_collateralTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_tos\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"multiInteract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/vaultRouter.sol\":\"VaultRouter\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=lib/protocol-core/lib/openzeppelin-contracts/\",\":@openzeppelin/contracts/=lib/protocol-core/lib/openzeppelin-contracts/contracts/\",\":descent-collective/protocol-core/=lib/protocol-core/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/protocol-core/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/protocol-core/lib/openzeppelin-contracts/\",\":protocol-core/=lib/protocol-core/\"]},\"sources\":{\"lib/protocol-core/lib/openzeppelin-contracts/contracts/access/AccessControl.sol\":{\"keccak256\":\"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80\",\"dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol\":{\"keccak256\":\"0x92aa1df62dc3d33f1656d63bede0923e0df0b706ad4137c8b10b0a8fe549fd92\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5c0f29195ad64cbe556da8e257dac8f05f78c53f90323c0d2accf8e6922d33a\",\"dweb:/ipfs/QmQ61TED8uaCZwcbh8KkgRSsCav7x7HbcGHwHts3U4DmUP\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229\",\"dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Permit.sol\":{\"keccak256\":\"0xc858a86a35701004d89022a5e98819aac46ccbdc4072fc9dd43928a676b1a2ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://18acebb483c512c0eaafcb437f09c839972c3f0d36f0201ea7baa2926b987dd2\",\"dweb:/ipfs/Qmd9bf2noaDSYDtf6FMSzKu7LPhuf91jsVNmcoCuTCuGic\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f5196ec75139918c6c7bb4251b36395e668f1fa6d206beba7e7520e74913940d\",\"dweb:/ipfs/QmSyqjksXxmm2mCG6qRd1yuwLykypkSVBbnBnGqJRcuJMi\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3036b3a83b7c48f96641f2a9002b9f2dcb6a5958dd670894ada21ae8229b3d0\",\"dweb:/ipfs/QmUNfSBdoVtjhETaUJCYcaC7pTMgbhht926tJ2uXJbiVd3\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7bd24e224f67f65bfadf85dc2929fa965456bb2415478bd0125471b5ce35245\",\"dweb:/ipfs/QmRaydGr8BTHs1kvaZfsNU69pKzUAGFrvABn1KiRSbE51y\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0c4e6cb30d3601e2f7af5af09e265508147cb275a8dcd99d6f7363645cc56867\",\"dweb:/ipfs/QmNgFkoXNWoUbAyw71rr1sKQ95Rj2GfvYiWg79xEYDn2NY\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Nonces.sol\":{\"keccak256\":\"0x0082767004fca261c332e9ad100868327a863a88ef724e844857128845ab350f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://132dce9686a54e025eb5ba5d2e48208f847a1ec3e60a3e527766d7bf53fb7f9e\",\"dweb:/ipfs/QmXn1a2nUZMpu2z6S88UoTfMVtY2YNh86iGrzJDYmMkKeZ\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol\":{\"keccak256\":\"0x18a7171df639a934592915a520ecb97c5bbc9675a1105607aac8a94e72bf62c6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7478e1f13da69a2867ccd883001d836b75620362e743f196376d63ed0c422a1c\",\"dweb:/ipfs/QmWywcQ9TNfwtoqAxbn25d8C5VrV12PrPS9UjtGe6pL2BA\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0x32ba59b4b7299237c8ba56319110989d7978a039faf754793064e967e5894418\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1ae50c8b562427df610cc4540c9bf104acca7ef8e2dcae567ae7e52272281e9c\",\"dweb:/ipfs/QmTHiadFCSJUPpRjNegc5SahmeU8bAoY8i9Aq6tVscbcKR\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ba80ba06c8e6be852847e4c5f4492cef801feb6558ae09ed705ff2e04ea8b13c\",\"dweb:/ipfs/QmXRJDv3xHLVQCVXg1ZvR35QS9sij5y9NDWYzMfUfAdTHF\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol\":{\"keccak256\":\"0x999f705a027ed6dc2d4e0df2cc4a509852c6bfd11de1c8161bf88832d0503fd0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0798def67258d9a3cc20b2b4da7ebf351a5cefe0abfdd665d2d81f8e32f89b21\",\"dweb:/ipfs/QmPEvJosnPfzHNjKvCv2D3891mA2Ww8eUwkqrxBjuYdHCt\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol\":{\"keccak256\":\"0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2ceacff44c0fdc81e48e0e0b1db87a2076d3c1fb497341de077bf1da9f6b406c\",\"dweb:/ipfs/QmRUo1muMRAewxrKQ7TkXUtknyRoR57AyEkoPpiuZQ8FzX\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"lib/protocol-core/src/currency.sol\":{\"keccak256\":\"0xcff030c4bad135b27acbe405aba19da1184c406c30fe6839b17ffcb8548938d4\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://8ca7791099d9f9851622964e2668477dbe07441c4d687621eaff725c7e25d48b\",\"dweb:/ipfs/QmdsMzD9aVqBym5bS4QnYnGtN8872iBck94NFeyfLirJ8Y\"]},\"lib/protocol-core/src/helpers/pausable.sol\":{\"keccak256\":\"0x8acce52dcd450c73da0f77d9539962826da23aca05aa7d0c7568614e89aed997\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://35e2f674e01c0d6107f31d1c32bb2780d442420b7d26636f560a4eb1007f4a8b\",\"dweb:/ipfs/QmWwVLUGiJq6Q3fK6Zhx4pc6kaqC73pkZ1ntfVA3QCHTpd\"]},\"lib/protocol-core/src/interfaces/ICurrency.sol\":{\"keccak256\":\"0x3b7adace3df08c34906612358d435ffff3b90b5eec0eae34b6335cc8dcd0e7ed\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://370c80ec5636bd95342256d4116f703e633e6b0467ee530397e9b5cada37f998\",\"dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz\"]},\"lib/protocol-core/src/interfaces/IVault.sol\":{\"keccak256\":\"0x0b07e90c8de2bb57e62990839bdc52077d067d9e38db6fd2a8c684dbaf74f1b4\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://50a4e4b3745f623e7ea99800c1472b5d2fdbc3332ceecc1e4eb1cb2546d6b7b5\",\"dweb:/ipfs/Qma91VRTUw3bJzxanpErFXze7R3N9gHE9pnmWm3oFwcC6g\"]},\"lib/protocol-core/src/vault.sol\":{\"keccak256\":\"0xb42eb135923431b43ccd78a05d5937dc7faf98717fabd0b3a50a030b15db7977\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://7a1cadec603bec32da036fc3f095454601105ed00b90def95fa0912ac2ea7d6d\",\"dweb:/ipfs/QmYLDswPYNPuG2RguyZbtD7cWumTZXhPmNfvwsJDr3vGyv\"]},\"src/vaultRouter.sol\":{\"keccak256\":\"0x277ae5fab67cecb12cc9d2e51229843b397b2d8be5c0b203e050fcac023ae198\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1bb1bc4a44eb8bca099512ada96dc9f528ef1f236cffd6b8e5c4084c40a0bf1a\",\"dweb:/ipfs/QmaaJeJNXXztmPDeKWaZbScLw1JHYiPVxrf5PrwPp4SLQ3\"]}},\"version\":1}", + "rawMetadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"InvalidEncodedParameterLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MisMatchedInputsLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewOwnerIsZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoHandoverRequest\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsafeCast\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"OwnershipHandoverCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"OwnershipHandoverRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_vaultAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isMax\",\"type\":\"bool\"}],\"name\":\"approveTokenForVault\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cancelOwnershipHandover\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"completeOwnershipHandover\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_packedOperations\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"_encodedParameters\",\"type\":\"bytes[]\"}],\"name\":\"multiInteract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"result\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingOwner\",\"type\":\"address\"}],\"name\":\"ownershipHandoverExpiresAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requestOwnershipHandover\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AlreadyInitialized()\":[{\"details\":\"Cannot double-initialize.\"}],\"NewOwnerIsZeroAddress()\":[{\"details\":\"The `newOwner` cannot be the zero address.\"}],\"NoHandoverRequest()\":[{\"details\":\"The `pendingOwner` does not have a valid handover request.\"}],\"Unauthorized()\":[{\"details\":\"The caller is not authorized to call the function.\"}]},\"events\":{\"OwnershipHandoverCanceled(address)\":{\"details\":\"The ownership handover to `pendingOwner` has been canceled.\"},\"OwnershipHandoverRequested(address)\":{\"details\":\"An ownership handover to `pendingOwner` has been requested.\"},\"OwnershipTransferred(address,address)\":{\"details\":\"The ownership is transferred from `oldOwner` to `newOwner`. This event is intentionally kept the same as OpenZeppelin's Ownable to be compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173), despite it not being as lightweight as a single argument event.\"}},\"kind\":\"dev\",\"methods\":{\"cancelOwnershipHandover()\":{\"details\":\"Cancels the two-step ownership handover to the caller, if any.\"},\"completeOwnershipHandover(address)\":{\"details\":\"Allows the owner to complete the two-step ownership handover to `pendingOwner`. Reverts if there is no existing ownership handover requested by `pendingOwner`.\"},\"owner()\":{\"details\":\"Returns the owner of the contract.\"},\"ownershipHandoverExpiresAt(address)\":{\"details\":\"Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`.\"},\"renounceOwnership()\":{\"details\":\"Allows the owner to renounce their ownership.\"},\"requestOwnershipHandover()\":{\"details\":\"Request a two-step ownership handover to the caller. The request will automatically expire in 48 hours (172800 seconds) by default.\"},\"transferOwnership(address)\":{\"details\":\"Allows the owner to transfer the ownership to `newOwner`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/vaultRouter.sol\":\"VaultRouter\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin-contracts/=lib/protocol-core/lib/oracle-module/lib/openzeppelin-contracts/contracts/\",\":@openzeppelin/contracts/=lib/protocol-core/lib/openzeppelin-contracts/contracts/\",\":descent-collective/oracle-module/=lib/protocol-core/lib/oracle-module/src/\",\":descent-collective/protocol-core/=lib/protocol-core/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/protocol-core/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/protocol-core/lib/openzeppelin-contracts/\",\":oracle-module/=lib/protocol-core/lib/oracle-module/\",\":permit2/=lib/permit2/src/\",\":protocol-core/=lib/protocol-core/\",\":solady/=lib/protocol-core/lib/solady/src/\",\":solmate/=lib/permit2/lib/solmate/\"]},\"sources\":{\"lib/permit2/src/interfaces/IAllowanceTransfer.sol\":{\"keccak256\":\"0x37f0ac203b6ef605c9533e1a739477e8e9dcea90710b40e645a367f8a21ace29\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e0104d72aeaec1cd66cc232e7de7b7ead08608efcc179491b8a66387614670b0\",\"dweb:/ipfs/QmfAZDyuNC9FXXbnJUwqHNwmAK6uRrXxtWEytLsxjskPsN\"]},\"lib/permit2/src/interfaces/IEIP712.sol\":{\"keccak256\":\"0xfdccf2b9639070803cd0e4198427fb0df3cc452ca59bd3b8a0d957a9a4254138\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f7c936ac42ce89e827db905a1544397f8bdf46db34cdb6aa1b90dea42fdb4c72\",\"dweb:/ipfs/QmVgurxo1N31qZqkPBirw9Z7S9tLYmv6jSwQp8R8ur2cBk\"]},\"lib/permit2/src/interfaces/IPermit2.sol\":{\"keccak256\":\"0xaa631cc9f53e699301d94233007110a345e6779011def484e8dd97b8fe0af771\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fc0502cf19c9c18f320a3001201e89e350393b75837f6b7971de18b2de06f30d\",\"dweb:/ipfs/QmT9SfhdJ7VJNNrf94g4H5usyi7ShqWGx7Cqsz9jZTjX96\"]},\"lib/permit2/src/interfaces/ISignatureTransfer.sol\":{\"keccak256\":\"0xe6df9966f8841dc3958ee86169c89de97e7f614c81c28b9dc947b12d732df64e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3d4eafdee7f48c3be8350a94eb6edd0bfb2af2c105df65787a77174f356c0317\",\"dweb:/ipfs/QmY1j2adeeAhNpn6cUuthemxGCdLXHTfyMh9yTKsY4mZ2d\"]},\"lib/protocol-core/lib/solady/src/auth/Ownable.sol\":{\"keccak256\":\"0xc208cdd9de02bbf4b5edad18b88e23a2be7ff56d2287d5649329dc7cda64b9a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e8fba079cc7230c617f7493a2e97873f88e59a53a5018fcb2e2b6ac42d8aa5a3\",\"dweb:/ipfs/QmTXg8GSt8hsK2cZhbPFrund1mrwVdkLQmEPoQaFy4fhjs\"]},\"lib/protocol-core/lib/solady/src/tokens/ERC20.sol\":{\"keccak256\":\"0xb4a3f9ba8a05107f7370de42cff57f3ad26dafd438712c11531a5892de2f59e0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f0a9ca06e3cf6dea1f9a4c5599581573b7d81cd64dc3afb582f325ccf5fdd6dc\",\"dweb:/ipfs/Qmb9r5dDceNF4W8S5u6i85RsNTgE5XG9HbTXkyS25ad3C6\"]},\"lib/protocol-core/lib/solady/src/utils/SafeTransferLib.sol\":{\"keccak256\":\"0xf98506fade18a92e3d8d0a0ca0bdaeaa099d7620aac2a9d76b5f3d0bcd10691c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a3495c9d108bc69951a12c5ce9f05851cc921f0bb69e2505756e79f3ddab4e1a\",\"dweb:/ipfs/QmT3XwbmdbQCxw7iNcF7DoiypDd5vs2ETFWirXqmJ86Meg\"]},\"lib/protocol-core/src/currency.sol\":{\"keccak256\":\"0xc266e97010a71e6ac755dce3e51a5a5844663b355e20ab40bf2020fd9308369b\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://d2660220b8a14c6d06351765dd7accec03e350e7fa9ae960c1505bea1e5d8d2d\",\"dweb:/ipfs/QmdYdPSnQC2nym38Fca4vRLKU4A78AQkgYasdg3TaRLGNY\"]},\"lib/protocol-core/src/helpers/pausable.sol\":{\"keccak256\":\"0x8acce52dcd450c73da0f77d9539962826da23aca05aa7d0c7568614e89aed997\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://35e2f674e01c0d6107f31d1c32bb2780d442420b7d26636f560a4eb1007f4a8b\",\"dweb:/ipfs/QmWwVLUGiJq6Q3fK6Zhx4pc6kaqC73pkZ1ntfVA3QCHTpd\"]},\"lib/protocol-core/src/interfaces/ICurrency.sol\":{\"keccak256\":\"0x3b7adace3df08c34906612358d435ffff3b90b5eec0eae34b6335cc8dcd0e7ed\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://370c80ec5636bd95342256d4116f703e633e6b0467ee530397e9b5cada37f998\",\"dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz\"]},\"lib/protocol-core/src/interfaces/IRate.sol\":{\"keccak256\":\"0x166dc423b74b60302197a27fb64557ee8ef6bafe416deb08fe7ecf94f0ede1d1\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://123ef521857e33b10b6f92b743831b26dd5100e57271353bf5c1882fc41c6a2e\",\"dweb:/ipfs/QmdK5y8SntLHAVoNRq6isddmNYunrpv1JxAxyEgRiHdAAj\"]},\"lib/protocol-core/src/interfaces/IVault.sol\":{\"keccak256\":\"0x5684f59679e090ebe583d31fda6d8882469436e71670a4873151793675c7c6c4\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b265c21b1ff01a8c5cf9b1120feb6b5419a96a0e2a6d1ff4bdd89934c7869c9c\",\"dweb:/ipfs/QmdbCgiYE763cAHZ6nevhf7EzF8BzEkfwsbw4qWuxBkm8f\"]},\"lib/protocol-core/src/mocks/ERC20Token.sol\":{\"keccak256\":\"0x62b878fb4dde1f455866e0c1290cc50714805d02c2848a4a9bb33c5dfbc8464d\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://7af3f5638d366abfbca3186813449259a33ed43e7c13ec983d389d73df1ad204\",\"dweb:/ipfs/QmeMdoEVTGqdcgSicTTcmycSQjToT7Sn5ZTgZdVFH9E6HA\"]},\"lib/protocol-core/src/vault.sol\":{\"keccak256\":\"0xfed823950fe0e1c09191b596b689d5c2942de66ec13cba4ad5a799cecee2f140\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://a044bd7f626b4835fe13962c0873ddab89030b362049fdd00050cc9c072371b5\",\"dweb:/ipfs/QmTiH4NcKNXYfPd4AipFWVkjveJFcJCQtjsGWsxobs4fW1\"]},\"src/vaultRouter.sol\":{\"keccak256\":\"0x1bc0cd476a75b0743449179be45058e351abfd82fed032134d7a9464a23674ad\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://04c7f777f6f8200baaaa6bec6b4ddea803058afeaecc880a3bb8eb928d69ed51\",\"dweb:/ipfs/QmTyyesneXtrXnETLNBCNWGYGL1myRnS4g8ESKStbr9HQ4\"]}},\"version\":1}", "metadata": { "compiler": { "version": "0.8.21+commit.d9974bed" @@ -66,53 +246,241 @@ "language": "Solidity", "output": { "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "type": "error", + "name": "AlreadyInitialized" + }, { "inputs": [ { "internalType": "uint256", - "name": "parameterIndex", + "name": "expectedLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "length", "type": "uint256" } ], "type": "error", + "name": "InvalidEncodedParameterLength" + }, + { + "inputs": [], + "type": "error", "name": "MisMatchedInputsLength" }, + { + "inputs": [], + "type": "error", + "name": "NewOwnerIsZeroAddress" + }, + { + "inputs": [], + "type": "error", + "name": "NoHandoverRequest" + }, + { + "inputs": [], + "type": "error", + "name": "Unauthorized" + }, + { + "inputs": [], + "type": "error", + "name": "UnsafeCast" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pendingOwner", + "type": "address", + "indexed": true + } + ], + "type": "event", + "name": "OwnershipHandoverCanceled", + "anonymous": false + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pendingOwner", + "type": "address", + "indexed": true + } + ], + "type": "event", + "name": "OwnershipHandoverRequested", + "anonymous": false + }, { "inputs": [ { - "internalType": "contract Vault[]", - "name": "_vaultContracts", - "type": "address[]" + "internalType": "address", + "name": "oldOwner", + "type": "address", + "indexed": true }, { - "internalType": "enum VaultRouter.Operations[]", - "name": "_operations", - "type": "uint8[]" + "internalType": "address", + "name": "newOwner", + "type": "address", + "indexed": true + } + ], + "type": "event", + "name": "OwnershipTransferred", + "anonymous": false + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" }, { - "internalType": "contract ERC20[]", - "name": "_collateralTokens", - "type": "address[]" + "internalType": "address", + "name": "_vaultAddress", + "type": "address" }, { - "internalType": "address[]", - "name": "_tos", - "type": "address[]" + "internalType": "bool", + "name": "isMax", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function", + "name": "approveTokenForVault" + }, + { + "inputs": [], + "stateMutability": "payable", + "type": "function", + "name": "cancelOwnershipHandover" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pendingOwner", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function", + "name": "completeOwnershipHandover" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_packedOperations", + "type": "bytes" }, { - "internalType": "uint256[]", - "name": "_amounts", - "type": "uint256[]" + "internalType": "bytes[]", + "name": "_encodedParameters", + "type": "bytes[]" } ], "stateMutability": "nonpayable", "type": "function", "name": "multiInteract" + }, + { + "inputs": [], + "stateMutability": "view", + "type": "function", + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "result", + "type": "address" + } + ] + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pendingOwner", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "name": "ownershipHandoverExpiresAt", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ] + }, + { + "inputs": [], + "stateMutability": "payable", + "type": "function", + "name": "renounceOwnership" + }, + { + "inputs": [], + "stateMutability": "payable", + "type": "function", + "name": "requestOwnershipHandover" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function", + "name": "transferOwnership" } ], "devdoc": { "kind": "dev", - "methods": {}, + "methods": { + "cancelOwnershipHandover()": { + "details": "Cancels the two-step ownership handover to the caller, if any." + }, + "completeOwnershipHandover(address)": { + "details": "Allows the owner to complete the two-step ownership handover to `pendingOwner`. Reverts if there is no existing ownership handover requested by `pendingOwner`." + }, + "owner()": { + "details": "Returns the owner of the contract." + }, + "ownershipHandoverExpiresAt(address)": { + "details": "Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`." + }, + "renounceOwnership()": { + "details": "Allows the owner to renounce their ownership." + }, + "requestOwnershipHandover()": { + "details": "Request a two-step ownership handover to the caller. The request will automatically expire in 48 hours (172800 seconds) by default." + }, + "transferOwnership(address)": { + "details": "Allows the owner to transfer the ownership to `newOwner`." + } + }, "version": 1 }, "userdoc": { @@ -123,14 +491,20 @@ }, "settings": { "remappings": [ - "@openzeppelin/=lib/protocol-core/lib/openzeppelin-contracts/", + "@openzeppelin-contracts/=lib/protocol-core/lib/oracle-module/lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts/=lib/protocol-core/lib/openzeppelin-contracts/contracts/", + "descent-collective/oracle-module/=lib/protocol-core/lib/oracle-module/src/", "descent-collective/protocol-core/=lib/protocol-core/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/protocol-core/lib/openzeppelin-contracts/lib/erc4626-tests/", + "forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/protocol-core/lib/openzeppelin-contracts/", - "protocol-core/=lib/protocol-core/" + "oracle-module/=lib/protocol-core/lib/oracle-module/", + "permit2/=lib/permit2/src/", + "protocol-core/=lib/protocol-core/", + "solady/=lib/protocol-core/lib/solady/src/", + "solmate/=lib/permit2/lib/solmate/" ], "optimizer": { "enabled": true, @@ -145,278 +519,224 @@ "libraries": {} }, "sources": { - "lib/protocol-core/lib/openzeppelin-contracts/contracts/access/AccessControl.sol": { - "keccak256": "0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308", + "lib/permit2/src/interfaces/IAllowanceTransfer.sol": { + "keccak256": "0x37f0ac203b6ef605c9533e1a739477e8e9dcea90710b40e645a367f8a21ace29", "urls": [ - "bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80", - "dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z" + "bzz-raw://e0104d72aeaec1cd66cc232e7de7b7ead08608efcc179491b8a66387614670b0", + "dweb:/ipfs/QmfAZDyuNC9FXXbnJUwqHNwmAK6uRrXxtWEytLsxjskPsN" ], "license": "MIT" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/access/IAccessControl.sol": { - "keccak256": "0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41", + "lib/permit2/src/interfaces/IEIP712.sol": { + "keccak256": "0xfdccf2b9639070803cd0e4198427fb0df3cc452ca59bd3b8a0d957a9a4254138", "urls": [ - "bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26", - "dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH" + "bzz-raw://f7c936ac42ce89e827db905a1544397f8bdf46db34cdb6aa1b90dea42fdb4c72", + "dweb:/ipfs/QmVgurxo1N31qZqkPBirw9Z7S9tLYmv6jSwQp8R8ur2cBk" ], "license": "MIT" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol": { - "keccak256": "0x92aa1df62dc3d33f1656d63bede0923e0df0b706ad4137c8b10b0a8fe549fd92", + "lib/permit2/src/interfaces/IPermit2.sol": { + "keccak256": "0xaa631cc9f53e699301d94233007110a345e6779011def484e8dd97b8fe0af771", "urls": [ - "bzz-raw://c5c0f29195ad64cbe556da8e257dac8f05f78c53f90323c0d2accf8e6922d33a", - "dweb:/ipfs/QmQ61TED8uaCZwcbh8KkgRSsCav7x7HbcGHwHts3U4DmUP" + "bzz-raw://fc0502cf19c9c18f320a3001201e89e350393b75837f6b7971de18b2de06f30d", + "dweb:/ipfs/QmT9SfhdJ7VJNNrf94g4H5usyi7ShqWGx7Cqsz9jZTjX96" ], "license": "MIT" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol": { - "keccak256": "0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7", + "lib/permit2/src/interfaces/ISignatureTransfer.sol": { + "keccak256": "0xe6df9966f8841dc3958ee86169c89de97e7f614c81c28b9dc947b12d732df64e", "urls": [ - "bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f", - "dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt" + "bzz-raw://3d4eafdee7f48c3be8350a94eb6edd0bfb2af2c105df65787a77174f356c0317", + "dweb:/ipfs/QmY1j2adeeAhNpn6cUuthemxGCdLXHTfyMh9yTKsY4mZ2d" ], "license": "MIT" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol": { - "keccak256": "0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80", + "lib/protocol-core/lib/solady/src/auth/Ownable.sol": { + "keccak256": "0xc208cdd9de02bbf4b5edad18b88e23a2be7ff56d2287d5649329dc7cda64b9a3", "urls": [ - "bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229", - "dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS" + "bzz-raw://e8fba079cc7230c617f7493a2e97873f88e59a53a5018fcb2e2b6ac42d8aa5a3", + "dweb:/ipfs/QmTXg8GSt8hsK2cZhbPFrund1mrwVdkLQmEPoQaFy4fhjs" ], "license": "MIT" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol": { - "keccak256": "0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70", + "lib/protocol-core/lib/solady/src/tokens/ERC20.sol": { + "keccak256": "0xb4a3f9ba8a05107f7370de42cff57f3ad26dafd438712c11531a5892de2f59e0", "urls": [ - "bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c", - "dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq" + "bzz-raw://f0a9ca06e3cf6dea1f9a4c5599581573b7d81cd64dc3afb582f325ccf5fdd6dc", + "dweb:/ipfs/Qmb9r5dDceNF4W8S5u6i85RsNTgE5XG9HbTXkyS25ad3C6" ], "license": "MIT" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Permit.sol": { - "keccak256": "0xc858a86a35701004d89022a5e98819aac46ccbdc4072fc9dd43928a676b1a2ee", + "lib/protocol-core/lib/solady/src/utils/SafeTransferLib.sol": { + "keccak256": "0xf98506fade18a92e3d8d0a0ca0bdaeaa099d7620aac2a9d76b5f3d0bcd10691c", "urls": [ - "bzz-raw://18acebb483c512c0eaafcb437f09c839972c3f0d36f0201ea7baa2926b987dd2", - "dweb:/ipfs/Qmd9bf2noaDSYDtf6FMSzKu7LPhuf91jsVNmcoCuTCuGic" + "bzz-raw://a3495c9d108bc69951a12c5ce9f05851cc921f0bb69e2505756e79f3ddab4e1a", + "dweb:/ipfs/QmT3XwbmdbQCxw7iNcF7DoiypDd5vs2ETFWirXqmJ86Meg" ], "license": "MIT" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "keccak256": "0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2", + "lib/protocol-core/src/currency.sol": { + "keccak256": "0xc266e97010a71e6ac755dce3e51a5a5844663b355e20ab40bf2020fd9308369b", "urls": [ - "bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850", - "dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV" + "bzz-raw://d2660220b8a14c6d06351765dd7accec03e350e7fa9ae960c1505bea1e5d8d2d", + "dweb:/ipfs/QmdYdPSnQC2nym38Fca4vRLKU4A78AQkgYasdg3TaRLGNY" ], - "license": "MIT" + "license": "GPL-3.0" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol": { - "keccak256": "0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff", + "lib/protocol-core/src/helpers/pausable.sol": { + "keccak256": "0x8acce52dcd450c73da0f77d9539962826da23aca05aa7d0c7568614e89aed997", "urls": [ - "bzz-raw://f5196ec75139918c6c7bb4251b36395e668f1fa6d206beba7e7520e74913940d", - "dweb:/ipfs/QmSyqjksXxmm2mCG6qRd1yuwLykypkSVBbnBnGqJRcuJMi" + "bzz-raw://35e2f674e01c0d6107f31d1c32bb2780d442420b7d26636f560a4eb1007f4a8b", + "dweb:/ipfs/QmWwVLUGiJq6Q3fK6Zhx4pc6kaqC73pkZ1ntfVA3QCHTpd" ], - "license": "MIT" + "license": "GPL-3.0" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol": { - "keccak256": "0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386", + "lib/protocol-core/src/interfaces/ICurrency.sol": { + "keccak256": "0x3b7adace3df08c34906612358d435ffff3b90b5eec0eae34b6335cc8dcd0e7ed", "urls": [ - "bzz-raw://b3036b3a83b7c48f96641f2a9002b9f2dcb6a5958dd670894ada21ae8229b3d0", - "dweb:/ipfs/QmUNfSBdoVtjhETaUJCYcaC7pTMgbhht926tJ2uXJbiVd3" + "bzz-raw://370c80ec5636bd95342256d4116f703e633e6b0467ee530397e9b5cada37f998", + "dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz" ], - "license": "MIT" + "license": "GPL-3.0" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Address.sol": { - "keccak256": "0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721", + "lib/protocol-core/src/interfaces/IRate.sol": { + "keccak256": "0x166dc423b74b60302197a27fb64557ee8ef6bafe416deb08fe7ecf94f0ede1d1", "urls": [ - "bzz-raw://b7bd24e224f67f65bfadf85dc2929fa965456bb2415478bd0125471b5ce35245", - "dweb:/ipfs/QmRaydGr8BTHs1kvaZfsNU69pKzUAGFrvABn1KiRSbE51y" + "bzz-raw://123ef521857e33b10b6f92b743831b26dd5100e57271353bf5c1882fc41c6a2e", + "dweb:/ipfs/QmdK5y8SntLHAVoNRq6isddmNYunrpv1JxAxyEgRiHdAAj" ], - "license": "MIT" + "license": "GPL-3.0" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Context.sol": { - "keccak256": "0x75a4ee64c68dbd5f38bddd06e664a64c8271b4caa554fb6f0607dfd672bb4bf3", + "lib/protocol-core/src/interfaces/IVault.sol": { + "keccak256": "0x5684f59679e090ebe583d31fda6d8882469436e71670a4873151793675c7c6c4", "urls": [ - "bzz-raw://0c4e6cb30d3601e2f7af5af09e265508147cb275a8dcd99d6f7363645cc56867", - "dweb:/ipfs/QmNgFkoXNWoUbAyw71rr1sKQ95Rj2GfvYiWg79xEYDn2NY" + "bzz-raw://b265c21b1ff01a8c5cf9b1120feb6b5419a96a0e2a6d1ff4bdd89934c7869c9c", + "dweb:/ipfs/QmdbCgiYE763cAHZ6nevhf7EzF8BzEkfwsbw4qWuxBkm8f" ], - "license": "MIT" + "license": "GPL-3.0" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Nonces.sol": { - "keccak256": "0x0082767004fca261c332e9ad100868327a863a88ef724e844857128845ab350f", + "lib/protocol-core/src/mocks/ERC20Token.sol": { + "keccak256": "0x62b878fb4dde1f455866e0c1290cc50714805d02c2848a4a9bb33c5dfbc8464d", "urls": [ - "bzz-raw://132dce9686a54e025eb5ba5d2e48208f847a1ec3e60a3e527766d7bf53fb7f9e", - "dweb:/ipfs/QmXn1a2nUZMpu2z6S88UoTfMVtY2YNh86iGrzJDYmMkKeZ" + "bzz-raw://7af3f5638d366abfbca3186813449259a33ed43e7c13ec983d389d73df1ad204", + "dweb:/ipfs/QmeMdoEVTGqdcgSicTTcmycSQjToT7Sn5ZTgZdVFH9E6HA" ], - "license": "MIT" + "license": "GPL-3.0" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol": { - "keccak256": "0x18a7171df639a934592915a520ecb97c5bbc9675a1105607aac8a94e72bf62c6", + "lib/protocol-core/src/vault.sol": { + "keccak256": "0xfed823950fe0e1c09191b596b689d5c2942de66ec13cba4ad5a799cecee2f140", "urls": [ - "bzz-raw://7478e1f13da69a2867ccd883001d836b75620362e743f196376d63ed0c422a1c", - "dweb:/ipfs/QmWywcQ9TNfwtoqAxbn25d8C5VrV12PrPS9UjtGe6pL2BA" + "bzz-raw://a044bd7f626b4835fe13962c0873ddab89030b362049fdd00050cc9c072371b5", + "dweb:/ipfs/QmTiH4NcKNXYfPd4AipFWVkjveJFcJCQtjsGWsxobs4fW1" ], - "license": "MIT" + "license": "GPL-3.0" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol": { - "keccak256": "0x32ba59b4b7299237c8ba56319110989d7978a039faf754793064e967e5894418", + "src/vaultRouter.sol": { + "keccak256": "0x1bc0cd476a75b0743449179be45058e351abfd82fed032134d7a9464a23674ad", "urls": [ - "bzz-raw://1ae50c8b562427df610cc4540c9bf104acca7ef8e2dcae567ae7e52272281e9c", - "dweb:/ipfs/QmTHiadFCSJUPpRjNegc5SahmeU8bAoY8i9Aq6tVscbcKR" + "bzz-raw://04c7f777f6f8200baaaa6bec6b4ddea803058afeaecc880a3bb8eb928d69ed51", + "dweb:/ipfs/QmTyyesneXtrXnETLNBCNWGYGL1myRnS4g8ESKStbr9HQ4" ], "license": "MIT" + } + }, + "version": 1 + }, + "ast": { + "absolutePath": "src/vaultRouter.sol", + "id": 51655, + "exportedSymbols": { + "ERC20": [46441], + "IAllowanceTransfer": [43676], + "IPermit2": [43696], + "ISignatureTransfer": [43836], + "Ownable": [44998], + "SafeTransferLib": [45613], + "Vault": [48277], + "VaultRouter": [51654] + }, + "nodeType": "SourceUnit", + "src": "32:7765:50", + "nodes": [ + { + "id": 50945, + "nodeType": "PragmaDirective", + "src": "32:23:50", + "nodes": [], + "literals": ["solidity", "0.8", ".21"] }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/Strings.sol": { - "keccak256": "0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792", - "urls": [ - "bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453", - "dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i" + { + "id": 50947, + "nodeType": "ImportDirective", + "src": "104:79:50", + "nodes": [], + "absolutePath": "lib/protocol-core/src/vault.sol", + "file": "descent-collective/protocol-core/vault.sol", + "nameLocation": "-1:-1:-1", + "scope": 51655, + "sourceUnit": 48278, + "symbolAliases": [ + { + "foreign": { + "id": 50946, + "name": "ERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46441, + "src": "112:10:50", + "typeDescriptions": {} + }, + "local": "ERC20", + "nameLocation": "-1:-1:-1" + } ], - "license": "MIT" + "unitAlias": "" }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol": { - "keccak256": "0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf", - "urls": [ - "bzz-raw://ba80ba06c8e6be852847e4c5f4492cef801feb6558ae09ed705ff2e04ea8b13c", - "dweb:/ipfs/QmXRJDv3xHLVQCVXg1ZvR35QS9sij5y9NDWYzMfUfAdTHF" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol": { - "keccak256": "0x999f705a027ed6dc2d4e0df2cc4a509852c6bfd11de1c8161bf88832d0503fd0", - "urls": [ - "bzz-raw://0798def67258d9a3cc20b2b4da7ebf351a5cefe0abfdd665d2d81f8e32f89b21", - "dweb:/ipfs/QmPEvJosnPfzHNjKvCv2D3891mA2Ww8eUwkqrxBjuYdHCt" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol": { - "keccak256": "0xba333517a3add42cd35fe877656fc3dfcc9de53baa4f3aabbd6d12a92e4ea435", - "urls": [ - "bzz-raw://2ceacff44c0fdc81e48e0e0b1db87a2076d3c1fb497341de077bf1da9f6b406c", - "dweb:/ipfs/QmRUo1muMRAewxrKQ7TkXUtknyRoR57AyEkoPpiuZQ8FzX" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol": { - "keccak256": "0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133", - "urls": [ - "bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8", - "dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol": { - "keccak256": "0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b", - "urls": [ - "bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df", - "dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/math/Math.sol": { - "keccak256": "0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d", - "urls": [ - "bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875", - "dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L" - ], - "license": "MIT" - }, - "lib/protocol-core/lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol": { - "keccak256": "0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72", - "urls": [ - "bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc", - "dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT" - ], - "license": "MIT" - }, - "lib/protocol-core/src/currency.sol": { - "keccak256": "0xcff030c4bad135b27acbe405aba19da1184c406c30fe6839b17ffcb8548938d4", - "urls": [ - "bzz-raw://8ca7791099d9f9851622964e2668477dbe07441c4d687621eaff725c7e25d48b", - "dweb:/ipfs/QmdsMzD9aVqBym5bS4QnYnGtN8872iBck94NFeyfLirJ8Y" - ], - "license": "GPL-3.0" - }, - "lib/protocol-core/src/helpers/pausable.sol": { - "keccak256": "0x8acce52dcd450c73da0f77d9539962826da23aca05aa7d0c7568614e89aed997", - "urls": [ - "bzz-raw://35e2f674e01c0d6107f31d1c32bb2780d442420b7d26636f560a4eb1007f4a8b", - "dweb:/ipfs/QmWwVLUGiJq6Q3fK6Zhx4pc6kaqC73pkZ1ntfVA3QCHTpd" - ], - "license": "GPL-3.0" - }, - "lib/protocol-core/src/interfaces/ICurrency.sol": { - "keccak256": "0x3b7adace3df08c34906612358d435ffff3b90b5eec0eae34b6335cc8dcd0e7ed", - "urls": [ - "bzz-raw://370c80ec5636bd95342256d4116f703e633e6b0467ee530397e9b5cada37f998", - "dweb:/ipfs/QmPQ5KY37JpfuSAXpJ16kBXAQVJcE253cfjYGcBEcMLERz" - ], - "license": "GPL-3.0" - }, - "lib/protocol-core/src/interfaces/IVault.sol": { - "keccak256": "0x0b07e90c8de2bb57e62990839bdc52077d067d9e38db6fd2a8c684dbaf74f1b4", - "urls": [ - "bzz-raw://50a4e4b3745f623e7ea99800c1472b5d2fdbc3332ceecc1e4eb1cb2546d6b7b5", - "dweb:/ipfs/Qma91VRTUw3bJzxanpErFXze7R3N9gHE9pnmWm3oFwcC6g" - ], - "license": "GPL-3.0" - }, - "lib/protocol-core/src/vault.sol": { - "keccak256": "0xb42eb135923431b43ccd78a05d5937dc7faf98717fabd0b3a50a030b15db7977", - "urls": [ - "bzz-raw://7a1cadec603bec32da036fc3f095454601105ed00b90def95fa0912ac2ea7d6d", - "dweb:/ipfs/QmYLDswPYNPuG2RguyZbtD7cWumTZXhPmNfvwsJDr3vGyv" - ], - "license": "GPL-3.0" - }, - "src/vaultRouter.sol": { - "keccak256": "0x277ae5fab67cecb12cc9d2e51229843b397b2d8be5c0b203e050fcac023ae198", - "urls": [ - "bzz-raw://1bb1bc4a44eb8bca099512ada96dc9f528ef1f236cffd6b8e5c4084c40a0bf1a", - "dweb:/ipfs/QmaaJeJNXXztmPDeKWaZbScLw1JHYiPVxrf5PrwPp4SLQ3" - ], - "license": "MIT" - } - }, - "version": 1 - }, - "ast": { - "absolutePath": "src/vaultRouter.sol", - "id": 52401, - "exportedSymbols": { - "ERC20": [45654], - "Vault": [51076], - "VaultRouter": [52400] - }, - "nodeType": "SourceUnit", - "src": "32:2354:54", - "nodes": [ { - "id": 52217, - "nodeType": "PragmaDirective", - "src": "32:23:54", + "id": 50949, + "nodeType": "ImportDirective", + "src": "184:48:50", "nodes": [], - "literals": ["solidity", "0.8", ".21"] + "absolutePath": "lib/protocol-core/lib/solady/src/auth/Ownable.sol", + "file": "solady/auth/Ownable.sol", + "nameLocation": "-1:-1:-1", + "scope": 51655, + "sourceUnit": 44999, + "symbolAliases": [ + { + "foreign": { + "id": 50948, + "name": "Ownable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44998, + "src": "192:7:50", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" }, { - "id": 52219, + "id": 50951, "nodeType": "ImportDirective", - "src": "104:68:54", + "src": "233:65:50", "nodes": [], - "absolutePath": "lib/protocol-core/lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "absolutePath": "lib/protocol-core/lib/solady/src/utils/SafeTransferLib.sol", + "file": "solady/utils/SafeTransferLib.sol", "nameLocation": "-1:-1:-1", - "scope": 52401, - "sourceUnit": 45655, + "scope": 51655, + "sourceUnit": 45614, "symbolAliases": [ { "foreign": { - "id": 52218, - "name": "ERC20", + "id": 50950, + "name": "SafeTransferLib", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 45654, - "src": "112:5:54", + "referencedDeclaration": 45613, + "src": "241:15:50", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -425,24 +745,74 @@ "unitAlias": "" }, { - "id": 52221, + "id": 50953, "nodeType": "ImportDirective", - "src": "173:65:54", + "src": "299:65:50", "nodes": [], "absolutePath": "lib/protocol-core/src/vault.sol", "file": "descent-collective/protocol-core/vault.sol", "nameLocation": "-1:-1:-1", - "scope": 52401, - "sourceUnit": 51077, + "scope": 51655, + "sourceUnit": 48278, "symbolAliases": [ { "foreign": { - "id": 52220, + "id": 50952, "name": "Vault", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51076, - "src": "181:5:54", + "referencedDeclaration": 48277, + "src": "307:5:50", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "id": 50957, + "nodeType": "ImportDirective", + "src": "365:97:50", + "nodes": [], + "absolutePath": "lib/permit2/src/interfaces/IPermit2.sol", + "file": "permit2/interfaces/IPermit2.sol", + "nameLocation": "-1:-1:-1", + "scope": 51655, + "sourceUnit": 43697, + "symbolAliases": [ + { + "foreign": { + "id": 50954, + "name": "IPermit2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43696, + "src": "373:8:50", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 50955, + "name": "ISignatureTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43836, + "src": "383:18:50", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 50956, + "name": "IAllowanceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43676, + "src": "403:18:50", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -451,31 +821,177 @@ "unitAlias": "" }, { - "id": 52400, + "id": 51654, "nodeType": "ContractDefinition", - "src": "240:2145:54", + "src": "464:7332:50", "nodes": [ { - "id": 52225, + "id": 50965, + "nodeType": "VariableDeclaration", + "src": "502:80:50", + "nodes": [], + "constant": true, + "mutability": "constant", + "name": "permit2", + "nameLocation": "520:7:50", + "scope": 51654, + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPermit2_$43696", + "typeString": "contract IPermit2" + }, + "typeName": { + "id": 50961, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 50960, + "name": "IPermit2", + "nameLocations": ["502:8:50"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 43696, + "src": "502:8:50" + }, + "referencedDeclaration": 43696, + "src": "502:8:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPermit2_$43696", + "typeString": "contract IPermit2" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307830303030303030303030323244343733303330463131366444454539463642343361433738424133", + "id": 50963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "539:42:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x000000000022D473030F116dDEE9F6B43aC78BA3" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 50962, + "name": "IPermit2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43696, + "src": "530:8:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IPermit2_$43696_$", + "typeString": "type(contract IPermit2)" + } + }, + "id": 50964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "530:52:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPermit2_$43696", + "typeString": "contract IPermit2" + } + }, + "visibility": "internal" + }, + { + "id": 50967, "nodeType": "ErrorDefinition", - "src": "267:53:54", + "src": "589:31:50", "nodes": [], - "errorSelector": "8aa3abdb", + "errorSelector": "3a89615b", "name": "MisMatchedInputsLength", - "nameLocation": "273:22:54", + "nameLocation": "595:22:50", + "parameters": { + "id": 50966, + "nodeType": "ParameterList", + "parameters": [], + "src": "617:2:50" + } + }, + { + "id": 50969, + "nodeType": "ErrorDefinition", + "src": "625:19:50", + "nodes": [], + "errorSelector": "c4bd89a9", + "name": "UnsafeCast", + "nameLocation": "631:10:50", "parameters": { - "id": 52224, + "id": 50968, + "nodeType": "ParameterList", + "parameters": [], + "src": "641:2:50" + } + }, + { + "id": 50975, + "nodeType": "ErrorDefinition", + "src": "649:76:50", + "nodes": [], + "errorSelector": "b046f372", + "name": "InvalidEncodedParameterLength", + "nameLocation": "655:29:50", + "parameters": { + "id": 50974, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 52223, + "id": 50971, + "mutability": "mutable", + "name": "expectedLength", + "nameLocation": "693:14:50", + "nodeType": "VariableDeclaration", + "scope": 50975, + "src": "685:22:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 50970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "685:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 50973, "mutability": "mutable", - "name": "parameterIndex", - "nameLocation": "304:14:54", + "name": "length", + "nameLocation": "717:6:50", "nodeType": "VariableDeclaration", - "scope": 52225, - "src": "296:22:54", + "scope": 50975, + "src": "709:14:50", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -483,10 +999,10 @@ "typeString": "uint256" }, "typeName": { - "id": 52222, + "id": 50972, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "296:7:54", + "src": "709:7:50", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -495,883 +1011,534 @@ "visibility": "internal" } ], - "src": "295:24:54" + "src": "684:40:50" } }, { - "id": 52230, + "id": 50984, + "nodeType": "FunctionDefinition", + "src": "731:59:50", + "nodes": [], + "body": { + "id": 50983, + "nodeType": "Block", + "src": "745:45:50", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 50979, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "772:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 50980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "776:6:50", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "772:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 50978, + "name": "_initializeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44877, + "src": "755:16:50", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 50981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "755:28:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 50982, + "nodeType": "ExpressionStatement", + "src": "755:28:50" + } + ] + }, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "parameters": { + "id": 50976, + "nodeType": "ParameterList", + "parameters": [], + "src": "742:2:50" + }, + "returnParameters": { + "id": 50977, + "nodeType": "ParameterList", + "parameters": [], + "src": "745:0:50" + }, + "scope": 51654, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "id": 50995, "nodeType": "EnumDefinition", - "src": "326:121:54", + "src": "796:365:50", "nodes": [], "canonicalName": "VaultRouter.Operations", "members": [ { - "id": 52226, + "id": 50985, + "name": "Invalid", + "nameLocation": "822:7:50", + "nodeType": "EnumValue", + "src": "822:7:50" + }, + { + "id": 50986, "name": "DepositCollateral", - "nameLocation": "352:17:54", + "nameLocation": "867:17:50", "nodeType": "EnumValue", - "src": "352:17:54" + "src": "867:17:50" }, { - "id": 52227, + "id": 50987, "name": "WithdrawCollateral", - "nameLocation": "379:18:54", + "nameLocation": "894:18:50", "nodeType": "EnumValue", - "src": "379:18:54" + "src": "894:18:50" }, { - "id": 52228, + "id": 50988, "name": "MintCurrency", - "nameLocation": "407:12:54", + "nameLocation": "922:12:50", "nodeType": "EnumValue", - "src": "407:12:54" + "src": "922:12:50" }, { - "id": 52229, + "id": 50989, "name": "BurnCurrency", - "nameLocation": "429:12:54", + "nameLocation": "944:12:50", + "nodeType": "EnumValue", + "src": "944:12:50" + }, + { + "id": 50990, + "name": "Permit2_PermitTransferFrom", + "nameLocation": "996:26:50", + "nodeType": "EnumValue", + "src": "996:26:50" + }, + { + "id": 50991, + "name": "Permit2_Permit", + "nameLocation": "1032:14:50", + "nodeType": "EnumValue", + "src": "1032:14:50" + }, + { + "id": 50992, + "name": "Permit2_TransferFrom", + "nameLocation": "1056:20:50", + "nodeType": "EnumValue", + "src": "1056:20:50" + }, + { + "id": 50993, + "name": "ERC20_Permit", + "nameLocation": "1115:12:50", + "nodeType": "EnumValue", + "src": "1115:12:50" + }, + { + "id": 50994, + "name": "ERC20_TransferFrom", + "nameLocation": "1137:18:50", "nodeType": "EnumValue", - "src": "429:12:54" + "src": "1137:18:50" } ], "name": "Operations", - "nameLocation": "331:10:54" + "nameLocation": "801:10:50" }, { - "id": 52399, + "id": 51587, "nodeType": "FunctionDefinition", - "src": "453:1930:54", + "src": "1167:5973:50", "nodes": [], "body": { - "id": 52398, + "id": 51586, "nodeType": "Block", - "src": "690:1693:54", + "src": "1270:5870:50", "nodes": [], "statements": [ { - "assignments": [52252], - "declarations": [ + "id": 51585, + "nodeType": "UncheckedBlock", + "src": "1280:5854:50", + "statements": [ { - "constant": false, - "id": 52252, - "mutability": "mutable", - "name": "_expectedLength", - "nameLocation": "778:15:54", - "nodeType": "VariableDeclaration", - "scope": 52398, - "src": "770:23:54", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 52251, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "770:7:54", - "typeDescriptions": { + "condition": { + "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 52255, - "initialValue": { - "expression": { - "id": 52253, - "name": "_vaultContracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52234, - "src": "796:15:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_contract$_Vault_$51076_$dyn_calldata_ptr", - "typeString": "contract Vault[] calldata" - } - }, - "id": 52254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "812:6:54", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "796:22:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "770:48:54" - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 52259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 52256, - "name": "_expectedLength", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52252, - "src": "833:15:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "expression": { - "id": 52257, - "name": "_operations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52238, - "src": "852:11:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_enum$_Operations_$52230_$dyn_calldata_ptr", - "typeString": "enum VaultRouter.Operations[] calldata" - } - }, - "id": 52258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "864:6:54", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "852:18:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "833:37:54", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 52264, - "nodeType": "IfStatement", - "src": "829:75:54", - "trueBody": { - "errorCall": { - "arguments": [ - { - "hexValue": "31", - "id": 52261, + }, + "id": 51007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 51003, + "name": "_packedOperations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50997, + "src": "1308:17:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + "id": 51004, "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "number", + "isPure": false, "lValueRequested": false, - "nodeType": "Literal", - "src": "902:1:54", + "memberLocation": "1326:6:50", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1308:24:50", "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 51005, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "1336:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" + "id": 51006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1355:6:50", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1336:25:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 52260, - "name": "MisMatchedInputsLength", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52225, - "src": "879:22:54", - "typeDescriptions": { - "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", - "typeString": "function (uint256) pure" - } - }, - "id": 52262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "879:25:54", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 52263, - "nodeType": "RevertStatement", - "src": "872:32:54" - } - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 52268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 52265, - "name": "_expectedLength", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52252, - "src": "987:15:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "expression": { - "id": 52266, - "name": "_collateralTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52242, - "src": "1006:17:54", + }, + "src": "1308:53:50", "typeDescriptions": { - "typeIdentifier": "t_array$_t_contract$_ERC20_$45654_$dyn_calldata_ptr", - "typeString": "contract ERC20[] calldata" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 52267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1024:6:54", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "1006:24:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "987:43:54", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 52273, - "nodeType": "IfStatement", - "src": "983:81:54", - "trueBody": { - "errorCall": { - "arguments": [ - { - "hexValue": "32", - "id": 52270, + "id": 51011, + "nodeType": "IfStatement", + "src": "1304:90:50", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 51008, + "name": "MisMatchedInputsLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50967, + "src": "1370:22:50", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51009, "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "number", + "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "nodeType": "Literal", - "src": "1062:1:54", + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1370:24:50", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } - ], - "id": 52269, - "name": "MisMatchedInputsLength", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52225, - "src": "1039:22:54", - "typeDescriptions": { - "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", - "typeString": "function (uint256) pure" - } - }, - "id": 52271, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1039:25:54", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 52272, - "nodeType": "RevertStatement", - "src": "1032:32:54" - } - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 52277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 52274, - "name": "_expectedLength", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52252, - "src": "1147:15:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "expression": { - "id": 52275, - "name": "_tos", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52245, - "src": "1166:4:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[] calldata" - } - }, - "id": 52276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1171:6:54", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "1166:11:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + }, + "id": 51010, + "nodeType": "RevertStatement", + "src": "1363:31:50" } }, - "src": "1147:30:54", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 52282, - "nodeType": "IfStatement", - "src": "1143:68:54", - "trueBody": { - "errorCall": { - "arguments": [ + { + "assignments": [51013], + "declarations": [ { - "hexValue": "33", - "id": 52279, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1209:1:54", + "constant": false, + "id": 51013, + "mutability": "mutable", + "name": "_operation", + "nameLocation": "1414:10:50", + "nodeType": "VariableDeclaration", + "scope": 51585, + "src": "1408:16:50", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 51012, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1408:5:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } }, - "value": "3" + "visibility": "internal" } ], - "expression": { - "argumentTypes": [ + "id": 51014, + "nodeType": "VariableDeclarationStatement", + "src": "1408:16:50" + }, + { + "body": { + "id": 51583, + "nodeType": "Block", + "src": "1490:5634:50", + "statements": [ { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - } - ], - "id": 52278, - "name": "MisMatchedInputsLength", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52225, - "src": "1186:22:54", - "typeDescriptions": { - "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", - "typeString": "function (uint256) pure" - } - }, - "id": 52280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1186:25:54", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 52281, - "nodeType": "RevertStatement", - "src": "1179:32:54" - } - }, - { - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 52286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 52283, - "name": "_expectedLength", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52252, - "src": "1294:15:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "expression": { - "id": 52284, - "name": "_amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52248, - "src": "1313:8:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 52285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1322:6:54", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "1313:15:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1294:34:54", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 52291, - "nodeType": "IfStatement", - "src": "1290:72:54", - "trueBody": { - "errorCall": { - "arguments": [ - { - "hexValue": "34", - "id": 52288, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1360:1:54", - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - } - ], - "id": 52287, - "name": "MisMatchedInputsLength", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52225, - "src": "1337:22:54", - "typeDescriptions": { - "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", - "typeString": "function (uint256) pure" - } - }, - "id": 52289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1337:25:54", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 52290, - "nodeType": "RevertStatement", - "src": "1330:32:54" - } - }, - { - "assignments": [52293], - "declarations": [ - { - "constant": false, - "id": 52293, - "mutability": "mutable", - "name": "_owner", - "nameLocation": "1607:6:54", - "nodeType": "VariableDeclaration", - "scope": 52398, - "src": "1599:14:54", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 52292, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1599:7:54", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "id": 52296, - "initialValue": { - "expression": { - "id": 52294, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "1616:3:54", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 52295, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1620:6:54", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "1616:10:54", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1599:27:54" - }, - { - "body": { - "id": 52396, - "nodeType": "Block", - "src": "1679:698:54", - "statements": [ - { - "condition": { - "commonType": { - "typeIdentifier": "t_enum$_Operations_$52230", - "typeString": "enum VaultRouter.Operations" - }, - "id": 52311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "baseExpression": { - "id": 52306, - "name": "_operations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52238, - "src": "1697:11:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_enum$_Operations_$52230_$dyn_calldata_ptr", - "typeString": "enum VaultRouter.Operations[] calldata" - } - }, - "id": 52308, - "indexExpression": { - "id": 52307, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "1709:1:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1697:14:54", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Operations_$52230", - "typeString": "enum VaultRouter.Operations" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { "expression": { - "id": 52309, - "name": "Operations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52230, - "src": "1715:10:54", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Operations_$52230_$", - "typeString": "type(enum VaultRouter.Operations)" - } - }, - "id": 52310, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "1726:17:54", - "memberName": "DepositCollateral", - "nodeType": "MemberAccess", - "referencedDeclaration": 52226, - "src": "1715:28:54", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Operations_$52230", - "typeString": "enum VaultRouter.Operations" - } - }, - "src": "1697:46:54", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "commonType": { - "typeIdentifier": "t_enum$_Operations_$52230", - "typeString": "enum VaultRouter.Operations" - }, - "id": 52331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "baseExpression": { - "id": 52326, - "name": "_operations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52238, - "src": "1867:11:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_enum$_Operations_$52230_$dyn_calldata_ptr", - "typeString": "enum VaultRouter.Operations[] calldata" - } - }, - "id": 52328, - "indexExpression": { - "id": 52327, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "1879:1:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, + "id": 51032, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1867:14:54", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Operations_$52230", - "typeString": "enum VaultRouter.Operations" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "expression": { - "id": 52329, - "name": "Operations", + "leftHandSide": { + "id": 51025, + "name": "_operation", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52230, - "src": "1885:10:54", + "referencedDeclaration": 51013, + "src": "1508:10:50", "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Operations_$52230_$", - "typeString": "type(enum VaultRouter.Operations)" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } }, - "id": 52330, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "1896:18:54", - "memberName": "WithdrawCollateral", - "nodeType": "MemberAccess", - "referencedDeclaration": 52227, - "src": "1885:29:54", + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "id": 51028, + "name": "_packedOperations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50997, + "src": "1527:17:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + "id": 51030, + "indexExpression": { + "id": 51029, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "1545:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1527:20:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 51027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1521:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 51026, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1521:5:50", + "typeDescriptions": {} + } + }, + "id": 51031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1521:27:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "1508:40:50", "typeDescriptions": { - "typeIdentifier": "t_enum$_Operations_$52230", - "typeString": "enum VaultRouter.Operations" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } }, - "src": "1867:47:54", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } + "id": 51033, + "nodeType": "ExpressionStatement", + "src": "1508:40:50" }, - "falseBody": { + { "condition": { "commonType": { - "typeIdentifier": "t_enum$_Operations_$52230", + "typeIdentifier": "t_enum$_Operations_$50995", "typeString": "enum VaultRouter.Operations" }, - "id": 52354, + "id": 51039, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "baseExpression": { - "id": 52349, - "name": "_operations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52238, - "src": "2048:11:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_enum$_Operations_$52230_$dyn_calldata_ptr", - "typeString": "enum VaultRouter.Operations[] calldata" + "arguments": [ + { + "id": 51035, + "name": "_operation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51013, + "src": "1581:10:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } } - }, - "id": 52351, - "indexExpression": { - "id": 52350, - "name": "i", + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 51034, + "name": "Operations", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "2060:1:54", + "referencedDeclaration": 50995, + "src": "1570:10:50", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" } }, + "id": 51036, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "typeConversion", "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2048:14:54", + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1570:22:50", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_enum$_Operations_$52230", + "typeIdentifier": "t_enum$_Operations_$50995", "typeString": "enum VaultRouter.Operations" } }, @@ -1379,33 +1546,33 @@ "operator": "==", "rightExpression": { "expression": { - "id": 52352, + "id": 51037, "name": "Operations", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52230, - "src": "2066:10:54", + "referencedDeclaration": 50995, + "src": "1596:10:50", "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Operations_$52230_$", + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", "typeString": "type(enum VaultRouter.Operations)" } }, - "id": 52353, + "id": 51038, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "memberLocation": "2077:12:54", - "memberName": "MintCurrency", + "memberLocation": "1607:7:50", + "memberName": "Invalid", "nodeType": "MemberAccess", - "referencedDeclaration": 52228, - "src": "2066:23:54", + "referencedDeclaration": 50985, + "src": "1596:18:50", "typeDescriptions": { - "typeIdentifier": "t_enum$_Operations_$52230", + "typeIdentifier": "t_enum$_Operations_$50995", "typeString": "enum VaultRouter.Operations" } }, - "src": "2048:41:54", + "src": "1570:44:50", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1414,48 +1581,60 @@ "falseBody": { "condition": { "commonType": { - "typeIdentifier": "t_enum$_Operations_$52230", + "typeIdentifier": "t_enum$_Operations_$50995", "typeString": "enum VaultRouter.Operations" }, - "id": 52377, + "id": 51047, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "baseExpression": { - "id": 52372, - "name": "_operations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52238, - "src": "2217:11:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_enum$_Operations_$52230_$dyn_calldata_ptr", - "typeString": "enum VaultRouter.Operations[] calldata" + "arguments": [ + { + "id": 51043, + "name": "_operation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51013, + "src": "1683:10:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } } - }, - "id": 52374, - "indexExpression": { - "id": 52373, - "name": "i", + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 51042, + "name": "Operations", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "2229:1:54", + "referencedDeclaration": 50995, + "src": "1672:10:50", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" } }, + "id": 51044, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "typeConversion", "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2217:14:54", + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1672:22:50", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_enum$_Operations_$52230", + "typeIdentifier": "t_enum$_Operations_$50995", "typeString": "enum VaultRouter.Operations" } }, @@ -1463,891 +1642,8150 @@ "operator": "==", "rightExpression": { "expression": { - "id": 52375, + "id": 51045, "name": "Operations", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52230, - "src": "2235:10:54", + "referencedDeclaration": 50995, + "src": "1698:10:50", "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Operations_$52230_$", + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", "typeString": "type(enum VaultRouter.Operations)" } }, - "id": 52376, + "id": 51046, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "memberLocation": "2246:12:54", - "memberName": "BurnCurrency", + "memberLocation": "1709:26:50", + "memberName": "Permit2_PermitTransferFrom", "nodeType": "MemberAccess", - "referencedDeclaration": 52229, - "src": "2235:23:54", + "referencedDeclaration": 50990, + "src": "1698:37:50", "typeDescriptions": { - "typeIdentifier": "t_enum$_Operations_$52230", + "typeIdentifier": "t_enum$_Operations_$50995", "typeString": "enum VaultRouter.Operations" } }, - "src": "2217:41:54", + "src": "1672:63:50", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 52392, - "nodeType": "IfStatement", - "src": "2213:154:54", - "trueBody": { - "id": 52391, - "nodeType": "Block", - "src": "2260:107:54", - "statements": [ - { + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + }, + "id": 51115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 51111, + "name": "_operation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51013, + "src": "2624:10:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], "expression": { - "arguments": [ + "argumentTypes": [ { - "baseExpression": { - "id": 52382, - "name": "_collateralTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52242, - "src": "2310:17:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_contract$_ERC20_$45654_$dyn_calldata_ptr", - "typeString": "contract ERC20[] calldata" - } - }, - "id": 52384, - "indexExpression": { - "id": 52383, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "2328:1:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2310:20:54", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45654", - "typeString": "contract ERC20" - } - }, + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 51110, + "name": "Operations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50995, + "src": "2613:10:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" + } + }, + "id": 51112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2613:22:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 51113, + "name": "Operations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50995, + "src": "2639:10:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" + } + }, + "id": 51114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2650:14:50", + "memberName": "Permit2_Permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 50991, + "src": "2639:25:50", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + } + }, + "src": "2613:51:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + }, + "id": 51214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ { - "id": 52385, - "name": "_owner", + "id": 51210, + "name": "_operation", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52293, - "src": "2332:6:54", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "baseExpression": { - "id": 52386, - "name": "_amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52248, - "src": "2340:8:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 52388, - "indexExpression": { - "id": 52387, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "2349:1:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2340:11:54", + "referencedDeclaration": 51013, + "src": "3933:10:50", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_ERC20_$45654", - "typeString": "contract ERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } ], - "expression": { - "baseExpression": { - "id": 52378, - "name": "_vaultContracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52234, - "src": "2278:15:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_contract$_Vault_$51076_$dyn_calldata_ptr", - "typeString": "contract Vault[] calldata" - } - }, - "id": 52380, - "indexExpression": { - "id": 52379, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "2294:1:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2278:18:54", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51076", - "typeString": "contract Vault" - } - }, - "id": 52381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2297:12:54", - "memberName": "burnCurrency", - "nodeType": "MemberAccess", - "referencedDeclaration": 50335, - "src": "2278:31:54", + "id": 51209, + "name": "Operations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50995, + "src": "3922:10:50", "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ERC20_$45654_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract ERC20,address,uint256) external" + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" } }, - "id": 52389, + "id": 51211, "isConstant": false, "isLValue": false, "isPure": false, - "kind": "functionCall", + "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", - "src": "2278:74:54", + "src": "3922:22:50", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" } }, - "id": 52390, - "nodeType": "ExpressionStatement", - "src": "2278:74:54" - } - ] - } - }, - "id": 52393, - "nodeType": "IfStatement", - "src": "2044:323:54", - "trueBody": { - "id": 52371, - "nodeType": "Block", - "src": "2091:116:54", - "statements": [ - { - "expression": { - "arguments": [ - { - "baseExpression": { - "id": 52359, - "name": "_collateralTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52242, - "src": "2141:17:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_contract$_ERC20_$45654_$dyn_calldata_ptr", - "typeString": "contract ERC20[] calldata" + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 51212, + "name": "Operations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50995, + "src": "3948:10:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" + } + }, + "id": 51213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3959:20:50", + "memberName": "Permit2_TransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 50992, + "src": "3948:31:50", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + } + }, + "src": "3922:57:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + }, + "id": 51267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 51263, + "name": "_operation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51013, + "src": "4386:10:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } } - }, - "id": 52361, - "indexExpression": { - "id": 52360, - "name": "i", + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 51262, + "name": "Operations", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "2159:1:54", + "referencedDeclaration": 50995, + "src": "4375:10:50", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" } }, + "id": 51264, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "typeConversion", "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2141:20:54", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45654", - "typeString": "contract ERC20" - } - }, - { - "id": 52362, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52293, - "src": "2163:6:54", + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4375:22:50", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" } }, - { - "baseExpression": { - "id": 52363, - "name": "_tos", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52245, - "src": "2171:4:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[] calldata" - } - }, - "id": 52365, - "indexExpression": { - "id": 52364, - "name": "i", + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 51265, + "name": "Operations", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "2176:1:54", + "referencedDeclaration": 50995, + "src": "4401:10:50", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" } }, + "id": 51266, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2171:7:54", + "memberLocation": "4412:17:50", + "memberName": "DepositCollateral", + "nodeType": "MemberAccess", + "referencedDeclaration": 50986, + "src": "4401:28:50", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + } + }, + "src": "4375:54:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + }, + "id": 51310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 51306, + "name": "_operation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51013, + "src": "4809:10:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 51305, + "name": "Operations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50995, + "src": "4798:10:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" + } + }, + "id": 51307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4798:22:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 51308, + "name": "Operations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50995, + "src": "4824:10:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" + } + }, + "id": 51309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4835:18:50", + "memberName": "WithdrawCollateral", + "nodeType": "MemberAccess", + "referencedDeclaration": 50987, + "src": "4824:29:50", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + } + }, + "src": "4798:55:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + }, + "id": 51358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 51354, + "name": "_operation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51013, + "src": "5262:10:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 51353, + "name": "Operations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50995, + "src": "5251:10:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" + } + }, + "id": 51355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5251:22:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 51356, + "name": "Operations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50995, + "src": "5277:10:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" + } + }, + "id": 51357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5288:12:50", + "memberName": "MintCurrency", + "nodeType": "MemberAccess", + "referencedDeclaration": 50988, + "src": "5277:23:50", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + } + }, + "src": "5251:49:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + }, + "id": 51406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 51402, + "name": "_operation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51013, + "src": "5703:10:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 51401, + "name": "Operations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50995, + "src": "5692:10:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" + } + }, + "id": 51403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5692:22:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 51404, + "name": "Operations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50995, + "src": "5718:10:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" + } + }, + "id": 51405, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5729:12:50", + "memberName": "BurnCurrency", + "nodeType": "MemberAccess", + "referencedDeclaration": 50989, + "src": "5718:23:50", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + } + }, + "src": "5692:49:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + }, + "id": 51449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 51445, + "name": "_operation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51013, + "src": "6116:10:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 51444, + "name": "Operations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50995, + "src": "6105:10:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" + } + }, + "id": 51446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6105:22:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 51447, + "name": "Operations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50995, + "src": "6131:10:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" + } + }, + "id": 51448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6142:12:50", + "memberName": "ERC20_Permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 50993, + "src": "6131:23:50", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + } + }, + "src": "6105:49:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + }, + "id": 51526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 51522, + "name": "_operation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51013, + "src": "6702:10:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 51521, + "name": "Operations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50995, + "src": "6691:10:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" + } + }, + "id": 51523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6691:22:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 51524, + "name": "Operations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50995, + "src": "6717:10:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_Operations_$50995_$", + "typeString": "type(enum VaultRouter.Operations)" + } + }, + "id": 51525, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6728:18:50", + "memberName": "ERC20_TransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 50994, + "src": "6717:29:50", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Operations_$50995", + "typeString": "enum VaultRouter.Operations" + } + }, + "src": "6691:55:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 51573, + "nodeType": "IfStatement", + "src": "6687:423:50", + "trueBody": { + "id": 51572, + "nodeType": "Block", + "src": "6748:362:50", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 51528, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "6797:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51530, + "indexExpression": { + "id": 51529, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "6816:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6797:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "hexValue": "3634", + "id": 51531, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6820:2:50", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + } + ], + "id": 51527, + "name": "_requireInputIsRightLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51634, + "src": "6770:26:50", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_calldata_ptr_$_t_uint256_$returns$__$", + "typeString": "function (bytes calldata,uint256) pure" + } + }, + "id": 51532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6770:53:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51533, + "nodeType": "ExpressionStatement", + "src": "6770:53:50" + }, + { + "assignments": [51535, 51537], + "declarations": [ + { + "constant": false, + "id": 51535, + "mutability": "mutable", + "name": "_token", + "nameLocation": "6854:6:50", + "nodeType": "VariableDeclaration", + "scope": 51572, + "src": "6846:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 51534, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6846:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51537, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "6870:7:50", + "nodeType": "VariableDeclaration", + "scope": 51572, + "src": "6862:15:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51536, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6862:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 51549, + "initialValue": { + "arguments": [ + { + "baseExpression": { + "id": 51540, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "6892:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51542, + "indexExpression": { + "id": 51541, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "6911:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6892:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "components": [ + { + "id": 51544, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6916:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 51543, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6916:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51546, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6925:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51545, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6925:7:50", + "typeDescriptions": {} + } + } + ], + "id": 51547, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6915:18:50", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_type$_t_address_$_$_t_type$_t_uint256_$_$", + "typeString": "tuple(type(address),type(uint256))" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_tuple$_t_type$_t_address_$_$_t_type$_t_uint256_$_$", + "typeString": "tuple(type(address),type(uint256))" + } + ], + "expression": { + "id": 51538, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "6881:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 51539, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6885:6:50", + "memberName": "decode", + "nodeType": "MemberAccess", + "src": "6881:10:50", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6881:53:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_payable_$_t_uint256_$", + "typeString": "tuple(address payable,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6845:89:50" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 51554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 51550, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51535, + "src": "6960:6:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 51551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6967:4:50", + "memberName": "code", + "nodeType": "MemberAccess", + "src": "6960:11:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 51552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6972:6:50", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "6960:18:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 51553, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6982:1:50", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6960:23:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 51558, + "nodeType": "IfStatement", + "src": "6956:37:50", + "trueBody": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 51555, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [-19, -19], + "referencedDeclaration": -19, + "src": "6985:6:50", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6985:8:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51557, + "nodeType": "ExpressionStatement", + "src": "6985:8:50" + } + }, + { + "expression": { + "arguments": [ + { + "id": 51562, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51535, + "src": "7048:6:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 51563, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7056:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 51564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7060:6:50", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7056:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 51567, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "7076:4:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_VaultRouter_$51654", + "typeString": "contract VaultRouter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_VaultRouter_$51654", + "typeString": "contract VaultRouter" + } + ], + "id": 51566, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7068:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 51565, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7068:7:50", + "typeDescriptions": {} + } + }, + "id": 51568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7068:13:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 51569, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51537, + "src": "7083:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 51559, + "name": "SafeTransferLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45613, + "src": "7015:15:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeTransferLib_$45613_$", + "typeString": "type(library SafeTransferLib)" + } + }, + "id": 51561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7031:16:50", + "memberName": "safeTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 45538, + "src": "7015:32:50", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,address,uint256)" + } + }, + "id": 51570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7015:76:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51571, + "nodeType": "ExpressionStatement", + "src": "7015:76:50" + } + ] + } + }, + "id": 51574, + "nodeType": "IfStatement", + "src": "6101:1009:50", + "trueBody": { + "id": 51520, + "nodeType": "Block", + "src": "6156:525:50", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 51451, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "6205:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51453, + "indexExpression": { + "id": 51452, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "6224:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6205:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "hexValue": "323536", + "id": 51454, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6228:3:50", + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + "value": "256" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + } + ], + "id": 51450, + "name": "_requireInputIsRightLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51634, + "src": "6178:26:50", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_calldata_ptr_$_t_uint256_$returns$__$", + "typeString": "function (bytes calldata,uint256) pure" + } + }, + "id": 51455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6178:54:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51456, + "nodeType": "ExpressionStatement", + "src": "6178:54:50" + }, + { + "assignments": [51459, 51461, 51463, 51465], + "declarations": [ + { + "constant": false, + "id": 51459, + "mutability": "mutable", + "name": "_token", + "nameLocation": "6261:6:50", + "nodeType": "VariableDeclaration", + "scope": 51520, + "src": "6255:12:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + }, + "typeName": { + "id": 51458, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 51457, + "name": "ERC20", + "nameLocations": ["6255:5:50"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46441, + "src": "6255:5:50" + }, + "referencedDeclaration": 46441, + "src": "6255:5:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51461, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "6277:7:50", + "nodeType": "VariableDeclaration", + "scope": 51520, + "src": "6269:15:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51460, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6269:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51463, + "mutability": "mutable", + "name": "_deadline", + "nameLocation": "6294:9:50", + "nodeType": "VariableDeclaration", + "scope": 51520, + "src": "6286:17:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51462, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6286:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51465, + "mutability": "mutable", + "name": "_signature", + "nameLocation": "6318:10:50", + "nodeType": "VariableDeclaration", + "scope": 51520, + "src": "6305:23:50", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 51464, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6305:5:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 51480, + "initialValue": { + "arguments": [ + { + "baseExpression": { + "id": 51468, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "6367:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51470, + "indexExpression": { + "id": 51469, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "6386:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6367:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "components": [ + { + "id": 51471, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46441, + "src": "6391:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Token_$46441_$", + "typeString": "type(contract ERC20Token)" + } + }, + { + "id": 51473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6398:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51472, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6398:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51475, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6407:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51474, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6407:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6416:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 51476, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6416:5:50", + "typeDescriptions": {} + } + } + ], + "id": 51478, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6390:32:50", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_type$_t_contract$_ERC20Token_$46441_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$_t_type$_t_bytes_storage_ptr_$_$", + "typeString": "tuple(type(contract ERC20Token),type(uint256),type(uint256),type(bytes storage pointer))" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_tuple$_t_type$_t_contract$_ERC20Token_$46441_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$_t_type$_t_bytes_storage_ptr_$_$", + "typeString": "tuple(type(contract ERC20Token),type(uint256),type(uint256),type(bytes storage pointer))" + } + ], + "expression": { + "id": 51466, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "6356:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 51467, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6360:6:50", + "memberName": "decode", + "nodeType": "MemberAccess", + "src": "6356:10:50", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6356:67:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_contract$_ERC20Token_$46441_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$", + "typeString": "tuple(contract ERC20Token,uint256,uint256,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6254:169:50" + }, + { + "assignments": [51482, 51484], + "declarations": [ + { + "constant": false, + "id": 51482, + "mutability": "mutable", + "name": "_r", + "nameLocation": "6454:2:50", + "nodeType": "VariableDeclaration", + "scope": 51520, + "src": "6446:10:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 51481, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6446:7:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51484, + "mutability": "mutable", + "name": "_s", + "nameLocation": "6466:2:50", + "nodeType": "VariableDeclaration", + "scope": 51520, + "src": "6458:10:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 51483, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6458:7:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 51494, + "initialValue": { + "arguments": [ + { + "id": 51487, + "name": "_signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51465, + "src": "6483:10:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "components": [ + { + "id": 51489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6496:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 51488, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6496:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51491, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6505:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 51490, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6505:7:50", + "typeDescriptions": {} + } + } + ], + "id": 51492, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6495:18:50", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_type$_t_bytes32_$_$_t_type$_t_bytes32_$_$", + "typeString": "tuple(type(bytes32),type(bytes32))" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_tuple$_t_type$_t_bytes32_$_$_t_type$_t_bytes32_$_$", + "typeString": "tuple(type(bytes32),type(bytes32))" + } + ], + "expression": { + "id": 51485, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "6472:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 51486, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6476:6:50", + "memberName": "decode", + "nodeType": "MemberAccess", + "src": "6472:10:50", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6472:42:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes32_$_t_bytes32_$", + "typeString": "tuple(bytes32,bytes32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6445:69:50" + }, + { + "assignments": [51496], + "declarations": [ + { + "constant": false, + "id": 51496, + "mutability": "mutable", + "name": "_v", + "nameLocation": "6542:2:50", + "nodeType": "VariableDeclaration", + "scope": 51520, + "src": "6536:8:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 51495, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6536:5:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 51503, + "initialValue": { + "arguments": [ + { + "baseExpression": { + "id": 51499, + "name": "_signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51465, + "src": "6553:10:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 51501, + "indexExpression": { + "hexValue": "3634", + "id": 51500, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6564:2:50", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6553:14:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 51498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6547:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 51497, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6547:5:50", + "typeDescriptions": {} + } + }, + "id": 51502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6547:21:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6536:32:50" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 51507, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6604:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 51508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6608:6:50", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6604:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 51511, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6624:4:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_VaultRouter_$51654", + "typeString": "contract VaultRouter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_VaultRouter_$51654", + "typeString": "contract VaultRouter" + } + ], + "id": 51510, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6616:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 51509, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6616:7:50", + "typeDescriptions": {} + } + }, + "id": 51512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6616:13:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 51513, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51461, + "src": "6631:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 51514, + "name": "_deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51463, + "src": "6640:9:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 51515, + "name": "_v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51496, + "src": "6651:2:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 51516, + "name": "_r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51482, + "src": "6655:2:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 51517, + "name": "_s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51484, + "src": "6659:2:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 51504, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51459, + "src": "6590:6:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + } + }, + "id": 51506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6597:6:50", + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 45260, + "src": "6590:13:50", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 51518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6590:72:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51519, + "nodeType": "ExpressionStatement", + "src": "6590:72:50" + } + ] + } + }, + "id": 51575, + "nodeType": "IfStatement", + "src": "5688:1422:50", + "trueBody": { + "id": 51443, + "nodeType": "Block", + "src": "5743:352:50", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 51408, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "5792:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51410, + "indexExpression": { + "id": 51409, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "5811:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5792:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "hexValue": "3936", + "id": 51411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5815:2:50", + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + } + ], + "id": 51407, + "name": "_requireInputIsRightLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51634, + "src": "5765:26:50", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_calldata_ptr_$_t_uint256_$returns$__$", + "typeString": "function (bytes calldata,uint256) pure" + } + }, + "id": 51412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5765:53:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51413, + "nodeType": "ExpressionStatement", + "src": "5765:53:50" + }, + { + "assignments": [51416, 51419, 51421], + "declarations": [ + { + "constant": false, + "id": 51416, + "mutability": "mutable", + "name": "_vaultContract", + "nameLocation": "5847:14:50", + "nodeType": "VariableDeclaration", + "scope": 51443, + "src": "5841:20:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48277", + "typeString": "contract Vault" + }, + "typeName": { + "id": 51415, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 51414, + "name": "Vault", + "nameLocations": ["5841:5:50"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48277, + "src": "5841:5:50" + }, + "referencedDeclaration": 48277, + "src": "5841:5:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48277", + "typeString": "contract Vault" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51419, + "mutability": "mutable", + "name": "_collateralToken", + "nameLocation": "5869:16:50", + "nodeType": "VariableDeclaration", + "scope": 51443, + "src": "5863:22:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + }, + "typeName": { + "id": 51418, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 51417, + "name": "ERC20", + "nameLocations": ["5863:5:50"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46441, + "src": "5863:5:50" + }, + "referencedDeclaration": 46441, + "src": "5863:5:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51421, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "5895:7:50", + "nodeType": "VariableDeclaration", + "scope": 51443, + "src": "5887:15:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51420, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5887:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 51433, + "initialValue": { + "arguments": [ + { + "baseExpression": { + "id": 51424, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "5941:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51426, + "indexExpression": { + "id": 51425, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "5960:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5941:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "components": [ + { + "id": 51427, + "name": "Vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48277, + "src": "5965:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Vault_$48277_$", + "typeString": "type(contract Vault)" + } + }, + { + "id": 51428, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46441, + "src": "5972:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Token_$46441_$", + "typeString": "type(contract ERC20Token)" + } + }, + { + "id": 51430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5979:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51429, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5979:7:50", + "typeDescriptions": {} + } + } + ], + "id": 51431, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5964:23:50", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_type$_t_contract$_Vault_$48277_$_$_t_type$_t_contract$_ERC20Token_$46441_$_$_t_type$_t_uint256_$_$", + "typeString": "tuple(type(contract Vault),type(contract ERC20Token),type(uint256))" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_tuple$_t_type$_t_contract$_Vault_$48277_$_$_t_type$_t_contract$_ERC20Token_$46441_$_$_t_type$_t_uint256_$_$", + "typeString": "tuple(type(contract Vault),type(contract ERC20Token),type(uint256))" + } + ], + "expression": { + "id": 51422, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "5930:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 51423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5934:6:50", + "memberName": "decode", + "nodeType": "MemberAccess", + "src": "5930:10:50", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5930:58:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_contract$_Vault_$48277_$_t_contract$_ERC20Token_$46441_$_t_uint256_$", + "typeString": "tuple(contract Vault,contract ERC20Token,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5840:148:50" + }, + { + "expression": { + "arguments": [ + { + "id": 51437, + "name": "_collateralToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51419, + "src": "6038:16:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + } + }, + { + "expression": { + "id": 51438, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6056:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 51439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6060:6:50", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6056:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 51440, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51421, + "src": "6068:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 51434, + "name": "_vaultContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51416, + "src": "6010:14:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48277", + "typeString": "contract Vault" + } + }, + "id": 51436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6025:12:50", + "memberName": "burnCurrency", + "nodeType": "MemberAccess", + "referencedDeclaration": 47577, + "src": "6010:27:50", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ERC20Token_$46441_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract ERC20Token,address,uint256) external" + } + }, + "id": 51441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6010:66:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51442, + "nodeType": "ExpressionStatement", + "src": "6010:66:50" + } + ] + } + }, + "id": 51576, + "nodeType": "IfStatement", + "src": "5247:1863:50", + "trueBody": { + "id": 51400, + "nodeType": "Block", + "src": "5302:380:50", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 51360, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "5351:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51362, + "indexExpression": { + "id": 51361, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "5370:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5351:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "hexValue": "313238", + "id": 51363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5374:3:50", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + } + ], + "id": 51359, + "name": "_requireInputIsRightLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51634, + "src": "5324:26:50", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_calldata_ptr_$_t_uint256_$returns$__$", + "typeString": "function (bytes calldata,uint256) pure" + } + }, + "id": 51364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5324:54:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51365, + "nodeType": "ExpressionStatement", + "src": "5324:54:50" + }, + { + "assignments": [51368, 51371, 51373, 51375], + "declarations": [ + { + "constant": false, + "id": 51368, + "mutability": "mutable", + "name": "_vaultContract", + "nameLocation": "5407:14:50", + "nodeType": "VariableDeclaration", + "scope": 51400, + "src": "5401:20:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48277", + "typeString": "contract Vault" + }, + "typeName": { + "id": 51367, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 51366, + "name": "Vault", + "nameLocations": ["5401:5:50"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48277, + "src": "5401:5:50" + }, + "referencedDeclaration": 48277, + "src": "5401:5:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48277", + "typeString": "contract Vault" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51371, + "mutability": "mutable", + "name": "_collateralToken", + "nameLocation": "5429:16:50", + "nodeType": "VariableDeclaration", + "scope": 51400, + "src": "5423:22:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + }, + "typeName": { + "id": 51370, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 51369, + "name": "ERC20", + "nameLocations": ["5423:5:50"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46441, + "src": "5423:5:50" + }, + "referencedDeclaration": 46441, + "src": "5423:5:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51373, + "mutability": "mutable", + "name": "_to", + "nameLocation": "5455:3:50", + "nodeType": "VariableDeclaration", + "scope": 51400, + "src": "5447:11:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 51372, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5447:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51375, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "5468:7:50", + "nodeType": "VariableDeclaration", + "scope": 51400, + "src": "5460:15:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51374, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5460:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 51389, + "initialValue": { + "arguments": [ + { + "baseExpression": { + "id": 51378, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "5514:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51380, + "indexExpression": { + "id": 51379, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "5533:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5514:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "components": [ + { + "id": 51381, + "name": "Vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48277, + "src": "5538:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Vault_$48277_$", + "typeString": "type(contract Vault)" + } + }, + { + "id": 51382, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46441, + "src": "5545:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Token_$46441_$", + "typeString": "type(contract ERC20Token)" + } + }, + { + "id": 51384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5552:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 51383, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5552:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5561:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51385, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5561:7:50", + "typeDescriptions": {} + } + } + ], + "id": 51387, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5537:32:50", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_type$_t_contract$_Vault_$48277_$_$_t_type$_t_contract$_ERC20Token_$46441_$_$_t_type$_t_address_$_$_t_type$_t_uint256_$_$", + "typeString": "tuple(type(contract Vault),type(contract ERC20Token),type(address),type(uint256))" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_tuple$_t_type$_t_contract$_Vault_$48277_$_$_t_type$_t_contract$_ERC20Token_$46441_$_$_t_type$_t_address_$_$_t_type$_t_uint256_$_$", + "typeString": "tuple(type(contract Vault),type(contract ERC20Token),type(address),type(uint256))" + } + ], + "expression": { + "id": 51376, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "5503:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 51377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5507:6:50", + "memberName": "decode", + "nodeType": "MemberAccess", + "src": "5503:10:50", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5503:67:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_contract$_Vault_$48277_$_t_contract$_ERC20Token_$46441_$_t_address_payable_$_t_uint256_$", + "typeString": "tuple(contract Vault,contract ERC20Token,address payable,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5400:170:50" + }, + { + "expression": { + "arguments": [ + { + "id": 51393, + "name": "_collateralToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51371, + "src": "5620:16:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + } + }, + { + "expression": { + "id": 51394, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5638:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 51395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5642:6:50", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5638:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 51396, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51373, + "src": "5650:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 51397, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51375, + "src": "5655:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 51390, + "name": "_vaultContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51368, + "src": "5592:14:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48277", + "typeString": "contract Vault" + } + }, + "id": 51392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5607:12:50", + "memberName": "mintCurrency", + "nodeType": "MemberAccess", + "referencedDeclaration": 47532, + "src": "5592:27:50", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ERC20Token_$46441_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract ERC20Token,address,address,uint256) external" + } + }, + "id": 51398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5592:71:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51399, + "nodeType": "ExpressionStatement", + "src": "5592:71:50" + } + ] + } + }, + "id": 51577, + "nodeType": "IfStatement", + "src": "4794:2316:50", + "trueBody": { + "id": 51352, + "nodeType": "Block", + "src": "4855:386:50", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 51312, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "4904:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51314, + "indexExpression": { + "id": 51313, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "4923:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4904:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "hexValue": "313238", + "id": 51315, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4927:3:50", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + } + ], + "id": 51311, + "name": "_requireInputIsRightLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51634, + "src": "4877:26:50", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_calldata_ptr_$_t_uint256_$returns$__$", + "typeString": "function (bytes calldata,uint256) pure" + } + }, + "id": 51316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4877:54:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51317, + "nodeType": "ExpressionStatement", + "src": "4877:54:50" + }, + { + "assignments": [51320, 51323, 51325, 51327], + "declarations": [ + { + "constant": false, + "id": 51320, + "mutability": "mutable", + "name": "_vaultContract", + "nameLocation": "4960:14:50", + "nodeType": "VariableDeclaration", + "scope": 51352, + "src": "4954:20:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48277", + "typeString": "contract Vault" + }, + "typeName": { + "id": 51319, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 51318, + "name": "Vault", + "nameLocations": ["4954:5:50"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48277, + "src": "4954:5:50" + }, + "referencedDeclaration": 48277, + "src": "4954:5:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48277", + "typeString": "contract Vault" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51323, + "mutability": "mutable", + "name": "_collateralToken", + "nameLocation": "4982:16:50", + "nodeType": "VariableDeclaration", + "scope": 51352, + "src": "4976:22:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + }, + "typeName": { + "id": 51322, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 51321, + "name": "ERC20", + "nameLocations": ["4976:5:50"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46441, + "src": "4976:5:50" + }, + "referencedDeclaration": 46441, + "src": "4976:5:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51325, + "mutability": "mutable", + "name": "_to", + "nameLocation": "5008:3:50", + "nodeType": "VariableDeclaration", + "scope": 51352, + "src": "5000:11:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 51324, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5000:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51327, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "5021:7:50", + "nodeType": "VariableDeclaration", + "scope": 51352, + "src": "5013:15:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51326, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5013:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 51341, + "initialValue": { + "arguments": [ + { + "baseExpression": { + "id": 51330, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "5067:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51332, + "indexExpression": { + "id": 51331, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "5086:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5067:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "components": [ + { + "id": 51333, + "name": "Vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48277, + "src": "5091:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Vault_$48277_$", + "typeString": "type(contract Vault)" + } + }, + { + "id": 51334, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46441, + "src": "5098:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Token_$46441_$", + "typeString": "type(contract ERC20Token)" + } + }, + { + "id": 51336, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5105:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 51335, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5105:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5114:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51337, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5114:7:50", + "typeDescriptions": {} + } + } + ], + "id": 51339, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5090:32:50", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_type$_t_contract$_Vault_$48277_$_$_t_type$_t_contract$_ERC20Token_$46441_$_$_t_type$_t_address_$_$_t_type$_t_uint256_$_$", + "typeString": "tuple(type(contract Vault),type(contract ERC20Token),type(address),type(uint256))" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_tuple$_t_type$_t_contract$_Vault_$48277_$_$_t_type$_t_contract$_ERC20Token_$46441_$_$_t_type$_t_address_$_$_t_type$_t_uint256_$_$", + "typeString": "tuple(type(contract Vault),type(contract ERC20Token),type(address),type(uint256))" + } + ], + "expression": { + "id": 51328, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "5056:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 51329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5060:6:50", + "memberName": "decode", + "nodeType": "MemberAccess", + "src": "5056:10:50", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5056:67:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_contract$_Vault_$48277_$_t_contract$_ERC20Token_$46441_$_t_address_payable_$_t_uint256_$", + "typeString": "tuple(contract Vault,contract ERC20Token,address payable,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4953:170:50" + }, + { + "expression": { + "arguments": [ + { + "id": 51345, + "name": "_collateralToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51323, + "src": "5179:16:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + } + }, + { + "expression": { + "id": 51346, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5197:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 51347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5201:6:50", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5197:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 51348, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51325, + "src": "5209:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 51349, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51327, + "src": "5214:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 51342, + "name": "_vaultContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51320, + "src": "5145:14:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48277", + "typeString": "contract Vault" + } + }, + "id": 51344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5160:18:50", + "memberName": "withdrawCollateral", + "nodeType": "MemberAccess", + "referencedDeclaration": 47425, + "src": "5145:33:50", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ERC20Token_$46441_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract ERC20Token,address,address,uint256) external" + } + }, + "id": 51350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5145:77:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51351, + "nodeType": "ExpressionStatement", + "src": "5145:77:50" + } + ] + } + }, + "id": 51578, + "nodeType": "IfStatement", + "src": "4371:2739:50", + "trueBody": { + "id": 51304, + "nodeType": "Block", + "src": "4431:357:50", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 51269, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "4480:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51271, + "indexExpression": { + "id": 51270, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "4499:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4480:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "hexValue": "3936", + "id": 51272, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4503:2:50", + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + } + ], + "id": 51268, + "name": "_requireInputIsRightLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51634, + "src": "4453:26:50", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_calldata_ptr_$_t_uint256_$returns$__$", + "typeString": "function (bytes calldata,uint256) pure" + } + }, + "id": 51273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4453:53:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51274, + "nodeType": "ExpressionStatement", + "src": "4453:53:50" + }, + { + "assignments": [51277, 51280, 51282], + "declarations": [ + { + "constant": false, + "id": 51277, + "mutability": "mutable", + "name": "_vaultContract", + "nameLocation": "4535:14:50", + "nodeType": "VariableDeclaration", + "scope": 51304, + "src": "4529:20:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48277", + "typeString": "contract Vault" + }, + "typeName": { + "id": 51276, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 51275, + "name": "Vault", + "nameLocations": ["4529:5:50"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 48277, + "src": "4529:5:50" + }, + "referencedDeclaration": 48277, + "src": "4529:5:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48277", + "typeString": "contract Vault" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51280, + "mutability": "mutable", + "name": "_collateralToken", + "nameLocation": "4557:16:50", + "nodeType": "VariableDeclaration", + "scope": 51304, + "src": "4551:22:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + }, + "typeName": { + "id": 51279, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 51278, + "name": "ERC20", + "nameLocations": ["4551:5:50"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 46441, + "src": "4551:5:50" + }, + "referencedDeclaration": 46441, + "src": "4551:5:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51282, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "4583:7:50", + "nodeType": "VariableDeclaration", + "scope": 51304, + "src": "4575:15:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51281, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4575:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 51294, + "initialValue": { + "arguments": [ + { + "baseExpression": { + "id": 51285, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "4629:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51287, + "indexExpression": { + "id": 51286, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "4648:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4629:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "components": [ + { + "id": 51288, + "name": "Vault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48277, + "src": "4653:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Vault_$48277_$", + "typeString": "type(contract Vault)" + } + }, + { + "id": 51289, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46441, + "src": "4660:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Token_$46441_$", + "typeString": "type(contract ERC20Token)" + } + }, + { + "id": 51291, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4667:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51290, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4667:7:50", + "typeDescriptions": {} + } + } + ], + "id": 51292, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4652:23:50", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_type$_t_contract$_Vault_$48277_$_$_t_type$_t_contract$_ERC20Token_$46441_$_$_t_type$_t_uint256_$_$", + "typeString": "tuple(type(contract Vault),type(contract ERC20Token),type(uint256))" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_tuple$_t_type$_t_contract$_Vault_$48277_$_$_t_type$_t_contract$_ERC20Token_$46441_$_$_t_type$_t_uint256_$_$", + "typeString": "tuple(type(contract Vault),type(contract ERC20Token),type(uint256))" + } + ], + "expression": { + "id": 51283, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "4618:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 51284, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4622:6:50", + "memberName": "decode", + "nodeType": "MemberAccess", + "src": "4618:10:50", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4618:58:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_contract$_Vault_$48277_$_t_contract$_ERC20Token_$46441_$_t_uint256_$", + "typeString": "tuple(contract Vault,contract ERC20Token,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4528:148:50" + }, + { + "expression": { + "arguments": [ + { + "id": 51298, + "name": "_collateralToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51280, + "src": "4731:16:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + } + }, + { + "expression": { + "id": 51299, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4749:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 51300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4753:6:50", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4749:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 51301, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51282, + "src": "4761:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20Token_$46441", + "typeString": "contract ERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 51295, + "name": "_vaultContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51277, + "src": "4698:14:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vault_$48277", + "typeString": "contract Vault" + } + }, + "id": 51297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4713:17:50", + "memberName": "depositCollateral", + "nodeType": "MemberAccess", + "referencedDeclaration": 47366, + "src": "4698:32:50", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ERC20Token_$46441_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract ERC20Token,address,uint256) external" + } + }, + "id": 51302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4698:71:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51303, + "nodeType": "ExpressionStatement", + "src": "4698:71:50" } + ] + } + }, + "id": 51579, + "nodeType": "IfStatement", + "src": "3918:3192:50", + "trueBody": { + "id": 51261, + "nodeType": "Block", + "src": "3981:384:50", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 51216, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "4030:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51218, + "indexExpression": { + "id": 51217, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "4049:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4030:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "hexValue": "3634", + "id": 51219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4053:2:50", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + } + ], + "id": 51215, + "name": "_requireInputIsRightLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51634, + "src": "4003:26:50", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_calldata_ptr_$_t_uint256_$returns$__$", + "typeString": "function (bytes calldata,uint256) pure" + } + }, + "id": 51220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4003:53:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51221, + "nodeType": "ExpressionStatement", + "src": "4003:53:50" }, { - "baseExpression": { - "id": 52366, - "name": "_amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52248, - "src": "2180:8:54", + "assignments": [51223, 51225], + "declarations": [ + { + "constant": false, + "id": 51223, + "mutability": "mutable", + "name": "_token", + "nameLocation": "4087:6:50", + "nodeType": "VariableDeclaration", + "scope": 51261, + "src": "4079:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 51222, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4079:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51225, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "4103:7:50", + "nodeType": "VariableDeclaration", + "scope": 51261, + "src": "4095:15:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51224, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4095:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 51237, + "initialValue": { + "arguments": [ + { + "baseExpression": { + "id": 51228, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "4125:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51230, + "indexExpression": { + "id": 51229, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "4144:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4125:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "components": [ + { + "id": 51232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4149:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 51231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4149:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51234, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4158:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51233, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4158:7:50", + "typeDescriptions": {} + } + } + ], + "id": 51235, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4148:18:50", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_type$_t_address_$_$_t_type$_t_uint256_$_$", + "typeString": "tuple(type(address),type(uint256))" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_tuple$_t_type$_t_address_$_$_t_type$_t_uint256_$_$", + "typeString": "tuple(type(address),type(uint256))" + } + ], + "expression": { + "id": 51226, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "4114:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 51227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4118:6:50", + "memberName": "decode", + "nodeType": "MemberAccess", + "src": "4114:10:50", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4114:53:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_payable_$_t_uint256_$", + "typeString": "tuple(address payable,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4078:89:50" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 51241, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4235:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 51242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4239:6:50", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4235:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 51245, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4255:4:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_VaultRouter_$51654", + "typeString": "contract VaultRouter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_VaultRouter_$51654", + "typeString": "contract VaultRouter" + } + ], + "id": 51244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4247:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 51243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4247:7:50", + "typeDescriptions": {} + } + }, + "id": 51246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4247:13:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 51250, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51225, + "src": "4288:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "arguments": [ + { + "id": 51253, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4302:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 51252, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "4302:7:50", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + } + ], + "id": 51251, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4297:4:50", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4297:13:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint160", + "typeString": "type(uint160)" + } + }, + "id": 51255, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4311:3:50", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4297:17:50", + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 51249, + "name": "_ensureSafeToCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51653, + "src": "4270:17:50", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 51256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4270:45:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 51248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4262:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 51247, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "4262:7:50", + "typeDescriptions": {} + } + }, + "id": 51257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4262:54:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + }, + { + "id": 51258, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51223, + "src": "4318:6:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 51238, + "name": "permit2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50965, + "src": "4189:7:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPermit2_$43696", + "typeString": "contract IPermit2" + } + }, + "id": 51240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4197:12:50", + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 43649, + "src": "4189:20:50", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint160_$_t_address_$returns$__$", + "typeString": "function (address,address,uint160,address) external" + } + }, + "id": 51259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4189:157:50", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 52368, - "indexExpression": { - "id": 52367, - "name": "i", + "id": 51260, + "nodeType": "ExpressionStatement", + "src": "4189:157:50" + } + ] + } + }, + "id": 51580, + "nodeType": "IfStatement", + "src": "2609:4501:50", + "trueBody": { + "id": 51208, + "nodeType": "Block", + "src": "2666:1246:50", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 51117, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "2715:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51119, + "indexExpression": { + "id": 51118, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "2734:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2715:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "hexValue": "333230", + "id": 51120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2738:3:50", + "typeDescriptions": { + "typeIdentifier": "t_rational_320_by_1", + "typeString": "int_const 320" + }, + "value": "320" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_rational_320_by_1", + "typeString": "int_const 320" + } + ], + "id": 51116, + "name": "_requireInputIsRightLength", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "2189:1:54", + "referencedDeclaration": 51634, + "src": "2688:26:50", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_internal_pure$_t_bytes_calldata_ptr_$_t_uint256_$returns$__$", + "typeString": "function (bytes calldata,uint256) pure" } }, + "id": 51121, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2180:11:54", + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2688:54:50", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } - } - ], - "expression": { - "argumentTypes": [ + }, + "id": 51122, + "nodeType": "ExpressionStatement", + "src": "2688:54:50" + }, + { + "assignments": [51124, 51126, 51128, 51130, 51132, 51134], + "declarations": [ { - "typeIdentifier": "t_contract$_ERC20_$45654", - "typeString": "contract ERC20" + "constant": false, + "id": 51124, + "mutability": "mutable", + "name": "_token", + "nameLocation": "2798:6:50", + "nodeType": "VariableDeclaration", + "scope": 51208, + "src": "2790:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 51123, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2790:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" }, { - "typeIdentifier": "t_address", - "typeString": "address" + "constant": false, + "id": 51126, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "2838:7:50", + "nodeType": "VariableDeclaration", + "scope": 51208, + "src": "2830:15:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51125, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2830:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, { - "typeIdentifier": "t_address", - "typeString": "address" + "constant": false, + "id": 51128, + "mutability": "mutable", + "name": "_expiration", + "nameLocation": "2879:11:50", + "nodeType": "VariableDeclaration", + "scope": 51208, + "src": "2871:19:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2871:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "baseExpression": { - "id": 52355, - "name": "_vaultContracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52234, - "src": "2109:15:54", + "constant": false, + "id": 51130, + "mutability": "mutable", + "name": "_nonce", + "nameLocation": "2924:6:50", + "nodeType": "VariableDeclaration", + "scope": 51208, + "src": "2916:14:50", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_contract$_Vault_$51076_$dyn_calldata_ptr", - "typeString": "contract Vault[] calldata" - } + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2916:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, - "id": 52357, - "indexExpression": { - "id": 52356, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "2125:1:54", + { + "constant": false, + "id": 51132, + "mutability": "mutable", + "name": "_deadline", + "nameLocation": "2964:9:50", + "nodeType": "VariableDeclaration", + "scope": 51208, + "src": "2956:17:50", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" + }, + "typeName": { + "id": 51131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2956:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51134, + "mutability": "mutable", + "name": "_signature", + "nameLocation": "3012:10:50", + "nodeType": "VariableDeclaration", + "scope": 51208, + "src": "2999:23:50", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 51133, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2999:5:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 51154, + "initialValue": { + "arguments": [ + { + "baseExpression": { + "id": 51137, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "3058:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51139, + "indexExpression": { + "id": 51138, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "3077:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3058:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "components": [ + { + "id": 51141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3082:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 51140, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3082:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51143, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3091:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51142, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3091:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3100:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51144, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3100:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51147, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3109:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51146, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3109:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3118:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51148, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3118:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3127:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 51150, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3127:5:50", + "typeDescriptions": {} + } + } + ], + "id": 51152, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3081:52:50", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_type$_t_address_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$_t_type$_t_bytes_storage_ptr_$_$", + "typeString": "tuple(type(address),type(uint256),type(uint256),type(uint256),type(uint256),type(bytes storage pointer))" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_tuple$_t_type$_t_address_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$_t_type$_t_bytes_storage_ptr_$_$", + "typeString": "tuple(type(address),type(uint256),type(uint256),type(uint256),type(uint256),type(bytes storage pointer))" + } + ], + "expression": { + "id": 51135, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "3047:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 51136, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3051:6:50", + "memberName": "decode", + "nodeType": "MemberAccess", + "src": "3047:10:50", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" } }, + "id": 51153, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2109:18:54", + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3047:87:50", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51076", - "typeString": "contract Vault" + "typeIdentifier": "t_tuple$_t_address_payable_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$", + "typeString": "tuple(address payable,uint256,uint256,uint256,uint256,bytes memory)" } }, - "id": 52358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2128:12:54", - "memberName": "mintCurrency", - "nodeType": "MemberAccess", - "referencedDeclaration": 50286, - "src": "2109:31:54", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ERC20_$45654_$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract ERC20,address,address,uint256) external" - } + "nodeType": "VariableDeclarationStatement", + "src": "2764:370:50" }, - "id": 52369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2109:83:54", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 52370, - "nodeType": "ExpressionStatement", - "src": "2109:83:54" - } - ] - } - }, - "id": 52394, - "nodeType": "IfStatement", - "src": "1863:504:54", - "trueBody": { - "id": 52348, - "nodeType": "Block", - "src": "1916:122:54", - "statements": [ - { - "expression": { - "arguments": [ { - "baseExpression": { - "id": 52336, - "name": "_collateralTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52242, - "src": "1972:17:54", + "expression": { + "arguments": [ + { + "expression": { + "id": 51158, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3196:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 51159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3200:6:50", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3196:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 51164, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51124, + "src": "3377:6:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 51168, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51126, + "src": "3451:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "arguments": [ + { + "id": 51171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3465:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 51170, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "3465:7:50", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + } + ], + "id": 51169, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "3460:4:50", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51172, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3460:13:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint160", + "typeString": "type(uint160)" + } + }, + "id": 51173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3474:3:50", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "3460:17:50", + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 51167, + "name": "_ensureSafeToCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51653, + "src": "3433:17:50", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 51174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3433:45:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 51166, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3425:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 51165, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "3425:7:50", + "typeDescriptions": {} + } + }, + "id": 51175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3425:54:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 51179, + "name": "_expiration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51128, + "src": "3550:11:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "arguments": [ + { + "id": 51182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3568:6:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint48_$", + "typeString": "type(uint48)" + }, + "typeName": { + "id": 51181, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "3568:6:50", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint48_$", + "typeString": "type(uint48)" + } + ], + "id": 51180, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "3563:4:50", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3563:12:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint48", + "typeString": "type(uint48)" + } + }, + "id": 51184, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3576:3:50", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "3563:16:50", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + ], + "id": 51178, + "name": "_ensureSafeToCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51653, + "src": "3532:17:50", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 51185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3532:48:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 51177, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3525:6:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint48_$", + "typeString": "type(uint48)" + }, + "typeName": { + "id": 51176, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "3525:6:50", + "typeDescriptions": {} + } + }, + "id": 51186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3525:56:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 51190, + "name": "_nonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51130, + "src": "3647:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "arguments": [ + { + "id": 51193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3660:6:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint48_$", + "typeString": "type(uint48)" + }, + "typeName": { + "id": 51192, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "3660:6:50", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint48_$", + "typeString": "type(uint48)" + } + ], + "id": 51191, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "3655:4:50", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3655:12:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint48", + "typeString": "type(uint48)" + } + }, + "id": 51195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3668:3:50", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "3655:16:50", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + ], + "id": 51189, + "name": "_ensureSafeToCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51653, + "src": "3629:17:50", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 51196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3629:43:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 51188, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3622:6:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint48_$", + "typeString": "type(uint48)" + }, + "typeName": { + "id": 51187, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "3622:6:50", + "typeDescriptions": {} + } + }, + "id": 51197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3622:51:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + }, + { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + }, + { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + ], + "expression": { + "id": 51162, + "name": "IAllowanceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43676, + "src": "3303:18:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IAllowanceTransfer_$43676_$", + "typeString": "type(contract IAllowanceTransfer)" + } + }, + "id": 51163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3322:13:50", + "memberName": "PermitDetails", + "nodeType": "MemberAccess", + "referencedDeclaration": 43544, + "src": "3303:32:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_PermitDetails_$43544_storage_ptr_$", + "typeString": "type(struct IAllowanceTransfer.PermitDetails storage pointer)" + } + }, + "id": 51198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": [ + "3370:5:50", + "3417:6:50", + "3513:10:50", + "3615:5:50" + ], + "names": ["token", "amount", "expiration", "nonce"], + "nodeType": "FunctionCall", + "src": "3303:401:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_PermitDetails_$43544_memory_ptr", + "typeString": "struct IAllowanceTransfer.PermitDetails memory" + } + }, + { + "arguments": [ + { + "id": 51201, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3751:4:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_VaultRouter_$51654", + "typeString": "contract VaultRouter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_VaultRouter_$51654", + "typeString": "contract VaultRouter" + } + ], + "id": 51200, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3743:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 51199, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3743:7:50", + "typeDescriptions": {} + } + }, + "id": 51202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3743:13:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 51203, + "name": "_deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51132, + "src": "3799:9:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_PermitDetails_$43544_memory_ptr", + "typeString": "struct IAllowanceTransfer.PermitDetails memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 51160, + "name": "IAllowanceTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43676, + "src": "3232:18:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IAllowanceTransfer_$43676_$", + "typeString": "type(contract IAllowanceTransfer)" + } + }, + "id": 51161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3251:12:50", + "memberName": "PermitSingle", + "nodeType": "MemberAccess", + "referencedDeclaration": 43553, + "src": "3232:31:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_PermitSingle_$43553_storage_ptr_$", + "typeString": "type(struct IAllowanceTransfer.PermitSingle storage pointer)" + } + }, + "id": 51204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": [ + "3294:7:50", + "3734:7:50", + "3786:11:50" + ], + "names": ["details", "spender", "sigDeadline"], + "nodeType": "FunctionCall", + "src": "3232:603:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_PermitSingle_$43553_memory_ptr", + "typeString": "struct IAllowanceTransfer.PermitSingle memory" + } + }, + { + "id": 51205, + "name": "_signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51134, + "src": "3861:10:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_struct$_PermitSingle_$43553_memory_ptr", + "typeString": "struct IAllowanceTransfer.PermitSingle memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 51155, + "name": "permit2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50965, + "src": "3156:7:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPermit2_$43696", + "typeString": "contract IPermit2" + } + }, + "id": 51157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3164:6:50", + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 43626, + "src": "3156:14:50", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_struct$_PermitSingle_$43553_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,struct IAllowanceTransfer.PermitSingle memory,bytes memory) external" + } + }, + "id": 51206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3156:737:50", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_array$_t_contract$_ERC20_$45654_$dyn_calldata_ptr", - "typeString": "contract ERC20[] calldata" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 52338, - "indexExpression": { - "id": 52337, - "name": "i", + "id": 51207, + "nodeType": "ExpressionStatement", + "src": "3156:737:50" + } + ] + } + }, + "id": 51581, + "nodeType": "IfStatement", + "src": "1668:5442:50", + "trueBody": { + "id": 51109, + "nodeType": "Block", + "src": "1737:866:50", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 51049, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "1786:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51051, + "indexExpression": { + "id": 51050, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "1805:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1786:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "hexValue": "323838", + "id": 51052, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1809:3:50", + "typeDescriptions": { + "typeIdentifier": "t_rational_288_by_1", + "typeString": "int_const 288" + }, + "value": "288" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_rational_288_by_1", + "typeString": "int_const 288" + } + ], + "id": 51048, + "name": "_requireInputIsRightLength", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "1990:1:54", + "referencedDeclaration": 51634, + "src": "1759:26:50", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_internal_pure$_t_bytes_calldata_ptr_$_t_uint256_$returns$__$", + "typeString": "function (bytes calldata,uint256) pure" } }, + "id": 51053, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1972:20:54", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45654", - "typeString": "contract ERC20" - } - }, - { - "id": 52339, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52293, - "src": "1994:6:54", + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1759:54:50", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - { - "baseExpression": { - "id": 52340, - "name": "_tos", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52245, - "src": "2002:4:54", + "id": 51054, + "nodeType": "ExpressionStatement", + "src": "1759:54:50" + }, + { + "assignments": [51056, 51058, 51060, 51062, 51064], + "declarations": [ + { + "constant": false, + "id": 51056, + "mutability": "mutable", + "name": "_token", + "nameLocation": "1844:6:50", + "nodeType": "VariableDeclaration", + "scope": 51109, + "src": "1836:14:50", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[] calldata" - } + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 51055, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1836:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" }, - "id": 52342, - "indexExpression": { - "id": 52341, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "2007:1:54", + { + "constant": false, + "id": 51058, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "1860:7:50", + "nodeType": "VariableDeclaration", + "scope": 51109, + "src": "1852:15:50", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2002:7:54", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "baseExpression": { - "id": 52343, - "name": "_amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52248, - "src": "2011:8:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } + }, + "typeName": { + "id": 51057, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1852:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, - "id": 52345, - "indexExpression": { - "id": 52344, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "2020:1:54", + { + "constant": false, + "id": 51060, + "mutability": "mutable", + "name": "_nonce", + "nameLocation": "1877:6:50", + "nodeType": "VariableDeclaration", + "scope": 51109, + "src": "1869:14:50", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2011:11:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_ERC20_$45654", - "typeString": "contract ERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" + }, + "typeName": { + "id": 51059, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1869:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, { - "typeIdentifier": "t_address", - "typeString": "address" + "constant": false, + "id": 51062, + "mutability": "mutable", + "name": "_deadline", + "nameLocation": "1893:9:50", + "nodeType": "VariableDeclaration", + "scope": 51109, + "src": "1885:17:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1885:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "constant": false, + "id": 51064, + "mutability": "mutable", + "name": "_signature", + "nameLocation": "1917:10:50", + "nodeType": "VariableDeclaration", + "scope": 51109, + "src": "1904:23:50", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 51063, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1904:5:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" } ], - "expression": { - "baseExpression": { - "id": 52332, - "name": "_vaultContracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52234, - "src": "1934:15:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_contract$_Vault_$51076_$dyn_calldata_ptr", - "typeString": "contract Vault[] calldata" + "id": 51082, + "initialValue": { + "arguments": [ + { + "baseExpression": { + "id": 51067, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "1966:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51069, + "indexExpression": { + "id": 51068, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "1985:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1966:21:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "components": [ + { + "id": 51071, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1990:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 51070, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1990:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51073, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1999:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51072, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1999:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51075, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2008:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51074, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2008:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2017:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51076, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2017:7:50", + "typeDescriptions": {} + } + }, + { + "id": 51079, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2026:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 51078, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2026:5:50", + "typeDescriptions": {} + } + } + ], + "id": 51080, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1989:43:50", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_type$_t_address_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$_t_type$_t_bytes_storage_ptr_$_$", + "typeString": "tuple(type(address),type(uint256),type(uint256),type(uint256),type(bytes storage pointer))" + } } - }, - "id": 52334, - "indexExpression": { - "id": 52333, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "1950:1:54", + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_tuple$_t_type$_t_address_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$_t_type$_t_bytes_storage_ptr_$_$", + "typeString": "tuple(type(address),type(uint256),type(uint256),type(uint256),type(bytes storage pointer))" + } + ], + "expression": { + "id": 51065, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1955:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 51066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1959:6:50", + "memberName": "decode", + "nodeType": "MemberAccess", + "src": "1955:10:50", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" } }, + "id": 51081, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1934:18:54", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51076", - "typeString": "contract Vault" - } - }, - "id": 52335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1953:18:54", - "memberName": "withdrawCollateral", - "nodeType": "MemberAccess", - "referencedDeclaration": 50204, - "src": "1934:37:54", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ERC20_$45654_$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract ERC20,address,address,uint256) external" - } - }, - "id": 52346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1934:89:54", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 52347, - "nodeType": "ExpressionStatement", - "src": "1934:89:54" - } - ] - } - }, - "id": 52395, - "nodeType": "IfStatement", - "src": "1693:674:54", - "trueBody": { - "id": 52325, - "nodeType": "Block", - "src": "1745:112:54", - "statements": [ - { - "expression": { - "arguments": [ - { - "baseExpression": { - "id": 52316, - "name": "_collateralTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52242, - "src": "1800:17:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_contract$_ERC20_$45654_$dyn_calldata_ptr", - "typeString": "contract ERC20[] calldata" - } - }, - "id": 52318, - "indexExpression": { - "id": 52317, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "1818:1:54", + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1955:78:50", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$_t_address_payable_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$", + "typeString": "tuple(address payable,uint256,uint256,uint256,bytes memory)" } }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1800:20:54", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45654", - "typeString": "contract ERC20" - } - }, - { - "id": 52319, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52293, - "src": "1822:6:54", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } + "nodeType": "VariableDeclarationStatement", + "src": "1835:198:50" }, { - "baseExpression": { - "id": 52320, - "name": "_amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52248, - "src": "1830:8:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 52322, - "indexExpression": { - "id": 52321, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "1839:1:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1830:11:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_ERC20_$45654", - "typeString": "contract ERC20" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "baseExpression": { - "id": 52312, - "name": "_vaultContracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52234, - "src": "1763:15:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_contract$_Vault_$51076_$dyn_calldata_ptr", - "typeString": "contract Vault[] calldata" - } - }, - "id": 52314, - "indexExpression": { - "id": 52313, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "1779:1:54", + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 51090, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51056, + "src": "2230:6:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 51091, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51058, + "src": "2246:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 51088, + "name": "ISignatureTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43836, + "src": "2186:18:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISignatureTransfer_$43836_$", + "typeString": "type(contract ISignatureTransfer)" + } + }, + "id": 51089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2205:16:50", + "memberName": "TokenPermissions", + "nodeType": "MemberAccess", + "referencedDeclaration": 43726, + "src": "2186:35:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_TokenPermissions_$43726_storage_ptr_$", + "typeString": "type(struct ISignatureTransfer.TokenPermissions storage pointer)" + } + }, + "id": 51092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": ["2223:5:50", "2238:6:50"], + "names": ["token", "amount"], + "nodeType": "FunctionCall", + "src": "2186:69:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_TokenPermissions_$43726_memory_ptr", + "typeString": "struct ISignatureTransfer.TokenPermissions memory" + } + }, + { + "id": 51093, + "name": "_nonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51060, + "src": "2292:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 51094, + "name": "_deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51062, + "src": "2338:9:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_TokenPermissions_$43726_memory_ptr", + "typeString": "struct ISignatureTransfer.TokenPermissions memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 51086, + "name": "ISignatureTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43836, + "src": "2107:18:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISignatureTransfer_$43836_$", + "typeString": "type(contract ISignatureTransfer)" + } + }, + "id": 51087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2126:18:50", + "memberName": "PermitTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 43735, + "src": "2107:37:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_PermitTransferFrom_$43735_storage_ptr_$", + "typeString": "type(struct ISignatureTransfer.PermitTransferFrom storage pointer)" + } + }, + "id": 51095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": ["2175:9:50", "2285:5:50", "2328:8:50"], + "names": ["permitted", "nonce", "deadline"], + "nodeType": "FunctionCall", + "src": "2107:267:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_PermitTransferFrom_$43735_memory_ptr", + "typeString": "struct ISignatureTransfer.PermitTransferFrom memory" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 51100, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2457:4:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_VaultRouter_$51654", + "typeString": "contract VaultRouter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_VaultRouter_$51654", + "typeString": "contract VaultRouter" + } + ], + "id": 51099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2449:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 51098, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2449:7:50", + "typeDescriptions": {} + } + }, + "id": 51101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2449:13:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 51102, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51058, + "src": "2481:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 51096, + "name": "ISignatureTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43836, + "src": "2400:18:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISignatureTransfer_$43836_$", + "typeString": "type(contract ISignatureTransfer)" + } + }, + "id": 51097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2419:24:50", + "memberName": "SignatureTransferDetails", + "nodeType": "MemberAccess", + "referencedDeclaration": 43741, + "src": "2400:43:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_SignatureTransferDetails_$43741_storage_ptr_$", + "typeString": "type(struct ISignatureTransfer.SignatureTransferDetails storage pointer)" + } + }, + "id": 51103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": ["2445:2:50", "2464:15:50"], + "names": ["to", "requestedAmount"], + "nodeType": "FunctionCall", + "src": "2400:90:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_SignatureTransferDetails_$43741_memory_ptr", + "typeString": "struct ISignatureTransfer.SignatureTransferDetails memory" + } + }, + { + "expression": { + "id": 51104, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2516:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 51105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2520:6:50", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2516:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 51106, + "name": "_signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51064, + "src": "2552:10:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_PermitTransferFrom_$43735_memory_ptr", + "typeString": "struct ISignatureTransfer.PermitTransferFrom memory" + }, + { + "typeIdentifier": "t_struct$_SignatureTransferDetails_$43741_memory_ptr", + "typeString": "struct ISignatureTransfer.SignatureTransferDetails memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 51083, + "name": "permit2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50965, + "src": "2055:7:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPermit2_$43696", + "typeString": "contract IPermit2" + } + }, + "id": 51085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2063:18:50", + "memberName": "permitTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 43775, + "src": "2055:26:50", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_struct$_PermitTransferFrom_$43735_memory_ptr_$_t_struct$_SignatureTransferDetails_$43741_memory_ptr_$_t_address_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (struct ISignatureTransfer.PermitTransferFrom memory,struct ISignatureTransfer.SignatureTransferDetails memory,address,bytes memory) external" + } + }, + "id": 51107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2055:529:50", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1763:18:54", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51076", - "typeString": "contract Vault" - } - }, - "id": 52315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1782:17:54", - "memberName": "depositCollateral", - "nodeType": "MemberAccess", - "referencedDeclaration": 50143, - "src": "1763:36:54", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ERC20_$45654_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (contract ERC20,address,uint256) external" + "id": 51108, + "nodeType": "ExpressionStatement", + "src": "2055:529:50" } - }, - "id": 52323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1763:79:54", - "tryCall": false, + ] + } + }, + "id": 51582, + "nodeType": "IfStatement", + "src": "1566:5544:50", + "trueBody": { + "id": 51041, + "nodeType": "Block", + "src": "1616:46:50", + "statements": [ + { + "id": 51040, + "nodeType": "Break", + "src": "1638:5:50" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 51021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 51018, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "1454:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 51019, + "name": "_encodedParameters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51000, + "src": "1458:18:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes calldata[] calldata" + } + }, + "id": 51020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1477:6:50", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1458:25:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1454:29:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 51584, + "initializationExpression": { + "assignments": [51016], + "declarations": [ + { + "constant": false, + "id": 51016, + "mutability": "mutable", + "name": "i", + "nameLocation": "1451:1:50", + "nodeType": "VariableDeclaration", + "scope": 51584, + "src": "1443:9:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1443:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 51017, + "nodeType": "VariableDeclarationStatement", + "src": "1443:9:50" + }, + "loopExpression": { + "expression": { + "id": 51023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "1485:3:50", + "subExpression": { + "id": 51022, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51016, + "src": "1487:1:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 51024, + "nodeType": "ExpressionStatement", + "src": "1485:3:50" + }, + "nodeType": "ForStatement", + "src": "1438:5686:50" + } + ] + } + ] + }, + "functionSelector": "2b492640", + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "multiInteract", + "nameLocation": "1176:13:50", + "parameters": { + "id": 51001, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 50997, + "mutability": "mutable", + "name": "_packedOperations", + "nameLocation": "1205:17:50", + "nodeType": "VariableDeclaration", + "scope": 51587, + "src": "1190:32:50", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 50996, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1190:5:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51000, + "mutability": "mutable", + "name": "_encodedParameters", + "nameLocation": "1241:18:50", + "nodeType": "VariableDeclaration", + "scope": 51587, + "src": "1224:35:50", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_calldata_ptr_$dyn_calldata_ptr", + "typeString": "bytes[]" + }, + "typeName": { + "baseType": { + "id": 50998, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1224:5:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "id": 50999, + "nodeType": "ArrayTypeName", + "src": "1224:7:50", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", + "typeString": "bytes[]" + } + }, + "visibility": "internal" + } + ], + "src": "1189:71:50" + }, + "returnParameters": { + "id": 51002, + "nodeType": "ParameterList", + "parameters": [], + "src": "1270:0:50" + }, + "scope": 51654, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 51614, + "nodeType": "FunctionDefinition", + "src": "7146:198:50", + "nodes": [], + "body": { + "id": 51613, + "nodeType": "Block", + "src": "7246:98:50", + "nodes": [], + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 51601, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51589, + "src": "7284:6:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 51602, + "name": "_vaultAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51591, + "src": "7292:13:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "condition": { + "id": 51603, + "name": "isMax", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51593, + "src": "7307:5:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "hexValue": "30", + "id": 51609, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7335:1:50", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 51610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "7307:29:50", + "trueExpression": { + "expression": { + "arguments": [ + { + "id": 51606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7320:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 51605, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7320:7:50", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 51604, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "7315:4:50", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 51607, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7315:13:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 51608, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "7329:3:50", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "7315:17:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "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": 51598, + "name": "SafeTransferLib", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 45613, + "src": "7256:15:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeTransferLib_$45613_$", + "typeString": "type(library SafeTransferLib)" + } + }, + "id": 51600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7272:11:50", + "memberName": "safeApprove", + "nodeType": "MemberAccess", + "referencedDeclaration": 45588, + "src": "7256:27:50", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 51611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7256:81:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51612, + "nodeType": "ExpressionStatement", + "src": "7256:81:50" + } + ] + }, + "functionSelector": "3f7d7bc9", + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 51596, + "kind": "modifierInvocation", + "modifierName": { + "id": 51595, + "name": "onlyOwner", + "nameLocations": ["7236:9:50"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 44997, + "src": "7236:9:50" + }, + "nodeType": "ModifierInvocation", + "src": "7236:9:50" + } + ], + "name": "approveTokenForVault", + "nameLocation": "7155:20:50", + "parameters": { + "id": 51594, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 51589, + "mutability": "mutable", + "name": "_token", + "nameLocation": "7184:6:50", + "nodeType": "VariableDeclaration", + "scope": 51614, + "src": "7176:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 51588, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7176:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51591, + "mutability": "mutable", + "name": "_vaultAddress", + "nameLocation": "7200:13:50", + "nodeType": "VariableDeclaration", + "scope": 51614, + "src": "7192:21:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 51590, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7192:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51593, + "mutability": "mutable", + "name": "isMax", + "nameLocation": "7220:5:50", + "nodeType": "VariableDeclaration", + "scope": 51614, + "src": "7215:10:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 51592, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7215:4:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "7175:51:50" + }, + "returnParameters": { + "id": 51597, + "nodeType": "ParameterList", + "parameters": [], + "src": "7246:0:50" + }, + "scope": 51654, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "id": 51634, + "nodeType": "FunctionDefinition", + "src": "7350:277:50", + "nodes": [], + "body": { + "id": 51633, + "nodeType": "Block", + "src": "7458:169:50", + "nodes": [], + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 51624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 51621, + "name": "_expectedLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51618, + "src": "7472:15:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 51622, + "name": "_encodedParameter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51616, + "src": "7491:17:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + "id": 51623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7509:6:50", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7491:24:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7472:43:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 51632, + "nodeType": "IfStatement", + "src": "7468:153:50", + "trueBody": { + "id": 51631, + "nodeType": "Block", + "src": "7517:104:50", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 51626, + "name": "_expectedLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51618, + "src": "7568:15:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 51627, + "name": "_encodedParameter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51616, + "src": "7585:17:50", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" } }, - "id": 52324, - "nodeType": "ExpressionStatement", - "src": "1763:79:54" + "id": 51628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7603:6:50", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7585:24:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } } - ] - } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 51625, + "name": "InvalidEncodedParameterLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50975, + "src": "7538:29:50", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256) pure" + } + }, + "id": 51629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7538:72:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 51630, + "nodeType": "RevertStatement", + "src": "7531:79:50" } ] + } + } + ] + }, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_requireInputIsRightLength", + "nameLocation": "7359:26:50", + "parameters": { + "id": 51619, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 51616, + "mutability": "mutable", + "name": "_encodedParameter", + "nameLocation": "7401:17:50", + "nodeType": "VariableDeclaration", + "scope": 51634, + "src": "7386:32:50", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 51615, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7386:5:50", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 51618, + "mutability": "mutable", + "name": "_expectedLength", + "nameLocation": "7428:15:50", + "nodeType": "VariableDeclaration", + "scope": 51634, + "src": "7420:23:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51617, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7420:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, + "visibility": "internal" + } + ], + "src": "7385:59:50" + }, + "returnParameters": { + "id": 51620, + "nodeType": "ParameterList", + "parameters": [], + "src": "7458:0:50" + }, + "scope": 51654, + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "id": 51653, + "nodeType": "FunctionDefinition", + "src": "7633:161:50", + "nodes": [], + "body": { + "id": 51652, + "nodeType": "Block", + "src": "7720:74:50", + "nodes": [], + "statements": [ + { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 52302, + "id": 51645, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 52300, - "name": "i", + "id": 51643, + "name": "maxOfX", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "1653:1:54", + "referencedDeclaration": 51638, + "src": "7734:6:50", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2356,341 +9794,218 @@ "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { - "id": 52301, - "name": "_expectedLength", + "id": 51644, + "name": "num", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52252, - "src": "1657:15:54", + "referencedDeclaration": 51636, + "src": "7743:3:50", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1653:19:54", + "src": "7734:12:50", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 52397, - "initializationExpression": { - "assignments": [52298], - "declarations": [ - { - "constant": false, - "id": 52298, - "mutability": "mutable", - "name": "i", - "nameLocation": "1650:1:54", - "nodeType": "VariableDeclaration", - "scope": 52397, - "src": "1642:9:54", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 52297, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1642:7:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 52299, - "nodeType": "VariableDeclarationStatement", - "src": "1642:9:54" - }, - "loopExpression": { - "expression": { - "id": 52304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "1674:3:54", - "subExpression": { - "id": 52303, - "name": "i", + "id": 51649, + "nodeType": "IfStatement", + "src": "7730:37:50", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 51646, + "name": "UnsafeCast", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 52298, - "src": "1676:1:54", + "referencedDeclaration": 50969, + "src": "7755:10:50", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" } }, + "id": 51647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7755:12:50", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 52305, - "nodeType": "ExpressionStatement", - "src": "1674:3:54" + "id": 51648, + "nodeType": "RevertStatement", + "src": "7748:19:50" + } + }, + { + "expression": { + "id": 51650, + "name": "num", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51636, + "src": "7784:3:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "nodeType": "ForStatement", - "src": "1637:740:54" + "functionReturnParameters": 51642, + "id": 51651, + "nodeType": "Return", + "src": "7777:10:50" } ] }, - "functionSelector": "b54fb88e", "implemented": true, "kind": "function", "modifiers": [], - "name": "multiInteract", - "nameLocation": "462:13:54", + "name": "_ensureSafeToCast", + "nameLocation": "7642:17:50", "parameters": { - "id": 52249, + "id": 51639, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 52234, - "mutability": "mutable", - "name": "_vaultContracts", - "nameLocation": "502:15:54", - "nodeType": "VariableDeclaration", - "scope": 52399, - "src": "485:32:54", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_contract$_Vault_$51076_$dyn_calldata_ptr", - "typeString": "contract Vault[]" - }, - "typeName": { - "baseType": { - "id": 52232, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 52231, - "name": "Vault", - "nameLocations": ["485:5:54"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 51076, - "src": "485:5:54" - }, - "referencedDeclaration": 51076, - "src": "485:5:54", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Vault_$51076", - "typeString": "contract Vault" - } - }, - "id": 52233, - "nodeType": "ArrayTypeName", - "src": "485:7:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_contract$_Vault_$51076_$dyn_storage_ptr", - "typeString": "contract Vault[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 52238, - "mutability": "mutable", - "name": "_operations", - "nameLocation": "549:11:54", - "nodeType": "VariableDeclaration", - "scope": 52399, - "src": "527:33:54", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_enum$_Operations_$52230_$dyn_calldata_ptr", - "typeString": "enum VaultRouter.Operations[]" - }, - "typeName": { - "baseType": { - "id": 52236, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 52235, - "name": "Operations", - "nameLocations": ["527:10:54"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 52230, - "src": "527:10:54" - }, - "referencedDeclaration": 52230, - "src": "527:10:54", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Operations_$52230", - "typeString": "enum VaultRouter.Operations" - } - }, - "id": 52237, - "nodeType": "ArrayTypeName", - "src": "527:12:54", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_enum$_Operations_$52230_$dyn_storage_ptr", - "typeString": "enum VaultRouter.Operations[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 52242, + "id": 51636, "mutability": "mutable", - "name": "_collateralTokens", - "nameLocation": "587:17:54", + "name": "num", + "nameLocation": "7668:3:50", "nodeType": "VariableDeclaration", - "scope": 52399, - "src": "570:34:54", + "scope": 51653, + "src": "7660:11:50", "stateVariable": false, - "storageLocation": "calldata", + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_contract$_ERC20_$45654_$dyn_calldata_ptr", - "typeString": "contract ERC20[]" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "baseType": { - "id": 52240, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 52239, - "name": "ERC20", - "nameLocations": ["570:5:54"], - "nodeType": "IdentifierPath", - "referencedDeclaration": 45654, - "src": "570:5:54" - }, - "referencedDeclaration": 45654, - "src": "570:5:54", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$45654", - "typeString": "contract ERC20" - } - }, - "id": 52241, - "nodeType": "ArrayTypeName", - "src": "570:7:54", + "id": 51635, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7660:7:50", "typeDescriptions": { - "typeIdentifier": "t_array$_t_contract$_ERC20_$45654_$dyn_storage_ptr", - "typeString": "contract ERC20[]" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, - "id": 52245, + "id": 51638, "mutability": "mutable", - "name": "_tos", - "nameLocation": "633:4:54", + "name": "maxOfX", + "nameLocation": "7681:6:50", "nodeType": "VariableDeclaration", - "scope": 52399, - "src": "614:23:54", + "scope": 51653, + "src": "7673:14:50", "stateVariable": false, - "storageLocation": "calldata", + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[]" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "baseType": { - "id": 52243, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "614:7:54", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 52244, - "nodeType": "ArrayTypeName", - "src": "614:9:54", + "id": 51637, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7673:7:50", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "visibility": "internal" - }, + } + ], + "src": "7659:29:50" + }, + "returnParameters": { + "id": 51642, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 52248, + "id": 51641, "mutability": "mutable", - "name": "_amounts", - "nameLocation": "666:8:54", + "name": "", + "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 52399, - "src": "647:27:54", + "scope": 51653, + "src": "7711:7:50", "stateVariable": false, - "storageLocation": "calldata", + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[]" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "baseType": { - "id": 52246, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "647:7:54", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 52247, - "nodeType": "ArrayTypeName", - "src": "647:9:54", + "id": 51640, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7711:7:50", "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "visibility": "internal" } ], - "src": "475:205:54" - }, - "returnParameters": { - "id": 52250, - "nodeType": "ParameterList", - "parameters": [], - "src": "690:0:54" + "src": "7710:9:50" }, - "scope": 52400, - "stateMutability": "nonpayable", + "scope": 51654, + "stateMutability": "pure", "virtual": false, - "visibility": "external" + "visibility": "private" } ], "abstract": false, - "baseContracts": [], + "baseContracts": [ + { + "baseName": { + "id": 50958, + "name": "Ownable", + "nameLocations": ["488:7:50"], + "nodeType": "IdentifierPath", + "referencedDeclaration": 44998, + "src": "488:7:50" + }, + "id": 50959, + "nodeType": "InheritanceSpecifier", + "src": "488:7:50" + } + ], "canonicalName": "VaultRouter", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, - "linearizedBaseContracts": [52400], + "linearizedBaseContracts": [51654, 44998], "name": "VaultRouter", - "nameLocation": "249:11:54", - "scope": 52401, - "usedErrors": [52225], - "usedEvents": [] + "nameLocation": "473:11:50", + "scope": 51655, + "usedErrors": [44810, 44813, 44816, 44819, 50967, 50969, 50975], + "usedEvents": [44826, 44831, 44836] } ], "license": "MIT" }, - "id": 54 + "id": 50 } diff --git a/src/contracts/abis/index.ts b/src/contracts/abis/index.ts index a10817a..f62f144 100644 --- a/src/contracts/abis/index.ts +++ b/src/contracts/abis/index.ts @@ -5,4 +5,5 @@ export default { VaultRouterAbi: require('./VaultRouter.json'), VaultGetterAbi: require('./VaultGetter.json'), VaultAbi: require('./Vault.json'), + RateAbi: require('./Rate.json'), }; diff --git a/src/contracts/getContractAddresses.ts b/src/contracts/getContractAddresses.ts index 2e99b04..48645ed 100644 --- a/src/contracts/getContractAddresses.ts +++ b/src/contracts/getContractAddresses.ts @@ -2,32 +2,57 @@ import { ContractName, SupportedNetwork } from './types'; const addresses: Record>> = { Vault: { - [SupportedNetwork.GOERLI]: '0xE2386C5eF4deC9d5815C60168e36c7153ba00D0C', + [SupportedNetwork.BASE_GOERLI]: '0xE2386C5eF4deC9d5815C60168e36c7153ba00D0C', + [SupportedNetwork.BASE_SEPOLIA]: '0x18196CCaA8C2844c82B40a8bDCa27349C7466280', }, MultiStaticcall: { - [SupportedNetwork.GOERLI]: '0x5226c32C94acdd44743FC5c376582d6782FA7592', + [SupportedNetwork.BASE_GOERLI]: '0x5226c32C94acdd44743FC5c376582d6782FA7592', + [SupportedNetwork.BASE_SEPOLIA]: '0x53D0ec27F7221535e72C11BA85BA1a1De34298c5', }, VaultGetters: { - [SupportedNetwork.GOERLI]: '0x63642E2E49922DA2095cFDB0781cFf01a0d69786', + [SupportedNetwork.BASE_GOERLI]: '0x63642E2E49922DA2095cFDB0781cFf01a0d69786', + [SupportedNetwork.BASE_SEPOLIA]: '0x50fC21F951Bc42421815e104d21C5f094da9e70C', }, VaultRouter: { - [SupportedNetwork.GOERLI]: '0x7FCF3897429Af4e5f3A397330AD638D819e53328', + [SupportedNetwork.BASE_GOERLI]: '0x7FCF3897429Af4e5f3A397330AD638D819e53328', + [SupportedNetwork.BASE_SEPOLIA]: '0x7F46a4944F9C3ecF4Ea622364132b3fE9aBa1015', }, Currency: { - [SupportedNetwork.GOERLI]: '0xee2bDAE7896910c49BeA25106B9f8e9f4B671c82', + [SupportedNetwork.BASE_GOERLI]: '0xee2bDAE7896910c49BeA25106B9f8e9f4B671c82', + [SupportedNetwork.BASE_SEPOLIA]: '0x5d0583Ef20884C0b175046d515Ec227200C12C89', }, Feed: { - [SupportedNetwork.GOERLI]: '0x970066EE55DF2134D1b52451afb49034AE5Fa29a', + [SupportedNetwork.BASE_GOERLI]: '0x970066EE55DF2134D1b52451afb49034AE5Fa29a', + [SupportedNetwork.BASE_SEPOLIA]: '0x94D80B2EA3cda86bF350DD7860e1171701F284c8', }, USDC: { - [SupportedNetwork.GOERLI]: '0xF175520C52418dfE19C8098071a252da48Cd1C19', + [SupportedNetwork.BASE_GOERLI]: '0xF175520C52418dfE19C8098071a252da48Cd1C19', + [SupportedNetwork.BASE_SEPOLIA]: '0x036CbD53842c5426634e7929541eC2318f3dCF7e', + }, + Rate: { + [SupportedNetwork.BASE_SEPOLIA]: '0x774843f6Baa4AAE62F026a8aF3c1C6FF3e55Ca39', }, }; -export const getContractAddress = (contractName: ContractName) => { +export const getContractAddress = ( + contractName: ContractName, + network: SupportedNetwork | string, +) => { try { - return addresses[contractName]; - } catch { - throw new Error(`No address for contract ${contractName}`); + const contractAddresses = addresses[contractName]; + + if (!contractAddresses) { + throw new Error(`No addresses defined for contract ${contractName}`); + } + + const address = contractAddresses[network]; + + if (!address) { + throw new Error(`No address defined for network ${network} for contract ${contractName}`); + } + + return address; + } catch (error) { + throw new Error(`Error getting contract address: ${error.message}`); } }; diff --git a/src/contracts/types.ts b/src/contracts/types.ts index c5077a7..1c72527 100644 --- a/src/contracts/types.ts +++ b/src/contracts/types.ts @@ -5,8 +5,10 @@ export type ContractName = | 'MultiStaticcall' | 'VaultGetters' | 'VaultRouter' - | 'Feed'; + | 'Feed' + | 'Rate'; export enum SupportedNetwork { - GOERLI = '84531', + BASE_GOERLI = '84531', + BASE_SEPOLIA = '84532', } diff --git a/src/generated/Currency.ts b/src/generated/Currency.ts index d4e90d4..964ec84 100644 --- a/src/generated/Currency.ts +++ b/src/generated/Currency.ts @@ -26,50 +26,45 @@ import type { export interface CurrencyInterface extends Interface { getFunction( nameOrSignature: - | "DEFAULT_ADMIN_ROLE" | "DOMAIN_SEPARATOR" | "PERMIT2" | "allowance" | "approve" | "balanceOf" | "burn" + | "cancelOwnershipHandover" + | "completeOwnershipHandover" | "decimals" - | "eip712Domain" - | "getRoleAdmin" - | "grantRole" - | "hasRole" | "mint" + | "minterRole" | "name" | "nonces" + | "owner" + | "ownershipHandoverExpiresAt" | "permit" | "permit2Enabled" | "recoverToken" - | "renounceRole" - | "revokeRole" + | "renounceOwnership" + | "requestOwnershipHandover" | "setMinterRole" - | "supportsInterface" | "symbol" | "totalSupply" | "transfer" | "transferFrom" + | "transferOwnership" | "updatePermit2Allowance" ): FunctionFragment; getEvent( nameOrSignatureOrTopic: | "Approval" - | "EIP712DomainChanged" + | "OwnershipHandoverCanceled" + | "OwnershipHandoverRequested" + | "OwnershipTransferred" | "Permit2AllowanceUpdated" - | "RoleAdminChanged" - | "RoleGranted" - | "RoleRevoked" | "Transfer" ): EventFragment; - encodeFunctionData( - functionFragment: "DEFAULT_ADMIN_ROLE", - values?: undefined - ): string; encodeFunctionData( functionFragment: "DOMAIN_SEPARATOR", values?: undefined @@ -91,29 +86,30 @@ export interface CurrencyInterface extends Interface { functionFragment: "burn", values: [AddressLike, BigNumberish] ): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( - functionFragment: "eip712Domain", + functionFragment: "cancelOwnershipHandover", values?: undefined ): string; encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [BytesLike] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [BytesLike, AddressLike] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [BytesLike, AddressLike] + functionFragment: "completeOwnershipHandover", + values: [AddressLike] ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; encodeFunctionData( functionFragment: "mint", values: [AddressLike, BigNumberish] ): string; + encodeFunctionData( + functionFragment: "minterRole", + values: [AddressLike] + ): string; encodeFunctionData(functionFragment: "name", values?: undefined): string; encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "ownershipHandoverExpiresAt", + values: [AddressLike] + ): string; encodeFunctionData( functionFragment: "permit", values: [ @@ -135,20 +131,16 @@ export interface CurrencyInterface extends Interface { values: [AddressLike, AddressLike] ): string; encodeFunctionData( - functionFragment: "renounceRole", - values: [BytesLike, AddressLike] + functionFragment: "renounceOwnership", + values?: undefined ): string; encodeFunctionData( - functionFragment: "revokeRole", - values: [BytesLike, AddressLike] + functionFragment: "requestOwnershipHandover", + values?: undefined ): string; encodeFunctionData( functionFragment: "setMinterRole", - values: [AddressLike] - ): string; - encodeFunctionData( - functionFragment: "supportsInterface", - values: [BytesLike] + values: [AddressLike, boolean] ): string; encodeFunctionData(functionFragment: "symbol", values?: undefined): string; encodeFunctionData( @@ -163,15 +155,15 @@ export interface CurrencyInterface extends Interface { functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish] ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [AddressLike] + ): string; encodeFunctionData( functionFragment: "updatePermit2Allowance", values: [boolean] ): string; - decodeFunctionResult( - functionFragment: "DEFAULT_ADMIN_ROLE", - data: BytesLike - ): Result; decodeFunctionResult( functionFragment: "DOMAIN_SEPARATOR", data: BytesLike @@ -181,20 +173,24 @@ export interface CurrencyInterface extends Interface { decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; decodeFunctionResult( - functionFragment: "eip712Domain", + functionFragment: "cancelOwnershipHandover", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "getRoleAdmin", + functionFragment: "completeOwnershipHandover", data: BytesLike ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "minterRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ownershipHandoverExpiresAt", + data: BytesLike + ): Result; decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; decodeFunctionResult( functionFragment: "permit2Enabled", @@ -205,16 +201,15 @@ export interface CurrencyInterface extends Interface { data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "renounceRole", + functionFragment: "renounceOwnership", data: BytesLike ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; decodeFunctionResult( - functionFragment: "setMinterRole", + functionFragment: "requestOwnershipHandover", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "supportsInterface", + functionFragment: "setMinterRole", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; @@ -227,6 +222,10 @@ export interface CurrencyInterface extends Interface { functionFragment: "transferFrom", data: BytesLike ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; decodeFunctionResult( functionFragment: "updatePermit2Allowance", data: BytesLike @@ -237,13 +236,13 @@ export namespace ApprovalEvent { export type InputTuple = [ owner: AddressLike, spender: AddressLike, - value: BigNumberish + amount: BigNumberish ]; - export type OutputTuple = [owner: string, spender: string, value: bigint]; + export type OutputTuple = [owner: string, spender: string, amount: bigint]; export interface OutputObject { owner: string; spender: string; - value: bigint; + amount: bigint; } export type Event = TypedContractEvent; export type Filter = TypedDeferredTopicFilter; @@ -251,21 +250,11 @@ export namespace ApprovalEvent { export type LogDescription = TypedLogDescription; } -export namespace EIP712DomainChangedEvent { - export type InputTuple = []; - export type OutputTuple = []; - export interface OutputObject {} - export type Event = TypedContractEvent; - export type Filter = TypedDeferredTopicFilter; - export type Log = TypedEventLog; - export type LogDescription = TypedLogDescription; -} - -export namespace Permit2AllowanceUpdatedEvent { - export type InputTuple = [enabled: boolean]; - export type OutputTuple = [enabled: boolean]; +export namespace OwnershipHandoverCanceledEvent { + export type InputTuple = [pendingOwner: AddressLike]; + export type OutputTuple = [pendingOwner: string]; export interface OutputObject { - enabled: boolean; + pendingOwner: string; } export type Event = TypedContractEvent; export type Filter = TypedDeferredTopicFilter; @@ -273,21 +262,11 @@ export namespace Permit2AllowanceUpdatedEvent { export type LogDescription = TypedLogDescription; } -export namespace RoleAdminChangedEvent { - export type InputTuple = [ - role: BytesLike, - previousAdminRole: BytesLike, - newAdminRole: BytesLike - ]; - export type OutputTuple = [ - role: string, - previousAdminRole: string, - newAdminRole: string - ]; +export namespace OwnershipHandoverRequestedEvent { + export type InputTuple = [pendingOwner: AddressLike]; + export type OutputTuple = [pendingOwner: string]; export interface OutputObject { - role: string; - previousAdminRole: string; - newAdminRole: string; + pendingOwner: string; } export type Event = TypedContractEvent; export type Filter = TypedDeferredTopicFilter; @@ -295,17 +274,12 @@ export namespace RoleAdminChangedEvent { export type LogDescription = TypedLogDescription; } -export namespace RoleGrantedEvent { - export type InputTuple = [ - role: BytesLike, - account: AddressLike, - sender: AddressLike - ]; - export type OutputTuple = [role: string, account: string, sender: string]; +export namespace OwnershipTransferredEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; export interface OutputObject { - role: string; - account: string; - sender: string; + oldOwner: string; + newOwner: string; } export type Event = TypedContractEvent; export type Filter = TypedDeferredTopicFilter; @@ -313,17 +287,11 @@ export namespace RoleGrantedEvent { export type LogDescription = TypedLogDescription; } -export namespace RoleRevokedEvent { - export type InputTuple = [ - role: BytesLike, - account: AddressLike, - sender: AddressLike - ]; - export type OutputTuple = [role: string, account: string, sender: string]; +export namespace Permit2AllowanceUpdatedEvent { + export type InputTuple = [enabled: boolean]; + export type OutputTuple = [enabled: boolean]; export interface OutputObject { - role: string; - account: string; - sender: string; + enabled: boolean; } export type Event = TypedContractEvent; export type Filter = TypedDeferredTopicFilter; @@ -335,13 +303,13 @@ export namespace TransferEvent { export type InputTuple = [ from: AddressLike, to: AddressLike, - value: BigNumberish + amount: BigNumberish ]; - export type OutputTuple = [from: string, to: string, value: bigint]; + export type OutputTuple = [from: string, to: string, amount: bigint]; export interface OutputObject { from: string; to: string; - value: bigint; + amount: bigint; } export type Event = TypedContractEvent; export type Filter = TypedDeferredTopicFilter; @@ -392,25 +360,23 @@ export interface Currency extends BaseContract { event?: TCEvent ): Promise; - DEFAULT_ADMIN_ROLE: TypedContractMethod<[], [string], "view">; - DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; PERMIT2: TypedContractMethod<[], [string], "view">; allowance: TypedContractMethod< - [owner: AddressLike, spender: AddressLike], + [_owner: AddressLike, spender: AddressLike], [bigint], "view" >; approve: TypedContractMethod< - [spender: AddressLike, value: BigNumberish], + [spender: AddressLike, amount: BigNumberish], [boolean], "nonpayable" >; - balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + balanceOf: TypedContractMethod<[owner: AddressLike], [bigint], "view">; burn: TypedContractMethod< [account: AddressLike, amount: BigNumberish], @@ -418,37 +384,15 @@ export interface Currency extends BaseContract { "nonpayable" >; - decimals: TypedContractMethod<[], [bigint], "view">; - - eip712Domain: TypedContractMethod< - [], - [ - [string, string, string, bigint, string, string, bigint[]] & { - fields: string; - name: string; - version: string; - chainId: bigint; - verifyingContract: string; - salt: string; - extensions: bigint[]; - } - ], - "view" - >; - - getRoleAdmin: TypedContractMethod<[role: BytesLike], [string], "view">; + cancelOwnershipHandover: TypedContractMethod<[], [void], "payable">; - grantRole: TypedContractMethod< - [role: BytesLike, account: AddressLike], + completeOwnershipHandover: TypedContractMethod< + [pendingOwner: AddressLike], [void], - "nonpayable" + "payable" >; - hasRole: TypedContractMethod< - [role: BytesLike, account: AddressLike], - [boolean], - "view" - >; + decimals: TypedContractMethod<[], [bigint], "view">; mint: TypedContractMethod< [account: AddressLike, amount: BigNumberish], @@ -456,10 +400,20 @@ export interface Currency extends BaseContract { "nonpayable" >; + minterRole: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; + name: TypedContractMethod<[], [string], "view">; nonces: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + owner: TypedContractMethod<[], [string], "view">; + + ownershipHandoverExpiresAt: TypedContractMethod< + [pendingOwner: AddressLike], + [bigint], + "view" + >; + permit: TypedContractMethod< [ owner: AddressLike, @@ -482,46 +436,38 @@ export interface Currency extends BaseContract { "nonpayable" >; - renounceRole: TypedContractMethod< - [role: BytesLike, callerConfirmation: AddressLike], - [void], - "nonpayable" - >; + renounceOwnership: TypedContractMethod<[], [void], "payable">; - revokeRole: TypedContractMethod< - [role: BytesLike, account: AddressLike], - [void], - "nonpayable" - >; + requestOwnershipHandover: TypedContractMethod<[], [void], "payable">; setMinterRole: TypedContractMethod< - [account: AddressLike], + [account: AddressLike, isMinter: boolean], [void], "nonpayable" >; - supportsInterface: TypedContractMethod< - [interfaceId: BytesLike], - [boolean], - "view" - >; - symbol: TypedContractMethod<[], [string], "view">; totalSupply: TypedContractMethod<[], [bigint], "view">; transfer: TypedContractMethod< - [to: AddressLike, value: BigNumberish], + [to: AddressLike, amount: BigNumberish], [boolean], "nonpayable" >; transferFrom: TypedContractMethod< - [from: AddressLike, to: AddressLike, value: BigNumberish], + [from: AddressLike, to: AddressLike, amount: BigNumberish], [boolean], "nonpayable" >; + transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "payable" + >; + updatePermit2Allowance: TypedContractMethod< [enabled: boolean], [void], @@ -532,9 +478,6 @@ export interface Currency extends BaseContract { key: string | FunctionFragment ): T; - getFunction( - nameOrSignature: "DEFAULT_ADMIN_ROLE" - ): TypedContractMethod<[], [string], "view">; getFunction( nameOrSignature: "DOMAIN_SEPARATOR" ): TypedContractMethod<[], [string], "view">; @@ -544,20 +487,20 @@ export interface Currency extends BaseContract { getFunction( nameOrSignature: "allowance" ): TypedContractMethod< - [owner: AddressLike, spender: AddressLike], + [_owner: AddressLike, spender: AddressLike], [bigint], "view" >; getFunction( nameOrSignature: "approve" ): TypedContractMethod< - [spender: AddressLike, value: BigNumberish], + [spender: AddressLike, amount: BigNumberish], [boolean], "nonpayable" >; getFunction( nameOrSignature: "balanceOf" - ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; getFunction( nameOrSignature: "burn" ): TypedContractMethod< @@ -566,42 +509,14 @@ export interface Currency extends BaseContract { "nonpayable" >; getFunction( - nameOrSignature: "decimals" - ): TypedContractMethod<[], [bigint], "view">; - getFunction( - nameOrSignature: "eip712Domain" - ): TypedContractMethod< - [], - [ - [string, string, string, bigint, string, string, bigint[]] & { - fields: string; - name: string; - version: string; - chainId: bigint; - verifyingContract: string; - salt: string; - extensions: bigint[]; - } - ], - "view" - >; - getFunction( - nameOrSignature: "getRoleAdmin" - ): TypedContractMethod<[role: BytesLike], [string], "view">; + nameOrSignature: "cancelOwnershipHandover" + ): TypedContractMethod<[], [void], "payable">; getFunction( - nameOrSignature: "grantRole" - ): TypedContractMethod< - [role: BytesLike, account: AddressLike], - [void], - "nonpayable" - >; + nameOrSignature: "completeOwnershipHandover" + ): TypedContractMethod<[pendingOwner: AddressLike], [void], "payable">; getFunction( - nameOrSignature: "hasRole" - ): TypedContractMethod< - [role: BytesLike, account: AddressLike], - [boolean], - "view" - >; + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; getFunction( nameOrSignature: "mint" ): TypedContractMethod< @@ -609,12 +524,21 @@ export interface Currency extends BaseContract { [boolean], "nonpayable" >; + getFunction( + nameOrSignature: "minterRole" + ): TypedContractMethod<[arg0: AddressLike], [boolean], "view">; getFunction( nameOrSignature: "name" ): TypedContractMethod<[], [string], "view">; getFunction( nameOrSignature: "nonces" ): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "ownershipHandoverExpiresAt" + ): TypedContractMethod<[pendingOwner: AddressLike], [bigint], "view">; getFunction( nameOrSignature: "permit" ): TypedContractMethod< @@ -641,25 +565,18 @@ export interface Currency extends BaseContract { "nonpayable" >; getFunction( - nameOrSignature: "renounceRole" - ): TypedContractMethod< - [role: BytesLike, callerConfirmation: AddressLike], - [void], - "nonpayable" - >; + nameOrSignature: "renounceOwnership" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "requestOwnershipHandover" + ): TypedContractMethod<[], [void], "payable">; getFunction( - nameOrSignature: "revokeRole" + nameOrSignature: "setMinterRole" ): TypedContractMethod< - [role: BytesLike, account: AddressLike], + [account: AddressLike, isMinter: boolean], [void], "nonpayable" >; - getFunction( - nameOrSignature: "setMinterRole" - ): TypedContractMethod<[account: AddressLike], [void], "nonpayable">; - getFunction( - nameOrSignature: "supportsInterface" - ): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; getFunction( nameOrSignature: "symbol" ): TypedContractMethod<[], [string], "view">; @@ -669,17 +586,20 @@ export interface Currency extends BaseContract { getFunction( nameOrSignature: "transfer" ): TypedContractMethod< - [to: AddressLike, value: BigNumberish], + [to: AddressLike, amount: BigNumberish], [boolean], "nonpayable" >; getFunction( nameOrSignature: "transferFrom" ): TypedContractMethod< - [from: AddressLike, to: AddressLike, value: BigNumberish], + [from: AddressLike, to: AddressLike, amount: BigNumberish], [boolean], "nonpayable" >; + getFunction( + nameOrSignature: "transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "payable">; getFunction( nameOrSignature: "updatePermit2Allowance" ): TypedContractMethod<[enabled: boolean], [void], "nonpayable">; @@ -692,39 +612,32 @@ export interface Currency extends BaseContract { ApprovalEvent.OutputObject >; getEvent( - key: "EIP712DomainChanged" + key: "OwnershipHandoverCanceled" ): TypedContractEvent< - EIP712DomainChangedEvent.InputTuple, - EIP712DomainChangedEvent.OutputTuple, - EIP712DomainChangedEvent.OutputObject - >; - getEvent( - key: "Permit2AllowanceUpdated" - ): TypedContractEvent< - Permit2AllowanceUpdatedEvent.InputTuple, - Permit2AllowanceUpdatedEvent.OutputTuple, - Permit2AllowanceUpdatedEvent.OutputObject + OwnershipHandoverCanceledEvent.InputTuple, + OwnershipHandoverCanceledEvent.OutputTuple, + OwnershipHandoverCanceledEvent.OutputObject >; getEvent( - key: "RoleAdminChanged" + key: "OwnershipHandoverRequested" ): TypedContractEvent< - RoleAdminChangedEvent.InputTuple, - RoleAdminChangedEvent.OutputTuple, - RoleAdminChangedEvent.OutputObject + OwnershipHandoverRequestedEvent.InputTuple, + OwnershipHandoverRequestedEvent.OutputTuple, + OwnershipHandoverRequestedEvent.OutputObject >; getEvent( - key: "RoleGranted" + key: "OwnershipTransferred" ): TypedContractEvent< - RoleGrantedEvent.InputTuple, - RoleGrantedEvent.OutputTuple, - RoleGrantedEvent.OutputObject + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject >; getEvent( - key: "RoleRevoked" + key: "Permit2AllowanceUpdated" ): TypedContractEvent< - RoleRevokedEvent.InputTuple, - RoleRevokedEvent.OutputTuple, - RoleRevokedEvent.OutputObject + Permit2AllowanceUpdatedEvent.InputTuple, + Permit2AllowanceUpdatedEvent.OutputTuple, + Permit2AllowanceUpdatedEvent.OutputObject >; getEvent( key: "Transfer" @@ -746,15 +659,37 @@ export interface Currency extends BaseContract { ApprovalEvent.OutputObject >; - "EIP712DomainChanged()": TypedContractEvent< - EIP712DomainChangedEvent.InputTuple, - EIP712DomainChangedEvent.OutputTuple, - EIP712DomainChangedEvent.OutputObject + "OwnershipHandoverCanceled(address)": TypedContractEvent< + OwnershipHandoverCanceledEvent.InputTuple, + OwnershipHandoverCanceledEvent.OutputTuple, + OwnershipHandoverCanceledEvent.OutputObject + >; + OwnershipHandoverCanceled: TypedContractEvent< + OwnershipHandoverCanceledEvent.InputTuple, + OwnershipHandoverCanceledEvent.OutputTuple, + OwnershipHandoverCanceledEvent.OutputObject + >; + + "OwnershipHandoverRequested(address)": TypedContractEvent< + OwnershipHandoverRequestedEvent.InputTuple, + OwnershipHandoverRequestedEvent.OutputTuple, + OwnershipHandoverRequestedEvent.OutputObject + >; + OwnershipHandoverRequested: TypedContractEvent< + OwnershipHandoverRequestedEvent.InputTuple, + OwnershipHandoverRequestedEvent.OutputTuple, + OwnershipHandoverRequestedEvent.OutputObject + >; + + "OwnershipTransferred(address,address)": TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject >; - EIP712DomainChanged: TypedContractEvent< - EIP712DomainChangedEvent.InputTuple, - EIP712DomainChangedEvent.OutputTuple, - EIP712DomainChangedEvent.OutputObject + OwnershipTransferred: TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject >; "Permit2AllowanceUpdated(bool)": TypedContractEvent< @@ -768,39 +703,6 @@ export interface Currency extends BaseContract { Permit2AllowanceUpdatedEvent.OutputObject >; - "RoleAdminChanged(bytes32,bytes32,bytes32)": TypedContractEvent< - RoleAdminChangedEvent.InputTuple, - RoleAdminChangedEvent.OutputTuple, - RoleAdminChangedEvent.OutputObject - >; - RoleAdminChanged: TypedContractEvent< - RoleAdminChangedEvent.InputTuple, - RoleAdminChangedEvent.OutputTuple, - RoleAdminChangedEvent.OutputObject - >; - - "RoleGranted(bytes32,address,address)": TypedContractEvent< - RoleGrantedEvent.InputTuple, - RoleGrantedEvent.OutputTuple, - RoleGrantedEvent.OutputObject - >; - RoleGranted: TypedContractEvent< - RoleGrantedEvent.InputTuple, - RoleGrantedEvent.OutputTuple, - RoleGrantedEvent.OutputObject - >; - - "RoleRevoked(bytes32,address,address)": TypedContractEvent< - RoleRevokedEvent.InputTuple, - RoleRevokedEvent.OutputTuple, - RoleRevokedEvent.OutputObject - >; - RoleRevoked: TypedContractEvent< - RoleRevokedEvent.InputTuple, - RoleRevokedEvent.OutputTuple, - RoleRevokedEvent.OutputObject - >; - "Transfer(address,address,uint256)": TypedContractEvent< TransferEvent.InputTuple, TransferEvent.OutputTuple, diff --git a/src/generated/Feed.ts b/src/generated/Feed.ts index 0befbe7..54e989c 100644 --- a/src/generated/Feed.ts +++ b/src/generated/Feed.ts @@ -26,18 +26,18 @@ import type { export interface FeedInterface extends Interface { getFunction( nameOrSignature: - | "DEFAULT_ADMIN_ROLE" + | "cancelOwnershipHandover" | "collaterals" - | "getRoleAdmin" - | "grantRole" - | "hasRole" + | "completeOwnershipHandover" | "mockUpdatePrice" + | "owner" + | "ownershipHandoverExpiresAt" | "pause" - | "renounceRole" - | "revokeRole" - | "setPriceOracleContract" + | "renounceOwnership" + | "requestOwnershipHandover" + | "setCollateralOSM" | "status" - | "supportsInterface" + | "transferOwnership" | "unpause" | "updatePrice" | "vault" @@ -45,14 +45,14 @@ export interface FeedInterface extends Interface { getEvent( nameOrSignatureOrTopic: + | "OwnershipHandoverCanceled" + | "OwnershipHandoverRequested" + | "OwnershipTransferred" | "Read" - | "RoleAdminChanged" - | "RoleGranted" - | "RoleRevoked" ): EventFragment; encodeFunctionData( - functionFragment: "DEFAULT_ADMIN_ROLE", + functionFragment: "cancelOwnershipHandover", values?: undefined ): string; encodeFunctionData( @@ -60,38 +60,35 @@ export interface FeedInterface extends Interface { values: [AddressLike] ): string; encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [BytesLike] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [BytesLike, AddressLike] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [BytesLike, AddressLike] + functionFragment: "completeOwnershipHandover", + values: [AddressLike] ): string; encodeFunctionData( functionFragment: "mockUpdatePrice", values: [AddressLike, BigNumberish] ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "ownershipHandoverExpiresAt", + values: [AddressLike] + ): string; encodeFunctionData(functionFragment: "pause", values?: undefined): string; encodeFunctionData( - functionFragment: "renounceRole", - values: [BytesLike, AddressLike] + functionFragment: "renounceOwnership", + values?: undefined ): string; encodeFunctionData( - functionFragment: "revokeRole", - values: [BytesLike, AddressLike] + functionFragment: "requestOwnershipHandover", + values?: undefined ): string; encodeFunctionData( - functionFragment: "setPriceOracleContract", + functionFragment: "setCollateralOSM", values: [AddressLike, AddressLike] ): string; encodeFunctionData(functionFragment: "status", values?: undefined): string; encodeFunctionData( - functionFragment: "supportsInterface", - values: [BytesLike] + functionFragment: "transferOwnership", + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "unpause", values?: undefined): string; encodeFunctionData( @@ -101,7 +98,7 @@ export interface FeedInterface extends Interface { encodeFunctionData(functionFragment: "vault", values?: undefined): string; decodeFunctionResult( - functionFragment: "DEFAULT_ADMIN_ROLE", + functionFragment: "cancelOwnershipHandover", data: BytesLike ): Result; decodeFunctionResult( @@ -109,28 +106,34 @@ export interface FeedInterface extends Interface { data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "getRoleAdmin", + functionFragment: "completeOwnershipHandover", data: BytesLike ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; decodeFunctionResult( functionFragment: "mockUpdatePrice", data: BytesLike ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ownershipHandoverExpiresAt", + data: BytesLike + ): Result; decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; decodeFunctionResult( - functionFragment: "renounceRole", + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "requestOwnershipHandover", data: BytesLike ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; decodeFunctionResult( - functionFragment: "setPriceOracleContract", + functionFragment: "setCollateralOSM", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "status", data: BytesLike): Result; decodeFunctionResult( - functionFragment: "supportsInterface", + functionFragment: "transferOwnership", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; @@ -141,12 +144,11 @@ export interface FeedInterface extends Interface { decodeFunctionResult(functionFragment: "vault", data: BytesLike): Result; } -export namespace ReadEvent { - export type InputTuple = [collateral: AddressLike, price: BigNumberish]; - export type OutputTuple = [collateral: string, price: bigint]; +export namespace OwnershipHandoverCanceledEvent { + export type InputTuple = [pendingOwner: AddressLike]; + export type OutputTuple = [pendingOwner: string]; export interface OutputObject { - collateral: string; - price: bigint; + pendingOwner: string; } export type Event = TypedContractEvent; export type Filter = TypedDeferredTopicFilter; @@ -154,21 +156,11 @@ export namespace ReadEvent { export type LogDescription = TypedLogDescription; } -export namespace RoleAdminChangedEvent { - export type InputTuple = [ - role: BytesLike, - previousAdminRole: BytesLike, - newAdminRole: BytesLike - ]; - export type OutputTuple = [ - role: string, - previousAdminRole: string, - newAdminRole: string - ]; +export namespace OwnershipHandoverRequestedEvent { + export type InputTuple = [pendingOwner: AddressLike]; + export type OutputTuple = [pendingOwner: string]; export interface OutputObject { - role: string; - previousAdminRole: string; - newAdminRole: string; + pendingOwner: string; } export type Event = TypedContractEvent; export type Filter = TypedDeferredTopicFilter; @@ -176,17 +168,12 @@ export namespace RoleAdminChangedEvent { export type LogDescription = TypedLogDescription; } -export namespace RoleGrantedEvent { - export type InputTuple = [ - role: BytesLike, - account: AddressLike, - sender: AddressLike - ]; - export type OutputTuple = [role: string, account: string, sender: string]; +export namespace OwnershipTransferredEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; export interface OutputObject { - role: string; - account: string; - sender: string; + oldOwner: string; + newOwner: string; } export type Event = TypedContractEvent; export type Filter = TypedDeferredTopicFilter; @@ -194,17 +181,12 @@ export namespace RoleGrantedEvent { export type LogDescription = TypedLogDescription; } -export namespace RoleRevokedEvent { - export type InputTuple = [ - role: BytesLike, - account: AddressLike, - sender: AddressLike - ]; - export type OutputTuple = [role: string, account: string, sender: string]; +export namespace ReadEvent { + export type InputTuple = [collateral: AddressLike, price: BigNumberish]; + export type OutputTuple = [collateral: string, price: bigint]; export interface OutputObject { - role: string; - account: string; - sender: string; + collateral: string; + price: bigint; } export type Event = TypedContractEvent; export type Filter = TypedDeferredTopicFilter; @@ -255,22 +237,14 @@ export interface Feed extends BaseContract { event?: TCEvent ): Promise; - DEFAULT_ADMIN_ROLE: TypedContractMethod<[], [string], "view">; + cancelOwnershipHandover: TypedContractMethod<[], [void], "payable">; collaterals: TypedContractMethod<[arg0: AddressLike], [string], "view">; - getRoleAdmin: TypedContractMethod<[role: BytesLike], [string], "view">; - - grantRole: TypedContractMethod< - [role: BytesLike, account: AddressLike], + completeOwnershipHandover: TypedContractMethod< + [pendingOwner: AddressLike], [void], - "nonpayable" - >; - - hasRole: TypedContractMethod< - [role: BytesLike, account: AddressLike], - [boolean], - "view" + "payable" >; mockUpdatePrice: TypedContractMethod< @@ -279,32 +253,32 @@ export interface Feed extends BaseContract { "nonpayable" >; - pause: TypedContractMethod<[], [void], "nonpayable">; + owner: TypedContractMethod<[], [string], "view">; - renounceRole: TypedContractMethod< - [role: BytesLike, callerConfirmation: AddressLike], - [void], - "nonpayable" + ownershipHandoverExpiresAt: TypedContractMethod< + [pendingOwner: AddressLike], + [bigint], + "view" >; - revokeRole: TypedContractMethod< - [role: BytesLike, account: AddressLike], - [void], - "nonpayable" - >; + pause: TypedContractMethod<[], [void], "nonpayable">; - setPriceOracleContract: TypedContractMethod< - [oracle: AddressLike, collateral: AddressLike], + renounceOwnership: TypedContractMethod<[], [void], "payable">; + + requestOwnershipHandover: TypedContractMethod<[], [void], "payable">; + + setCollateralOSM: TypedContractMethod< + [collateral: AddressLike, oracle: AddressLike], [void], "nonpayable" >; status: TypedContractMethod<[], [bigint], "view">; - supportsInterface: TypedContractMethod< - [interfaceId: BytesLike], - [boolean], - "view" + transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "payable" >; unpause: TypedContractMethod<[], [void], "nonpayable">; @@ -322,28 +296,14 @@ export interface Feed extends BaseContract { ): T; getFunction( - nameOrSignature: "DEFAULT_ADMIN_ROLE" - ): TypedContractMethod<[], [string], "view">; + nameOrSignature: "cancelOwnershipHandover" + ): TypedContractMethod<[], [void], "payable">; getFunction( nameOrSignature: "collaterals" ): TypedContractMethod<[arg0: AddressLike], [string], "view">; getFunction( - nameOrSignature: "getRoleAdmin" - ): TypedContractMethod<[role: BytesLike], [string], "view">; - getFunction( - nameOrSignature: "grantRole" - ): TypedContractMethod< - [role: BytesLike, account: AddressLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "hasRole" - ): TypedContractMethod< - [role: BytesLike, account: AddressLike], - [boolean], - "view" - >; + nameOrSignature: "completeOwnershipHandover" + ): TypedContractMethod<[pendingOwner: AddressLike], [void], "payable">; getFunction( nameOrSignature: "mockUpdatePrice" ): TypedContractMethod< @@ -351,27 +311,25 @@ export interface Feed extends BaseContract { [void], "nonpayable" >; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "ownershipHandoverExpiresAt" + ): TypedContractMethod<[pendingOwner: AddressLike], [bigint], "view">; getFunction( nameOrSignature: "pause" ): TypedContractMethod<[], [void], "nonpayable">; getFunction( - nameOrSignature: "renounceRole" - ): TypedContractMethod< - [role: BytesLike, callerConfirmation: AddressLike], - [void], - "nonpayable" - >; + nameOrSignature: "renounceOwnership" + ): TypedContractMethod<[], [void], "payable">; getFunction( - nameOrSignature: "revokeRole" - ): TypedContractMethod< - [role: BytesLike, account: AddressLike], - [void], - "nonpayable" - >; + nameOrSignature: "requestOwnershipHandover" + ): TypedContractMethod<[], [void], "payable">; getFunction( - nameOrSignature: "setPriceOracleContract" + nameOrSignature: "setCollateralOSM" ): TypedContractMethod< - [oracle: AddressLike, collateral: AddressLike], + [collateral: AddressLike, oracle: AddressLike], [void], "nonpayable" >; @@ -379,8 +337,8 @@ export interface Feed extends BaseContract { nameOrSignature: "status" ): TypedContractMethod<[], [bigint], "view">; getFunction( - nameOrSignature: "supportsInterface" - ): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + nameOrSignature: "transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "payable">; getFunction( nameOrSignature: "unpause" ): TypedContractMethod<[], [void], "nonpayable">; @@ -392,77 +350,77 @@ export interface Feed extends BaseContract { ): TypedContractMethod<[], [string], "view">; getEvent( - key: "Read" + key: "OwnershipHandoverCanceled" ): TypedContractEvent< - ReadEvent.InputTuple, - ReadEvent.OutputTuple, - ReadEvent.OutputObject + OwnershipHandoverCanceledEvent.InputTuple, + OwnershipHandoverCanceledEvent.OutputTuple, + OwnershipHandoverCanceledEvent.OutputObject >; getEvent( - key: "RoleAdminChanged" + key: "OwnershipHandoverRequested" ): TypedContractEvent< - RoleAdminChangedEvent.InputTuple, - RoleAdminChangedEvent.OutputTuple, - RoleAdminChangedEvent.OutputObject + OwnershipHandoverRequestedEvent.InputTuple, + OwnershipHandoverRequestedEvent.OutputTuple, + OwnershipHandoverRequestedEvent.OutputObject >; getEvent( - key: "RoleGranted" + key: "OwnershipTransferred" ): TypedContractEvent< - RoleGrantedEvent.InputTuple, - RoleGrantedEvent.OutputTuple, - RoleGrantedEvent.OutputObject + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject >; getEvent( - key: "RoleRevoked" + key: "Read" ): TypedContractEvent< - RoleRevokedEvent.InputTuple, - RoleRevokedEvent.OutputTuple, - RoleRevokedEvent.OutputObject + ReadEvent.InputTuple, + ReadEvent.OutputTuple, + ReadEvent.OutputObject >; filters: { - "Read(address,uint256)": TypedContractEvent< - ReadEvent.InputTuple, - ReadEvent.OutputTuple, - ReadEvent.OutputObject + "OwnershipHandoverCanceled(address)": TypedContractEvent< + OwnershipHandoverCanceledEvent.InputTuple, + OwnershipHandoverCanceledEvent.OutputTuple, + OwnershipHandoverCanceledEvent.OutputObject >; - Read: TypedContractEvent< - ReadEvent.InputTuple, - ReadEvent.OutputTuple, - ReadEvent.OutputObject + OwnershipHandoverCanceled: TypedContractEvent< + OwnershipHandoverCanceledEvent.InputTuple, + OwnershipHandoverCanceledEvent.OutputTuple, + OwnershipHandoverCanceledEvent.OutputObject >; - "RoleAdminChanged(bytes32,bytes32,bytes32)": TypedContractEvent< - RoleAdminChangedEvent.InputTuple, - RoleAdminChangedEvent.OutputTuple, - RoleAdminChangedEvent.OutputObject + "OwnershipHandoverRequested(address)": TypedContractEvent< + OwnershipHandoverRequestedEvent.InputTuple, + OwnershipHandoverRequestedEvent.OutputTuple, + OwnershipHandoverRequestedEvent.OutputObject >; - RoleAdminChanged: TypedContractEvent< - RoleAdminChangedEvent.InputTuple, - RoleAdminChangedEvent.OutputTuple, - RoleAdminChangedEvent.OutputObject + OwnershipHandoverRequested: TypedContractEvent< + OwnershipHandoverRequestedEvent.InputTuple, + OwnershipHandoverRequestedEvent.OutputTuple, + OwnershipHandoverRequestedEvent.OutputObject >; - "RoleGranted(bytes32,address,address)": TypedContractEvent< - RoleGrantedEvent.InputTuple, - RoleGrantedEvent.OutputTuple, - RoleGrantedEvent.OutputObject + "OwnershipTransferred(address,address)": TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject >; - RoleGranted: TypedContractEvent< - RoleGrantedEvent.InputTuple, - RoleGrantedEvent.OutputTuple, - RoleGrantedEvent.OutputObject + OwnershipTransferred: TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject >; - "RoleRevoked(bytes32,address,address)": TypedContractEvent< - RoleRevokedEvent.InputTuple, - RoleRevokedEvent.OutputTuple, - RoleRevokedEvent.OutputObject + "Read(address,uint256)": TypedContractEvent< + ReadEvent.InputTuple, + ReadEvent.OutputTuple, + ReadEvent.OutputObject >; - RoleRevoked: TypedContractEvent< - RoleRevokedEvent.InputTuple, - RoleRevokedEvent.OutputTuple, - RoleRevokedEvent.OutputObject + Read: TypedContractEvent< + ReadEvent.InputTuple, + ReadEvent.OutputTuple, + ReadEvent.OutputObject >; }; } diff --git a/src/generated/Rate.ts b/src/generated/Rate.ts new file mode 100644 index 0000000..1307a67 --- /dev/null +++ b/src/generated/Rate.ts @@ -0,0 +1,140 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export declare namespace IVault { + export type RateInfoStruct = { + rate: BigNumberish; + accumulatedRate: BigNumberish; + lastUpdateTime: BigNumberish; + }; + + export type RateInfoStructOutput = [ + rate: bigint, + accumulatedRate: bigint, + lastUpdateTime: bigint + ] & { rate: bigint; accumulatedRate: bigint; lastUpdateTime: bigint }; +} + +export interface RateInterface extends Interface { + getFunction( + nameOrSignature: + | "calculateCurrentAccumulatedRate" + | "calculateCurrentTotalAccumulatedRate" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "calculateCurrentAccumulatedRate", + values: [IVault.RateInfoStruct] + ): string; + encodeFunctionData( + functionFragment: "calculateCurrentTotalAccumulatedRate", + values: [IVault.RateInfoStruct, IVault.RateInfoStruct] + ): string; + + decodeFunctionResult( + functionFragment: "calculateCurrentAccumulatedRate", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "calculateCurrentTotalAccumulatedRate", + data: BytesLike + ): Result; +} + +export interface Rate extends BaseContract { + connect(runner?: ContractRunner | null): Rate; + waitForDeployment(): Promise; + + interface: RateInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + calculateCurrentAccumulatedRate: TypedContractMethod< + [_rateInfo: IVault.RateInfoStruct], + [bigint], + "view" + >; + + calculateCurrentTotalAccumulatedRate: TypedContractMethod< + [ + _baseRateInfo: IVault.RateInfoStruct, + _collateralRateInfo: IVault.RateInfoStruct + ], + [bigint], + "view" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "calculateCurrentAccumulatedRate" + ): TypedContractMethod<[_rateInfo: IVault.RateInfoStruct], [bigint], "view">; + getFunction( + nameOrSignature: "calculateCurrentTotalAccumulatedRate" + ): TypedContractMethod< + [ + _baseRateInfo: IVault.RateInfoStruct, + _collateralRateInfo: IVault.RateInfoStruct + ], + [bigint], + "view" + >; + + filters: {}; +} diff --git a/src/generated/Vault.ts b/src/generated/Vault.ts index 1f1cb40..8dc2885 100644 --- a/src/generated/Vault.ts +++ b/src/generated/Vault.ts @@ -41,35 +41,39 @@ export interface VaultInterface extends Interface { getFunction( nameOrSignature: | "CURRENCY_TOKEN" - | "DEFAULT_ADMIN_ROLE" - | "accruedFees" | "baseRateInfo" | "burnCurrency" + | "cancelOwnershipHandover" | "collateralMapping" + | "completeOwnershipHandover" | "createCollateralType" | "debt" + | "debtCeiling" | "deny" | "depositCollateral" - | "getRoleAdmin" - | "grantRole" - | "hasRole" + | "feedModule" | "liquidate" | "mintCurrency" + | "owner" + | "ownershipHandoverExpiresAt" | "paidFees" | "pause" + | "rateModule" | "recoverToken" | "rely" | "relyMapping" - | "renounceRole" - | "revokeRole" + | "renounceOwnership" + | "requestOwnershipHandover" + | "stabilityModule" | "status" - | "supportsInterface" + | "transferOwnership" | "unpause" | "updateBaseRate" | "updateCollateralData" - | "updateCollateralRate" - | "updateFeedContract" + | "updateDebtCeiling" + | "updateFeedModule" | "updatePrice" + | "updateRateModule" | "updateStabilityModule" | "vaultMapping" | "withdrawCollateral" @@ -85,9 +89,9 @@ export interface VaultInterface extends Interface { | "CurrencyMinted" | "FeesPaid" | "Liquidated" - | "RoleAdminChanged" - | "RoleGranted" - | "RoleRevoked" + | "OwnershipHandoverCanceled" + | "OwnershipHandoverRequested" + | "OwnershipTransferred" ): EventFragment; encodeFunctionData( @@ -95,23 +99,23 @@ export interface VaultInterface extends Interface { values?: undefined ): string; encodeFunctionData( - functionFragment: "DEFAULT_ADMIN_ROLE", + functionFragment: "baseRateInfo", values?: undefined ): string; encodeFunctionData( - functionFragment: "accruedFees", - values?: undefined + functionFragment: "burnCurrency", + values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( - functionFragment: "baseRateInfo", + functionFragment: "cancelOwnershipHandover", values?: undefined ): string; encodeFunctionData( - functionFragment: "burnCurrency", - values: [AddressLike, AddressLike, BigNumberish] + functionFragment: "collateralMapping", + values: [AddressLike] ): string; encodeFunctionData( - functionFragment: "collateralMapping", + functionFragment: "completeOwnershipHandover", values: [AddressLike] ): string; encodeFunctionData( @@ -126,22 +130,18 @@ export interface VaultInterface extends Interface { ] ): string; encodeFunctionData(functionFragment: "debt", values?: undefined): string; + encodeFunctionData( + functionFragment: "debtCeiling", + values?: undefined + ): string; encodeFunctionData(functionFragment: "deny", values: [AddressLike]): string; encodeFunctionData( functionFragment: "depositCollateral", values: [AddressLike, AddressLike, BigNumberish] ): string; encodeFunctionData( - functionFragment: "getRoleAdmin", - values: [BytesLike] - ): string; - encodeFunctionData( - functionFragment: "grantRole", - values: [BytesLike, AddressLike] - ): string; - encodeFunctionData( - functionFragment: "hasRole", - values: [BytesLike, AddressLike] + functionFragment: "feedModule", + values?: undefined ): string; encodeFunctionData( functionFragment: "liquidate", @@ -151,8 +151,17 @@ export interface VaultInterface extends Interface { functionFragment: "mintCurrency", values: [AddressLike, AddressLike, AddressLike, BigNumberish] ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "ownershipHandoverExpiresAt", + values: [AddressLike] + ): string; encodeFunctionData(functionFragment: "paidFees", values?: undefined): string; encodeFunctionData(functionFragment: "pause", values?: undefined): string; + encodeFunctionData( + functionFragment: "rateModule", + values?: undefined + ): string; encodeFunctionData( functionFragment: "recoverToken", values: [AddressLike, AddressLike] @@ -163,17 +172,21 @@ export interface VaultInterface extends Interface { values: [AddressLike, AddressLike] ): string; encodeFunctionData( - functionFragment: "renounceRole", - values: [BytesLike, AddressLike] + functionFragment: "renounceOwnership", + values?: undefined ): string; encodeFunctionData( - functionFragment: "revokeRole", - values: [BytesLike, AddressLike] + functionFragment: "requestOwnershipHandover", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "stabilityModule", + values?: undefined ): string; encodeFunctionData(functionFragment: "status", values?: undefined): string; encodeFunctionData( - functionFragment: "supportsInterface", - values: [BytesLike] + functionFragment: "transferOwnership", + values: [AddressLike] ): string; encodeFunctionData(functionFragment: "unpause", values?: undefined): string; encodeFunctionData( @@ -185,17 +198,21 @@ export interface VaultInterface extends Interface { values: [AddressLike, BigNumberish, BigNumberish] ): string; encodeFunctionData( - functionFragment: "updateCollateralRate", - values: [AddressLike, BigNumberish] + functionFragment: "updateDebtCeiling", + values: [BigNumberish] ): string; encodeFunctionData( - functionFragment: "updateFeedContract", + functionFragment: "updateFeedModule", values: [AddressLike] ): string; encodeFunctionData( functionFragment: "updatePrice", values: [AddressLike, BigNumberish] ): string; + encodeFunctionData( + functionFragment: "updateRateModule", + values: [AddressLike] + ): string; encodeFunctionData( functionFragment: "updateStabilityModule", values: [AddressLike] @@ -210,7 +227,7 @@ export interface VaultInterface extends Interface { ): string; encodeFunctionData( functionFragment: "withdrawFees", - values: [AddressLike, BigNumberish] + values?: undefined ): string; decodeFunctionResult( @@ -218,23 +235,23 @@ export interface VaultInterface extends Interface { data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "DEFAULT_ADMIN_ROLE", + functionFragment: "baseRateInfo", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "accruedFees", + functionFragment: "burnCurrency", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "baseRateInfo", + functionFragment: "cancelOwnershipHandover", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "burnCurrency", + functionFragment: "collateralMapping", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "collateralMapping", + functionFragment: "completeOwnershipHandover", data: BytesLike ): Result; decodeFunctionResult( @@ -242,24 +259,29 @@ export interface VaultInterface extends Interface { data: BytesLike ): Result; decodeFunctionResult(functionFragment: "debt", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "deny", data: BytesLike): Result; decodeFunctionResult( - functionFragment: "depositCollateral", + functionFragment: "debtCeiling", data: BytesLike ): Result; + decodeFunctionResult(functionFragment: "deny", data: BytesLike): Result; decodeFunctionResult( - functionFragment: "getRoleAdmin", + functionFragment: "depositCollateral", data: BytesLike ): Result; - decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "feedModule", data: BytesLike): Result; decodeFunctionResult(functionFragment: "liquidate", data: BytesLike): Result; decodeFunctionResult( functionFragment: "mintCurrency", data: BytesLike ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ownershipHandoverExpiresAt", + data: BytesLike + ): Result; decodeFunctionResult(functionFragment: "paidFees", data: BytesLike): Result; decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "rateModule", data: BytesLike): Result; decodeFunctionResult( functionFragment: "recoverToken", data: BytesLike @@ -270,13 +292,20 @@ export interface VaultInterface extends Interface { data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "renounceRole", + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "requestOwnershipHandover", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "stabilityModule", data: BytesLike ): Result; - decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "status", data: BytesLike): Result; decodeFunctionResult( - functionFragment: "supportsInterface", + functionFragment: "transferOwnership", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; @@ -289,17 +318,21 @@ export interface VaultInterface extends Interface { data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "updateCollateralRate", + functionFragment: "updateDebtCeiling", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "updateFeedContract", + functionFragment: "updateFeedModule", data: BytesLike ): Result; decodeFunctionResult( functionFragment: "updatePrice", data: BytesLike ): Result; + decodeFunctionResult( + functionFragment: "updateRateModule", + data: BytesLike + ): Result; decodeFunctionResult( functionFragment: "updateStabilityModule", data: BytesLike @@ -425,21 +458,11 @@ export namespace LiquidatedEvent { export type LogDescription = TypedLogDescription; } -export namespace RoleAdminChangedEvent { - export type InputTuple = [ - role: BytesLike, - previousAdminRole: BytesLike, - newAdminRole: BytesLike - ]; - export type OutputTuple = [ - role: string, - previousAdminRole: string, - newAdminRole: string - ]; +export namespace OwnershipHandoverCanceledEvent { + export type InputTuple = [pendingOwner: AddressLike]; + export type OutputTuple = [pendingOwner: string]; export interface OutputObject { - role: string; - previousAdminRole: string; - newAdminRole: string; + pendingOwner: string; } export type Event = TypedContractEvent; export type Filter = TypedDeferredTopicFilter; @@ -447,17 +470,11 @@ export namespace RoleAdminChangedEvent { export type LogDescription = TypedLogDescription; } -export namespace RoleGrantedEvent { - export type InputTuple = [ - role: BytesLike, - account: AddressLike, - sender: AddressLike - ]; - export type OutputTuple = [role: string, account: string, sender: string]; +export namespace OwnershipHandoverRequestedEvent { + export type InputTuple = [pendingOwner: AddressLike]; + export type OutputTuple = [pendingOwner: string]; export interface OutputObject { - role: string; - account: string; - sender: string; + pendingOwner: string; } export type Event = TypedContractEvent; export type Filter = TypedDeferredTopicFilter; @@ -465,17 +482,12 @@ export namespace RoleGrantedEvent { export type LogDescription = TypedLogDescription; } -export namespace RoleRevokedEvent { - export type InputTuple = [ - role: BytesLike, - account: AddressLike, - sender: AddressLike - ]; - export type OutputTuple = [role: string, account: string, sender: string]; +export namespace OwnershipTransferredEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; export interface OutputObject { - role: string; - account: string; - sender: string; + oldOwner: string; + newOwner: string; } export type Event = TypedContractEvent; export type Filter = TypedDeferredTopicFilter; @@ -528,10 +540,6 @@ export interface Vault extends BaseContract { CURRENCY_TOKEN: TypedContractMethod<[], [string], "view">; - DEFAULT_ADMIN_ROLE: TypedContractMethod<[], [string], "view">; - - accruedFees: TypedContractMethod<[], [bigint], "view">; - baseRateInfo: TypedContractMethod< [], [ @@ -550,6 +558,8 @@ export interface Vault extends BaseContract { "nonpayable" >; + cancelOwnershipHandover: TypedContractMethod<[], [void], "payable">; + collateralMapping: TypedContractMethod< [arg0: AddressLike], [ @@ -562,26 +572,28 @@ export interface Vault extends BaseContract { bigint, bigint, bigint, - bigint, - bigint, - boolean + bigint ] & { totalDepositedCollateral: bigint; totalBorrowedAmount: bigint; liquidationThreshold: bigint; liquidationBonus: bigint; rateInfo: IVault.RateInfoStructOutput; - paidFees: bigint; price: bigint; debtCeiling: bigint; collateralFloorPerPosition: bigint; additionalCollateralPrecision: bigint; - exists: boolean; } ], "view" >; + completeOwnershipHandover: TypedContractMethod< + [pendingOwner: AddressLike], + [void], + "payable" + >; + createCollateralType: TypedContractMethod< [ _collateralToken: AddressLike, @@ -597,6 +609,8 @@ export interface Vault extends BaseContract { debt: TypedContractMethod<[], [bigint], "view">; + debtCeiling: TypedContractMethod<[], [bigint], "view">; + deny: TypedContractMethod<[_reliedUpon: AddressLike], [void], "nonpayable">; depositCollateral: TypedContractMethod< @@ -605,19 +619,7 @@ export interface Vault extends BaseContract { "nonpayable" >; - getRoleAdmin: TypedContractMethod<[role: BytesLike], [string], "view">; - - grantRole: TypedContractMethod< - [role: BytesLike, account: AddressLike], - [void], - "nonpayable" - >; - - hasRole: TypedContractMethod< - [role: BytesLike, account: AddressLike], - [boolean], - "view" - >; + feedModule: TypedContractMethod<[], [string], "view">; liquidate: TypedContractMethod< [ @@ -641,10 +643,20 @@ export interface Vault extends BaseContract { "nonpayable" >; + owner: TypedContractMethod<[], [string], "view">; + + ownershipHandoverExpiresAt: TypedContractMethod< + [pendingOwner: AddressLike], + [bigint], + "view" + >; + paidFees: TypedContractMethod<[], [bigint], "view">; pause: TypedContractMethod<[], [void], "nonpayable">; + rateModule: TypedContractMethod<[], [string], "view">; + recoverToken: TypedContractMethod< [_tokenAddress: AddressLike, _to: AddressLike], [void], @@ -659,24 +671,18 @@ export interface Vault extends BaseContract { "view" >; - renounceRole: TypedContractMethod< - [role: BytesLike, callerConfirmation: AddressLike], - [void], - "nonpayable" - >; + renounceOwnership: TypedContractMethod<[], [void], "payable">; - revokeRole: TypedContractMethod< - [role: BytesLike, account: AddressLike], - [void], - "nonpayable" - >; + requestOwnershipHandover: TypedContractMethod<[], [void], "payable">; + + stabilityModule: TypedContractMethod<[], [string], "view">; status: TypedContractMethod<[], [bigint], "view">; - supportsInterface: TypedContractMethod< - [interfaceId: BytesLike], - [boolean], - "view" + transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "payable" >; unpause: TypedContractMethod<[], [void], "nonpayable">; @@ -693,14 +699,14 @@ export interface Vault extends BaseContract { "nonpayable" >; - updateCollateralRate: TypedContractMethod< - [_collateralToken: AddressLike, _rate: BigNumberish], + updateDebtCeiling: TypedContractMethod< + [_debtCeiling: BigNumberish], [void], "nonpayable" >; - updateFeedContract: TypedContractMethod< - [_feedContract: AddressLike], + updateFeedModule: TypedContractMethod< + [_feedModule: AddressLike], [void], "nonpayable" >; @@ -711,6 +717,12 @@ export interface Vault extends BaseContract { "nonpayable" >; + updateRateModule: TypedContractMethod< + [_rateModule: AddressLike], + [void], + "nonpayable" + >; + updateStabilityModule: TypedContractMethod< [_stabilityModule: AddressLike], [void], @@ -741,11 +753,7 @@ export interface Vault extends BaseContract { "nonpayable" >; - withdrawFees: TypedContractMethod< - [_collateralToken: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; + withdrawFees: TypedContractMethod<[], [void], "nonpayable">; getFunction( key: string | FunctionFragment @@ -754,12 +762,6 @@ export interface Vault extends BaseContract { getFunction( nameOrSignature: "CURRENCY_TOKEN" ): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "DEFAULT_ADMIN_ROLE" - ): TypedContractMethod<[], [string], "view">; - getFunction( - nameOrSignature: "accruedFees" - ): TypedContractMethod<[], [bigint], "view">; getFunction( nameOrSignature: "baseRateInfo" ): TypedContractMethod< @@ -780,6 +782,9 @@ export interface Vault extends BaseContract { [void], "nonpayable" >; + getFunction( + nameOrSignature: "cancelOwnershipHandover" + ): TypedContractMethod<[], [void], "payable">; getFunction( nameOrSignature: "collateralMapping" ): TypedContractMethod< @@ -794,25 +799,24 @@ export interface Vault extends BaseContract { bigint, bigint, bigint, - bigint, - bigint, - boolean + bigint ] & { totalDepositedCollateral: bigint; totalBorrowedAmount: bigint; liquidationThreshold: bigint; liquidationBonus: bigint; rateInfo: IVault.RateInfoStructOutput; - paidFees: bigint; price: bigint; debtCeiling: bigint; collateralFloorPerPosition: bigint; additionalCollateralPrecision: bigint; - exists: boolean; } ], "view" >; + getFunction( + nameOrSignature: "completeOwnershipHandover" + ): TypedContractMethod<[pendingOwner: AddressLike], [void], "payable">; getFunction( nameOrSignature: "createCollateralType" ): TypedContractMethod< @@ -830,6 +834,9 @@ export interface Vault extends BaseContract { getFunction( nameOrSignature: "debt" ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "debtCeiling" + ): TypedContractMethod<[], [bigint], "view">; getFunction( nameOrSignature: "deny" ): TypedContractMethod<[_reliedUpon: AddressLike], [void], "nonpayable">; @@ -841,22 +848,8 @@ export interface Vault extends BaseContract { "nonpayable" >; getFunction( - nameOrSignature: "getRoleAdmin" - ): TypedContractMethod<[role: BytesLike], [string], "view">; - getFunction( - nameOrSignature: "grantRole" - ): TypedContractMethod< - [role: BytesLike, account: AddressLike], - [void], - "nonpayable" - >; - getFunction( - nameOrSignature: "hasRole" - ): TypedContractMethod< - [role: BytesLike, account: AddressLike], - [boolean], - "view" - >; + nameOrSignature: "feedModule" + ): TypedContractMethod<[], [string], "view">; getFunction( nameOrSignature: "liquidate" ): TypedContractMethod< @@ -881,12 +874,21 @@ export interface Vault extends BaseContract { [void], "nonpayable" >; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "ownershipHandoverExpiresAt" + ): TypedContractMethod<[pendingOwner: AddressLike], [bigint], "view">; getFunction( nameOrSignature: "paidFees" ): TypedContractMethod<[], [bigint], "view">; getFunction( nameOrSignature: "pause" ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "rateModule" + ): TypedContractMethod<[], [string], "view">; getFunction( nameOrSignature: "recoverToken" ): TypedContractMethod< @@ -905,25 +907,20 @@ export interface Vault extends BaseContract { "view" >; getFunction( - nameOrSignature: "renounceRole" - ): TypedContractMethod< - [role: BytesLike, callerConfirmation: AddressLike], - [void], - "nonpayable" - >; + nameOrSignature: "renounceOwnership" + ): TypedContractMethod<[], [void], "payable">; getFunction( - nameOrSignature: "revokeRole" - ): TypedContractMethod< - [role: BytesLike, account: AddressLike], - [void], - "nonpayable" - >; + nameOrSignature: "requestOwnershipHandover" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "stabilityModule" + ): TypedContractMethod<[], [string], "view">; getFunction( nameOrSignature: "status" ): TypedContractMethod<[], [bigint], "view">; getFunction( - nameOrSignature: "supportsInterface" - ): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + nameOrSignature: "transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "payable">; getFunction( nameOrSignature: "unpause" ): TypedContractMethod<[], [void], "nonpayable">; @@ -938,15 +935,11 @@ export interface Vault extends BaseContract { "nonpayable" >; getFunction( - nameOrSignature: "updateCollateralRate" - ): TypedContractMethod< - [_collateralToken: AddressLike, _rate: BigNumberish], - [void], - "nonpayable" - >; + nameOrSignature: "updateDebtCeiling" + ): TypedContractMethod<[_debtCeiling: BigNumberish], [void], "nonpayable">; getFunction( - nameOrSignature: "updateFeedContract" - ): TypedContractMethod<[_feedContract: AddressLike], [void], "nonpayable">; + nameOrSignature: "updateFeedModule" + ): TypedContractMethod<[_feedModule: AddressLike], [void], "nonpayable">; getFunction( nameOrSignature: "updatePrice" ): TypedContractMethod< @@ -954,6 +947,9 @@ export interface Vault extends BaseContract { [void], "nonpayable" >; + getFunction( + nameOrSignature: "updateRateModule" + ): TypedContractMethod<[_rateModule: AddressLike], [void], "nonpayable">; getFunction( nameOrSignature: "updateStabilityModule" ): TypedContractMethod<[_stabilityModule: AddressLike], [void], "nonpayable">; @@ -985,11 +981,7 @@ export interface Vault extends BaseContract { >; getFunction( nameOrSignature: "withdrawFees" - ): TypedContractMethod< - [_collateralToken: AddressLike, _amount: BigNumberish], - [void], - "nonpayable" - >; + ): TypedContractMethod<[], [void], "nonpayable">; getEvent( key: "CollateralDeposited" @@ -1041,25 +1033,25 @@ export interface Vault extends BaseContract { LiquidatedEvent.OutputObject >; getEvent( - key: "RoleAdminChanged" + key: "OwnershipHandoverCanceled" ): TypedContractEvent< - RoleAdminChangedEvent.InputTuple, - RoleAdminChangedEvent.OutputTuple, - RoleAdminChangedEvent.OutputObject + OwnershipHandoverCanceledEvent.InputTuple, + OwnershipHandoverCanceledEvent.OutputTuple, + OwnershipHandoverCanceledEvent.OutputObject >; getEvent( - key: "RoleGranted" + key: "OwnershipHandoverRequested" ): TypedContractEvent< - RoleGrantedEvent.InputTuple, - RoleGrantedEvent.OutputTuple, - RoleGrantedEvent.OutputObject + OwnershipHandoverRequestedEvent.InputTuple, + OwnershipHandoverRequestedEvent.OutputTuple, + OwnershipHandoverRequestedEvent.OutputObject >; getEvent( - key: "RoleRevoked" + key: "OwnershipTransferred" ): TypedContractEvent< - RoleRevokedEvent.InputTuple, - RoleRevokedEvent.OutputTuple, - RoleRevokedEvent.OutputObject + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject >; filters: { @@ -1140,37 +1132,37 @@ export interface Vault extends BaseContract { LiquidatedEvent.OutputObject >; - "RoleAdminChanged(bytes32,bytes32,bytes32)": TypedContractEvent< - RoleAdminChangedEvent.InputTuple, - RoleAdminChangedEvent.OutputTuple, - RoleAdminChangedEvent.OutputObject + "OwnershipHandoverCanceled(address)": TypedContractEvent< + OwnershipHandoverCanceledEvent.InputTuple, + OwnershipHandoverCanceledEvent.OutputTuple, + OwnershipHandoverCanceledEvent.OutputObject >; - RoleAdminChanged: TypedContractEvent< - RoleAdminChangedEvent.InputTuple, - RoleAdminChangedEvent.OutputTuple, - RoleAdminChangedEvent.OutputObject + OwnershipHandoverCanceled: TypedContractEvent< + OwnershipHandoverCanceledEvent.InputTuple, + OwnershipHandoverCanceledEvent.OutputTuple, + OwnershipHandoverCanceledEvent.OutputObject >; - "RoleGranted(bytes32,address,address)": TypedContractEvent< - RoleGrantedEvent.InputTuple, - RoleGrantedEvent.OutputTuple, - RoleGrantedEvent.OutputObject + "OwnershipHandoverRequested(address)": TypedContractEvent< + OwnershipHandoverRequestedEvent.InputTuple, + OwnershipHandoverRequestedEvent.OutputTuple, + OwnershipHandoverRequestedEvent.OutputObject >; - RoleGranted: TypedContractEvent< - RoleGrantedEvent.InputTuple, - RoleGrantedEvent.OutputTuple, - RoleGrantedEvent.OutputObject + OwnershipHandoverRequested: TypedContractEvent< + OwnershipHandoverRequestedEvent.InputTuple, + OwnershipHandoverRequestedEvent.OutputTuple, + OwnershipHandoverRequestedEvent.OutputObject >; - "RoleRevoked(bytes32,address,address)": TypedContractEvent< - RoleRevokedEvent.InputTuple, - RoleRevokedEvent.OutputTuple, - RoleRevokedEvent.OutputObject + "OwnershipTransferred(address,address)": TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject >; - RoleRevoked: TypedContractEvent< - RoleRevokedEvent.InputTuple, - RoleRevokedEvent.OutputTuple, - RoleRevokedEvent.OutputObject + OwnershipTransferred: TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject >; }; } diff --git a/src/generated/VaultRouter.ts b/src/generated/VaultRouter.ts index 81d9fc7..5fdf4c6 100644 --- a/src/generated/VaultRouter.ts +++ b/src/generated/VaultRouter.ts @@ -3,11 +3,11 @@ /* eslint-disable */ import type { BaseContract, - BigNumberish, BytesLike, FunctionFragment, Result, Interface, + EventFragment, AddressLike, ContractRunner, ContractMethod, @@ -17,28 +17,136 @@ import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, + TypedLogDescription, TypedListener, TypedContractMethod, } from "./common"; export interface VaultRouterInterface extends Interface { - getFunction(nameOrSignature: "multiInteract"): FunctionFragment; + getFunction( + nameOrSignature: + | "approveTokenForVault" + | "cancelOwnershipHandover" + | "completeOwnershipHandover" + | "multiInteract" + | "owner" + | "ownershipHandoverExpiresAt" + | "renounceOwnership" + | "requestOwnershipHandover" + | "transferOwnership" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "OwnershipHandoverCanceled" + | "OwnershipHandoverRequested" + | "OwnershipTransferred" + ): EventFragment; + encodeFunctionData( + functionFragment: "approveTokenForVault", + values: [AddressLike, AddressLike, boolean] + ): string; + encodeFunctionData( + functionFragment: "cancelOwnershipHandover", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "completeOwnershipHandover", + values: [AddressLike] + ): string; encodeFunctionData( functionFragment: "multiInteract", - values: [ - AddressLike[], - BigNumberish[], - AddressLike[], - AddressLike[], - BigNumberish[] - ] + values: [BytesLike, BytesLike[]] + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "ownershipHandoverExpiresAt", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "requestOwnershipHandover", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [AddressLike] ): string; + decodeFunctionResult( + functionFragment: "approveTokenForVault", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "cancelOwnershipHandover", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "completeOwnershipHandover", + data: BytesLike + ): Result; decodeFunctionResult( functionFragment: "multiInteract", data: BytesLike ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ownershipHandoverExpiresAt", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "requestOwnershipHandover", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; +} + +export namespace OwnershipHandoverCanceledEvent { + export type InputTuple = [pendingOwner: AddressLike]; + export type OutputTuple = [pendingOwner: string]; + export interface OutputObject { + pendingOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace OwnershipHandoverRequestedEvent { + export type InputTuple = [pendingOwner: AddressLike]; + export type OutputTuple = [pendingOwner: string]; + export interface OutputObject { + pendingOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace OwnershipTransferredEvent { + export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [oldOwner: string, newOwner: string]; + export interface OutputObject { + oldOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; } export interface VaultRouter extends BaseContract { @@ -84,35 +192,138 @@ export interface VaultRouter extends BaseContract { event?: TCEvent ): Promise; + approveTokenForVault: TypedContractMethod< + [_token: AddressLike, _vaultAddress: AddressLike, isMax: boolean], + [void], + "nonpayable" + >; + + cancelOwnershipHandover: TypedContractMethod<[], [void], "payable">; + + completeOwnershipHandover: TypedContractMethod< + [pendingOwner: AddressLike], + [void], + "payable" + >; + multiInteract: TypedContractMethod< - [ - _vaultContracts: AddressLike[], - _operations: BigNumberish[], - _collateralTokens: AddressLike[], - _tos: AddressLike[], - _amounts: BigNumberish[] - ], + [_packedOperations: BytesLike, _encodedParameters: BytesLike[]], [void], "nonpayable" >; + owner: TypedContractMethod<[], [string], "view">; + + ownershipHandoverExpiresAt: TypedContractMethod< + [pendingOwner: AddressLike], + [bigint], + "view" + >; + + renounceOwnership: TypedContractMethod<[], [void], "payable">; + + requestOwnershipHandover: TypedContractMethod<[], [void], "payable">; + + transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "payable" + >; + getFunction( key: string | FunctionFragment ): T; + getFunction( + nameOrSignature: "approveTokenForVault" + ): TypedContractMethod< + [_token: AddressLike, _vaultAddress: AddressLike, isMax: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "cancelOwnershipHandover" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "completeOwnershipHandover" + ): TypedContractMethod<[pendingOwner: AddressLike], [void], "payable">; getFunction( nameOrSignature: "multiInteract" ): TypedContractMethod< - [ - _vaultContracts: AddressLike[], - _operations: BigNumberish[], - _collateralTokens: AddressLike[], - _tos: AddressLike[], - _amounts: BigNumberish[] - ], + [_packedOperations: BytesLike, _encodedParameters: BytesLike[]], [void], "nonpayable" >; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "ownershipHandoverExpiresAt" + ): TypedContractMethod<[pendingOwner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "renounceOwnership" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "requestOwnershipHandover" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "payable">; + + getEvent( + key: "OwnershipHandoverCanceled" + ): TypedContractEvent< + OwnershipHandoverCanceledEvent.InputTuple, + OwnershipHandoverCanceledEvent.OutputTuple, + OwnershipHandoverCanceledEvent.OutputObject + >; + getEvent( + key: "OwnershipHandoverRequested" + ): TypedContractEvent< + OwnershipHandoverRequestedEvent.InputTuple, + OwnershipHandoverRequestedEvent.OutputTuple, + OwnershipHandoverRequestedEvent.OutputObject + >; + getEvent( + key: "OwnershipTransferred" + ): TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + + filters: { + "OwnershipHandoverCanceled(address)": TypedContractEvent< + OwnershipHandoverCanceledEvent.InputTuple, + OwnershipHandoverCanceledEvent.OutputTuple, + OwnershipHandoverCanceledEvent.OutputObject + >; + OwnershipHandoverCanceled: TypedContractEvent< + OwnershipHandoverCanceledEvent.InputTuple, + OwnershipHandoverCanceledEvent.OutputTuple, + OwnershipHandoverCanceledEvent.OutputObject + >; + + "OwnershipHandoverRequested(address)": TypedContractEvent< + OwnershipHandoverRequestedEvent.InputTuple, + OwnershipHandoverRequestedEvent.OutputTuple, + OwnershipHandoverRequestedEvent.OutputObject + >; + OwnershipHandoverRequested: TypedContractEvent< + OwnershipHandoverRequestedEvent.InputTuple, + OwnershipHandoverRequestedEvent.OutputTuple, + OwnershipHandoverRequestedEvent.OutputObject + >; - filters: {}; + "OwnershipTransferred(address,address)": TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + OwnershipTransferred: TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + }; } diff --git a/src/generated/factories/Currency__factory.ts b/src/generated/factories/Currency__factory.ts index 0edf4b2..defa884 100644 --- a/src/generated/factories/Currency__factory.ts +++ b/src/generated/factories/Currency__factory.ts @@ -16,12 +16,12 @@ const _abi = [ inputs: [ { internalType: "string", - name: "_name", + name: "name_", type: "string", }, { internalType: "string", - name: "_symbol", + name: "symbol_", type: "string", }, ], @@ -30,233 +30,62 @@ const _abi = [ }, { inputs: [], - name: "AccessControlBadConfirmation", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "neededRole", - type: "bytes32", - }, - ], - name: "AccessControlUnauthorizedAccount", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "target", - type: "address", - }, - ], - name: "AddressEmptyCode", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "AddressInsufficientBalance", + name: "AllowanceOverflow", type: "error", }, { inputs: [], - name: "ECDSAInvalidSignature", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "length", - type: "uint256", - }, - ], - name: "ECDSAInvalidSignatureLength", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "ECDSAInvalidSignatureS", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "allowance", - type: "uint256", - }, - { - internalType: "uint256", - name: "needed", - type: "uint256", - }, - ], - name: "ERC20InsufficientAllowance", + name: "AllowanceUnderflow", 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", + inputs: [], + name: "AlreadyInitialized", type: "error", }, { - inputs: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - ], - name: "ERC20InvalidSender", + inputs: [], + name: "InsufficientAllowance", type: "error", }, { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "ERC20InvalidSpender", + inputs: [], + name: "InsufficientBalance", type: "error", }, { - inputs: [ - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - ], - name: "ERC2612ExpiredSignature", + inputs: [], + name: "InvalidPermit", type: "error", }, { - inputs: [ - { - internalType: "address", - name: "signer", - type: "address", - }, - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "ERC2612InvalidSigner", + inputs: [], + name: "NewOwnerIsZeroAddress", type: "error", }, { inputs: [], - name: "FailedInnerCall", + name: "NoHandoverRequest", type: "error", }, { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "currentNonce", - type: "uint256", - }, - ], - name: "InvalidAccountNonce", + inputs: [], + name: "NotMinter", type: "error", }, { inputs: [], - name: "InvalidShortString", + name: "PermitExpired", type: "error", }, { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "SafeERC20FailedOperation", + inputs: [], + name: "TotalSupplyOverflow", type: "error", }, { - inputs: [ - { - internalType: "string", - name: "str", - type: "string", - }, - ], - name: "StringTooLong", + inputs: [], + name: "Unauthorized", type: "error", }, { @@ -277,30 +106,24 @@ const _abi = [ { indexed: false, internalType: "uint256", - name: "value", + name: "amount", type: "uint256", }, ], name: "Approval", type: "event", }, - { - anonymous: false, - inputs: [], - name: "EIP712DomainChanged", - type: "event", - }, { anonymous: false, inputs: [ { - indexed: false, - internalType: "bool", - name: "enabled", - type: "bool", + indexed: true, + internalType: "address", + name: "pendingOwner", + type: "address", }, ], - name: "Permit2AllowanceUpdated", + name: "OwnershipHandoverCanceled", type: "event", }, { @@ -308,74 +131,44 @@ const _abi = [ inputs: [ { indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - indexed: true, - internalType: "bytes32", - name: "previousAdminRole", - type: "bytes32", - }, - { - indexed: true, - internalType: "bytes32", - name: "newAdminRole", - type: "bytes32", + internalType: "address", + name: "pendingOwner", + type: "address", }, ], - name: "RoleAdminChanged", + name: "OwnershipHandoverRequested", type: "event", }, { anonymous: false, inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, { indexed: true, internalType: "address", - name: "account", + name: "oldOwner", type: "address", }, { indexed: true, internalType: "address", - name: "sender", + name: "newOwner", type: "address", }, ], - name: "RoleGranted", + name: "OwnershipTransferred", type: "event", }, { anonymous: false, inputs: [ { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", + indexed: false, + internalType: "bool", + name: "enabled", + type: "bool", }, ], - name: "RoleRevoked", + name: "Permit2AllowanceUpdated", type: "event", }, { @@ -396,33 +189,20 @@ const _abi = [ { indexed: false, internalType: "uint256", - name: "value", + name: "amount", type: "uint256", }, ], name: "Transfer", type: "event", }, - { - inputs: [], - name: "DEFAULT_ADMIN_ROLE", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [], name: "DOMAIN_SEPARATOR", outputs: [ { internalType: "bytes32", - name: "", + name: "result", type: "bytes32", }, ], @@ -446,7 +226,7 @@ const _abi = [ inputs: [ { internalType: "address", - name: "owner", + name: "_owner", type: "address", }, { @@ -475,7 +255,7 @@ const _abi = [ }, { internalType: "uint256", - name: "value", + name: "amount", type: "uint256", }, ], @@ -494,7 +274,7 @@ const _abi = [ inputs: [ { internalType: "address", - name: "account", + name: "owner", type: "address", }, ], @@ -502,7 +282,7 @@ const _abi = [ outputs: [ { internalType: "uint256", - name: "", + name: "result", type: "uint256", }, ], @@ -535,111 +315,51 @@ const _abi = [ }, { inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", + name: "cancelOwnershipHandover", + outputs: [], + stateMutability: "payable", type: "function", }, { - inputs: [], - name: "eip712Domain", - outputs: [ - { - internalType: "bytes1", - name: "fields", - type: "bytes1", - }, - { - internalType: "string", - name: "name", - type: "string", - }, - { - internalType: "string", - name: "version", - type: "string", - }, - { - internalType: "uint256", - name: "chainId", - type: "uint256", - }, + inputs: [ { internalType: "address", - name: "verifyingContract", + name: "pendingOwner", type: "address", }, - { - internalType: "bytes32", - name: "salt", - type: "bytes32", - }, - { - internalType: "uint256[]", - name: "extensions", - type: "uint256[]", - }, ], - stateMutability: "view", + name: "completeOwnershipHandover", + outputs: [], + stateMutability: "payable", type: "function", }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - ], - name: "getRoleAdmin", + inputs: [], + name: "decimals", outputs: [ { - internalType: "bytes32", + internalType: "uint8", name: "", - type: "bytes32", + type: "uint8", }, ], - stateMutability: "view", + stateMutability: "pure", type: "function", }, { inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, { internalType: "address", name: "account", type: "address", }, - ], - name: "grantRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, { - internalType: "address", - name: "account", - type: "address", + internalType: "uint256", + name: "amount", + type: "uint256", }, ], - name: "hasRole", + name: "mint", outputs: [ { internalType: "bool", @@ -647,23 +367,18 @@ const _abi = [ type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "account", + name: "", type: "address", }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, ], - name: "mint", + name: "minterRole", outputs: [ { internalType: "bool", @@ -671,7 +386,7 @@ const _abi = [ type: "bool", }, ], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { @@ -699,7 +414,39 @@ const _abi = [ outputs: [ { internalType: "uint256", - name: "", + name: "result", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "result", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "pendingOwner", + type: "address", + }, + ], + name: "ownershipHandoverExpiresAt", + outputs: [ + { + internalType: "uint256", + name: "result", type: "uint256", }, ], @@ -765,7 +512,7 @@ const _abi = [ { inputs: [ { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "token", type: "address", }, @@ -781,39 +528,17 @@ const _abi = [ type: "function", }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "callerConfirmation", - type: "address", - }, - ], - name: "renounceRole", + inputs: [], + name: "renounceOwnership", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "revokeRole", + inputs: [], + name: "requestOwnershipHandover", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { @@ -823,29 +548,15 @@ const _abi = [ name: "account", type: "address", }, - ], - name: "setMinterRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ { internalType: "bool", - name: "", + name: "isMinter", type: "bool", }, ], - stateMutability: "view", + name: "setMinterRole", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { @@ -867,7 +578,7 @@ const _abi = [ outputs: [ { internalType: "uint256", - name: "", + name: "result", type: "uint256", }, ], @@ -883,7 +594,7 @@ const _abi = [ }, { internalType: "uint256", - name: "value", + name: "amount", type: "uint256", }, ], @@ -912,7 +623,7 @@ const _abi = [ }, { internalType: "uint256", - name: "value", + name: "amount", type: "uint256", }, ], @@ -927,6 +638,19 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "payable", + type: "function", + }, { inputs: [ { @@ -943,7 +667,7 @@ const _abi = [ ] as const; const _bytecode = - "0x6101606040523480156200001257600080fd5b50604051620025653803806200256583398101604081905262000035916200034e565b6040805180820190915260018152603160f81b6020820152819081908482600462000061838262000447565b50600562000070828262000447565b5062000082915083905060066200014e565b61012052620000938160076200014e565b61014052815160208084019190912060e052815190820120610100524660a0526200012160e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c052506200013860003362000187565b50506009805460ff19166001179055506200056d565b60006020835110156200016e57620001668362000235565b905062000181565b816200017b848262000447565b5060ff90505b92915050565b6000828152602081815260408083206001600160a01b038516845290915281205460ff166200022c576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620001e33390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600162000181565b50600062000181565b600080829050601f815111156200026c578260405163305a27a960e01b815260040162000263919062000513565b60405180910390fd5b8051620002798262000548565b179392505050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620002b45781810151838201526020016200029a565b50506000910152565b600082601f830112620002cf57600080fd5b81516001600160401b0380821115620002ec57620002ec62000281565b604051601f8301601f19908116603f0116810190828211818310171562000317576200031762000281565b816040528381528660208588010111156200033157600080fd5b6200034484602083016020890162000297565b9695505050505050565b600080604083850312156200036257600080fd5b82516001600160401b03808211156200037a57600080fd5b6200038886838701620002bd565b935060208501519150808211156200039f57600080fd5b50620003ae85828601620002bd565b9150509250929050565b600181811c90821680620003cd57607f821691505b602082108103620003ee57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200044257600081815260208120601f850160051c810160208610156200041d5750805b601f850160051c820191505b818110156200043e5782815560010162000429565b5050505b505050565b81516001600160401b0381111562000463576200046362000281565b6200047b81620004748454620003b8565b84620003f4565b602080601f831160018114620004b357600084156200049a5750858301515b600019600386901b1c1916600185901b1785556200043e565b600085815260208120601f198616915b82811015620004e457888601518255948401946001909101908401620004c3565b5085821015620005035787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208152600082518060208401526200053481604085016020870162000297565b601f01601f19169190910160400192915050565b80516020808301519190811015620003ee5760001960209190910360031b1b16919050565b60805160a05160c05160e051610100516101205161014051611f9d620005c860003960006110e9015260006110bc01526000610f4901526000610f2101526000610e7c01526000610ea601526000610ed00152611f9d6000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c8063705e6a5b116100f95780639dc29fac11610097578063d505accf11610071578063d505accf146103f4578063d547741f14610407578063dd62ed3e1461041a578063feaea5861461042d57600080fd5b80639dc29fac146103c6578063a217fddf146103d9578063a9059cbb146103e157600080fd5b806384b0196e116100d357806384b0196e1461034c57806391d1485414610367578063945d1229146103ab57806395d89b41146103be57600080fd5b8063705e6a5b146102f057806370a08231146103035780637ecebe001461033957600080fd5b80632f2ff15d1161016657806336568abe1161014057806336568abe14610282578063407c48b41461029557806340c10f19146102a25780636afdd850146102b557600080fd5b80632f2ff15d14610256578063313ce5671461026b5780633644e5151461027a57600080fd5b806318160ddd1161019757806318160ddd1461020e57806323b872dd14610220578063248a9ca31461023357600080fd5b806301ffc9a7146101be57806306fdde03146101e6578063095ea7b3146101fb575b600080fd5b6101d16101cc366004611b48565b610440565b60405190151581526020015b60405180910390f35b6101ee6104d9565b6040516101dd9190611bf8565b6101d1610209366004611c2d565b61056b565b6003545b6040519081526020016101dd565b6101d161022e366004611c59565b610583565b610212610241366004611c9a565b60009081526020819052604090206001015490565b610269610264366004611cb3565b6105a9565b005b604051601281526020016101dd565b6102126105d4565b610269610290366004611cb3565b6105e3565b6009546101d19060ff1681565b6101d16102b0366004611c2d565b610641565b6102cb6e22d473030f116ddee9f6b43ac78ba381565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101dd565b6102696102fe366004611cf1565b610677565b610212610311366004611d0e565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610212610347366004611d0e565b6106e9565b610354610714565b6040516101dd9796959493929190611d2b565b6101d1610375366004611cb3565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6102696103b9366004611d0e565b610776565b6101ee6107ab565b6101d16103d4366004611c2d565b6107ba565b610212600081565b6101d16103ef366004611c2d565b6107f0565b610269610402366004611dea565b6107fe565b610269610415366004611cb3565b6109b0565b610212610428366004611e61565b6109d5565b61026961043b366004611e61565b610a71565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806104d357507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600480546104e890611e8f565b80601f016020809104026020016040519081016040528092919081815260200182805461051490611e8f565b80156105615780601f1061053657610100808354040283529160200191610561565b820191906000526020600020905b81548152906001019060200180831161054457829003601f168201915b5050505050905090565b600033610579818585610bfd565b5060019392505050565b600033610591858285610c0a565b61059c858585610cae565b60019150505b9392505050565b6000828152602081905260409020600101546105c481610d59565b6105ce8383610d66565b50505050565b60006105de610e62565b905090565b73ffffffffffffffffffffffffffffffffffffffff81163314610632576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61063c8282610f9a565b505050565b60007fcfd53186d792f1ec9d0679afc2dc3ffc86fc31fe1e0f342b838eb6c3eade62b361066d81610d59565b6105798484611055565b600061068281610d59565b60405182151581527f383d8f27281deff0ab982f76ad2feac76f0cb5d922008a4642d8765c748591329060200160405180910390a150600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600860205260408120546104d3565b6000606080600080600060606107286110b5565b6107306110e2565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b600061078181610d59565b61063c7fcfd53186d792f1ec9d0679afc2dc3ffc86fc31fe1e0f342b838eb6c3eade62b383610d66565b6060600580546104e890611e8f565b60007fcfd53186d792f1ec9d0679afc2dc3ffc86fc31fe1e0f342b838eb6c3eade62b36107e681610d59565b610579848461110f565b600033610579818585610cae565b83421115610840576040517f62791302000000000000000000000000000000000000000000000000000000008152600481018590526024015b60405180910390fd5b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861089a8c73ffffffffffffffffffffffffffffffffffffffff16600090815260086020526040902080546001810190915590565b60408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006109028261116b565b90506000610912828787876111b3565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610999576040517f4b800e4600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80831660048301528b166024820152604401610837565b6109a48a8a8a610bfd565b50505050505050505050565b6000828152602081905260409020600101546109cb81610d59565b6105ce8383610f9a565b600073ffffffffffffffffffffffffffffffffffffffff82166e22d473030f116ddee9f6b43ac78ba3148015610a0d575060095460ff165b15610a3957507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6104d3565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600260209081526040808320938616835292905220546105a2565b6000610a7c81610d59565b73ffffffffffffffffffffffffffffffffffffffff831615610b33576040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015261063c908490849073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015610b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2e9190611ee2565b6111e1565b60008273ffffffffffffffffffffffffffffffffffffffff164760405160006040518083038185875af1925050503d8060008114610b8d576040519150601f19603f3d011682016040523d82523d6000602084013e610b92565b606091505b50509050806105ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f7769746864726177206661696c656400000000000000000000000000000000006044820152606401610837565b61063c838383600161126e565b6000610c1684846109d5565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146105ce5781811015610c9f576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810182905260448101839052606401610837565b6105ce8484848403600061126e565b73ffffffffffffffffffffffffffffffffffffffff8316610cfe576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b73ffffffffffffffffffffffffffffffffffffffff8216610d4e576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b61063c8383836113b6565b610d638133611561565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff16610e5a5760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610df83390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016104d3565b5060006104d3565b60003073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015610ec857507f000000000000000000000000000000000000000000000000000000000000000046145b15610ef257507f000000000000000000000000000000000000000000000000000000000000000090565b6105de604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff1615610e5a5760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016104d3565b73ffffffffffffffffffffffffffffffffffffffff82166110a5576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b6110b1600083836113b6565b5050565b60606105de7f000000000000000000000000000000000000000000000000000000000000000060066115e7565b60606105de7f000000000000000000000000000000000000000000000000000000000000000060076115e7565b73ffffffffffffffffffffffffffffffffffffffff821661115f576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b6110b1826000836113b6565b60006104d3611178610e62565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b6000806000806111c588888888611692565b9250925092506111d5828261178c565b50909695505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261063c908490611890565b73ffffffffffffffffffffffffffffffffffffffff84166112be576040517fe602df0500000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b73ffffffffffffffffffffffffffffffffffffffff831661130e576040517f94280d6200000000000000000000000000000000000000000000000000000000815260006004820152602401610837565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260026020908152604080832093871683529290522082905580156105ce578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516113a891815260200190565b60405180910390a350505050565b73ffffffffffffffffffffffffffffffffffffffff83166113ee5780600360008282546113e39190611efb565b909155506114a09050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205481811015611474576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526024810182905260448101839052606401610837565b73ffffffffffffffffffffffffffffffffffffffff841660009081526001602052604090209082900390555b73ffffffffffffffffffffffffffffffffffffffff82166114c9576003805482900390556114f5565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090208054820190555b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161155491815260200190565b60405180910390a3505050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166110b1576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260248101839052604401610837565b606060ff8314611601576115fa83611926565b90506104d3565b81805461160d90611e8f565b80601f016020809104026020016040519081016040528092919081815260200182805461163990611e8f565b80156116865780601f1061165b57610100808354040283529160200191611686565b820191906000526020600020905b81548152906001019060200180831161166957829003601f168201915b505050505090506104d3565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156116cd5750600091506003905082611782565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611721573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661177857506000925060019150829050611782565b9250600091508190505b9450945094915050565b60008260038111156117a0576117a0611f35565b036117a9575050565b60018260038111156117bd576117bd611f35565b036117f4576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282600381111561180857611808611f35565b03611842576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401610837565b600382600381111561185657611856611f35565b036110b1576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401610837565b60006118b273ffffffffffffffffffffffffffffffffffffffff841683611965565b905080516000141580156118d75750808060200190518101906118d59190611f64565b155b1561063c576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610837565b6060600061193383611973565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b60606105a2838360006119b4565b600060ff8216601f8111156104d3576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060814710156119f2576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610837565b6000808573ffffffffffffffffffffffffffffffffffffffff168486604051611a1b9190611f81565b60006040518083038185875af1925050503d8060008114611a58576040519150601f19603f3d011682016040523d82523d6000602084013e611a5d565b606091505b5091509150611a6d868383611a77565b9695505050505050565b606082611a8c57611a8782611b06565b6105a2565b8151158015611ab0575073ffffffffffffffffffffffffffffffffffffffff84163b155b15611aff576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610837565b50806105a2565b805115611b165780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060208284031215611b5a57600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146105a257600080fd5b60005b83811015611ba5578181015183820152602001611b8d565b50506000910152565b60008151808452611bc6816020860160208601611b8a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006105a26020830184611bae565b73ffffffffffffffffffffffffffffffffffffffff81168114610d6357600080fd5b60008060408385031215611c4057600080fd5b8235611c4b81611c0b565b946020939093013593505050565b600080600060608486031215611c6e57600080fd5b8335611c7981611c0b565b92506020840135611c8981611c0b565b929592945050506040919091013590565b600060208284031215611cac57600080fd5b5035919050565b60008060408385031215611cc657600080fd5b823591506020830135611cd881611c0b565b809150509250929050565b8015158114610d6357600080fd5b600060208284031215611d0357600080fd5b81356105a281611ce3565b600060208284031215611d2057600080fd5b81356105a281611c0b565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e081840152611d6760e084018a611bae565b8381036040850152611d79818a611bae565b6060850189905273ffffffffffffffffffffffffffffffffffffffff8816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015611dd857835183529284019291840191600101611dbc565b50909c9b505050505050505050505050565b600080600080600080600060e0888a031215611e0557600080fd5b8735611e1081611c0b565b96506020880135611e2081611c0b565b95506040880135945060608801359350608088013560ff81168114611e4457600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611e7457600080fd5b8235611e7f81611c0b565b91506020830135611cd881611c0b565b600181811c90821680611ea357607f821691505b602082108103611edc577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600060208284031215611ef457600080fd5b5051919050565b808201808211156104d3577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060208284031215611f7657600080fd5b81516105a281611ce3565b60008251611f93818460208701611b8a565b919091019291505056"; + "0x60806040523480156200001157600080fd5b506040516200160938038062001609833981016040819052620000349162000173565b6200003f3362000072565b60006200004d83826200026c565b5060016200005c82826200026c565b50506002805460ff191660011790555062000338565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000d657600080fd5b81516001600160401b0380821115620000f357620000f3620000ae565b604051601f8301601f19908116603f011681019082821181831017156200011e576200011e620000ae565b816040528381526020925086838588010111156200013b57600080fd5b600091505b838210156200015f578582018301518183018401529082019062000140565b600093810190920192909252949350505050565b600080604083850312156200018757600080fd5b82516001600160401b03808211156200019f57600080fd5b620001ad86838701620000c4565b93506020850151915080821115620001c457600080fd5b50620001d385828601620000c4565b9150509250929050565b600181811c90821680620001f257607f821691505b6020821081036200021357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200026757600081815260208120601f850160051c81016020861015620002425750805b601f850160051c820191505b8181101562000263578281556001016200024e565b5050505b505050565b81516001600160401b03811115620002885762000288620000ae565b620002a081620002998454620001dd565b8462000219565b602080601f831160018114620002d85760008415620002bf5750858301515b600019600386901b1c1916600185901b17855562000263565b600085815260208120601f198616915b828110156200030957888601518255948401946001909101908401620002e8565b5085821015620003285787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6112c180620003486000396000f3fe6080604052600436106101ac5760003560e01c8063715018a6116100ec578063cb177b1e1161008a578063f04e283e11610064578063f04e283e146104bf578063f2fde38b146104d2578063feaea586146104e5578063fee81cf41461050557600080fd5b8063cb177b1e1461045f578063d505accf1461047f578063dd62ed3e1461049f57600080fd5b806395d89b41116100c657806395d89b41146103da5780639dc29fac146103ef578063a9059cbb1461040f578063ad0e7d8c1461042f57600080fd5b8063715018a61461036b5780637ecebe00146103735780638da5cb5b146103a657600080fd5b80633644e5151161015957806354d1f13d1161013357806354d1f13d146102c85780636afdd850146102d0578063705e6a5b1461031857806370a082311461033857600080fd5b80633644e51514610279578063407c48b41461028e57806340c10f19146102a857600080fd5b806323b872dd1161018a57806323b872dd146102335780632569296214610253578063313ce5671461025d57600080fd5b806306fdde03146101b1578063095ea7b3146101dc57806318160ddd1461020c575b600080fd5b3480156101bd57600080fd5b506101c6610538565b6040516101d39190611028565b60405180910390f35b3480156101e857600080fd5b506101fc6101f73660046110b6565b6105ca565b60405190151581526020016101d3565b34801561021857600080fd5b506805345cdf77eb68f44c545b6040519081526020016101d3565b34801561023f57600080fd5b506101fc61024e3660046110e2565b61061e565b61025b6106dc565b005b34801561026957600080fd5b50604051601281526020016101d3565b34801561028557600080fd5b5061022561072c565b34801561029a57600080fd5b506002546101fc9060ff1681565b3480156102b457600080fd5b506101fc6102c33660046110b6565b6107a9565b61025b610805565b3480156102dc57600080fd5b506102f36e22d473030f116ddee9f6b43ac78ba381565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d3565b34801561032457600080fd5b5061025b610333366004611138565b610841565b34801561034457600080fd5b50610225610353366004611153565b6387a211a2600c908152600091909152602090205490565b61025b6108af565b34801561037f57600080fd5b5061022561038e366004611153565b6338377508600c908152600091909152602090205490565b3480156103b257600080fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927546102f3565b3480156103e657600080fd5b506101c66108c3565b3480156103fb57600080fd5b506101fc61040a3660046110b6565b6108d2565b34801561041b57600080fd5b506101fc61042a3660046110b6565b610906565b34801561043b57600080fd5b506101fc61044a366004611153565b60036020526000908152604090205460ff1681565b34801561046b57600080fd5b5061025b61047a366004611170565b61097d565b34801561048b57600080fd5b5061025b61049a3660046111a5565b6109db565b3480156104ab57600080fd5b506102256104ba36600461121c565b610b75565b61025b6104cd366004611153565b610bfa565b61025b6104e0366004611153565b610c3a565b3480156104f157600080fd5b5061025b61050036600461121c565b610c61565b34801561051157600080fd5b50610225610520366004611153565b63389a75e1600c908152600091909152602090205490565b60606000805461054790611255565b80601f016020809104026020016040519081016040528092919081815260200182805461057390611255565b80156105c05780601f10610595576101008083540402835291602001916105c0565b820191906000526020600020905b8154815290600101906020018083116105a357829003601f168201915b5050505050905090565b600082602052637f5e9f20600c5233600052816034600c205581600052602c5160601c337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560206000a35060015b92915050565b60008360601b33602052637f5e9f208117600c526034600c208054600181011561065e5780851115610658576313be252b6000526004601cfd5b84810382555b50506387a211a28117600c526020600c208054808511156106875763f4d678b86000526004601cfd5b84810382555050836000526020600c208381540181555082602052600c5160601c8160601c7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a3505060019392505050565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b600080610737610538565b8051906020012090506040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81528160208201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6604082015246606082015230608082015260a081209250505090565b3360009081526003602052604081205460ff166107f2576040517ff8d2906c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107fc8383610df7565b50600192915050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b610849610e76565b60405181151581527f383d8f27281deff0ab982f76ad2feac76f0cb5d922008a4642d8765c748591329060200160405180910390a1600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6108b7610e76565b6108c16000610eac565b565b60606001805461054790611255565b600073ffffffffffffffffffffffffffffffffffffffff831633146108fc576108fc833384610f12565b6107fc8383610f55565b60006387a211a2600c52336000526020600c208054808411156109315763f4d678b86000526004601cfd5b83810382555050826000526020600c208281540181555081602052600c5160601c337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a36107fc565b610985610e76565b73ffffffffffffffffffffffffffffffffffffffff91909116600090815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60006109e5610538565b80519060200120905084421115610a0457631a15a3cc6000526004601cfd5b6040518860601b60601c98508760601b60601c975065383775081901600e52886000526020600c2080547f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f83528360208401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6604084015246606084015230608084015260a08320602e527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c983528a60208401528960408401528860608401528060808401528760a084015260c08320604e526042602c206000528660ff1660205285604052846060526020806080600060015afa8b3d5114610b105763ddafbaef6000526004601cfd5b019055777f5e9f20000000000000000000000000000000000000000088176040526034602c2087905587897f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602060608501a360405250506000606052505050505050565b600073ffffffffffffffffffffffffffffffffffffffff82166e22d473030f116ddee9f6b43ac78ba3148015610bad575060025460ff165b15610bd957507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610618565b6020829052637f5e9f20600c908152600084905260349020545b9392505050565b610c02610e76565b63389a75e1600c52806000526020600c208054421115610c2a57636f5e88186000526004601cfd5b60009055610c3781610eac565b50565b610c42610e76565b8060601b610c5857637448fbae6000526004601cfd5b610c3781610eac565b610c69610e76565b73ffffffffffffffffffffffffffffffffffffffff821615610d24576040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152610d20908390839073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015610cf7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1b91906112a8565b610fd9565b5050565b60008173ffffffffffffffffffffffffffffffffffffffff164760405160006040518083038185875af1925050503d8060008114610d7e576040519150601f19603f3d011682016040523d82523d6000602084013e610d83565b606091505b5050905080610df2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f7769746864726177206661696c65640000000000000000000000000000000000604482015260640160405180910390fd5b505050565b6805345cdf77eb68f44c5481810181811015610e1b5763e5cfe9576000526004601cfd5b806805345cdf77eb68f44c5550506387a211a2600c52816000526020600c208181540181555080602052600c5160601c60007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602080a35050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275433146108c1576382b429006000526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b81602052637f5e9f20600c52826000526034600c2080546001810115610f4e5780831115610f48576313be252b6000526004601cfd5b82810382555b5050505050565b6387a211a2600c52816000526020600c20805480831115610f7e5763f4d678b86000526004601cfd5b82900390556805345cdf77eb68f44c80548290039055600081815273ffffffffffffffffffffffffffffffffffffffff83167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602083a35050565b81601452806034526fa9059cbb00000000000000000000000060005260206000604460106000875af13d15600160005114171661101e576390b8ec186000526004601cfd5b6000603452505050565b600060208083528351808285015260005b8181101561105557858101830151858201604001528201611039565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c3757600080fd5b600080604083850312156110c957600080fd5b82356110d481611094565b946020939093013593505050565b6000806000606084860312156110f757600080fd5b833561110281611094565b9250602084013561111281611094565b929592945050506040919091013590565b8035801515811461113357600080fd5b919050565b60006020828403121561114a57600080fd5b610bf382611123565b60006020828403121561116557600080fd5b8135610bf381611094565b6000806040838503121561118357600080fd5b823561118e81611094565b915061119c60208401611123565b90509250929050565b600080600080600080600060e0888a0312156111c057600080fd5b87356111cb81611094565b965060208801356111db81611094565b95506040880135945060608801359350608088013560ff811681146111ff57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561122f57600080fd5b823561123a81611094565b9150602083013561124a81611094565b809150509250929050565b600181811c9082168061126957607f821691505b6020821081036112a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b6000602082840312156112ba57600080fd5b505191905056"; type CurrencyConstructorParams = | [signer?: Signer] @@ -963,18 +687,18 @@ export class Currency__factory extends ContractFactory { } override getDeployTransaction( - _name: string, - _symbol: string, + name_: string, + symbol_: string, overrides?: NonPayableOverrides & { from?: string } ): Promise { - return super.getDeployTransaction(_name, _symbol, overrides || {}); + return super.getDeployTransaction(name_, symbol_, overrides || {}); } override deploy( - _name: string, - _symbol: string, + name_: string, + symbol_: string, overrides?: NonPayableOverrides & { from?: string } ) { - return super.deploy(_name, _symbol, overrides || {}) as Promise< + return super.deploy(name_, symbol_, overrides || {}) as Promise< Currency & { deploymentTransaction(): ContractTransactionResponse; } diff --git a/src/generated/factories/Feed__factory.ts b/src/generated/factories/Feed__factory.ts index 836de35..96ca424 100644 --- a/src/generated/factories/Feed__factory.ts +++ b/src/generated/factories/Feed__factory.ts @@ -30,23 +30,27 @@ const _abi = [ }, { inputs: [], - name: "AccessControlBadConfirmation", + name: "AlreadyInitialized", type: "error", }, { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "neededRole", - type: "bytes32", - }, - ], - name: "AccessControlUnauthorizedAccount", + inputs: [], + name: "BadPrice", + type: "error", + }, + { + inputs: [], + name: "NewOwnerIsZeroAddress", + type: "error", + }, + { + inputs: [], + name: "NoHandoverRequest", + type: "error", + }, + { + inputs: [], + name: "NotPaused", type: "error", }, { @@ -54,23 +58,22 @@ const _abi = [ name: "Paused", type: "error", }, + { + inputs: [], + name: "Unauthorized", + type: "error", + }, { anonymous: false, inputs: [ { - indexed: false, + indexed: true, internalType: "address", - name: "collateral", + name: "pendingOwner", type: "address", }, - { - indexed: false, - internalType: "uint256", - name: "price", - type: "uint256", - }, ], - name: "Read", + name: "OwnershipHandoverCanceled", type: "event", }, { @@ -78,93 +81,63 @@ const _abi = [ inputs: [ { indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - indexed: true, - internalType: "bytes32", - name: "previousAdminRole", - type: "bytes32", - }, - { - indexed: true, - internalType: "bytes32", - name: "newAdminRole", - type: "bytes32", + internalType: "address", + name: "pendingOwner", + type: "address", }, ], - name: "RoleAdminChanged", + name: "OwnershipHandoverRequested", type: "event", }, { anonymous: false, inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, { indexed: true, internalType: "address", - name: "account", + name: "oldOwner", type: "address", }, { indexed: true, internalType: "address", - name: "sender", + name: "newOwner", type: "address", }, ], - name: "RoleGranted", + name: "OwnershipTransferred", type: "event", }, { anonymous: false, inputs: [ { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - indexed: true, + indexed: false, internalType: "address", - name: "account", + name: "collateral", type: "address", }, { - indexed: true, - internalType: "address", - name: "sender", - type: "address", + indexed: false, + internalType: "uint256", + name: "price", + type: "uint256", }, ], - name: "RoleRevoked", + name: "Read", type: "event", }, { inputs: [], - name: "DEFAULT_ADMIN_ROLE", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", + name: "cancelOwnershipHandover", + outputs: [], + stateMutability: "payable", type: "function", }, { inputs: [ { - internalType: "address", + internalType: "contract ERC20Token", name: "", type: "address", }, @@ -172,7 +145,7 @@ const _abi = [ name: "collaterals", outputs: [ { - internalType: "contract IMedian", + internalType: "contract IOSM", name: "", type: "address", }, @@ -183,61 +156,44 @@ const _abi = [ { inputs: [ { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - ], - name: "getRoleAdmin", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", + internalType: "address", + name: "pendingOwner", + type: "address", }, ], - stateMutability: "view", + name: "completeOwnershipHandover", + outputs: [], + stateMutability: "payable", type: "function", }, { inputs: [ { - internalType: "bytes32", - name: "role", - type: "bytes32", + internalType: "contract ERC20Token", + name: "collateral", + type: "address", }, { - internalType: "address", - name: "account", - type: "address", + internalType: "uint256", + name: "price", + type: "uint256", }, ], - name: "grantRole", + name: "mockUpdatePrice", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + inputs: [], + name: "owner", + outputs: [ { internalType: "address", - name: "account", + name: "result", type: "address", }, ], - name: "hasRole", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], stateMutability: "view", type: "function", }, @@ -245,18 +201,19 @@ const _abi = [ inputs: [ { internalType: "address", - name: "collateral", + name: "pendingOwner", type: "address", }, + ], + name: "ownershipHandoverExpiresAt", + outputs: [ { internalType: "uint256", - name: "price", + name: "result", type: "uint256", }, ], - name: "mockUpdatePrice", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { @@ -267,55 +224,33 @@ const _abi = [ type: "function", }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "callerConfirmation", - type: "address", - }, - ], - name: "renounceRole", + inputs: [], + name: "renounceOwnership", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "revokeRole", + inputs: [], + name: "requestOwnershipHandover", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { inputs: [ { - internalType: "address", - name: "oracle", + internalType: "contract ERC20Token", + name: "collateral", type: "address", }, { - internalType: "address", - name: "collateral", + internalType: "contract IOSM", + name: "oracle", type: "address", }, ], - name: "setPriceOracleContract", + name: "setCollateralOSM", outputs: [], stateMutability: "nonpayable", type: "function", @@ -336,20 +271,14 @@ const _abi = [ { inputs: [ { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", + internalType: "address", + name: "newOwner", + type: "address", }, ], - stateMutability: "view", + name: "transferOwnership", + outputs: [], + stateMutability: "payable", type: "function", }, { @@ -362,7 +291,7 @@ const _abi = [ { inputs: [ { - internalType: "address", + internalType: "contract ERC20Token", name: "collateral", type: "address", }, @@ -388,7 +317,7 @@ const _abi = [ ] as const; const _bytecode = - "0x608060405234801561001057600080fd5b50604051610c89380380610c8983398101604081905261002f91610110565b61003a600033610064565b50600180546001600160a01b0319166001600160a01b039290921691909117905560028055610140565b6000828152602081815260408083206001600160a01b038516845290915281205460ff16610106576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556100be3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161010a565b5060005b92915050565b60006020828403121561012257600080fd5b81516001600160a01b038116811461013957600080fd5b9392505050565b610b3a8061014f6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638456cb5911610097578063c7331b0111610066578063c7331b0114610206578063d547741f14610219578063eeb97d3b1461022c578063fbfa77cf1461028757600080fd5b80638456cb591461019f57806391d14854146101a757806396e85ced146101eb578063a217fddf146101fe57600080fd5b80632f2ff15d116100d35780632f2ff15d1461015c57806336568abe146101715780633f4ba83a146101845780635ab68dd81461018c57600080fd5b806301ffc9a7146100fa578063200d2ed214610122578063248a9ca314610139575b600080fd5b61010d6101083660046109f0565b6102a7565b60405190151581526020015b60405180910390f35b61012b60025481565b604051908152602001610119565b61012b610147366004610a39565b60009081526020819052604090206001015490565b61016f61016a366004610a7b565b610340565b005b61016f61017f366004610a7b565b61036b565b61016f6103c9565b61016f61019a366004610aa7565b6103db565b61016f610478565b61010d6101b5366004610a7b565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b61016f6101f9366004610ad1565b61048b565b61012b600081565b61016f610214366004610aec565b610659565b61016f610227366004610a7b565b610779565b61026261023a366004610ad1565b60036020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610119565b6001546102629073ffffffffffffffffffffffffffffffffffffffff1681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061033a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60008281526020819052604090206001015461035b8161079e565b61036583836107ab565b50505050565b73ffffffffffffffffffffffffffffffffffffffff811633146103ba576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103c482826108a7565b505050565b60006103d48161079e565b5060028055565b600160025403610417576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006104228161079e565b5073ffffffffffffffffffffffffffffffffffffffff90811660009081526003602052604090208054919092167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116179055565b60006104838161079e565b506001600255565b6001600254036104c7576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006104d28161079e565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600360205260408082205481517f57de26a40000000000000000000000000000000000000000000000000000000081528251939491909116926357de26a4926004808401939192918290030181865afa158015610550573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105749190610b16565b6001546040517f457972de00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152602482018490529294509116915063457972de90604401600060405180830381600087803b1580156105eb57600080fd5b505af11580156105ff573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff87168152602081018590527feee6047fc5e3ea81b2b940b6b7c0140055ee3f19ba649d78e25718bdf67eae4093500190505b60405180910390a1505050565b600160025403610695576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006106a08161079e565b6001546040517f457972de00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529091169063457972de90604401600060405180830381600087803b15801561071457600080fd5b505af1158015610728573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff87168152602081018690527feee6047fc5e3ea81b2b940b6b7c0140055ee3f19ba649d78e25718bdf67eae40935001905061064c565b6000828152602081905260409020600101546107948161079e565b61036583836108a7565b6107a88133610962565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff1661089f5760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561083d3390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161033a565b50600061033a565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff161561089f5760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161033a565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166109ec576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024810183905260440160405180910390fd5b5050565b600060208284031215610a0257600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a3257600080fd5b9392505050565b600060208284031215610a4b57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610a7657600080fd5b919050565b60008060408385031215610a8e57600080fd5b82359150610a9e60208401610a52565b90509250929050565b60008060408385031215610aba57600080fd5b610ac383610a52565b9150610a9e60208401610a52565b600060208284031215610ae357600080fd5b610a3282610a52565b60008060408385031215610aff57600080fd5b610b0883610a52565b946020939093013593505050565b60008060408385031215610b2957600080fd5b50508051602090910151909290915056"; + "0x608060405234801561001057600080fd5b5060405161097538038061097583398101604081905261002f916100a3565b600260005561003d33610067565b600180546001600160a01b0319166001600160a01b039290921691909117905560026000556100d3565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6000602082840312156100b557600080fd5b81516001600160a01b03811681146100cc57600080fd5b9392505050565b610893806100e26000396000f3fe6080604052600436106100e85760003560e01c80638da5cb5b1161008a578063f04e283e11610059578063f04e283e14610252578063f2fde38b14610265578063fbfa77cf14610278578063fee81cf4146102a557600080fd5b80638da5cb5b1461017a57806396e85ced146101cf578063c7331b01146101ef578063eeb97d3b1461020f57600080fd5b8063425bddcf116100c6578063425bddcf1461013557806354d1f13d14610155578063715018a61461015d5780638456cb591461016557600080fd5b8063200d2ed2146100ed57806325692962146101165780633f4ba83a14610120575b600080fd5b3480156100f957600080fd5b5061010360005481565b6040519081526020015b60405180910390f35b61011e6102d8565b005b34801561012c57600080fd5b5061011e610328565b34801561014157600080fd5b5061011e6101503660046107f1565b610373565b61011e61040a565b61011e610446565b34801561017157600080fd5b5061011e61045a565b34801561018657600080fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927545b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010d565b3480156101db57600080fd5b5061011e6101ea36600461082a565b6104a5565b3480156101fb57600080fd5b5061011e61020a36600461084e565b61064e565b34801561021b57600080fd5b506101aa61022a36600461082a565b60026020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b61011e61026036600461082a565b6106cc565b61011e61027336600461082a565b61070c565b34801561028457600080fd5b506001546101aa9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156102b157600080fd5b506101036102c036600461082a565b63389a75e1600c908152600091909152602090205490565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b600260005403610364576040517f6cd6020100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61036c610733565b6002600055565b6001600054036103af576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103b7610733565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b61044e610733565b6104586000610769565b565b600160005403610496576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049e610733565b6001600055565b6001600054036104e1576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff80821660009081526002602090815260408083205481517f9fa6a6e3000000000000000000000000000000000000000000000000000000008152915193941692639fa6a6e3926004808401939192918290030181865afa15801561055e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610582919061087a565b9050806000036105be576040517ffd1ee34900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546040517f457972de00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490529091169063457972de90604401600060405180830381600087803b15801561063257600080fd5b505af1158015610646573d6000803e3d6000fd5b505050505050565b60016000540361068a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610692610733565b806000036105be576040517ffd1ee34900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106d4610733565b63389a75e1600c52806000526020600c2080544211156106fc57636f5e88186000526004601cfd5b6000905561070981610769565b50565b610714610733565b8060601b61072a57637448fbae6000526004601cfd5b61070981610769565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610458576382b429006000526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b73ffffffffffffffffffffffffffffffffffffffff8116811461070957600080fd5b6000806040838503121561080457600080fd5b823561080f816107cf565b9150602083013561081f816107cf565b809150509250929050565b60006020828403121561083c57600080fd5b8135610847816107cf565b9392505050565b6000806040838503121561086157600080fd5b823561086c816107cf565b946020939093013593505050565b60006020828403121561088c57600080fd5b505191905056"; type FeedConstructorParams = | [signer?: Signer] diff --git a/src/generated/factories/Rate__factory.ts b/src/generated/factories/Rate__factory.ts new file mode 100644 index 0000000..3fe8901 --- /dev/null +++ b/src/generated/factories/Rate__factory.ts @@ -0,0 +1,155 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../common"; +import type { Rate, RateInterface } from "../Rate"; + +const _abi = [ + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "rate", + type: "uint256", + }, + { + internalType: "uint256", + name: "accumulatedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "lastUpdateTime", + type: "uint256", + }, + ], + internalType: "struct IVault.RateInfo", + name: "_rateInfo", + type: "tuple", + }, + ], + name: "calculateCurrentAccumulatedRate", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "rate", + type: "uint256", + }, + { + internalType: "uint256", + name: "accumulatedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "lastUpdateTime", + type: "uint256", + }, + ], + internalType: "struct IVault.RateInfo", + name: "_baseRateInfo", + type: "tuple", + }, + { + components: [ + { + internalType: "uint256", + name: "rate", + type: "uint256", + }, + { + internalType: "uint256", + name: "accumulatedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "lastUpdateTime", + type: "uint256", + }, + ], + internalType: "struct IVault.RateInfo", + name: "_collateralRateInfo", + type: "tuple", + }, + ], + name: "calculateCurrentTotalAccumulatedRate", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b506101a0806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063cf5696cb1461003b578063d14a27fd14610060575b600080fd5b61004e6100493660046100e3565b610073565b60405190815260200160405180910390f35b61004e61006e366004610118565b61009a565b600061007e8361009a565b6100878361009a565b6100919190610163565b90505b92915050565b6000806100ab604084013542610176565b6100b6908435610189565b6100c4906020850135610163565b9392505050565b6000606082840312156100dd57600080fd5b50919050565b60008060c083850312156100f657600080fd5b61010084846100cb565b915061010f84606085016100cb565b90509250929050565b60006060828403121561012a57600080fd5b61009183836100cb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561009457610094610134565b8181038181111561009457610094610134565b80820281158282048414176100945761009461013456"; + +type RateConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: RateConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class Rate__factory extends ContractFactory { + constructor(...args: RateConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction( + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction(overrides || {}); + } + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + Rate & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): Rate__factory { + return super.connect(runner) as Rate__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): RateInterface { + return new Interface(_abi) as RateInterface; + } + static connect(address: string, runner?: ContractRunner | null): Rate { + return new Contract(address, _abi, runner) as unknown as Rate; + } +} diff --git a/src/generated/factories/VaultGetters__factory.ts b/src/generated/factories/VaultGetters__factory.ts index b5b9cbe..3764cb8 100644 --- a/src/generated/factories/VaultGetters__factory.ts +++ b/src/generated/factories/VaultGetters__factory.ts @@ -20,7 +20,7 @@ const _abi = [ type: "address", }, { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "_collateralToken", type: "address", }, @@ -74,7 +74,7 @@ const _abi = [ type: "address", }, { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "_collateralToken", type: "address", }, @@ -103,7 +103,7 @@ const _abi = [ type: "address", }, { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "_collateralToken", type: "address", }, @@ -132,7 +132,7 @@ const _abi = [ type: "address", }, { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "_collateralToken", type: "address", }, @@ -161,7 +161,7 @@ const _abi = [ type: "address", }, { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "_collateralToken", type: "address", }, @@ -190,7 +190,7 @@ const _abi = [ type: "address", }, { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "_collateralToken", type: "address", }, @@ -253,7 +253,7 @@ const _abi = [ ] as const; const _bytecode = - "0x608060405234801561001057600080fd5b50610e72806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a6e91adf1161005b578063a6e91adf14610120578063b09758f014610141578063c03d887114610154578063f44364c51461016757600080fd5b8063347c5d431461008257806354510b9d146100b55780635d242b97146100d8575b600080fd5b610095610090366004610aae565b61017a565b604080519384526020840192909252908201526060015b60405180910390f35b6100c86100c3366004610aae565b6101d7565b60405190151581526020016100ac565b6100eb6100e6366004610af9565b61022d565b604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e0016100ac565b61013361012e366004610aae565b6102b4565b6040519081526020016100ac565b6100c861014f366004610aae565b610376565b610133610162366004610aae565b6103f4565b610133610175366004610aae565b6104e3565b60008060008061018b87878761052b565b9050600061019988886105fb565b905060006101a88983856106f8565b50905060008184604001516101bd9190610b48565b8451602090950151949b949a509850929650505050505050565b6000806101e585858561052b565b905060006101f386866105fb565b905080610140015161020a57600192505050610226565b6000610217878385610757565b60409092015190911115925050505b9392505050565b6000806000806000806000806102438a8a6105fb565b905060006102508b6107e1565b80516080840151519192506000916102689190610b48565b610276906301e13380610b5b565b61010084015184516020860151604087015160e088015160c090980151929e50909c509a509498509096509450919250505092959891949750929550565b6000806102c285858561052b565b905060006102d086866105fb565b90508061014001516102e757600092505050610226565b60006102f48783856106f8565b5090506000818460400151856020015161030e9190610b48565b6103189190610b48565b90506000610326848361088e565b905060006103586103396012600a610c56565b610344906001610b5b565b61034e9084610b5b565b86604001516108e7565b8651909150610368908290610c62565b9a9950505050505050505050565b604051635881fc3360e01b81526001600160a01b038381166004830152828116602483015260009190851690635881fc3390604401602060405180830381865afa1580156103c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ec9190610c9e565b949350505050565b60008061040285858561052b565b9050600061041086866105fb565b825190915015806104245750806101400151155b1561043457600092505050610226565b60006104408284610927565b905060006104506012600a610c56565b61045b906001610b5b565b604084015161046a9084610b5b565b6104749190610cb9565b905060006104838985876106f8565b5090506000818660400151876020015161049d9190610b48565b6104a79190610b48565b905060006104b58285610c62565b90506000811380156104ca5750808660e00151105b15610368575060e08501519a9950505050505050505050565b6000806104f185858561052b565b905060006104ff86866105fb565b905080610140015161051657600092505050610226565b610521868284610757565b9695505050505050565b6105566040518060800160405280600081526020016000815260200160008152602001600081525090565b60405163e2c7283f60e01b81526001600160a01b038481166004830152838116602483015260009182918291829189169063e2c7283f90604401608060405180830381865afa1580156105ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d19190610cdb565b60408051608081018252948552602085019390935291830152606082015298975050505050505050565b610603610a18565b60008060008060008060008060008060008d6001600160a01b031663c665471f8e6040518263ffffffff1660e01b815260040161064f91906001600160a01b0391909116815260200190565b6101a060405180830381865afa15801561066d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106919190610d11565b60408051610160810182529b8c5260208c019a909a52988a01979097526060890195909552608088019390935260a087019190915260c086015260e085015261010084015261012083015215156101408201529b5050505050505050505050505b92915050565b60008060006107078686610978565b905060006107176012600a610c56565b610722906001610b5b565b602086015160608701516107369085610dfb565b6107409190610b5b565b61074a9190610cb9565b9791965090945050505050565b6000806107658585856106f8565b5090506000818460400151856020015161077f9190610b48565b6107899190610b48565b90508060000361079e57600092505050610226565b60006107aa8686610927565b90506107d66107bb6012600a610c56565b6107c6906001610b5b565b6107d09084610b5b565b826108e7565b979650505050505050565b61080560405180606001604052806000815260200160008152602001600081525090565b6000806000846001600160a01b03166313f60c9a6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610848573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086c9190610e0e565b6040805160608101825293845260208401929092529082015295945050505050565b6000806108cf6108a06012600a610c56565b6108ab906001610b5b565b6108b59085610b5b565b64e8d4a510008660c001516108ca9190610b5b565b6108e7565b90506103ec81856101200151600a6108ca9190610c56565b6000816000036108f657600080fd5b82600003610906575060006106f2565b81610912600185610dfb565b61091c9190610cb9565b610226906001610b48565b6000806109366012600a610c56565b610941906001610b5b565b64e8d4a510008560c0015161095a8787600001516109fa565b6109649190610b5b565b61096e9190610b5b565b6103ec9190610cb9565b6000808260800151604001514261098f9190610dfb565b60808401515161099f9190610b5b565b8360800151602001516109b29190610b48565b905060006109bf856107e1565b905060008160400151426109d39190610dfb565b82516109df9190610b5b565b82602001516109ee9190610b48565b90506105218184610b48565b6000826101200151600a610a0e9190610c56565b6102269083610b5b565b60405180610160016040528060008152602001600081526020016000815260200160008152602001610a6460405180606001604052806000815260200160008152602001600081525090565b815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b6001600160a01b0381168114610aab57600080fd5b50565b600080600060608486031215610ac357600080fd5b8335610ace81610a96565b92506020840135610ade81610a96565b91506040840135610aee81610a96565b809150509250925092565b60008060408385031215610b0c57600080fd5b8235610b1781610a96565b91506020830135610b2781610a96565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b808201808211156106f2576106f2610b32565b80820281158282048414176106f2576106f2610b32565b600181815b80851115610bad578160001904821115610b9357610b93610b32565b80851615610ba057918102915b93841c9390800290610b77565b509250929050565b600082610bc4575060016106f2565b81610bd1575060006106f2565b8160018114610be75760028114610bf157610c0d565b60019150506106f2565b60ff841115610c0257610c02610b32565b50506001821b6106f2565b5060208310610133831016604e8410600b8410161715610c30575081810a6106f2565b610c3a8383610b72565b8060001904821115610c4e57610c4e610b32565b029392505050565b60006102268383610bb5565b8181036000831280158383131683831282161715610c8257610c82610b32565b5092915050565b80518015158114610c9957600080fd5b919050565b600060208284031215610cb057600080fd5b61022682610c89565b600082610cd657634e487b7160e01b600052601260045260246000fd5b500490565b60008060008060808587031215610cf157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60008060008060008060008060008060008b8d036101a0811215610d3457600080fd5b8c519b5060208d01519a5060408d0151995060608d015198506060607f1982011215610d5f57600080fd5b506040516060810181811067ffffffffffffffff82111715610d9157634e487b7160e01b600052604160045260246000fd5b806040525060808d0151815260a08d0151602082015260c08d015160408201528097505060e08c015195506101008c015194506101208c015193506101408c015192506101608c01519150610de96101808d01610c89565b90509295989b509295989b9093969950565b818103818111156106f2576106f2610b32565b600080600060608486031215610e2357600080fd5b835192506020840151915060408401519050925092509256fea264697066735822122041488375584208ff5ee08a1c8377342d6861e7290ac51da794fda4c0ec337c5464736f6c63430008150033"; + "0x608060405234801561001057600080fd5b50610f1e806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a6e91adf1161005b578063a6e91adf14610120578063b09758f014610141578063c03d887114610154578063f44364c51461016757600080fd5b8063347c5d431461008257806354510b9d146100b55780635d242b97146100d8575b600080fd5b610095610090366004610b16565b61017a565b604080519384526020840192909252908201526060015b60405180910390f35b6100c86100c3366004610b16565b6101d7565b60405190151581526020016100ac565b6100eb6100e6366004610b61565b610231565b604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e0016100ac565b61013361012e366004610b16565b6102b7565b6040519081526020016100ac565b6100c861014f366004610b16565b61037d565b610133610162366004610b16565b6103fb565b610133610175366004610b16565b61050b565b60008060008061018b878787610557565b905060006101998888610627565b905060006101a889838561070e565b50905060008184604001516101bd9190610bb0565b8451602090950151949b949a509850929650505050505050565b6000806101e5858585610557565b905060006101f38686610627565b60808101515190915060000361020e5760019250505061022a565b600061021b87838561083f565b60409092015190911115925050505b9392505050565b6000806000806000806000806102478a8a610627565b905060006102548b6108de565b805160808401515191925060009161026c9190610bb0565b61027a906301e13380610bc3565b60e084015184516020860151604087015160c088015160a090980151929e50909c509a509498509096509450919250505092959891949750929550565b6000806102c5858585610557565b905060006102d38686610627565b6080810151519091506000036102ee5760009250505061022a565b60006102fb87838561070e565b509050600081846040015185602001516103159190610bb0565b61031f9190610bb0565b9050600061032d848361098b565b9050600061035f6103406012600a610cbe565b61034b906064610bc3565b6103559084610bc3565b86604001516109e1565b865190915061036f908290610cca565b9a9950505050505050505050565b604051635881fc3360e01b81526001600160a01b038381166004830152828116602483015260009190851690635881fc3390604401602060405180830381865afa1580156103cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f39190610cf1565b949350505050565b600080610409858585610557565b905060006104178686610627565b8251909150158061042b5750608081015151155b1561043b5760009250505061022a565b60006104478284610a21565b905060006104576012600a610cbe565b610462906064610bc3565b60408401516104719084610bc3565b61047b9190610d13565b9050600061048a89858761070e565b509050600081866040015187602001516104a49190610bb0565b6104ae9190610bb0565b905060006104bc8285610cca565b90506000811380156104d15750808660c00151105b1561036f576001600160ff1b038660c0015111156104f757506001600160ff1b0361036f565b5060c08501519a9950505050505050505050565b600080610519858585610557565b905060006105278686610627565b6080810151519091506000036105425760009250505061022a565b61054d86828461083f565b9695505050505050565b6105826040518060800160405280600081526020016000815260200160008152602001600081525090565b60405163e2c7283f60e01b81526001600160a01b038481166004830152838116602483015260009182918291829189169063e2c7283f90604401608060405180830381865afa1580156105d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fd9190610d35565b60408051608081018252948552602085019390935291830152606082015298975050505050505050565b61062f610a90565b60008060008060008060008060008b6001600160a01b031663c665471f8c6040518263ffffffff1660e01b815260040161067891906001600160a01b0391909116815260200190565b61016060405180830381865afa158015610696573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ba9190610d6b565b6040805161012081018252998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e083015261010082015299505050505050505050505b92915050565b6000806000856001600160a01b031663336d391e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610751573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107759190610e38565b6001600160a01b031663cf5696cb61078c886108de565b87608001516040518363ffffffff1660e01b81526004016107ae929190610e55565b602060405180830381865afa1580156107cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ef9190610e8e565b905060006107ff6012600a610cbe565b61080a906064610bc3565b6020860151606087015161081e9085610ea7565b6108289190610bc3565b6108329190610d13565b9791965090945050505050565b60008061084d85858561070e565b509050600081846040015185602001516108679190610bb0565b6108719190610bb0565b9050806000036108865760009250505061022a565b835160000361089b576000199250505061022a565b60006108a78686610a21565b90506108d36108b86012600a610cbe565b6108c3906064610bc3565b6108cd9084610bc3565b826109e1565b979650505050505050565b61090260405180606001604052806000815260200160008152602001600081525090565b6000806000846001600160a01b03166313f60c9a6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610945573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109699190610eba565b6040805160608101825293845260208401929092529082015295945050505050565b600061022a61099c6012600a610cbe565b6109a7906001610bc3565b6109b19084610bc3565b6101008501516109c290600a610cbe565b64e8d4a510008660a001516109d79190610bc3565b6109e19190610bc3565b6000816000036109f057600080fd5b82600003610a0057506000610708565b81610a0c600185610ea7565b610a169190610d13565b61022a906001610bb0565b600080610a306012600a610cbe565b610a3b906001610bc3565b64e8d4a510008560a00151610a54878760000151610a72565b610a5e9190610bc3565b610a689190610bc3565b6103f39190610d13565b6000826101000151600a610a869190610cbe565b61022a9083610bc3565b60405180610120016040528060008152602001600081526020016000815260200160008152602001610adc60405180606001604052806000815260200160008152602001600081525090565b8152602001600081526020016000815260200160008152602001600081525090565b6001600160a01b0381168114610b1357600080fd5b50565b600080600060608486031215610b2b57600080fd5b8335610b3681610afe565b92506020840135610b4681610afe565b91506040840135610b5681610afe565b809150509250925092565b60008060408385031215610b7457600080fd5b8235610b7f81610afe565b91506020830135610b8f81610afe565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561070857610708610b9a565b808202811582820484141761070857610708610b9a565b600181815b80851115610c15578160001904821115610bfb57610bfb610b9a565b80851615610c0857918102915b93841c9390800290610bdf565b509250929050565b600082610c2c57506001610708565b81610c3957506000610708565b8160018114610c4f5760028114610c5957610c75565b6001915050610708565b60ff841115610c6a57610c6a610b9a565b50506001821b610708565b5060208310610133831016604e8410600b8410161715610c98575081810a610708565b610ca28383610bda565b8060001904821115610cb657610cb6610b9a565b029392505050565b600061022a8383610c1d565b8181036000831280158383131683831282161715610cea57610cea610b9a565b5092915050565b600060208284031215610d0357600080fd5b8151801515811461022a57600080fd5b600082610d3057634e487b7160e01b600052601260045260246000fd5b500490565b60008060008060808587031215610d4b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b6000806000806000806000806000898b03610160811215610d8b57600080fd5b8a51995060208b0151985060408b0151975060608b015196506060607f1982011215610db657600080fd5b506040516060810181811067ffffffffffffffff82111715610de857634e487b7160e01b600052604160045260246000fd5b806040525060808b0151815260a08b0151602082015260c08b015160408201528095505060e08a015193506101008a015192506101208a015191506101408a015190509295985092959850929598565b600060208284031215610e4a57600080fd5b815161022a81610afe565b8251815260208084015181830152604080850151818401528351606084015290830151608083015282015160a082015260c0810161022a565b600060208284031215610ea057600080fd5b5051919050565b8181038181111561070857610708610b9a565b600080600060608486031215610ecf57600080fd5b835192506020840151915060408401519050925092509256fea264697066735822122088a8bbf0e50731659250053affd0c6fd68855ae8488831075089108d8fcb0b1864736f6c63430008150033"; type VaultGettersConstructorParams = | [signer?: Signer] diff --git a/src/generated/factories/VaultRouter__factory.ts b/src/generated/factories/VaultRouter__factory.ts index e234d5c..342ca08 100644 --- a/src/generated/factories/VaultRouter__factory.ts +++ b/src/generated/factories/VaultRouter__factory.ts @@ -12,43 +12,156 @@ import type { NonPayableOverrides } from "../common"; import type { VaultRouter, VaultRouterInterface } from "../VaultRouter"; const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, { inputs: [ { internalType: "uint256", - name: "parameterIndex", + name: "expectedLength", + type: "uint256", + }, + { + internalType: "uint256", + name: "length", type: "uint256", }, ], + name: "InvalidEncodedParameterLength", + type: "error", + }, + { + inputs: [], name: "MisMatchedInputsLength", type: "error", }, { + inputs: [], + name: "NewOwnerIsZeroAddress", + type: "error", + }, + { + inputs: [], + name: "NoHandoverRequest", + type: "error", + }, + { + inputs: [], + name: "Unauthorized", + type: "error", + }, + { + inputs: [], + name: "UnsafeCast", + type: "error", + }, + { + anonymous: false, inputs: [ { - internalType: "contract Vault[]", - name: "_vaultContracts", - type: "address[]", + indexed: true, + internalType: "address", + name: "pendingOwner", + type: "address", + }, + ], + name: "OwnershipHandoverCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "pendingOwner", + type: "address", + }, + ], + name: "OwnershipHandoverRequested", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldOwner", + type: "address", }, { - internalType: "enum VaultRouter.Operations[]", - name: "_operations", - type: "uint8[]", + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_vaultAddress", + type: "address", + }, + { + internalType: "bool", + name: "isMax", + type: "bool", + }, + ], + name: "approveTokenForVault", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "cancelOwnershipHandover", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ { - internalType: "contract ERC20[]", - name: "_collateralTokens", - type: "address[]", + internalType: "address", + name: "pendingOwner", + type: "address", }, + ], + name: "completeOwnershipHandover", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ { - internalType: "address[]", - name: "_tos", - type: "address[]", + internalType: "bytes", + name: "_packedOperations", + type: "bytes", }, { - internalType: "uint256[]", - name: "_amounts", - type: "uint256[]", + internalType: "bytes[]", + name: "_encodedParameters", + type: "bytes[]", }, ], name: "multiInteract", @@ -56,10 +169,69 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "result", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "pendingOwner", + type: "address", + }, + ], + name: "ownershipHandoverExpiresAt", + outputs: [ + { + internalType: "uint256", + name: "result", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "requestOwnershipHandover", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "payable", + type: "function", + }, ] as const; const _bytecode = - "0x608060405234801561001057600080fd5b5061070b806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063b54fb88e14610030575b600080fd5b61004361003e366004610534565b610045565b005b8887811461006e57604051638aa3abdb60e01b8152600160048201526024015b60405180910390fd5b80861461009157604051638aa3abdb60e01b815260026004820152602401610065565b8084146100b457604051638aa3abdb60e01b815260036004820152602401610065565b8082146100d657604051638aa3abdb60e01b8152600481810152602401610065565b3360005b828110156104d95760008b8b838181106100f6576100f661063b565b905060200201602081019061010b9190610651565b600381111561011c5761011c610625565b03610205578c8c828181106101335761013361063b565b90506020020160208101906101489190610691565b6001600160a01b031663f970c3b78a8a848181106101685761016861063b565b905060200201602081019061017d9190610691565b848888868181106101905761019061063b565b6040516001600160e01b031960e088901b1681526001600160a01b039586166004820152949093166024850152506020909102013560448201526064015b600060405180830381600087803b1580156101e857600080fd5b505af11580156101fc573d6000803e3d6000fd5b505050506104c9565b60018b8b838181106102195761021961063b565b905060200201602081019061022e9190610651565b600381111561023f5761023f610625565b03610325578c8c828181106102565761025661063b565b905060200201602081019061026b9190610691565b6001600160a01b0316635820ba638a8a8481811061028b5761028b61063b565b90506020020160208101906102a09190610691565b848a8a868181106102b3576102b361063b565b90506020020160208101906102c89190610691565b8989878181106102da576102da61063b565b60405160e088901b6001600160e01b03191681526001600160a01b039687166004820152948616602486015292909416604484015260209091020135606482015260840190506101ce565b60028b8b838181106103395761033961063b565b905060200201602081019061034e9190610651565b600381111561035f5761035f610625565b036103ab578c8c828181106103765761037661063b565b905060200201602081019061038b9190610691565b6001600160a01b03166349a66ca38a8a8481811061028b5761028b61063b565b60038b8b838181106103bf576103bf61063b565b90506020020160208101906103d49190610651565b60038111156103e5576103e5610625565b036104c9578c8c828181106103fc576103fc61063b565b90506020020160208101906104119190610691565b6001600160a01b0316634fa739198a8a848181106104315761043161063b565b90506020020160208101906104469190610691565b848888868181106104595761045961063b565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b1580156104b057600080fd5b505af11580156104c4573d6000803e3d6000fd5b505050505b6104d2816106ae565b90506100da565b50505050505050505050505050565b60008083601f8401126104fa57600080fd5b50813567ffffffffffffffff81111561051257600080fd5b6020830191508360208260051b850101111561052d57600080fd5b9250929050565b60008060008060008060008060008060a08b8d03121561055357600080fd5b8a3567ffffffffffffffff8082111561056b57600080fd5b6105778e838f016104e8565b909c509a5060208d013591508082111561059057600080fd5b61059c8e838f016104e8565b909a50985060408d01359150808211156105b557600080fd5b6105c18e838f016104e8565b909850965060608d01359150808211156105da57600080fd5b6105e68e838f016104e8565b909650945060808d01359150808211156105ff57600080fd5b5061060c8d828e016104e8565b915080935050809150509295989b9194979a5092959850565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561066357600080fd5b81356004811061067257600080fd5b9392505050565b6001600160a01b038116811461068e57600080fd5b50565b6000602082840312156106a357600080fd5b813561067281610679565b6000600182016106ce57634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220806b08789d39a4ca103e0821f09ca0454dfa8a6b48de5c9d2049eaf104c3249464736f6c63430008150033"; + "0x608060405234801561001057600080fd5b5061001a3361001f565b61005b565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b61146e8061006a6000396000f3fe6080604052600436106100865760003560e01c8063715018a611610059578063715018a6146100dd5780638da5cb5b146100e5578063f04e283e14610116578063f2fde38b14610129578063fee81cf41461013c57600080fd5b8063256929621461008b5780632b492640146100955780633f7d7bc9146100b557806354d1f13d146100d5575b600080fd5b61009361017d565b005b3480156100a157600080fd5b506100936100b0366004610e5e565b6101cd565b3480156100c157600080fd5b506100936100d0366004610f38565b610c36565b610093610c5c565b610093610c98565b3480156100f157600080fd5b50638b78c6d819546040516001600160a01b0390911681526020015b60405180910390f35b610093610124366004610f88565b610cac565b610093610137366004610f88565b610cec565b34801561014857600080fd5b5061016f610157366004610f88565b63389a75e1600c908152600091909152602090205490565b60405190815260200161010d565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b8281146101ed57604051633a89615b60e01b815260040160405180910390fd5b6000805b82811015610c2e5785858281811061020b5761020b610fac565b919091013560f81c92506000905082600981111561022b5761022b610fc2565b600981111561023c5761023c610fc2565b14610c2e5760058260ff16600981111561025857610258610fc2565b600981111561026957610269610fc2565b036103975761029d84848381811061028357610283610fac565b90506020028101906102959190610fd8565b610120610d13565b60008060008060008888878181106102b7576102b7610fac565b90506020028101906102c99190610fd8565b8101906102d691906110c9565b6040805160a0810182526001600160a01b03871660608201908152608082018790528152602080820186905281830185905282518084018452308152908101879052915163187945bd60e11b8152969b5094995092975090955093506e22d473030f116ddee9f6b43ac78ba3926330f28b7a9261035b9290913390879060040161117c565b600060405180830381600087803b15801561037557600080fd5b505af1158015610389573d6000803e3d6000fd5b505050505050505050610c26565b60068260ff1660098111156103ae576103ae610fc2565b60098111156103bf576103bf610fc2565b03610546576103f38484838181106103d9576103d9610fac565b90506020028101906103eb9190610fd8565b610140610d13565b60008060008060008089898881811061040e5761040e610fac565b90506020028101906104209190610fd8565b81019061042d9190611200565b9550955095509550955095506e22d473030f116ddee9f6b43ac78ba36001600160a01b0316632b67b57033604051806060016040528060405180608001604052808c6001600160a01b031681526020016104908c6001600160a01b038016610d41565b6001600160a01b031681526020016104ae8b65ffffffffffff610d41565b65ffffffffffff1681526020016104cd8a65ffffffffffff8016610d41565b65ffffffffffff16905281523060208201526040908101879052516001600160e01b031960e085901b1681526105099291908690600401611275565b600060405180830381600087803b15801561052357600080fd5b505af1158015610537573d6000803e3d6000fd5b50505050505050505050610c26565b60078260ff16600981111561055d5761055d610fc2565b600981111561056e5761056e610fc2565b03610679576105a184848381811061058857610588610fac565b905060200281019061059a9190610fd8565b6040610d13565b6000808585848181106105b6576105b6610fac565b90506020028101906105c89190610fd8565b8101906105d591906112f3565b90925090506e22d473030f116ddee9f6b43ac78ba36336c785163330610602856001600160a01b03610d41565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529183166024830152821660448201529085166064820152608401600060405180830381600087803b15801561065a57600080fd5b505af115801561066e573d6000803e3d6000fd5b505050505050610c26565b60018260ff16600981111561069057610690610fc2565b60098111156106a1576106a1610fc2565b03610784576106d48484838181106106bb576106bb610fac565b90506020028101906106cd9190610fd8565b6060610d13565b60008060008686858181106106eb576106eb610fac565b90506020028101906106fd9190610fd8565b81019061070a919061131f565b60405163f970c3b760e01b81526001600160a01b0380841660048301523360248301526044820183905293965091945092509084169063f970c3b7906064015b600060405180830381600087803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b50505050505050610c26565b60028260ff16600981111561079b5761079b610fc2565b60098111156107ac576107ac610fc2565b0361089c576107df8484838181106107c6576107c6610fac565b90506020028101906107d89190610fd8565b6080610d13565b6000806000808787868181106107f7576107f7610fac565b90506020028101906108099190610fd8565b8101906108169190611360565b604051635820ba6360e01b81526001600160a01b038085166004830152336024830152808416604483015260648201839052949850929650909450925090851690635820ba63906084015b600060405180830381600087803b15801561087b57600080fd5b505af115801561088f573d6000803e3d6000fd5b5050505050505050610c26565b60038260ff1660098111156108b3576108b3610fc2565b60098111156108c4576108c4610fc2565b03610964576108de8484838181106107c6576107c6610fac565b6000806000808787868181106108f6576108f6610fac565b90506020028101906109089190610fd8565b8101906109159190611360565b6040516349a66ca360e01b81526001600160a01b0380851660048301523360248301528084166044830152606482018390529498509296509094509250908516906349a66ca390608401610861565b60048260ff16600981111561097b5761097b610fc2565b600981111561098c5761098c610fc2565b03610a20576109a68484838181106106bb576106bb610fac565b60008060008686858181106109bd576109bd610fac565b90506020028101906109cf9190610fd8565b8101906109dc919061131f565b604051634fa7391960e01b81526001600160a01b03808416600483015233602483015260448201839052939650919450925090841690634fa739199060640161074a565b60088260ff166009811115610a3757610a37610fc2565b6009811115610a4857610a48610fc2565b03610b8657610a7c848483818110610a6257610a62610fac565b9050602002810190610a749190610fd8565b610100610d13565b600080600080878786818110610a9457610a94610fac565b9050602002810190610aa69190610fd8565b810190610ab391906113b1565b935093509350935060008082806020019051810190610ad29190611414565b91509150600083604081518110610aeb57610aeb610fac565b016020015160405163d505accf60e01b8152336004820152306024820152604481018890526064810187905260f89190911c6084820181905260a4820185905260c4820184905291506001600160a01b0388169063d505accf9060e401600060405180830381600087803b158015610b6257600080fd5b505af1158015610b76573d6000803e3d6000fd5b5050505050505050505050610c26565b60098260ff166009811115610b9d57610b9d610fc2565b6009811115610bae57610bae610fc2565b03610c2657610bc884848381811061058857610588610fac565b600080858584818110610bdd57610bdd610fac565b9050602002810190610bef9190610fd8565b810190610bfc91906112f3565b91509150816001600160a01b03163b600003610c1757600080fd5b610c2382333084610d6b565b50505b6001016101f1565b505050505050565b610c3e610dbf565b610c57838383610c4f576000610dda565b600019610dda565b505050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b610ca0610dbf565b610caa6000610e20565b565b610cb4610dbf565b63389a75e1600c52806000526020600c208054421115610cdc57636f5e88186000526004601cfd5b60009055610ce981610e20565b50565b610cf4610dbf565b8060601b610d0a57637448fbae6000526004601cfd5b610ce981610e20565b808214610c575760405163582379b960e11b8152600481018290526024810183905260440160405180910390fd5b600082821015610d645760405163c4bd89a960e01b815260040160405180910390fd5b5090919050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af13d156001600051141716610db157637939f4246000526004601cfd5b600060605260405250505050565b638b78c6d819543314610caa576382b429006000526004601cfd5b816014528060345263095ea7b360601b60005260206000604460106000875af13d156001600051141716610e1657633e3f8f736000526004601cfd5b6000603452505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b60008060008060408587031215610e7457600080fd5b843567ffffffffffffffff80821115610e8c57600080fd5b818701915087601f830112610ea057600080fd5b813581811115610eaf57600080fd5b886020828501011115610ec157600080fd5b602092830196509450908601359080821115610edc57600080fd5b818701915087601f830112610ef057600080fd5b813581811115610eff57600080fd5b8860208260051b8501011115610f1457600080fd5b95989497505060200194505050565b6001600160a01b0381168114610ce957600080fd5b600080600060608486031215610f4d57600080fd5b8335610f5881610f23565b92506020840135610f6881610f23565b915060408401358015158114610f7d57600080fd5b809150509250925092565b600060208284031215610f9a57600080fd5b8135610fa581610f23565b9392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b6000808335601e19843603018112610fef57600080fd5b83018035915067ffffffffffffffff82111561100a57600080fd5b60200191503681900382131561101f57600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261104d57600080fd5b813567ffffffffffffffff8082111561106857611068611026565b604051601f8301601f19908116603f0116810190828211818310171561109057611090611026565b816040528381528660208588010111156110a957600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a086880312156110e157600080fd5b85356110ec81610f23565b9450602086013593506040860135925060608601359150608086013567ffffffffffffffff81111561111d57600080fd5b6111298882890161103c565b9150509295509295909350565b6000815180845260005b8181101561115c57602081850181015186830182015201611140565b506000602082860101526020601f19601f83011685010191505092915050565b600061010061119f83885180516001600160a01b03168252602090810151910152565b60208701516040840152604087015160608401526111d3608084018780516001600160a01b03168252602090810151910152565b6001600160a01b03851660c084015260e083018190526111f581840185611136565b979650505050505050565b60008060008060008060c0878903121561121957600080fd5b863561122481610f23565b95506020870135945060408701359350606087013592506080870135915060a087013567ffffffffffffffff81111561125c57600080fd5b61126889828a0161103c565b9150509295509295509295565b600061010060018060a01b0380871684528551818151166020860152816020820151166040860152604081015165ffffffffffff80821660608801528060608401511660808801525050508060208701511660a085015250604085015160c08401528060e08401526112e981840185611136565b9695505050505050565b6000806040838503121561130657600080fd5b823561131181610f23565b946020939093013593505050565b60008060006060848603121561133457600080fd5b833561133f81610f23565b9250602084013561134f81610f23565b929592945050506040919091013590565b6000806000806080858703121561137657600080fd5b843561138181610f23565b9350602085013561139181610f23565b925060408501356113a181610f23565b9396929550929360600135925050565b600080600080608085870312156113c757600080fd5b84356113d281610f23565b93506020850135925060408501359150606085013567ffffffffffffffff8111156113fc57600080fd5b6114088782880161103c565b91505092959194509250565b6000806040838503121561142757600080fd5b50508051602090910151909290915056fea264697066735822122002d0219beb8676a13f2c86e79246f9b974b7fc22b9374067fa3536150410ae3c64736f6c63430008150033"; type VaultRouterConstructorParams = | [signer?: Signer] diff --git a/src/generated/factories/Vault__factory.ts b/src/generated/factories/Vault__factory.ts index 03ff630..1301ced 100644 --- a/src/generated/factories/Vault__factory.ts +++ b/src/generated/factories/Vault__factory.ts @@ -30,81 +30,73 @@ const _abi = [ name: "_baseRate", type: "uint256", }, + { + internalType: "uint256", + name: "_debtCeiling", + type: "uint256", + }, ], stateMutability: "nonpayable", type: "constructor", }, { inputs: [], - name: "AccessControlBadConfirmation", + name: "AlreadyInitialized", type: "error", }, { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "neededRole", - type: "bytes32", - }, - ], - name: "AccessControlUnauthorizedAccount", + inputs: [], + name: "BadCollateralRatio", type: "error", }, { - inputs: [ - { - internalType: "address", - name: "target", - type: "address", - }, - ], - name: "AddressEmptyCode", + inputs: [], + name: "CollateralAlreadyExists", type: "error", }, { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "AddressInsufficientBalance", + inputs: [], + name: "CollateralDebtCeilingExceeded", type: "error", }, { inputs: [], - name: "BadCollateralRatio", + name: "CollateralDoesNotExist", type: "error", }, { inputs: [], - name: "CollateralAlreadyExists", + name: "CollateralRatioNotImproved", type: "error", }, { inputs: [], - name: "CollateralDoesNotExist", + name: "EthTransferFailed", type: "error", }, { inputs: [], - name: "CollateralRatioNotImproved", + name: "GlobalDebtCeilingExceeded", type: "error", }, { inputs: [], - name: "EthTransferFailed", + name: "InsufficientCurrencyAmountToPay", type: "error", }, { inputs: [], - name: "FailedInnerCall", + name: "InvalidStabilityModule", + type: "error", + }, + { + inputs: [], + name: "NewOwnerIsZeroAddress", + type: "error", + }, + { + inputs: [], + name: "NoHandoverRequest", type: "error", }, { @@ -112,6 +104,11 @@ const _abi = [ name: "NotEnoughCollateralToPay", type: "error", }, + { + inputs: [], + name: "NotFeedContract", + type: "error", + }, { inputs: [], name: "NotOwnerOrReliedUpon", @@ -133,19 +130,13 @@ const _abi = [ type: "error", }, { - inputs: [ - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "SafeERC20FailedOperation", + inputs: [], + name: "TotalUserCollateralBelowFloor", type: "error", }, { inputs: [], - name: "TotalUserCollateralBelowFloor", + name: "Unauthorized", type: "error", }, { @@ -313,74 +304,44 @@ const _abi = [ inputs: [ { indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - indexed: true, - internalType: "bytes32", - name: "previousAdminRole", - type: "bytes32", - }, - { - indexed: true, - internalType: "bytes32", - name: "newAdminRole", - type: "bytes32", + internalType: "address", + name: "pendingOwner", + type: "address", }, ], - name: "RoleAdminChanged", + name: "OwnershipHandoverCanceled", type: "event", }, { anonymous: false, inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, { indexed: true, internalType: "address", - name: "account", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "sender", + name: "pendingOwner", type: "address", }, ], - name: "RoleGranted", + name: "OwnershipHandoverRequested", type: "event", }, { anonymous: false, inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, { indexed: true, internalType: "address", - name: "account", + name: "oldOwner", type: "address", }, { indexed: true, internalType: "address", - name: "sender", + name: "newOwner", type: "address", }, ], - name: "RoleRevoked", + name: "OwnershipTransferred", type: "event", }, { @@ -396,32 +357,6 @@ const _abi = [ stateMutability: "view", type: "function", }, - { - inputs: [], - name: "DEFAULT_ADMIN_ROLE", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "accruedFees", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [], name: "baseRateInfo", @@ -448,7 +383,7 @@ const _abi = [ { inputs: [ { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "_collateralToken", type: "address", }, @@ -468,10 +403,17 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "cancelOwnershipHandover", + outputs: [], + stateMutability: "payable", + type: "function", + }, { inputs: [ { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "", type: "address", }, @@ -520,11 +462,6 @@ const _abi = [ name: "rateInfo", type: "tuple", }, - { - internalType: "uint256", - name: "paidFees", - type: "uint256", - }, { internalType: "uint256", name: "price", @@ -545,19 +482,27 @@ const _abi = [ name: "additionalCollateralPrecision", type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { - internalType: "bool", - name: "exists", - type: "bool", + internalType: "address", + name: "pendingOwner", + type: "address", }, ], - stateMutability: "view", + name: "completeOwnershipHandover", + outputs: [], + stateMutability: "payable", type: "function", }, { inputs: [ { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "_collateralToken", type: "address", }, @@ -605,6 +550,19 @@ const _abi = [ stateMutability: "view", type: "function", }, + { + inputs: [], + name: "debtCeiling", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -621,7 +579,7 @@ const _abi = [ { inputs: [ { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "_collateralToken", type: "address", }, @@ -642,19 +600,13 @@ const _abi = [ type: "function", }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - ], - name: "getRoleAdmin", + inputs: [], + name: "feedModule", outputs: [ { - internalType: "bytes32", + internalType: "address", name: "", - type: "bytes32", + type: "address", }, ], stateMutability: "view", @@ -663,49 +615,35 @@ const _abi = [ { inputs: [ { - internalType: "bytes32", - name: "role", - type: "bytes32", + internalType: "contract ERC20Token", + name: "_collateralToken", + type: "address", }, { internalType: "address", - name: "account", + name: "_owner", type: "address", }, - ], - name: "grantRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, { internalType: "address", - name: "account", + name: "_to", type: "address", }, - ], - name: "hasRole", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", + internalType: "uint256", + name: "_currencyAmountToPay", + type: "uint256", }, ], - stateMutability: "view", + name: "liquidate", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "_collateralToken", type: "address", }, @@ -721,41 +659,45 @@ const _abi = [ }, { internalType: "uint256", - name: "_currencyAmountToPay", + name: "_amount", type: "uint256", }, ], - name: "liquidate", + name: "mintCurrency", outputs: [], stateMutability: "nonpayable", type: "function", }, { - inputs: [ - { - internalType: "contract ERC20", - name: "_collateralToken", - type: "address", - }, + inputs: [], + name: "owner", + outputs: [ { internalType: "address", - name: "_owner", + name: "result", type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { internalType: "address", - name: "_to", + name: "pendingOwner", type: "address", }, + ], + name: "ownershipHandoverExpiresAt", + outputs: [ { internalType: "uint256", - name: "_amount", + name: "result", type: "uint256", }, ], - name: "mintCurrency", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { @@ -778,6 +720,19 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, + { + inputs: [], + name: "rateModule", + outputs: [ + { + internalType: "contract IRate", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -834,39 +789,30 @@ const _abi = [ type: "function", }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "callerConfirmation", - type: "address", - }, - ], - name: "renounceRole", + inputs: [], + name: "renounceOwnership", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + inputs: [], + name: "requestOwnershipHandover", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "stabilityModule", + outputs: [ { internalType: "address", - name: "account", + name: "", type: "address", }, ], - name: "revokeRole", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { @@ -885,20 +831,14 @@ const _abi = [ { inputs: [ { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", + internalType: "address", + name: "newOwner", + type: "address", }, ], - stateMutability: "view", + name: "transferOwnership", + outputs: [], + stateMutability: "payable", type: "function", }, { @@ -924,7 +864,7 @@ const _abi = [ { inputs: [ { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "_collateralToken", type: "address", }, @@ -946,18 +886,13 @@ const _abi = [ }, { inputs: [ - { - internalType: "contract ERC20", - name: "_collateralToken", - type: "address", - }, { internalType: "uint256", - name: "_rate", + name: "_debtCeiling", type: "uint256", }, ], - name: "updateCollateralRate", + name: "updateDebtCeiling", outputs: [], stateMutability: "nonpayable", type: "function", @@ -966,11 +901,11 @@ const _abi = [ inputs: [ { internalType: "address", - name: "_feedContract", + name: "_feedModule", type: "address", }, ], - name: "updateFeedContract", + name: "updateFeedModule", outputs: [], stateMutability: "nonpayable", type: "function", @@ -978,7 +913,7 @@ const _abi = [ { inputs: [ { - internalType: "address", + internalType: "contract ERC20Token", name: "_collateralAddress", type: "address", }, @@ -993,6 +928,19 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, + { + inputs: [ + { + internalType: "contract IRate", + name: "_rateModule", + type: "address", + }, + ], + name: "updateRateModule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -1009,7 +957,7 @@ const _abi = [ { inputs: [ { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "", type: "address", }, @@ -1048,7 +996,7 @@ const _abi = [ { inputs: [ { - internalType: "contract ERC20", + internalType: "contract ERC20Token", name: "_collateralToken", type: "address", }, @@ -1074,18 +1022,7 @@ const _abi = [ type: "function", }, { - inputs: [ - { - internalType: "contract ERC20", - name: "_collateralToken", - type: "address", - }, - { - internalType: "uint256", - name: "_amount", - type: "uint256", - }, - ], + inputs: [], name: "withdrawFees", outputs: [], stateMutability: "nonpayable", @@ -1094,7 +1031,7 @@ const _abi = [ ] as const; const _bytecode = - "0x60a06040523480156200001157600080fd5b506040516200352f3803806200352f833981016040819052620000349162000111565b60026001556200004660003362000062565b506001600160a01b03909116608052426004556002556200014d565b6000828152602081815260408083206001600160a01b038516845290915281205460ff1662000107576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620000be3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016200010b565b5060005b92915050565b600080604083850312156200012557600080fd5b82516001600160a01b03811681146200013d57600080fd5b6020939093015192949293505050565b6080516133956200019a6000396000818161060a015281816118d401528181611c6c01528181611d03015281816122b30152818161241c015281816125640152612b7201526133956000f3fe608060405234801561001057600080fd5b50600436106102265760003560e01c8063645ba4251161012a578063ad3b1b47116100bd578063da3b77031161008c578063e72531c811610071578063e72531c814610605578063f970c3b714610651578063feaea5861461066457600080fd5b8063da3b770314610592578063e2c7283f146105a557600080fd5b8063ad3b1b4714610462578063b80a0a7714610475578063c665471f1461047e578063d547741f1461057f57600080fd5b806391d14854116100f957806391d14854146103f05780639c52a7f114610434578063a217fddf14610447578063aab3f8681461044f57600080fd5b8063645ba425146103b957806365fae35e146103cc578063682c2058146103df5780638456cb59146103e857600080fd5b806336568abe116101bd57806349a66ca31161018c57806357b35a781161017157806357b35a78146103655780635820ba63146103785780635881fc331461038b57600080fd5b806349a66ca31461033f5780634fa739191461035257600080fd5b806336568abe146102fe5780633f4ba83a146103115780634522fa8514610319578063457972de1461032c57600080fd5b8063200d2ed2116101f9578063200d2ed2146102ac578063248a9ca3146102b55780632f2ff15d146102d8578063330283aa146102eb57600080fd5b806301ffc9a71461022b5780630408ccd6146102535780630dca59c11461026857806313f60c9a1461027f575b600080fd5b61023e610239366004612ed0565b610677565b60405190151581526020015b60405180910390f35b610266610261366004612f34565b610710565b005b61027160055481565b60405190815260200161024a565b60025460035460045461029192919083565b6040805193845260208401929092529082015260600161024a565b61027160015481565b6102716102c3366004612f51565b60009081526020819052604090206001015490565b6102666102e6366004612f6a565b610785565b6102666102f9366004612f51565b6107b0565b61026661030c366004612f6a565b610831565b61026661088a565b610266610327366004612f34565b6108d9565b61026661033a366004612f9a565b610949565b61026661034d366004612fc6565b610a41565b610266610360366004613017565b610c85565b610266610373366004613058565b610e12565b610266610386366004612fc6565b610fae565b61023e61039936600461308c565b600a60209081526000928352604080842090915290825290205460ff1681565b6102666103c73660046130ba565b611184565b6102666103da366004612f34565b611378565b61027160065481565b61026661140f565b61023e6103fe366004612f6a565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b610266610442366004612f34565b61145c565b610271600081565b61026661045d366004612fc6565b6114f0565b610266610470366004612f9a565b611780565b61027160075481565b61050c61048c366004612f34565b60086020818152600092835260409283902080546001820154600283015460038401548751606081018952600486015481526005860154968101969096526006850154978601979097526007840154958401546009850154600a860154600b870154600c9097015495999498939794969495939492939192909160ff168b565b604080519b8c526020808d019b909b528b81019990995260608b0197909752855160808b01529785015160a08a0152939095015160c088015260e087019190915261010086015261012085019290925261014084019190915261016083019190915215156101808201526101a00161024a565b61026661058d366004612f6a565b61195e565b6102666105a0366004612f9a565b611983565b6105e56105b336600461308c565b600960209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b60408051948552602085019390935291830152606082015260800161024a565b61062c7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161024a565b61026661065f366004613017565b611a9b565b61026661067236600461308c565b611c24565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061070a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b600180540361074b576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061075681611f83565b6107807fa05d8775623c9cb9a7c26c4d686f58ed0f717cdbd1543265197fc098bd63969683611f90565b505050565b6000828152602081905260409020600101546107a081611f83565b6107aa8383611f90565b50505050565b60018054036107eb576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006107f681611f83565b6002546004546108069042613135565b6108109190613148565b6003805460009061082290849061315f565b90915550504260045550600255565b73ffffffffffffffffffffffffffffffffffffffff81163314610880576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610780828261208c565b6002600154036108c6576040517f6cd6020100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006108d181611f83565b506002600155565b6001805403610914576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061091f81611f83565b6107807fd30e44b6367b3271655a8fdafcfc17a83191efab29a626ed0c76e1f42d65e33283611f90565b6001805403610984576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fd30e44b6367b3271655a8fdafcfc17a83191efab29a626ed0c76e1f42d65e3326109ae81611f83565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16610a12576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505073ffffffffffffffffffffffffffffffffffffffff90911660009081526008602081905260409091200155565b6001805403610a7c576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600860205260409020600c0154849060ff16610ae0576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff81163314801590610b38575073ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020908152604080832033845290915290205460ff16155b15610b6f576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600960209081526040808320948a16835293815283822092825260089052919091208154600a8201541115610bed576040517f8464610300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600182015415610c0657610c018183612147565b610c15565b610c0f816121a7565b60038301555b8673ffffffffffffffffffffffffffffffffffffffff167f2794e993350ecd3e426a1d6ba9554613ee597988342e95658e5e97a12156585286604051610c5d91815260200190565b60405180910390a2610c718183888861221a565b610c7b81836122e2565b5050505050505050565b6001805403610cc0576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16610d24576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff81163314801590610d7c575073ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020908152604080832033845290915290205460ff16155b15610db3576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808616600081815260096020908152604080832094891683529381528382209282526008905291909120610dfc8183612147565b610e09818388898961232d565b50505050505050565b6001805403610e4d576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610e5881611f83565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600860205260409020600c0154849060ff16610ebc576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516600090815260086020526040812090856003811115610ef457610ef4613172565b03610f055760098101849055610fa6565b6001856003811115610f1957610f19613172565b03610f2a57600a8101849055610fa6565b6002856003811115610f3e57610f3e613172565b03610f4f5760038101849055610fa6565b6003856003811115610f6357610f63613172565b03610f745760028101849055610fa6565b6040517f9d2ff48000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b6001805403610fe9576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600860205260409020600c0154849060ff1661104d576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff811633148015906110a5575073ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020908152604080832033845290915290205460ff16155b156110dc576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600960209081526040808320948a16835293815283822092825260089052919091206111258183612147565b6040805173ffffffffffffffffffffffffffffffffffffffff8881168252602082018890528916917f45892a46e6cef329bb642da6d69846d324db43d19008edc141ed82382eda1bee910160405180910390a2610c71888888886125e8565b60018054036111bf576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006111ca81611f83565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600860205260409020600c81015460ff161561122e576040517fbf508dc400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004808201889055426006830155600282018790556003820186905560098201859055600a8201849055604080517f313ce567000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff8b169263313ce567928082019260209290918290030181865afa1580156112c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e591906131a1565b6112f39060ff166012613135565b600b820155600c810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905560405173ffffffffffffffffffffffffffffffffffffffff891681527f8abd6b05a86c62b0ddaec80e50ab0326ee89a599589d4b4126cf8f94ff3d0a879060200160405180910390a15050505050505050565b60018054036113b3576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600180540361144a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061145581611f83565b5060018055565b6001805403611497576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600a6020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600180540361152b576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600860205260409020600c0154849060ff1661158f576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8086166000818152600960209081526040808320948916835293815283822092825260089052919091206115d88183612147565b60006115e48284612677565b905081600201548111611623576040517f819a066c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8503611661578260020154836001015461165e919061315f565b94505b600061166d83876126e3565b9050600061167d6012600a6132e4565b611688906001613148565b60038501546116979084613148565b6116a191906132f0565b905060006116af828461315f565b86549091508111156116bf575084545b60408051338152602081018a905290810182905273ffffffffffffffffffffffffffffffffffffffff8b16907f1f0c6615429d1cdae0dfa233abf91d3b31cdbdd82c8081389832a61e1072f1ea9060600160405180910390a26117248b8b8b846125e8565b61173185878c338c61232d565b61173b8587612677565b8411611773576040517f07af690800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050565b60018054036117bb576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fa05d8775623c9cb9a7c26c4d686f58ed0f717cdbd1543265197fc098bd6396966117e581611f83565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16611849576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff841660009081526008602052604081206007018054859290611881908490613135565b92505081905550826007600082825461189a9190613135565b90915550506040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044015b6020604051808303816000875af1158015611933573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611957919061332b565b5050505050565b60008281526020819052604090206001015461197981611f83565b6107aa838361208c565b60018054036119be576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006119c981611f83565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16611a2d576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020526040902060048101546006820154611a669042613135565b611a709190613148565b600582018054600090611a8490849061315f565b909155505042600682015560040192909255505050565b6001805403611ad6576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600860205260409020600c0154839060ff16611b3a576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff81163314801590611b92575073ffffffffffffffffffffffffffffffffffffffff81166000908152600a6020908152604080832033845290915290205460ff16155b15611bc9576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff167fd7243f6f8212d5188fd054141cf6ea89cfc0d91facb8c3afe2f88a135848014284604051611c1191815260200190565b60405180910390a261195785858561273b565b6001805403611c5f576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c6a81611f83565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611e17576007546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb9185919084906370a0823190602401602060405180830381865afa158015611d55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d79919061334d565b611d839190613135565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015611df3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa919061332b565b73ffffffffffffffffffffffffffffffffffffffff8316611ecc5760008273ffffffffffffffffffffffffffffffffffffffff164760405160006040518083038185875af1925050503d8060008114611e8c576040519150601f19603f3d011682016040523d82523d6000602084013e611e91565b606091505b50509050806107aa576040517f6d963f8800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316600081815260086020526040908190205490517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015285926107aa9284928792906370a0823190602401602060405180830381865afa158015611f50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f74919061334d565b611f7e9190613135565b612906565b611f8d8133612987565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff166120845760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556120223390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161070a565b50600061070a565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff16156120845760008381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161070a565b6000806121548484612a12565b915091508083600301819055508160000361216f5750505050565b81836002016000828254612183919061315f565b92505081905550816006600082825461219c919061315f565b909155505050505050565b600681015460009081906121bb9042613135565b60048401546121ca9190613148565b60058401546121d9919061315f565b6004549091506000906121ec9042613135565b6002546121f99190613148565b600354612206919061315f565b9050612212818361315f565b949350505050565b8083600101600082825461222e919061315f565b9250508190555080846001016000828254612249919061315f565b925050819055508060056000828254612262919061315f565b90915550506040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401611914565b81600201546122f18383612677565b1115612329576040517f963c7ede00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b8360010154811161248f578084600101600082825461234c9190613135565b92505081905550808560010160008282546123679190613135565b9250508190555080600560008282546123809190613135565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8416907fcb55e9f35638c4fdb4390d3a385ac1d72a8f72e4dcf0eb1f3c79d144b1023f859060200160405180910390a26040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906044016020604051808303816000875af1158015612465573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612489919061332b565b50611957565b6001808501805460009182905591870180548392906124af908490613135565b9250508190555080600560008282546124c89190613135565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8516907fcb55e9f35638c4fdb4390d3a385ac1d72a8f72e4dcf0eb1f3c79d144b1023f859060200160405180910390a26040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906044016020604051808303816000875af11580156125ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d1919061332b565b50610fa6868686866125e38688613135565b612a6f565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526009602090815260408083209387168352929052908120805483929061262c908490613135565b909155505073ffffffffffffffffffffffffffffffffffffffff841660009081526008602052604081208054839290612666908490613135565b909155506107aa9050848383612906565b6000808260020154836001015461268e919061315f565b9050806000036126a257600091505061070a565b60006126ae8585612bdf565b90506126da6126bf6012600a6132e4565b6126ca906001613148565b6126d49084613148565b82612c30565b95945050505050565b6000806127246126f56012600a6132e4565b612700906001613148565b61270a9085613148565b64e8d4a51000866008015461271f9190613148565b612c30565b90506122128185600b0154600a61271f91906132e4565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401602060405180830381865afa1580156127a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127cc919061334d565b90506127da84843085612c77565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090829073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa158015612849573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286d919061334d565b6128779190613135565b73ffffffffffffffffffffffffffffffffffffffff80871660009081526009602090815260408083209389168352929052908120805492935083929091906128c090849061315f565b909155505073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020526040812080548392906128fa90849061315f565b90915550505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261078091859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612cbd565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16612329576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602481018390526044015b60405180910390fd5b6000806000612a20856121a7565b90506000612a306012600a6132e4565b612a3b906001613148565b60018601546003870154612a4f9085613135565b612a599190613148565b612a6391906132f0565b96919550909350505050565b80846002016000828254612a839190613135565b925050819055508060066000828254612a9c9190613135565b9250508190555080856007016000828254612ab7919061315f565b925050819055508060076000828254612ad0919061315f565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8416907f6a41f86b2a18fe00e10a9bd078e790ae82c2627a6f940166bddc2db475194a5f9060200160405180910390a26040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152306024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af1158015612bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa6919061332b565b600080612bee6012600a6132e4565b612bf9906001613148565b64e8d4a510008560080154612c12878760000154612d53565b612c1c9190613148565b612c269190613148565b61221291906132f0565b600081600003612c3f57600080fd5b82600003612c4f5750600061070a565b81612c5b600185613135565b612c6591906132f0565b612c7090600161315f565b9392505050565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526107aa9186918216906323b872dd90608401612940565b6000612cdf73ffffffffffffffffffffffffffffffffffffffff841683612d70565b90508051600014158015612d04575080806020019051810190612d02919061332b565b155b15610780576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401612a09565b600082600b0154600a612d6691906132e4565b612c709083613148565b6060612c7083836000846000808573ffffffffffffffffffffffffffffffffffffffff168486604051612da39190613366565b60006040518083038185875af1925050503d8060008114612de0576040519150601f19603f3d011682016040523d82523d6000602084013e612de5565b606091505b5091509150612df5868383612dff565b9695505050505050565b606082612e1457612e0f82612e8e565b612c70565b8151158015612e38575073ffffffffffffffffffffffffffffffffffffffff84163b155b15612e87576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401612a09565b5080612c70565b805115612e9e5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060208284031215612ee257600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612c7057600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114611f8d57600080fd5b600060208284031215612f4657600080fd5b8135612c7081612f12565b600060208284031215612f6357600080fd5b5035919050565b60008060408385031215612f7d57600080fd5b823591506020830135612f8f81612f12565b809150509250929050565b60008060408385031215612fad57600080fd5b8235612fb881612f12565b946020939093013593505050565b60008060008060808587031215612fdc57600080fd5b8435612fe781612f12565b93506020850135612ff781612f12565b9250604085013561300781612f12565b9396929550929360600135925050565b60008060006060848603121561302c57600080fd5b833561303781612f12565b9250602084013561304781612f12565b929592945050506040919091013590565b60008060006060848603121561306d57600080fd5b833561307881612f12565b925060208401356004811061304757600080fd5b6000806040838503121561309f57600080fd5b82356130aa81612f12565b91506020830135612f8f81612f12565b60008060008060008060c087890312156130d357600080fd5b86356130de81612f12565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561070a5761070a613106565b808202811582820484141761070a5761070a613106565b8082018082111561070a5761070a613106565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000602082840312156131b357600080fd5b815160ff81168114612c7057600080fd5b600181815b8085111561321d57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561320357613203613106565b8085161561321057918102915b93841c93908002906131c9565b509250929050565b6000826132345750600161070a565b816132415750600061070a565b816001811461325757600281146132615761327d565b600191505061070a565b60ff84111561327257613272613106565b50506001821b61070a565b5060208310610133831016604e8410600b84101617156132a0575081810a61070a565b6132aa83836131c4565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156132dc576132dc613106565b029392505050565b6000612c708383613225565b600082613326577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561333d57600080fd5b81518015158114612c7057600080fd5b60006020828403121561335f57600080fd5b5051919050565b6000825160005b81811015613387576020818601810151858301520161336d565b50600092019182525091905056"; + "0x60a06040523480156200001157600080fd5b50604051620031bc380380620031bc83398101604081905262000034916200009e565b6002600055620000443362000062565b6001600160a01b0390921660805242600655600455600755620000e3565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b600080600060608486031215620000b457600080fd5b83516001600160a01b0381168114620000cc57600080fd5b602085015160409095015190969495509392505050565b60805161308c62000130600039600081816107b801528181610d4201528181611d4c01528181611de30152818161215b015281816122ff015281816124470152612abe015261308c6000f3fe6080604052600436106102855760003560e01c806365fae35e11610153578063d707eed5116100cb578063f04e283e1161007f578063f970c3b711610064578063f970c3b71461082d578063feaea5861461084d578063fee81cf41461086d57600080fd5b8063f04e283e14610807578063f2fde38b1461081a57600080fd5b8063e2c7283f116100b0578063e2c7283f14610739578063e72531c8146107a6578063ea061ad4146107da57600080fd5b8063d707eed514610703578063e1c84ea41461072357600080fd5b80639c52a7f111610122578063aab3f86811610107578063aab3f868146105da578063b80a0a77146105fa578063c665471f1461061057600080fd5b80639c52a7f11461058d578063a12ad552146105ad57600080fd5b806365fae35e1461051c578063715018a61461053c5780638456cb59146105445780638da5cb5b1461055957600080fd5b80633f4ba83a1161020157806354d1f13d116101b55780635820ba631161019a5780635820ba63146104915780635881fc33146104b1578063645ba425146104fc57600080fd5b806354d1f13d1461046957806357b35a781461047157600080fd5b8063476343ee116101e6578063476343ee1461041457806349a66ca3146104295780634fa739191461044957600080fd5b80633f4ba83a146103df578063457972de146103f457600080fd5b806313f60c9a11610258578063256929621161023d5780632569296214610365578063330283aa1461036d578063336d391e1461038d57600080fd5b806313f60c9a14610315578063200d2ed21461034f57600080fd5b80630408ccd61461028a5780630ae5ccab146102ac5780630dca59c1146102cc5780631218c5fd146102f5575b600080fd5b34801561029657600080fd5b506102aa6102a5366004612c22565b6108a0565b005b3480156102b857600080fd5b506102aa6102c7366004612c22565b61092b565b3480156102d857600080fd5b506102e260085481565b6040519081526020015b60405180910390f35b34801561030157600080fd5b506102aa610310366004612c3f565b6109b6565b34801561032157600080fd5b5060045460055460065461033492919083565b604080519384526020840192909252908201526060016102ec565b34801561035b57600080fd5b506102e260005481565b6102aa6109ff565b34801561037957600080fd5b506102aa610388366004612c3f565b610a4f565b34801561039957600080fd5b506003546103ba9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102ec565b3480156103eb57600080fd5b506102aa610b36565b34801561040057600080fd5b506102aa61040f366004612c58565b610b45565b34801561042057600080fd5b506102aa610c61565b34801561043557600080fd5b506102aa610444366004612c84565b610db4565b34801561045557600080fd5b506102aa610464366004612cd5565b61111f565b6102aa6111df565b34801561047d57600080fd5b506102aa61048c366004612d16565b61121b565b34801561049d57600080fd5b506102aa6104ac366004612c84565b61142c565b3480156104bd57600080fd5b506104ec6104cc366004612d4a565b600c60209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016102ec565b34801561050857600080fd5b506102aa610517366004612d83565b6115c5565b34801561052857600080fd5b506102aa610537366004612c22565b611786565b6102aa61181e565b34801561055057600080fd5b506102aa611826565b34801561056557600080fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927546103ba565b34801561059957600080fd5b506102aa6105a8366004612c22565b611835565b3480156105b957600080fd5b506002546103ba9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105e657600080fd5b506102aa6105f5366004612c84565b6118ca565b34801561060657600080fd5b506102e260095481565b34801561061c57600080fd5b506106a161062b366004612c22565b600a6020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040160405180606001604052908160008201548152602001600182015481526020016002820154815250509080600701549080600801549080600901549080600a0154905089565b60408051998a526020808b0199909952898101979097526060890195909552835160808901529583015160a0880152919093015160c086015260e0850192909252610100840191909152610120830191909152610140820152610160016102ec565b34801561070f57600080fd5b506102aa61071e366004612c22565b611b1d565b34801561072f57600080fd5b506102e260075481565b34801561074557600080fd5b50610786610754366004612d4a565b600b60209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016102ec565b3480156107b257600080fd5b506103ba7f000000000000000000000000000000000000000000000000000000000000000081565b3480156107e657600080fd5b506001546103ba9073ffffffffffffffffffffffffffffffffffffffff1681565b6102aa610815366004612c22565b611ba8565b6102aa610828366004612c22565b611be8565b34801561083957600080fd5b506102aa610848366004612cd5565b611c0f565b34801561085957600080fd5b506102aa610868366004612d4a565b611d0e565b34801561087957600080fd5b506102e2610888366004612c22565b63389a75e1600c908152600091909152602090205490565b6001600054036108dc576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108e4612043565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600160005403610967576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61096f612043565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6001600054036109f2576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109fa612043565b600755565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b600160005403610a8b576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a93612043565b6003546040517fd14a27fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063d14a27fd90610ae9906004908101612dcf565b602060405180830381865afa158015610b06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2a9190612df0565b60055542600655600455565b610b3e612043565b6002600055565b600160005403610b81576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a6020526040812060040154839103610be3576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025473ffffffffffffffffffffffffffffffffffffffff163314610c34576040517f16ee083800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff9091166000908152600a6020526040902060070155565b600160005403610c9d576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015473ffffffffffffffffffffffffffffffffffffffff1680610ced576040517fd389b01000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6009805460009091556040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015610d8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610daf9190612e09565b505050565b600160005403610df0576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600a6020526040812060040154859103610e52576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff81163314801590610eaa575073ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832033845290915290205460ff16155b15610ee1576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600b60209081526040808320948a168352938152838220928252600a905291909120815460098201541115610f5f576040517f8464610300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60075485600854610f709190612e5a565b1115610fa8576040517fdd0b23bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060080154858260010154610fbd9190612e5a565b1115610ff5576040517fa99870f800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018201541561100e57611009818361207b565b6110af565b6003546040517fcf5696cb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063cf5696cb9061106890600490858201908201612e6d565b602060405180830381865afa158015611085573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a99190612df0565b60038301555b8673ffffffffffffffffffffffffffffffffffffffff167f2794e993350ecd3e426a1d6ba9554613ee597988342e95658e5e97a121565852866040516110f791815260200190565b60405180910390a261110b818388886120c2565b61111581836121c9565b5050505050505050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600a6020526040812060040154849103611181576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8085166000818152600b602090815260408083209488168352938152838220928252600a9052919091206111ca818361207b565b6111d78183873388612210565b505050505050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b600160005403611257576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61125f612043565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600a60205260408120600401548491036112c1576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600a60205260408120908460048111156112f9576112f9612ea9565b036113ae576003546040517fd14a27fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063d14a27fd906113569060048086019101612dcf565b602060405180830381865afa158015611373573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113979190612df0565b600582015542600682015560048101839055611425565b60018460048111156113c2576113c2612ea9565b036113d35760088101839055611425565b60028460048111156113e7576113e7612ea9565b036113f85760098101839055611425565b600384600481111561140c5761140c612ea9565b0361141d5760038101839055611425565b600281018390555b5050505050565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600a602052604081206004015485910361148e576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff811633148015906114e6575073ffffffffffffffffffffffffffffffffffffffff81166000908152600c6020908152604080832033845290915290205460ff16155b1561151d576040517fed76312100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8087166000818152600b60209081526040808320948a168352938152838220928252600a905291909120611566818361207b565b6040805173ffffffffffffffffffffffffffffffffffffffff8881168252602082018890528916917f45892a46e6cef329bb642da6d69846d324db43d19008edc141ed82382eda1bee910160405180910390a261110b888888886124ca565b600160005403611601576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611609612043565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600a6020526040902060048101541561166a576040517fbf508dc400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600480820187905542600683015560028201869055600382018590556008820184905560098201839055604080517f313ce567000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff8a169263313ce567928082019260209290918290030181865afa1580156116fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117219190612ed8565b61172f9060ff166012612efb565b600a82015560405173ffffffffffffffffffffffffffffffffffffffff881681527f8abd6b05a86c62b0ddaec80e50ab0326ee89a599589d4b4126cf8f94ff3d0a879060200160405180910390a150505050505050565b6001600054036117c2576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600c6020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b610285612043565b61182e612043565b6001600055565b600160005403611871576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600c6020908152604080832073ffffffffffffffffffffffffffffffffffffffff9490941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600a602052604081206004015485910361192c576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8086166000818152600b602090815260408083209489168352938152838220928252600a905291909120611975818361207b565b6000611981828461257c565b9050816002015481116119c0576040517f819a066c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85036119fe57826002015483600101546119fb9190612e5a565b94505b6000611a0a838761261c565b90506000611a1a6012600a61302e565b611a2590606461303a565b6003850154611a34908461303a565b611a3e9190613051565b90506000611a4c8284612e5a565b8654909150811115611a5c575084545b60408051338152602081018a905290810182905273ffffffffffffffffffffffffffffffffffffffff8b16907f1f0c6615429d1cdae0dfa233abf91d3b31cdbdd82c8081389832a61e1072f1ea9060600160405180910390a2611ac18b8b8b846124ca565b611ace85878c338c612210565b611ad8858761257c565b8411611b10576040517f07af690800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050565b600160005403611b59576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b61612043565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611bb0612043565b63389a75e1600c52806000526020600c208054421115611bd857636f5e88186000526004601cfd5b60009055611be581612680565b50565b611bf0612043565b8060601b611c0657637448fbae6000526004601cfd5b611be581612680565b600160005403611c4b576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600a6020526040812060040154849103611cad576040517f0d8b6eb700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff167fd7243f6f8212d5188fd054141cf6ea89cfc0d91facb8c3afe2f88a135848014283604051611cf591815260200190565b60405180910390a2611d088484846126e6565b50505050565b600160005403611d4a576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611ed3576009546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb9184919084906370a0823190602401602060405180830381865afa158015611e35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e599190612df0565b611e639190612efb565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015610d8b573d6000803e3d6000fd5b73ffffffffffffffffffffffffffffffffffffffff8216611f885760008173ffffffffffffffffffffffffffffffffffffffff164760405160006040518083038185875af1925050503d8060008114611f48576040519150601f19603f3d011682016040523d82523d6000602084013e611f4d565b606091505b5050905080610daf576040517f6d963f8800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000818152600a6020526040908190205490517f70a082310000000000000000000000000000000000000000000000000000000081523060048201528492610daf9284928692906370a0823190602401602060405180830381865afa15801561200c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120309190612df0565b61203a9190612efb565b6128b1565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314612079576382b429006000526004601cfd5b565b6000806120888484612900565b91509150808360030181905550816000036120a35750505050565b818360020160008282546120b79190612e5a565b909155505050505050565b808360010160008282546120d69190612e5a565b92505081905550808460010160008282546120f19190612e5a565b92505081905550806008600082825461210a9190612e5a565b90915550506040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f19906044015b6020604051808303816000875af11580156121a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114259190612e09565b81600201546121d8838361257c565b111561203f576040517f963c7ede00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83600101548111612372578084600101600082825461222f9190612efb565b925050819055508085600101600082825461224a9190612efb565b9250508190555080600860008282546122639190612efb565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8416907fcb55e9f35638c4fdb4390d3a385ac1d72a8f72e4dcf0eb1f3c79d144b1023f859060200160405180910390a26040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906044016020604051808303816000875af1158015612348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061236c9190612e09565b50611425565b600180850180546000918290559187018054839290612392908490612efb565b9250508190555080600860008282546123ab9190612efb565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8516907fcb55e9f35638c4fdb4390d3a385ac1d72a8f72e4dcf0eb1f3c79d144b1023f859060200160405180910390a26040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906044016020604051808303816000875af1158015612490573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b49190612e09565b506111d78585856124c58587612efb565b6129ef565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600b602090815260408083209387168352929052908120805483929061250e908490612efb565b909155505073ffffffffffffffffffffffffffffffffffffffff84166000908152600a602052604081208054839290612548908490612efb565b909155505073ffffffffffffffffffffffffffffffffffffffff84163b60000361257157600080fd5b611d088483836128b1565b600080826002015483600101546125939190612e5a565b9050806000036125a7576000915050612616565b82546000036125d9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff915050612616565b60006125e58585612aed565b90506126116125f66012600a61302e565b61260190606461303a565b61260b908461303a565b82612b46565b925050505b92915050565b600082600a0154600a61262f919061302e565b64e8d4a510008460070154612644919061303a565b61264e919061303a565b61265a6012600a61302e565b61266590600161303a565b61266f908461303a565b6126799190613051565b9392505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401602060405180830381865afa158015612753573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127779190612df0565b905061278584333085612b86565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090829073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa1580156127f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128189190612df0565b6128229190612efb565b73ffffffffffffffffffffffffffffffffffffffff8087166000908152600b6020908152604080832093891683529290529081208054929350839290919061286b908490612e5a565b909155505073ffffffffffffffffffffffffffffffffffffffff85166000908152600a6020526040812080548392906128a5908490612e5a565b90915550505050505050565b81601452806034526fa9059cbb00000000000000000000000060005260206000604460106000875af13d1560016000511417166128f6576390b8ec186000526004601cfd5b6000603452505050565b6003546040517fcf5696cb0000000000000000000000000000000000000000000000000000000081526000918291829173ffffffffffffffffffffffffffffffffffffffff169063cf5696cb9061295f90600490898201908201612e6d565b602060405180830381865afa15801561297c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129a09190612df0565b905060006129b06012600a61302e565b6129bb90606461303a565b600186015460038701546129cf9085612efb565b6129d9919061303a565b6129e39190613051565b96919550909350505050565b80846002016000828254612a039190612efb565b925050819055508060096000828254612a1c9190612e5a565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8416907f6a41f86b2a18fe00e10a9bd078e790ae82c2627a6f940166bddc2db475194a5f9060200160405180910390a26040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152306024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90606401612186565b600080612afc6012600a61302e565b612b0790600161303a565b64e8d4a510008560070154612b20878760000154612be3565b612b2a919061303a565b612b34919061303a565b612b3e9190613051565b949350505050565b600081600003612b5557600080fd5b82600003612b6557506000612616565b81612b71600185612efb565b612b7b9190613051565b612679906001612e5a565b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c52602060006064601c6000895af13d156001600051141716612bd557637939f4246000526004601cfd5b600060605260405250505050565b600082600a0154600a612bf6919061302e565b612679908361303a565b73ffffffffffffffffffffffffffffffffffffffff81168114611be557600080fd5b600060208284031215612c3457600080fd5b813561267981612c00565b600060208284031215612c5157600080fd5b5035919050565b60008060408385031215612c6b57600080fd5b8235612c7681612c00565b946020939093013593505050565b60008060008060808587031215612c9a57600080fd5b8435612ca581612c00565b93506020850135612cb581612c00565b92506040850135612cc581612c00565b9396929550929360600135925050565b600080600060608486031215612cea57600080fd5b8335612cf581612c00565b92506020840135612d0581612c00565b929592945050506040919091013590565b600080600060608486031215612d2b57600080fd5b8335612d3681612c00565b9250602084013560058110612d0557600080fd5b60008060408385031215612d5d57600080fd5b8235612d6881612c00565b91506020830135612d7881612c00565b809150509250929050565b60008060008060008060c08789031215612d9c57600080fd5b8635612da781612c00565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b81548152600182015460208201526002820154604082015260608101612616565b600060208284031215612e0257600080fd5b5051919050565b600060208284031215612e1b57600080fd5b8151801515811461267957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561261657612616612e2b565b82548152600183015460208201526002830154604082015260c081018254606083015260018301546080830152600283015460a0830152612679565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060208284031215612eea57600080fd5b815160ff8116811461267957600080fd5b8181038181111561261657612616612e2b565b600181815b80851115612f6757817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115612f4d57612f4d612e2b565b80851615612f5a57918102915b93841c9390800290612f13565b509250929050565b600082612f7e57506001612616565b81612f8b57506000612616565b8160018114612fa15760028114612fab57612fc7565b6001915050612616565b60ff841115612fbc57612fbc612e2b565b50506001821b612616565b5060208310610133831016604e8410600b8410161715612fea575081810a612616565b612ff48383612f0e565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561302657613026612e2b565b029392505050565b60006126798383612f6f565b808202811582820484141761261657612616612e2b565b600082613087577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056"; type VaultConstructorParams = | [signer?: Signer] @@ -1116,20 +1053,28 @@ export class Vault__factory extends ContractFactory { override getDeployTransaction( _currencyToken: AddressLike, _baseRate: BigNumberish, + _debtCeiling: BigNumberish, overrides?: NonPayableOverrides & { from?: string } ): Promise { return super.getDeployTransaction( _currencyToken, _baseRate, + _debtCeiling, overrides || {} ); } override deploy( _currencyToken: AddressLike, _baseRate: BigNumberish, + _debtCeiling: BigNumberish, overrides?: NonPayableOverrides & { from?: string } ) { - return super.deploy(_currencyToken, _baseRate, overrides || {}) as Promise< + return super.deploy( + _currencyToken, + _baseRate, + _debtCeiling, + overrides || {} + ) as Promise< Vault & { deploymentTransaction(): ContractTransactionResponse; } diff --git a/src/generated/factories/index.ts b/src/generated/factories/index.ts index c79fa51..d89c425 100644 --- a/src/generated/factories/index.ts +++ b/src/generated/factories/index.ts @@ -4,6 +4,7 @@ export { Currency__factory } from "./Currency__factory"; export { Feed__factory } from "./Feed__factory"; export { MultiStaticcall__factory } from "./MultiStaticcall__factory"; +export { Rate__factory } from "./Rate__factory"; export { USDC__factory } from "./USDC__factory"; export { Vault__factory } from "./Vault__factory"; export { VaultGetters__factory } from "./VaultGetters__factory"; diff --git a/src/generated/index.ts b/src/generated/index.ts index 1dc4a69..e9deb46 100644 --- a/src/generated/index.ts +++ b/src/generated/index.ts @@ -4,6 +4,7 @@ export type { Currency } from "./Currency"; export type { Feed } from "./Feed"; export type { MultiStaticcall } from "./MultiStaticcall"; +export type { Rate } from "./Rate"; export type { USDC } from "./USDC"; export type { Vault } from "./Vault"; export type { VaultGetters } from "./VaultGetters"; @@ -12,6 +13,7 @@ export * as factories from "./factories"; export { Currency__factory } from "./factories/Currency__factory"; export { Feed__factory } from "./factories/Feed__factory"; export { MultiStaticcall__factory } from "./factories/MultiStaticcall__factory"; +export { Rate__factory } from "./factories/Rate__factory"; export { USDC__factory } from "./factories/USDC__factory"; export { Vault__factory } from "./factories/Vault__factory"; export { VaultGetters__factory } from "./factories/VaultGetters__factory"; diff --git a/src/index.ts b/src/index.ts index 9f3169a..d62ef96 100644 --- a/src/index.ts +++ b/src/index.ts @@ -286,7 +286,10 @@ async function create( } const chainId = (await provider.getNetwork()).chainId.toString(10); - if (![chainId].includes(SupportedNetwork.GOERLI)) { + if ( + ![chainId].includes(SupportedNetwork.BASE_GOERLI) || + ![chainId].includes(SupportedNetwork.BASE_SEPOLIA) + ) { throw new Error(`chainId '${chainId}' is not supported.`); } diff --git a/src/services/getters.ts b/src/services/getters.ts index f073fea..55b12d3 100644 --- a/src/services/getters.ts +++ b/src/services/getters.ts @@ -14,10 +14,10 @@ const getVault = async ( internal: Internal, signer: Signer, ) => { - const collateralAddress: any = getContractAddress(collateral)[chainId]; - const vaultContractAddress: any = getContractAddress('Vault')[chainId]; - const vaultGettersAddress: any = getContractAddress('VaultGetters')[chainId]; - const multiStaticcallAddress: any = getContractAddress('MultiStaticcall')[chainId]; + const collateralAddress: any = getContractAddress(collateral, chainId); + const vaultContractAddress: any = getContractAddress('Vault', chainId); + const vaultGettersAddress: any = getContractAddress('VaultGetters', chainId); + const multiStaticcallAddress: any = getContractAddress('MultiStaticcall', chainId); const multiStaticcallContract = Contract( multiStaticcallAddress, @@ -120,8 +120,8 @@ const getVault = async ( }; const checkVaultSetupStatus = async (owner: string, chainId: string, signer: Signer) => { - const vaultContractAddress: any = getContractAddress('Vault')[chainId]; - const vaultRouterAddress: any = getContractAddress('VaultRouter')[chainId]; + const vaultContractAddress: any = getContractAddress('Vault', chainId); + const vaultRouterAddress: any = getContractAddress('VaultRouter', chainId); const vaultContract = Contract(vaultContractAddress, Vault__factory.abi, signer); @@ -131,9 +131,9 @@ const checkVaultSetupStatus = async (owner: string, chainId: string, signer: Sig }; const getCollateralData = async (collateral: ICollateral, chainId: string, signer: Signer) => { - const collateralAddress: any = getContractAddress(collateral)[chainId]; - const vaultContractAddress: any = getContractAddress('Vault')[chainId]; - const vaultGetterAddress: any = getContractAddress('VaultGetters')[chainId]; + const collateralAddress: any = getContractAddress(collateral, chainId); + const vaultContractAddress: any = getContractAddress('Vault', chainId); + const vaultGetterAddress: any = getContractAddress('VaultGetters', chainId); const vaultGetterContract = Contract(vaultGetterAddress, VaultGetters__factory.abi, signer); diff --git a/src/services/utility.ts b/src/services/utility.ts index e748305..f0e8755 100644 --- a/src/services/utility.ts +++ b/src/services/utility.ts @@ -31,8 +31,8 @@ const approveCollateralToken = async ( internal: Internal, transaction: Transaction, ) => { - const collateralAddress: any = getContractAddress(collateral)[chainId]; - const vaultAddress: any = getContractAddress('Vault')[chainId]; + const collateralAddress: any = getContractAddress(collateral, chainId); + const vaultAddress: any = getContractAddress('Vault', chainId); const _amount = parseUnits(amount, 6); // build transaction object @@ -56,8 +56,8 @@ const approveCurrencyToken = async ( internal: Internal, transaction: Transaction, ) => { - const currnecyAddress: any = getContractAddress('Currency')[chainId]; - const vaultAddress: any = getContractAddress('Vault')[chainId]; + const currnecyAddress: any = getContractAddress('Currency', chainId); + const vaultAddress: any = getContractAddress('Vault', chainId); const _amount = parseEther(amount); // build transaction object @@ -75,7 +75,7 @@ const approveCurrencyToken = async ( }; const getCurrencyTokenBalance = async (owner: string, chainId: string, signer: Signer) => { - const currencyContractAddress: any = getContractAddress('Currency')[chainId]; + const currencyContractAddress: any = getContractAddress('Currency', chainId); const currencyContract = Contract(currencyContractAddress, Currency__factory.abi, signer); const balance = await currencyContract.balanceOf(owner); @@ -89,7 +89,7 @@ const getCollateralTokenBalance = async ( chainId: string, signer: Signer, ) => { - const collateralAddress: any = getContractAddress(collateral)[chainId]; + const collateralAddress: any = getContractAddress(collateral, chainId); const collateralContract = Contract(collateralAddress, USDC__factory.abi, signer); const balance = await collateralContract.balanceOf(owner); @@ -103,8 +103,8 @@ const getCollateralTokenAllowance = async ( chainId: string, signer: Signer, ) => { - const collateralAddress: any = getContractAddress(collateral)[chainId]; - const vaultAddress: any = getContractAddress('Vault')[chainId]; + const collateralAddress: any = getContractAddress(collateral, chainId); + const vaultAddress: any = getContractAddress('Vault', chainId); const collateralContract = Contract(collateralAddress, USDC__factory.abi, signer); const allowance = await collateralContract.allowance(owner, vaultAddress); diff --git a/src/services/vault.ts b/src/services/vault.ts index 2ed70a1..6bc871f 100644 --- a/src/services/vault.ts +++ b/src/services/vault.ts @@ -38,10 +38,10 @@ const setupVault = async ( transaction: Transaction, internal: Internal, ) => { - const vaultRouterAddress: any = getContractAddress('VaultRouter')[chainId]; + const vaultRouterAddress: any = getContractAddress('VaultRouter', chainId); // build transaction object - const to: any = getContractAddress('Vault')[chainId]; + const to: any = getContractAddress('Vault', chainId); let iface = internal.getInterface(Vault__factory.abi); const data = iface.encodeFunctionData('rely', [vaultRouterAddress]); @@ -64,13 +64,13 @@ const collateralizeVault = async ( transaction: Transaction, internal: Internal, ) => { - const collateralAddress: any = getContractAddress(collateral)[chainId]; - const vaultContractAddress: any = getContractAddress('Vault')[chainId]; + const collateralAddress: any = getContractAddress(collateral, chainId); + const vaultContractAddress: any = getContractAddress('Vault', chainId); const _amount = BigInt(amount) * BigInt(1e6); // build transaction object - const to: any = getContractAddress('VaultRouter')[chainId]; + const to: any = getContractAddress('VaultRouter', chainId); let iface = internal.getInterface(VaultRouter__factory.abi); const data = iface.encodeFunctionData('multiInteract', [ [vaultContractAddress], @@ -99,15 +99,15 @@ const withdrawCollateral = async ( internal: Internal, signer: Signer, ) => { - const collateralAddress: any = getContractAddress(collateral)[chainId]; - const vaultContractAddress: any = getContractAddress('Vault')[chainId]; - const vaultGetterAddress: any = getContractAddress('VaultGetters')[chainId]; + const collateralAddress: any = getContractAddress(collateral, chainId); + const vaultContractAddress: any = getContractAddress('Vault', chainId); + const vaultGetterAddress: any = getContractAddress('VaultGetters', chainId); const vaultGetterContract = Contract(vaultGetterAddress, VaultGetters__factory.abi, signer); const _amount = BigInt(amount) * BigInt(1e6); - const to: any = getContractAddress('VaultRouter')[chainId]; + const to: any = getContractAddress('VaultRouter', chainId); let iface = internal.getInterface(VaultRouter__factory.abi); const maxWithdrawable = await vaultGetterContract.getMaxWithdrawable( @@ -149,9 +149,9 @@ const mintCurrency = async ( internal: Internal, signer: Signer, ) => { - const collateralAddress: any = getContractAddress(collateral)[chainId]; - const vaultContractAddress: any = getContractAddress('Vault')[chainId]; - const vaultGetterAddress: any = getContractAddress('VaultGetters')[chainId]; + const collateralAddress: any = getContractAddress(collateral, chainId); + const vaultContractAddress: any = getContractAddress('Vault', chainId); + const vaultGetterAddress: any = getContractAddress('VaultGetters', chainId); const vaultGetterContract = Contract(vaultGetterAddress, VaultGetters__factory.abi, signer); @@ -170,7 +170,7 @@ const mintCurrency = async ( } // build transaction object - const to: any = getContractAddress('VaultRouter')[chainId]; + const to: any = getContractAddress('VaultRouter', chainId); let iface = internal.getInterface(VaultRouter__factory.abi); const data = iface.encodeFunctionData('multiInteract', [ [vaultContractAddress], @@ -199,10 +199,10 @@ const burnCurrency = async ( internal: Internal, signer: Signer, ) => { - const collateralAddress: any = getContractAddress(collateral)[chainId]; - const vaultContractAddress: any = getContractAddress('Vault')[chainId]; + const collateralAddress: any = getContractAddress(collateral, chainId); + const vaultContractAddress: any = getContractAddress('Vault', chainId); - const currencyContractAddress: any = getContractAddress('Currency')[chainId]; + const currencyContractAddress: any = getContractAddress('Currency', chainId); const currencyContract = Contract(currencyContractAddress, Currency__factory.abi, signer); @@ -217,7 +217,7 @@ const burnCurrency = async ( } // build transaction object - const to: any = getContractAddress('VaultRouter')[chainId]; + const to: any = getContractAddress('VaultRouter', chainId); let iface = internal.getInterface(VaultRouter__factory.abi); const data = iface.encodeFunctionData('multiInteract', [ [vaultContractAddress], From 5daf9f4ac85f7300a3b493a8405deae927598dea Mon Sep 17 00:00:00 2001 From: Njoku Emmanuel Date: Mon, 5 Feb 2024 23:02:22 +0100 Subject: [PATCH 2/5] chore: update tests --- src/index.ts | 7 +++---- test/getters.test.ts | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index d62ef96..e56e4d9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -268,6 +268,8 @@ async function create( collateral: ICollateral; }, ) { + const supportedNetworks = [SupportedNetwork.BASE_GOERLI, SupportedNetwork.BASE_SEPOLIA]; + // Validate required options if (!options.collateral) { throw new Error('Missing required options'); @@ -286,10 +288,7 @@ async function create( } const chainId = (await provider.getNetwork()).chainId.toString(10); - if ( - ![chainId].includes(SupportedNetwork.BASE_GOERLI) || - ![chainId].includes(SupportedNetwork.BASE_SEPOLIA) - ) { + if (!supportedNetworks.includes(chainId)) { throw new Error(`chainId '${chainId}' is not supported.`); } diff --git a/test/getters.test.ts b/test/getters.test.ts index 0f555eb..c96928e 100644 --- a/test/getters.test.ts +++ b/test/getters.test.ts @@ -7,7 +7,7 @@ config(); describe('Descent Protocol SDK Test', () => { let descent: DescentClass; let owner = '0x459D7FB72ac3dFB0666227B30F25A424A5583E9c'; - let rpcUrl = 'https://goerli.base.org'; + let rpcUrl = 'https://sepolia.base.org'; beforeAll(async () => { descent = await Descent.create('https', { From 494c1ecfeb04a7b5d3f73fea58b5dea3db80c658 Mon Sep 17 00:00:00 2001 From: Njoku Emmanuel Date: Tue, 6 Feb 2024 14:57:20 +0100 Subject: [PATCH 3/5] chore: implement batching functionality --- src/libs/utils.ts | 12 ++++----- src/services/vault.ts | 45 ++++++++++++++++++++++++-------- test/integration/descent.spec.ts | 4 +-- test/utility.test.ts | 2 +- test/vault.test.ts | 36 ++++++++++++------------- 5 files changed, 61 insertions(+), 38 deletions(-) diff --git a/src/libs/utils.ts b/src/libs/utils.ts index 532f9fc..16ea857 100644 --- a/src/libs/utils.ts +++ b/src/libs/utils.ts @@ -43,7 +43,7 @@ const approveUSDC = async ( const owner = await signer.getAddress(); // build transaction object - const to: any = getContractAddress('USDC')[chainId!]; + const to: any = getContractAddress('USDC', chainId); let iface = internal.getInterface(USDC__factory.abi); const data = iface.encodeFunctionData('approve', [spender, amount]); @@ -62,8 +62,8 @@ const waitTime = (seconds: number) => new Promise((resolve) => setTimeout(resolv // const updateTestPrice = async (signer: Signer) => { // const chainId = (await signer?.provider?.getNetwork())?.chainId.toString(); -// const collateralAddress: any = getContractAddress('USDC')[chainId!]; -// const feedContractAddress: any = getContractAddress('Feed')[chainId!]; +// const collateralAddress: any = getContractAddress('USDC', chainId); +// const feedContractAddress: any = getContractAddress('Feed', chainId); // const contract = new ContractManager(signer); // await (await contract.getVaultContract()).updateFeedContract(feedContractAddress); @@ -81,7 +81,7 @@ const waitTime = (seconds: number) => new Promise((resolve) => setTimeout(resolv // const setMinterRole = async (signer: Signer, owner: string) => { // const chainId = (await signer?.provider?.getNetwork())?.chainId.toString(); -// const vaultContractAddress: any = getContractAddress('Vault')[chainId!]; +// const vaultContractAddress: any = getContractAddress('Vault', chainId); // const contract = new ContractManager(signer); // await (await contract.getCurrencyContract()).setMinterRole(vaultContractAddress); @@ -92,7 +92,7 @@ const waitTime = (seconds: number) => new Promise((resolve) => setTimeout(resolv const getxNGNBalance = async (owner: any, signer?: Signer) => { const chainId = (await signer?.provider?.getNetwork())?.chainId.toString(); - const currencyContractAddress: any = getContractAddress('Currency')[chainId]; + const currencyContractAddress: any = getContractAddress('Currency', chainId); const currencyContract = Contract(currencyContractAddress, Currency__factory.abi, signer); const balance = await currencyContract.balanceOf(owner); @@ -115,7 +115,7 @@ const approvexNGN = async ( const _amount = BigInt(amount) * BigInt(10e18); // build transaction object - const to: any = getContractAddress('Currency')[chainId!]; + const to: any = getContractAddress('Currency', chainId); let iface = internal.getInterface(Currency__factory.abi); const data = iface.encodeFunctionData('approve', [spender, _amount]); diff --git a/src/services/vault.ts b/src/services/vault.ts index 6bc871f..b0e9629 100644 --- a/src/services/vault.ts +++ b/src/services/vault.ts @@ -8,6 +8,7 @@ import { parseEther, formatEther, Signer, + AbiCoder, } from 'ethers'; import { ICollateral, IContract } from '../types'; import { Transaction } from '../libs/transactions'; @@ -27,10 +28,19 @@ export enum VaultHealthFactor { SAFE = 'SAFE', } export enum VaultOperations { - DepositCollateral = 0, - WithdrawCollateral = 1, - MintCurrency = 2, - BurnCurrency = 3, + Invalid = 0, + // Vault operations + DepositCollateral = 1, + WithdrawCollateral = 2, + MintCurrency = 3, + BurnCurrency = 4, + // Permit2 operations + Permit2_PermitTransferFrom = 5, + Permit2_Permit = 5, + Permit2_TransferFrom = 6, + /// ERC20 Operations + ERC20_Permit = 7, + ERC20_TransferFrom = 8, } const setupVault = async ( owner: string, @@ -64,21 +74,34 @@ const collateralizeVault = async ( transaction: Transaction, internal: Internal, ) => { + const abiCoder = AbiCoder.defaultAbiCoder(); const collateralAddress: any = getContractAddress(collateral, chainId); const vaultContractAddress: any = getContractAddress('Vault', chainId); const _amount = BigInt(amount) * BigInt(1e6); + // encode // build transaction object const to: any = getContractAddress('VaultRouter', chainId); let iface = internal.getInterface(VaultRouter__factory.abi); - const data = iface.encodeFunctionData('multiInteract', [ - [vaultContractAddress], - [VaultOperations.DepositCollateral], - [collateralAddress], - [ethers.ZeroAddress], - [_amount], - ]); + + const packedOperations = ethers.solidityPacked( + ['uint8', 'uint8'], + [VaultOperations.ERC20_TransferFrom, VaultOperations.DepositCollateral], + ); + let encodedParameters = []; + + encodedParameters.push( + abiCoder.encode( + ['address', 'address', 'uint256'], + [vaultContractAddress, collateralAddress, _amount], + ), + ); + encodedParameters.push(abiCoder.encode(['address', 'uint256'], [collateralAddress, _amount])); + + console.log(encodedParameters, 'encoded parameters'); + + const data = iface.encodeFunctionData('multiInteract', [packedOperations, encodedParameters]); const txConfig = await internal.getTransactionConfig({ from: owner, diff --git a/test/integration/descent.spec.ts b/test/integration/descent.spec.ts index 5137ef2..e74e397 100644 --- a/test/integration/descent.spec.ts +++ b/test/integration/descent.spec.ts @@ -1,11 +1,11 @@ import { config } from 'dotenv'; import Descent from '../../dist/index.es'; -import type { IDescentClass } from '../../dist/types/types'; +import type { IDescentClass } from '../../dist/types'; config(); describe('Descent Protocol SDK Test', () => { - let descent: any; + let descent: IDescentClass; let owner = '0x459D7FB72ac3dFB0666227B30F25A424A5583E9c'; let rpcUrl = 'https://goerli.base.org'; diff --git a/test/utility.test.ts b/test/utility.test.ts index 57063ac..ab75947 100644 --- a/test/utility.test.ts +++ b/test/utility.test.ts @@ -8,7 +8,7 @@ config(); describe('Descent Protocol Utility Test', () => { let descent: DescentClass; let owner = '0x459D7FB72ac3dFB0666227B30F25A424A5583E9c'; - let rpcUrl = 'https://goerli.base.org'; + let rpcUrl = 'https://sepolia.base.org'; beforeAll(async () => { descent = await Descent.create('https', { diff --git a/test/vault.test.ts b/test/vault.test.ts index 8a66c14..f0ccc53 100644 --- a/test/vault.test.ts +++ b/test/vault.test.ts @@ -10,7 +10,7 @@ describe('Descent Protocol SDK Test', () => { let descent: DescentClass; let owner = '0x459D7FB72ac3dFB0666227B30F25A424A5583E9c'; let vault = '0xE2386C5eF4deC9d5815C60168e36c7153ba00D0C'; - let rpcUrl = 'https://goerli.base.org'; + let rpcUrl = 'https://sepolia.base.org'; let signer: Signer; @@ -26,9 +26,9 @@ describe('Descent Protocol SDK Test', () => { signer = new ethers.Wallet(process.env.PRIVATE_KEY!, provider); - const response = await descent.setupVault(); + // const response = await descent.setupVault(); - console.log('Vault setup'); + // console.log(response, 'Vault setup'); }, 120000); it('should deposit usdc into a vault', async () => { @@ -44,23 +44,23 @@ describe('Descent Protocol SDK Test', () => { expect(response).not.toBeNull; }, 500000); - it('should withdraw usdc from a vault', async () => { - const response = await descent.withdrawCollateral('50'); - await waitTime(60); - expect(response).not.toBeNull; - }, 200000); + // it('should withdraw usdc from a vault', async () => { + // const response = await descent.withdrawCollateral('50'); + // await waitTime(60); + // expect(response).not.toBeNull; + // }, 200000); - it('should mint xNGN from a vault to an address', async () => { - const response = await descent.borrowCurrency('10000'); + // it('should mint xNGN from a vault to an address', async () => { + // const response = await descent.borrowCurrency('10000'); - await waitTime(60); - expect(response).not.toBeNull; - }, 200000); + // await waitTime(60); + // expect(response).not.toBeNull; + // }, 200000); - it('should payback xNGN', async () => { - const response = await descent.repayCurrency('9000'); + // it('should payback xNGN', async () => { + // const response = await descent.repayCurrency('9000'); - await waitTime(60); - expect(response).not.toBeNull; - }, 200000); + // await waitTime(60); + // expect(response).not.toBeNull; + // }, 200000); }); From 8fcce568cd6c305a660f29f73f2c913f639bbc45 Mon Sep 17 00:00:00 2001 From: Njoku Emmanuel Date: Sun, 11 Feb 2024 10:33:46 +0100 Subject: [PATCH 4/5] chore: call vault contracts directly --- src/contracts/getContractAddresses.ts | 8 +-- src/services/vault.ts | 73 +++++++++------------------ test/vault.test.ts | 42 ++++++++------- 3 files changed, 51 insertions(+), 72 deletions(-) diff --git a/src/contracts/getContractAddresses.ts b/src/contracts/getContractAddresses.ts index 48645ed..be6a615 100644 --- a/src/contracts/getContractAddresses.ts +++ b/src/contracts/getContractAddresses.ts @@ -3,7 +3,7 @@ import { ContractName, SupportedNetwork } from './types'; const addresses: Record>> = { Vault: { [SupportedNetwork.BASE_GOERLI]: '0xE2386C5eF4deC9d5815C60168e36c7153ba00D0C', - [SupportedNetwork.BASE_SEPOLIA]: '0x18196CCaA8C2844c82B40a8bDCa27349C7466280', + [SupportedNetwork.BASE_SEPOLIA]: '0x3d35807343CbF4fDb16E42297F2214f62848D032', }, MultiStaticcall: { [SupportedNetwork.BASE_GOERLI]: '0x5226c32C94acdd44743FC5c376582d6782FA7592', @@ -19,18 +19,18 @@ const addresses: Record { - const abiCoder = AbiCoder.defaultAbiCoder(); const collateralAddress: any = getContractAddress(collateral, chainId); - const vaultContractAddress: any = getContractAddress('Vault', chainId); - const _amount = BigInt(amount) * BigInt(1e6); - // encode // build transaction object - const to: any = getContractAddress('VaultRouter', chainId); - let iface = internal.getInterface(VaultRouter__factory.abi); - - const packedOperations = ethers.solidityPacked( - ['uint8', 'uint8'], - [VaultOperations.ERC20_TransferFrom, VaultOperations.DepositCollateral], - ); - let encodedParameters = []; - - encodedParameters.push( - abiCoder.encode( - ['address', 'address', 'uint256'], - [vaultContractAddress, collateralAddress, _amount], - ), - ); - encodedParameters.push(abiCoder.encode(['address', 'uint256'], [collateralAddress, _amount])); - - console.log(encodedParameters, 'encoded parameters'); + const to: any = getContractAddress('Vault', chainId); + let iface = internal.getInterface(Vault__factory.abi); - const data = iface.encodeFunctionData('multiInteract', [packedOperations, encodedParameters]); + const data = iface.encodeFunctionData('depositCollateral', [collateralAddress, owner, _amount]); const txConfig = await internal.getTransactionConfig({ from: owner, @@ -130,8 +110,8 @@ const withdrawCollateral = async ( const _amount = BigInt(amount) * BigInt(1e6); - const to: any = getContractAddress('VaultRouter', chainId); - let iface = internal.getInterface(VaultRouter__factory.abi); + const to: any = getContractAddress('Vault', chainId); + let iface = internal.getInterface(Vault__factory.abi); const maxWithdrawable = await vaultGetterContract.getMaxWithdrawable( vaultContractAddress, @@ -144,14 +124,14 @@ const withdrawCollateral = async ( if (Number(amount) > Number(formattedMaxWithdrawable.toString())) { throw new Error(' Withdrawal amount is more than available collateral balance'); } + const recepientAddress = owner; // build transaction object - const data = iface.encodeFunctionData('multiInteract', [ - [vaultContractAddress], - [VaultOperations.WithdrawCollateral], - [collateralAddress], - [owner], - [_amount], + const data = iface.encodeFunctionData('withdrawCollateral', [ + collateralAddress, + owner, + recepientAddress, + _amount, ]); const txConfig = await internal.getTransactionConfig({ from: owner, @@ -192,15 +172,16 @@ const mintCurrency = async ( throw new Error(' Borrow amount is more than available currency borrowable'); } + const recepientAddress = owner; + // build transaction object - const to: any = getContractAddress('VaultRouter', chainId); - let iface = internal.getInterface(VaultRouter__factory.abi); - const data = iface.encodeFunctionData('multiInteract', [ - [vaultContractAddress], - [VaultOperations.MintCurrency], - [collateralAddress], - [owner], - [_amount], + const to: any = getContractAddress('Vault', chainId); + let iface = internal.getInterface(Vault__factory.abi); + const data = iface.encodeFunctionData('mintCurrency', [ + collateralAddress, + owner, + recepientAddress, + _amount, ]); const txConfig = await internal.getTransactionConfig({ from: owner, @@ -223,7 +204,6 @@ const burnCurrency = async ( signer: Signer, ) => { const collateralAddress: any = getContractAddress(collateral, chainId); - const vaultContractAddress: any = getContractAddress('Vault', chainId); const currencyContractAddress: any = getContractAddress('Currency', chainId); @@ -238,17 +218,10 @@ const burnCurrency = async ( if (Number(amount) > Number(formattedBalance.toString())) { throw new Error('Payback xNGN: Insufficient funds'); } - // build transaction object - const to: any = getContractAddress('VaultRouter', chainId); - let iface = internal.getInterface(VaultRouter__factory.abi); - const data = iface.encodeFunctionData('multiInteract', [ - [vaultContractAddress], - [VaultOperations.BurnCurrency], - [collateralAddress], - [owner], - [_amount], - ]); + const to: any = getContractAddress('Vault', chainId); + let iface = internal.getInterface(Vault__factory.abi); + const data = iface.encodeFunctionData('burnCurrency', [collateralAddress, owner, _amount]); const txConfig = await internal.getTransactionConfig({ from: owner, to, diff --git a/test/vault.test.ts b/test/vault.test.ts index f0ccc53..315dd4f 100644 --- a/test/vault.test.ts +++ b/test/vault.test.ts @@ -9,7 +9,7 @@ config(); describe('Descent Protocol SDK Test', () => { let descent: DescentClass; let owner = '0x459D7FB72ac3dFB0666227B30F25A424A5583E9c'; - let vault = '0xE2386C5eF4deC9d5815C60168e36c7153ba00D0C'; + let vault = '0x3d35807343CbF4fDb16E42297F2214f62848D032'; let rpcUrl = 'https://sepolia.base.org'; let signer: Signer; @@ -44,23 +44,29 @@ describe('Descent Protocol SDK Test', () => { expect(response).not.toBeNull; }, 500000); - // it('should withdraw usdc from a vault', async () => { - // const response = await descent.withdrawCollateral('50'); - // await waitTime(60); - // expect(response).not.toBeNull; - // }, 200000); - - // it('should mint xNGN from a vault to an address', async () => { - // const response = await descent.borrowCurrency('10000'); - - // await waitTime(60); - // expect(response).not.toBeNull; - // }, 200000); + it('should withdraw usdc from a vault', async () => { + const response = await descent.withdrawCollateral('50'); + await waitTime(60); + expect(response).not.toBeNull; + }, 200000); - // it('should payback xNGN', async () => { - // const response = await descent.repayCurrency('9000'); + it('should mint xNGN from a vault to an address', async () => { + const response = await descent.borrowCurrency('10000'); - // await waitTime(60); - // expect(response).not.toBeNull; - // }, 200000); + await waitTime(60); + expect(response).not.toBeNull; + }, 200000); + + it('should payback xNGN', async () => { + try { + await approvexNGN(vault, '30000', signer, descent.transaction, descent.internal); + const response = await descent.repayCurrency('30000'); + console.log(response, 'res'); + + await waitTime(60); + expect(response).not.toBeNull; + } catch (err) { + console.log(err?.info, 'error'); + } + }, 200000); }); From 10eeedb79c369e4f6e2326679246ed1d474576bb Mon Sep 17 00:00:00 2001 From: Njoku Emmanuel Date: Sun, 11 Feb 2024 12:51:12 +0100 Subject: [PATCH 5/5] chore: update build --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 68194db..780f6d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@descent-protocol/sdk", - "version": "0.1.23", + "version": "0.1.24", "description": "A Typescript library for interacting with the Descent Protocol", "keywords": [ "xNGN", @@ -15,10 +15,9 @@ "license": "MIT", "author": "Njoku Emmanuel", "type": "module", - "main": "dist/index.js", - "module": "dist/index.es.js", + "main": "./dist/cjs/index.js", + "module": "./dist/esm/index.mjs", "browser": "dist/index.bundle.js", - "types": "./dist/types.d.ts", "exports": { ".": { "import": "./dist/esm/index.mjs", @@ -69,6 +68,7 @@ "src/", "!src/tests" ], + "types": "./dist/types.d.ts", "scripts": { "analyze": "size-limit --why", "format": "prettier --write .", @@ -79,7 +79,7 @@ "prepublishOnly": "npm ci && npm run build", "dev": "concurrently -c yellow,blue -n RLP,SRV \"npm:build:watch\" \"npm:serve\"", "build:types": "tsc --emitDeclarationOnly --project tsconfig.build.json", - "build": "rollup -c", + "build": "node esbuild.js", "test": "jest --coverage ./test/", "test:getter": "jest ./test/getters.test.ts", "test:vault": "jest ./test/vault.test.ts",