From 13e3b70daf47a530df35e59fdbb2f2080a17b7ee Mon Sep 17 00:00:00 2001 From: aalavandhan1984 <6264334+aalavandhan@users.noreply.github.com> Date: Fri, 25 Aug 2023 15:04:12 -0400 Subject: [PATCH 1/3] setup subgraph repo --- README.md | 3 + package.json | 3 +- spot-contracts/deployments/goerli.json | 5 + spot-contracts/deployments/mainnet.json | 5 + .../exported-artifacts/BondIssuer.json | 227 +++ .../exported-artifacts/PerpetualTranche.json | 1699 ++++++++++++++++ .../exported-artifacts/RouterV1.json | 276 +++ .../external-artifacts/ERC20ABI.json | 222 +++ .../external-artifacts/RebasingERC20ABI.json | 344 ++++ spot-contracts/hardhat.config.ts | 4 +- spot-contracts/tasks/goeril.sh | 25 +- spot-subgraph/.eslintrc | 5 + spot-subgraph/.gitignore | 8 + spot-subgraph/.prettierrc | 7 + spot-subgraph/LICENSE | 674 +++++++ spot-subgraph/README.md | 37 + spot-subgraph/package.json | 25 + spot-subgraph/schema.graphql | 232 +++ spot-subgraph/scripts/deploy-local.sh | 12 + spot-subgraph/scripts/deploy.sh | 14 + spot-subgraph/src/data/bondIssuer.ts | 21 + spot-subgraph/src/data/buttonTranche.ts | 165 ++ spot-subgraph/src/data/perpetualTranche.ts | 99 + spot-subgraph/src/data/token.ts | 55 + spot-subgraph/src/mappings/bondController.ts | 55 + spot-subgraph/src/mappings/bondFactory.ts | 16 + spot-subgraph/src/mappings/bondIssuer.ts | 17 + .../src/mappings/perpetualTranche.ts | 55 + spot-subgraph/src/mappings/rebasingToken.ts | 42 + spot-subgraph/src/mappings/token.ts | 42 + spot-subgraph/src/utils.ts | 21 + spot-subgraph/subgraph.template.yaml | 196 ++ yarn.lock | 1774 ++++++++++++++++- 33 files changed, 6337 insertions(+), 48 deletions(-) create mode 100644 spot-contracts/exported-artifacts/BondIssuer.json create mode 100644 spot-contracts/exported-artifacts/PerpetualTranche.json create mode 100644 spot-contracts/exported-artifacts/RouterV1.json create mode 100644 spot-contracts/external-artifacts/ERC20ABI.json create mode 100644 spot-contracts/external-artifacts/RebasingERC20ABI.json create mode 100644 spot-subgraph/.eslintrc create mode 100644 spot-subgraph/.gitignore create mode 100644 spot-subgraph/.prettierrc create mode 100644 spot-subgraph/LICENSE create mode 100644 spot-subgraph/README.md create mode 100644 spot-subgraph/package.json create mode 100644 spot-subgraph/schema.graphql create mode 100755 spot-subgraph/scripts/deploy-local.sh create mode 100755 spot-subgraph/scripts/deploy.sh create mode 100644 spot-subgraph/src/data/bondIssuer.ts create mode 100644 spot-subgraph/src/data/buttonTranche.ts create mode 100644 spot-subgraph/src/data/perpetualTranche.ts create mode 100644 spot-subgraph/src/data/token.ts create mode 100644 spot-subgraph/src/mappings/bondController.ts create mode 100644 spot-subgraph/src/mappings/bondFactory.ts create mode 100644 spot-subgraph/src/mappings/bondIssuer.ts create mode 100644 spot-subgraph/src/mappings/perpetualTranche.ts create mode 100644 spot-subgraph/src/mappings/rebasingToken.ts create mode 100644 spot-subgraph/src/mappings/token.ts create mode 100644 spot-subgraph/src/utils.ts create mode 100644 spot-subgraph/subgraph.template.yaml diff --git a/README.md b/README.md index 5c0cbcfa..37677dbb 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,12 @@ SPOT is an inflation-resistant store of value fully collateralized by AMPL backe ### Package organization * [spot-contracts](./spot-contracts): SPOT protocol smart contracts. +* [spot-subgraph](./spot-subgraph): Subgraph to index SPOT protocol on-chain data. ## Licensing The primary license for Spot is the Business Source License 1.1 (`BUSL-1.1`), see [`LICENSE`](./LICENSE). However, some files are dual licensed under `GPL-3.0-or-later`: - All files in `spot-contracts/contracts/_interfaces/` may also be licensed under `GPL-3.0-or-later` (as indicated in their SPDX headers), see [`spot-contracts/contracts/_interfaces/LICENSE`](./spot-contracts/contracts/_interfaces/LICENSE) + +- All files in `spot-subgraph` may also be licensed under `GPL-3.0-or-later`, see [`spot-subgraph/LICENSE`](./spot-subgraph/LICENSE) diff --git a/package.json b/package.json index 246b88c9..cd67320c 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "private": true, "packageManager": "yarn@3.2.1", "workspaces": [ - "spot-contracts" + "spot-contracts", + "spot-subgraph" ] } diff --git a/spot-contracts/deployments/goerli.json b/spot-contracts/deployments/goerli.json index 69a1cc53..736c2464 100644 --- a/spot-contracts/deployments/goerli.json +++ b/spot-contracts/deployments/goerli.json @@ -1,4 +1,6 @@ { + "network": "goerli", + "startBlock": 7476901, "ampl": "0x74567107828843070087F1c6ec8322A3e8450725", "bondFactory": "0xdDe914EfBF5C472a590e61658d8E342d17E3AAB7", "bondIssuer": "0xbC060a1EbEC5eC869C4D51d4563244d4a223D307", @@ -8,3 +10,6 @@ "previousIssuers": ["0xAb7d17864463dEdA6c19060Ad6556e1B218c5Ba0"], "rolloverVault": "0xca36B64BEbdf141623911987b93767dcA4bF6F1f" } + + + \ No newline at end of file diff --git a/spot-contracts/deployments/mainnet.json b/spot-contracts/deployments/mainnet.json index c4f8381a..9467b846 100644 --- a/spot-contracts/deployments/mainnet.json +++ b/spot-contracts/deployments/mainnet.json @@ -1,4 +1,6 @@ { + "network": "mainnet", + "startBlock": 15800099, "ampl": "0xD46bA6D942050d489DBd938a2C909A5d5039A161", "bondFactory": "0x2b135C839d61808E1eC6F84151CD9429B0920374", "bondIssuer": "0x85d1BA777Eb3FCBb10C82cdf3aAa8231e21B6777", @@ -9,5 +11,8 @@ "0x9443b779d4AedF97d2B93D7CDa5fA0BB6312DfF2", "0xD64FA63dc5E8fcB743457E47E4d522E11Ff1AD66", "0x2E2E49eDCd5ce08677Bab6d791C863f1361B52F2" + ], + "previousBondFactories": [ + "0x72799FFD1F4CCF92eA2b1eE0CADa16a5461c4d96" ] } diff --git a/spot-contracts/exported-artifacts/BondIssuer.json b/spot-contracts/exported-artifacts/BondIssuer.json new file mode 100644 index 00000000..cc904c83 --- /dev/null +++ b/spot-contracts/exported-artifacts/BondIssuer.json @@ -0,0 +1,227 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "BondIssuer", + "sourceName": "contracts/BondIssuer.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IBondFactory", + "name": "bondFactory_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minIssueTimeIntervalSec_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "issueWindowOffsetSec_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMaturityDuration_", + "type": "uint256" + }, + { + "internalType": "address", + "name": "collateral_", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "trancheRatios_", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IBondController", + "name": "bond", + "type": "address" + } + ], + "name": "BondIssued", + "type": "event" + }, + { + "inputs": [], + "name": "bondFactory", + "outputs": [ + { + "internalType": "contract IBondFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "collateral", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLatestBond", + "outputs": [ + { + "internalType": "contract IBondController", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IBondController", + "name": "bond", + "type": "address" + } + ], + "name": "isInstance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "issue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "issueWindowOffsetSec", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "issuedBondAt", + "outputs": [ + { + "internalType": "contract IBondController", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "issuedCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastIssueWindowTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxMaturityDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minIssueTimeIntervalSec", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "trancheRatios", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x6101206040523480156200001257600080fd5b5060405162001d4f38038062001d4f83398181016040528101906200003891906200097d565b6200006c7ff9ca79c1d2894cd0975d03c4ffe766777e0b76635b5cf15ff718cb478d61e91760001b6200069b60201b60201c565b620000a07fef0d00317a1d419311deb2e28a91398111a70cc0a3d745a627e6222a0346975e60001b6200069b60201b60201c565b620000d47fbde27d28dd9e986ea934a9a07ced9d325de3a8716557c2d2a0fbdf0b08d3e3a560001b6200069b60201b60201c565b8573ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200013c7f7260d3bb608156b2364be30997d2bed1c7972fa1b3953518cca582c921ef333d60001b6200069b60201b60201c565b620001707f78f711c9e388a0c3f3fd56253a96a582f946024be01ec0f3156f2cc036ec8c4d60001b6200069b60201b60201c565b8460a08181525050620001ac7ffb487c8c8d29164b7fb9c2e26fb7d15ecea850d7c7c7af1a10212096bdd0e52060001b6200069b60201b60201c565b620001e07f3df19f89647fc33dbca99744e242f49ddaa3ad572b6881545605eef187e8910d60001b6200069b60201b60201c565b8360c081815250506200021c7f7719d8a6fdfbbd699d72e5ae0d44c7a1d3e751c9e624cd120aaac4bdb2fc5f6260001b6200069b60201b60201c565b620002507f8d0f41b98560a7c190e4736e1616193210a26299133f3138acf6a1325511ea5b60001b6200069b60201b60201c565b8260e081815250506200028c7fc3f2c02ae91752b1c8d6c3d873ec74aef5112d9ff99337fe81cd529ea52aa84760001b6200069b60201b60201c565b620002c07fb9cd7bf59f6f20dc66583f0f8a58ce56b0ecc50e7fb9057f37bf59e6e42e0d5b60001b6200069b60201b60201c565b8173ffffffffffffffffffffffffffffffffffffffff166101008173ffffffffffffffffffffffffffffffffffffffff1681525050620003297f93bdf52f7f0265960793bf1d5e63d53c28d1ee207744db17b4f14c99d0477a6460001b6200069b60201b60201c565b6200035d7f67f6b208fb3f293b6306b4d7beb71f331a77bb6d2f3b5587a4649097929a181d60001b6200069b60201b60201c565b8060009080519060200190620003759291906200069e565b50620003aa7f63df221e978104c790fbd0c5c1b04e7713bb6a67ccfd7d5f09be46836274d72160001b6200069b60201b60201c565b620003de7f1cf3fbbb4229f90c7025f167cde6b4c37f4f7000f4e97bfd52b6a9ffacd36c8760001b6200069b60201b60201c565b6000620004147f0eab422eede1df5c82966a124739e8173f6a56d02463818d69a15fa80b4cb02560001b6200069b60201b60201c565b620004487f5a8a6eb9724d928039314a1af5ea43a2bccb7537745e5a6db63b64fc3b3548cb60001b6200069b60201b60201c565b60005b82518160ff16101562000506576200048c7f29369de39b0c02adebc84fc560df0fea3281530ddc29067997fdd2d91602f6e660001b6200069b60201b60201c565b620004c07f1c104588ffd4760ecf78ea991cc1725ede699f2561105a5fd08491c0402c890960001b6200069b60201b60201c565b828160ff1681518110620004d957620004d862000a38565b5b602002602001015182620004ee919062000a96565b91508080620004fd9062000ade565b9150506200044b565b506200053b7fcae6c05ef2a92fd02c8d3c5b3997f91d021a86502c527bb1829c44105d1f01e460001b6200069b60201b60201c565b6200056f7f34c94389b4cd7042556749c98afe749031da10b087aa82787b7f12bc4f13e57160001b6200069b60201b60201c565b620005a37f520587c620b73c743dd6869f5772315a97db9b7375e05191b3cf6964df83a65760001b6200069b60201b60201c565b6103e88114620005ea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620005e19062000b93565b60405180910390fd5b6200061e7f415dfa9126ba1a9eab4f60dba2bc7f913ad7f387aa114489a5a2075c18b70b3d60001b6200069b60201b60201c565b620006527f429a30e7abdb3c3bc034b4995d6a76bbc036439415808e69428165a167ef24da60001b6200069b60201b60201c565b620006867febc749b2f1e09f8b5deee5a490b629b81e1e175e4ac5b3529afbee50f3e1995f60001b6200069b60201b60201c565b60006003819055505050505050505062000bb5565b50565b828054828255906000526020600020908101928215620006dd579160200282015b82811115620006dc578251825591602001919060010190620006bf565b5b509050620006ec9190620006f0565b5090565b5b808211156200070b576000816000905550600101620006f1565b5090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620007508262000723565b9050919050565b6000620007648262000743565b9050919050565b620007768162000757565b81146200078257600080fd5b50565b60008151905062000796816200076b565b92915050565b6000819050919050565b620007b1816200079c565b8114620007bd57600080fd5b50565b600081519050620007d181620007a6565b92915050565b620007e28162000743565b8114620007ee57600080fd5b50565b6000815190506200080281620007d7565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b62000858826200080d565b810181811067ffffffffffffffff821117156200087a57620008796200081e565b5b80604052505050565b60006200088f6200070f565b90506200089d82826200084d565b919050565b600067ffffffffffffffff821115620008c057620008bf6200081e565b5b602082029050602081019050919050565b600080fd5b6000620008ed620008e784620008a2565b62000883565b90508083825260208201905060208402830185811115620009135762000912620008d1565b5b835b818110156200094057806200092b8882620007c0565b84526020840193505060208101905062000915565b5050509392505050565b600082601f83011262000962576200096162000808565b5b815162000974848260208601620008d6565b91505092915050565b60008060008060008060c087890312156200099d576200099c62000719565b5b6000620009ad89828a0162000785565b9650506020620009c089828a01620007c0565b9550506040620009d389828a01620007c0565b9450506060620009e689828a01620007c0565b9350506080620009f989828a01620007f1565b92505060a087015167ffffffffffffffff81111562000a1d5762000a1c6200071e565b5b62000a2b89828a016200094a565b9150509295509295509295565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000aa3826200079c565b915062000ab0836200079c565b925082820190508082111562000acb5762000aca62000a67565b5b92915050565b600060ff82169050919050565b600062000aeb8262000ad1565b915060ff820362000b015762000b0062000a67565b5b600182019050919050565b600082825260208201905092915050565b7f426f6e644973737565723a20496e76616c6964207472616e636865207261746960008201527f6f73000000000000000000000000000000000000000000000000000000000000602082015250565b600062000b7b60228362000b0c565b915062000b888262000b1d565b604082019050919050565b6000602082019050818103600083015262000bae8162000b6c565b9050919050565b60805160a05160c05160e0516101005161112b62000c246000396000818161068d01526109790152600081816102da01526106b001526000818161058f015261084101526000818161044d015281816105b00152610a3e0152600081816102fe0152610651015261112b6000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063d3cf9e3011610071578063d3cf9e301461016b578063d5eb27a114610189578063d8dfeb45146101a7578063d97bef34146101c5578063e1b43ba2146101f5578063fb425cc714610213576100b4565b80630b0f7743146100b9578063107e12d6146100d7578063576e4151146100f55780636b44e6be146101135780637c46dc2b14610143578063d383f64614610161575b600080fd5b6100c1610243565b6040516100ce9190610bfe565b60405180910390f35b6100df6102d8565b6040516100ec9190610bfe565b60405180910390f35b6100fd6102fc565b60405161010a9190610c98565b60405180910390f35b61012d60048036038101906101289190610d08565b610320565b60405161013a9190610d50565b60405180910390f35b61014b6103c1565b6040516101589190610bfe565b60405180910390f35b6101696103c7565b005b61017361083f565b6040516101809190610bfe565b60405180910390f35b610191610863565b60405161019e9190610d8c565b60405180910390f35b6101af610977565b6040516101bc9190610db6565b60405180910390f35b6101df60048036038101906101da9190610dfd565b61099b565b6040516101ec9190610d8c565b60405180910390f35b6101fd610a3c565b60405161020a9190610bfe565b60405180910390f35b61022d60048036038101906102289190610dfd565b610a60565b60405161023a9190610bfe565b60405180910390f35b60006102717fb0b85dae04a40fac0d8b488f80f394813ec8567219b99d9ab7a67a33bb71191c60001b610a84565b61029d7f6526f4a1586ab5146853ef946d938b37946bbccf172f936ec4164814b417332a60001b610a84565b6102c97f3437b34c5f15c66568f7a4662636917ed1d8f949b18371b29280ec14f687ba2d60001b610a84565b6102d36001610a87565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061034e7fa045b6358bddd4cdafce835764495b2ba1ff20d7b39efd9068f70adef069d7ba60001b610a84565b61037a7f78e70be5d5d49a99893440b4f6824b41661938018324f4dcbbe7c2c21f49d54b60001b610a84565b6103a67f3d15ff85eb582fa9d8ee70c19adafe4a84b9f6cf8ec6b090b5f5da0ad2bd4c6560001b610a84565b6103ba826001610a9c90919063ffffffff16565b9050919050565b60035481565b6103f37f1a3966083241516a4c8f99fd5e0657dfc90736de14b243d5b2e584f4e87a60e260001b610a84565b61041f7f22347d1771f85a890d27520bd7ad7e66d75b03f8d5aa38b0e844fe23b02ff50e60001b610a84565b61044b7fb496e37eadd1288e7c0574b0c926eb71d1c5336f2bc876907ce438932b29451c60001b610a84565b7f00000000000000000000000000000000000000000000000000000000000000006003546104799190610e59565b421015610509576104ac7f91d560f2580752609f7b9e159e18b95852458caee7d20dee8a2238fcc0c759b860001b610a84565b6104d87f6e53c201a45cfd07f44559637dbd0dd8b8f1ecade69d4958c59fc9ffc388e3f260001b610a84565b6105047f658f77ba7316ee2522156c794fc4a552c647c6468b39848968cbef13a1e1843460001b610a84565b61083d565b6105357f2e193856ae298267cf42b30f494872383d716d6966e639264b494fb4e94e7cc860001b610a84565b6105617ff1870a2b5c76f0c0b59fa46f80182e7fdd9f52620f5be3d6d42f06d5d1153df160001b610a84565b61058d7fbb353de6215a3e40517515c1632b9e46090959c8df3c9306dfc5f57ff90023b060001b610a84565b7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000426105da9190610ebc565b426105e59190610eed565b6105ef9190610e59565b6003819055506106217f660a7fb02acf68af8da8c4917c4440a1e2103ba2047fbf95874233dc70a3f33560001b610a84565b61064d7f53578cbaecf4b495d45e0d3a125b2a52ee9f86b206c11d1a9a786a75b7251aca60001b610a84565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c7bfded57f000000000000000000000000000000000000000000000000000000000000000060007f00000000000000000000000000000000000000000000000000000000000000006003546106dc9190610e59565b6040518463ffffffff1660e01b81526004016106fa9392919061102f565b6020604051808303816000875af1158015610719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073d9190611099565b905061076b7f78b6cf55bde2d72b899a30d6614e8d3ebe2ccc44bdd35f3a226b111dc81d042f60001b610a84565b6107977fe80c4c2e8cfc116358f32cbac6db34fdb870504a722b86ef614a43ddef31aaa960001b610a84565b6107ab816001610acc90919063ffffffff16565b506107d87fe897c72a4e0799fe59faaf34807db2368146d22d336db90c1122b601e8dcb8d260001b610a84565b6108047fa35ff86fbf86ab624db346bc180979286dcf7b55c13232e8c1cb1a62d7158a5e60001b610a84565b7f83425b315fe57ede6e65954ac7ec63b2699040570de3470442b54866a4a4c41d816040516108339190610d8c565b60405180910390a1505b565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006108917f1e01852934f4a68704df0c7a137383e833f758f6ee099414c323bb2f7775f99460001b610a84565b6108bd7fb50c029104af72917cfe0a56f6b85f835603444522c2fd5429e5bdb171734eb260001b610a84565b6108e97fee1438668534b3dcc365c1bb7d90f41b010ed08a0971987fead4d0974911477560001b610a84565b6108f16103c7565b61091d7ffddd292b4d06aa4febcd4390073c5a1270757ba13e8cd6d591f04223dc82d4dc60001b610a84565b6109497fd660dae67676885bc9afa74dbf6a1a246daf20e4d3bce7552d02381eb1f89df660001b610a84565b61097260016109586001610a87565b6109629190610eed565b6001610afc90919063ffffffff16565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006109c97f6089808033937a11a203870ead0fae07874da87d7943f6778087a7c7e307552560001b610a84565b6109f57f85453897e7847be7a334725393debcbb831d21394c4d5fe6a4c323e4de7971ba60001b610a84565b610a217f3a8b34f0133f1559efd86999fa14ef8bdc816704ec70a27c8499552cda3ec74960001b610a84565b610a35826001610afc90919063ffffffff16565b9050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008181548110610a7057600080fd5b906000526020600020016000915090505481565b50565b6000610a9582600001610b16565b9050919050565b6000610ac4836000018373ffffffffffffffffffffffffffffffffffffffff1660001b610b27565b905092915050565b6000610af4836000018373ffffffffffffffffffffffffffffffffffffffff1660001b610b4a565b905092915050565b6000610b0b8360000183610bba565b60001c905092915050565b600081600001805490509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b6000610b568383610b27565b610baf578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050610bb4565b600090505b92915050565b6000826000018281548110610bd257610bd16110c6565b5b9060005260206000200154905092915050565b6000819050919050565b610bf881610be5565b82525050565b6000602082019050610c136000830184610bef565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610c5e610c59610c5484610c19565b610c39565b610c19565b9050919050565b6000610c7082610c43565b9050919050565b6000610c8282610c65565b9050919050565b610c9281610c77565b82525050565b6000602082019050610cad6000830184610c89565b92915050565b600080fd5b6000610cc382610c19565b9050919050565b6000610cd582610cb8565b9050919050565b610ce581610cca565b8114610cf057600080fd5b50565b600081359050610d0281610cdc565b92915050565b600060208284031215610d1e57610d1d610cb3565b5b6000610d2c84828501610cf3565b91505092915050565b60008115159050919050565b610d4a81610d35565b82525050565b6000602082019050610d656000830184610d41565b92915050565b6000610d7682610c65565b9050919050565b610d8681610d6b565b82525050565b6000602082019050610da16000830184610d7d565b92915050565b610db081610cb8565b82525050565b6000602082019050610dcb6000830184610da7565b92915050565b610dda81610be5565b8114610de557600080fd5b50565b600081359050610df781610dd1565b92915050565b600060208284031215610e1357610e12610cb3565b5b6000610e2184828501610de8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e6482610be5565b9150610e6f83610be5565b9250828201905080821115610e8757610e86610e2a565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610ec782610be5565b9150610ed283610be5565b925082610ee257610ee1610e8d565b5b828206905092915050565b6000610ef882610be5565b9150610f0383610be5565b9250828203905081811115610f1b57610f1a610e2a565b5b92915050565b600081549050919050565b600082825260208201905092915050565b60008190508160005260206000209050919050565b610f5b81610be5565b82525050565b6000610f6d8383610f52565b60208301905092915050565b60008160001c9050919050565b6000819050919050565b6000610fa3610f9e83610f79565b610f86565b9050919050565b6000610fb68254610f90565b9050919050565b6000600182019050919050565b6000610fd582610f21565b610fdf8185610f2c565b9350610fea83610f3d565b8060005b8381101561102257610fff82610faa565b6110098882610f61565b975061101483610fbd565b925050600181019050610fee565b5085935050505092915050565b60006060820190506110446000830186610da7565b81810360208301526110568185610fca565b90506110656040830184610bef565b949350505050565b61107681610cb8565b811461108157600080fd5b50565b6000815190506110938161106d565b92915050565b6000602082840312156110af576110ae610cb3565b5b60006110bd84828501611084565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea2646970667358221220a928a73cb2563e651a5804789a8c9aa276ebb9fcbb42abeead3acd0b8c8908aa64736f6c63430008110033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/spot-contracts/exported-artifacts/PerpetualTranche.json b/spot-contracts/exported-artifacts/PerpetualTranche.json new file mode 100644 index 00000000..212588b6 --- /dev/null +++ b/spot-contracts/exported-artifacts/PerpetualTranche.json @@ -0,0 +1,1699 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "PerpetualTranche", + "sourceName": "contracts/PerpetualTranche.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "matureValuePerc", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "matureValueTargetPerc", + "type": "uint256" + } + ], + "name": "BelowMatureValueTargetPerc", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "contract ITranche", + "name": "trancheIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmtForCurrentTranche", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMintAmtPerTranche", + "type": "uint256" + } + ], + "name": "ExceededMaxMintPerTranche", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentMaxSupply", + "type": "uint256" + } + ], + "name": "ExceededMaxSupply", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "perpSupply", + "type": "uint256" + } + ], + "name": "ExpectedSupplyReduction", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "invalidCollateral", + "type": "address" + }, + { + "internalType": "address", + "name": "underlyingCollateral", + "type": "address" + } + ], + "name": "InvalidCollateral", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "InvalidPerc", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectDecimals", + "type": "uint256" + } + ], + "name": "InvalidStrategyDecimals", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minTrancheMaturitySec", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTrancheMaturitySec", + "type": "uint256" + } + ], + "name": "InvalidTrancheMaturityBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestedBurnAmt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "perpSupply", + "type": "uint256" + } + ], + "name": "UnacceptableBurnAmt", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "contract ITranche", + "name": "trancheIn", + "type": "address" + }, + { + "internalType": "contract IBondController", + "name": "depositBond", + "type": "address" + } + ], + "name": "UnacceptableDepositTranche", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "trancheInAmt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "perpAmtMint", + "type": "uint256" + } + ], + "name": "UnacceptableMintAmt", + "type": "error" + }, + { + "inputs": [], + "name": "UnacceptableReference", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "contract ITranche", + "name": "trancheIn", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "tokenOut", + "type": "address" + } + ], + "name": "UnacceptableRollover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "trancheInAmt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "trancheOutAmt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rolloverAmt", + "type": "uint256" + } + ], + "name": "UnacceptableRolloverAmt", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "authorizedCaller", + "type": "address" + } + ], + "name": "UnauthorizedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + } + ], + "name": "UnauthorizedTransferOut", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "discount", + "type": "uint256" + } + ], + "name": "DiscountApplied", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "ReserveSynced", + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IBondIssuer", + "name": "issuer", + "type": "address" + } + ], + "name": "UpdatedBondIssuer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IBondController", + "name": "bond", + "type": "address" + } + ], + "name": "UpdatedDepositBond", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IDiscountStrategy", + "name": "strategy", + "type": "address" + } + ], + "name": "UpdatedDiscountStrategy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IFeeStrategy", + "name": "strategy", + "type": "address" + } + ], + "name": "UpdatedFeeStrategy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "prevKeeper", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newKeeper", + "type": "address" + } + ], + "name": "UpdatedKeeper", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "matureTrancheBalance", + "type": "uint256" + } + ], + "name": "UpdatedMatureTrancheBalance", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "matureValueTargetPerc", + "type": "uint256" + } + ], + "name": "UpdatedMatureValueTargetPerc", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "maxSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "maxMintAmtPerTranche", + "type": "uint256" + } + ], + "name": "UpdatedMintingLimits", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IPricingStrategy", + "name": "strategy", + "type": "address" + } + ], + "name": "UpdatedPricingStrategy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "UpdatedTolerableTrancheMaturity", + "type": "event" + }, + { + "inputs": [], + "name": "DISCOUNT_DECIMALS", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "HUNDRED_PERC", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERC_DECIMALS", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRICE_DECIMALS", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNIT_DISCOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNIT_PERC", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNIT_PRICE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bondIssuer", + "outputs": [ + { + "internalType": "contract IBondIssuer", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "collateral", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + } + ], + "name": "computeDiscount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITranche", + "name": "trancheIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "trancheInAmt", + "type": "uint256" + } + ], + "name": "computeMintAmt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + } + ], + "name": "computePrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "perpAmtBurnt", + "type": "uint256" + } + ], + "name": "computeRedemptionAmts", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable[]", + "name": "", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITranche", + "name": "trancheIn", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "trancheInAmtAvailable", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenOutAmtRequested", + "type": "uint256" + } + ], + "name": "computeRolloverAmt", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "perpRolloverAmt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenOutAmt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "trancheOutAmt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "trancheInAmt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "remainingTrancheInAmt", + "type": "uint256" + } + ], + "internalType": "struct IPerpetualTranche.RolloverPreview", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITranche", + "name": "trancheIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "trancheInAmt", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "discountStrategy", + "outputs": [ + { + "internalType": "contract IDiscountStrategy", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeStrategy", + "outputs": [ + { + "internalType": "contract IFeeStrategy", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAvgPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getDepositBond", + "outputs": [ + { + "internalType": "contract IBondController", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getMatureTrancheBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "i", + "type": "uint256" + } + ], + "name": "getReserveAt", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getReserveCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getReserveTokensUpForRollover", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "tranche", + "type": "address" + } + ], + "name": "getReserveTrancheBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + } + ], + "name": "inReserve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "collateral_", + "type": "address" + }, + { + "internalType": "contract IBondIssuer", + "name": "bondIssuer_", + "type": "address" + }, + { + "internalType": "contract IFeeStrategy", + "name": "feeStrategy_", + "type": "address" + }, + { + "internalType": "contract IPricingStrategy", + "name": "pricingStrategy_", + "type": "address" + }, + { + "internalType": "contract IDiscountStrategy", + "name": "discountStrategy_", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITranche", + "name": "trancheIn", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "tokenOut", + "type": "address" + } + ], + "name": "isAcceptableRollover", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "keeper", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "matureValueTargetPerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxMintAmtPerTranche", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxTrancheMaturitySec", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minTrancheMaturitySec", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITranche", + "name": "", + "type": "address" + } + ], + "name": "mintedSupplyPerTranche", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "perpERC20", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pricingStrategy", + "outputs": [ + { + "internalType": "contract IPricingStrategy", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "protocolFeeCollector", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "perpAmtBurnt", + "type": "uint256" + } + ], + "name": "redeem", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "reserve", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITranche", + "name": "trancheIn", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "trancheInAmtAvailable", + "type": "uint256" + } + ], + "name": "rollover", + "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": "", + "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": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferERC20", + "outputs": [], + "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": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IBondIssuer", + "name": "bondIssuer_", + "type": "address" + } + ], + "name": "updateBondIssuer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IDiscountStrategy", + "name": "discountStrategy_", + "type": "address" + } + ], + "name": "updateDiscountStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IFeeStrategy", + "name": "feeStrategy_", + "type": "address" + } + ], + "name": "updateFeeStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newKeeper", + "type": "address" + } + ], + "name": "updateKeeper", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "matureValueTargetPerc_", + "type": "uint256" + } + ], + "name": "updateMatureValueTargetPerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxSupply_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMintAmtPerTranche_", + "type": "uint256" + } + ], + "name": "updateMintingLimits", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IPricingStrategy", + "name": "pricingStrategy_", + "type": "address" + } + ], + "name": "updatePricingStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minTrancheMaturitySec_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTrancheMaturitySec_", + "type": "uint256" + } + ], + "name": "updateTolerableTrancheMaturity", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5061f8aa80620000226000396000f3fe608060405234801561001057600080fd5b50600436106104125760003560e01c8063850a150111610220578063beed49b811610130578063ddebf795116100b8578063ef98f88411610087578063ef98f88414610c67578063f01e66ec14610c98578063f1a640f814610cb6578063f20b4fdf14610cd4578063f2fde38b14610cf257610412565b8063ddebf79514610bdf578063e8821b8914610c0f578063eca05e9614610c2b578063ee95e04814610c4957610412565b8063cd3293de116100ff578063cd3293de14610b39578063d5abeb0114610b57578063d8dfeb4514610b75578063db006a7514610b93578063dd62ed3e14610baf57610412565b8063beed49b814610ab3578063c34b96fc14610ad1578063c5706b2014610b01578063c876a2a714610b1d57610412565b806397790217116101b3578063a9059cbb11610182578063a9059cbb14610a0d578063aced166114610a3d578063adf84ca314610a5b578063afa40bbd14610a79578063b4abecc714610a9757610412565b8063977902171461098757806399806546146109a35780639db5dbe4146109c1578063a457c2d7146109dd57610412565b806392a18b44116101ef57806392a18b4414610913578063949b22ae1461092f57806395a074951461094d57806395d89b411461096957610412565b8063850a15011461089b578063876853aa146108b95780638da5cb5b146108d75780638fb69c4b146108f557610412565b806347e7ef2411610326578063715018a6116102ae57806379cc67901161027d57806379cc67901461081b5780637cb6eb6b146108375780637daa0050146108555780638456cb5914610873578063846e7e9f1461087d57610412565b8063715018a6146107b7578063729256eb146107c157806375d5179f146107df57806378b99c24146107fd57610412565b80635ec57251116102f55780635ec57251146106eb57806361902ffc14610709578063647846a514610739578063679556e81461075757806370a082311461078757610412565b806347e7ef241461066557806357c3ee83146106815780635c975abb1461069d5780635dcc45b7146106bb57610412565b80632cff15ce116103a9578063364d22fc11610378578063364d22fc146105c157806336852f4f146105df578063395093511461060f5780633f4ba83a1461063f57806342966c681461064957610412565b80632cff15ce146105395780632e5d55e114610555578063311705aa14610585578063313ce567146105a357610412565b806318160ddd116103e557806318160ddd146104c55780631d8557d7146104e357806323b872dd146104ed5780632bf8f1a51461051d57610412565b806306fdde0314610417578063095ea7b314610435578063107c041814610465578063151b499c14610495575b600080fd5b61041f610d0e565b60405161042c919061d533565b60405180910390f35b61044f600480360381019061044a919061d5fd565b610da0565b60405161045c919061d658565b60405180910390f35b61047f600480360381019061047a919061d673565b610dc3565b60405161048c919061d6ff565b60405180910390f35b6104af60048036038101906104aa919061d796565b610f11565b6040516104bc919061d874565b60405180910390f35b6104cd61106b565b6040516104da919061d89e565b60405180910390f35b6104eb611075565b005b6105076004803603810190610502919061d8b9565b611b5e565b604051610514919061d658565b60405180910390f35b6105376004803603810190610532919061d90c565b611b8d565b005b610553600480360381019061054e919061d95f565b612404565b005b61056f600480360381019061056a919061d99f565b6126b0565b60405161057c919061d89e565b60405180910390f35b61058d6126c9565b60405161059a919061d89e565b60405180910390f35b6105ab6126da565b6040516105b8919061d9e8565b60405180910390f35b6105c9612776565b6040516105d6919061dac1565b60405180910390f35b6105f960048036038101906105f4919061dae3565b612e4d565b604051610606919061d89e565b60405180910390f35b6106296004803603810190610624919061d5fd565b613024565b604051610636919061d658565b60405180910390f35b61064761305b565b005b610663600480360381019061065e919061d673565b6132e3565b005b61067f600480360381019061067a919061db10565b6132f7565b005b61069b6004803603810190610696919061db8e565b613c6f565b005b6106a5614117565b6040516106b2919061d658565b60405180910390f35b6106d560048036038101906106d0919061dae3565b61412e565b6040516106e2919061d658565b60405180910390f35b6106f361427c565b604051610700919061d89e565b60405180910390f35b610723600480360381019061071e919061db10565b614283565b604051610730919061d89e565b60405180910390f35b6107416143d3565b60405161074e919061d6ff565b60405180910390f35b610771600480360381019061076c919061dbbb565b6144f0565b60405161077e919061d658565b60405180910390f35b6107a1600480360381019061079c919061dbfb565b614640565b6040516107ae919061d89e565b60405180910390f35b6107bf614689565b005b6107c961469d565b6040516107d6919061dc49565b60405180910390f35b6107e76146c4565b6040516107f4919061d9e8565b60405180910390f35b6108056146c9565b604051610812919061dc85565b60405180910390f35b6108356004803603810190610830919061d5fd565b6146f0565b005b61083f614710565b60405161084c919061d89e565b60405180910390f35b61085d614857565b60405161086a919061dcc1565b60405180910390f35b61087b61487e565b005b610885614b06565b604051610892919061d89e565b60405180910390f35b6108a3614b23565b6040516108b0919061dceb565b60405180910390f35b6108c1614bb6565b6040516108ce919061d89e565b60405180910390f35b6108df614bbd565b6040516108ec919061dceb565b60405180910390f35b6108fd614be7565b60405161090a919061dd27565b60405180910390f35b61092d6004803603810190610928919061dd80565b614d4e565b005b61093761522c565b604051610944919061ddce565b60405180910390f35b6109676004803603810190610962919061de27565b615253565b005b6109716156fb565b60405161097e919061d533565b60405180910390f35b6109a1600480360381019061099c919061dbfb565b61578d565b005b6109ab615ab2565b6040516109b8919061d89e565b60405180910390f35b6109db60048036038101906109d6919061de54565b615bfd565b005b6109f760048036038101906109f2919061d5fd565b615ed5565b604051610a04919061d658565b60405180910390f35b610a276004803603810190610a22919061d5fd565b615f4c565b604051610a34919061d658565b60405180910390f35b610a45615f6f565b604051610a52919061dceb565b60405180910390f35b610a63615f96565b604051610a70919061d89e565b60405180910390f35b610a81615f9d565b604051610a8e919061d89e565b60405180910390f35b610ab16004803603810190610aac919061d95f565b615fae565b005b610abb616137565b604051610ac8919061d89e565b60405180910390f35b610aeb6004803603810190610ae6919061dae3565b616148565b604051610af8919061d89e565b60405180910390f35b610b1b6004803603810190610b16919061e01a565b6163cc565b005b610b376004803603810190610b32919061e0f4565b616b03565b005b610b41616da5565b604051610b4e919061dceb565b60405180910390f35b610b5f616e31565b604051610b6c919061d89e565b60405180910390f35b610b7d616e38565b604051610b8a919061d6ff565b60405180910390f35b610bad6004803603810190610ba8919061d673565b616ecd565b005b610bc96004803603810190610bc4919061e121565b61769e565b604051610bd6919061d89e565b60405180910390f35b610bf96004803603810190610bf4919061dae3565b617725565b604051610c06919061d89e565b60405180910390f35b610c296004803603810190610c24919061d673565b61790e565b005b610c33617b71565b604051610c40919061d89e565b60405180910390f35b610c51617b78565b604051610c5e919061d6ff565b60405180910390f35b610c816004803603810190610c7c919061d673565b617c04565b604051610c8f92919061e210565b60405180910390f35b610ca0617d55565b604051610cad919061d89e565b60405180910390f35b610cbe617f20565b604051610ccb919061d9e8565b60405180910390f35b610cdc617f25565b604051610ce9919061d9e8565b60405180910390f35b610d0c6004803603810190610d07919061dbfb565b617f2a565b005b606060368054610d1d9061e276565b80601f0160208091040260200160405190810160405280929190818152602001828054610d499061e276565b8015610d965780601f10610d6b57610100808354040283529160200191610d96565b820191906000526020600020905b815481529060010190602001808311610d7957829003601f168201915b5050505050905090565b600080610dab617fad565b9050610db8818585617fb5565b600191505092915050565b6000610df17f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b610e1d7fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b610e497f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b610e51611075565b610e7d7f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b610ea97f05152c8e9de07acd46b31fc73fe403ba35b8914ba5173fbb9dc2978d543cc8ae60001b61817e565b610ed57fa79894200a7b639a6a55fb2b9f046a1dd296afde640c8cde5e4bd1cad214f08f60001b61817e565b610f017f61b1bf511a3a2792b48a4fe1e5ee75d4dc2d5456d7f42a4c9adca89d7f3e80a860001b61817e565b610f0a82618181565b9050919050565b610f1961d474565b610f457f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b610f717fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b610f9d7f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b610fa5611075565b610fd17f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b610ffd7fd1beafed999679274ff3b75856b494cd1df921d78f4df9a8b91976f69bb92e6760001b61817e565b6110297f48e8ec20aa70feef399a559d1762c3530611cee44c31808aa067b15cee081a5660001b61817e565b6110557f755c2763ca4bf9d42a46db3c9f01fd52ec1c6a511a92ff294839ff1a5caf03cc60001b61817e565b61106185858585618223565b9050949350505050565b6000603554905090565b6110a17fbe971f136eca38d79383c8a21f3e6818e5d03fe4a4a1c417bee4667c881ef35260001b61817e565b6110cd7fc44856c05594420e74d5e03916909f82d9ecf907900d3dd1ba98e9b12055a96260001b61817e565b6110f97f3779ae423c8b6554aa8dea7be3fc01d4923ef9fbd86e81e7829868dbe2775d4560001b61817e565b600061013160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d5eb27a16040518163ffffffff1660e01b81526004016020604051808303816000875af115801561116b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118f919061e2e5565b90506111bd7fbc8669b813247b48a64854f00bbe9709cd252834ec0484887e5e3d62b95084b260001b61817e565b6111e97fc70a89aa2f909e25431a4787db4d0a334dd5559631ac38dbc634bc4936b91a3c60001b61817e565b8073ffffffffffffffffffffffffffffffffffffffff1661013260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415801561124d575061124c81618db6565b5b156113ac5761127e7f41fe4f85e70e841952c036cd431b23cacbb1ec00af34ab8eab8ac855ce9ee25260001b61817e565b6112aa7fba55735fa52c5726585ccde4c5f8933b3412f2ffa71d6d61c746185907db69a660001b61817e565b6112d67fce3f91541dd4a6c5af8fe71670f8b25a684bd7ed53b1bb43634f11304a9b744660001b61817e565b8061013260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506113447f70894150fe69156bba557d7ccc95b0d10c387e67114a67f7977536415067286060001b61817e565b6113707f7dbc88702f5b80cc570ad13b5c1806156dae7540697dd4c00894a013446614d360001b61817e565b7f63e01b6b930f6bd3789aab43a62005627cb8a43517cd0569f997fd6b343b80238160405161139f919061dd27565b60405180910390a16113d9565b6113d87f1089d9c00752b2cabbd4532663303a9800eb122ae33669d6837212e1f2ed9a2e60001b61817e565b5b6114057f4a7b1f132e5df5cb3e9794e1f398564f406853c51f7f2962c942648b49ab286a60001b61817e565b6114317f7c12376140aa37197956e326bce38e7542eaeee5c486847dab645a60a826db7b60001b61817e565b600061143b618f82565b90506114697f2cbf64c9deff76adaee1fca44e44c6873b721627363b6b63150011c40fae8f1060001b61817e565b6114957f4d79bb21290ec3eeb1fdc254baf3d961e0eb681d0a62dcfad37dd388622699c360001b61817e565b60006001826114a4919061e341565b90505b6000811115611aee576114dc7f17280846d8d52c6d88fdcd2314f908709b2ae3979e5e19f45bfab676ad76249660001b61817e565b6115087f6fc9e01fe69f70994e4aa683aa2fbd1e14e8c3e4e2064f3ca0080edc5b08331560001b61817e565b600061151382618181565b90506115417fd975004bc9af5fbe029ab32d3625349599d45b9dba39e2502c3566bd1135dde760001b61817e565b61156d7fabf53a256c3b0ef70d85c1b33fab72a1f27471d32eab51b512ebd0c7cd45376060001b61817e565b60008173ffffffffffffffffffffffffffffffffffffffff166364c9ec6f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115de919061e38a565b905061160c7f15194ca9f89f979958e99eb466e82279da7fcbb4efad96b62aafa4d4a3fa940f60001b61817e565b6116387f90eea24149eeae04a7afb6110e7bc4e6c36c2546953f4ba9b4b6fb34b714a82a60001b61817e565b60006116598273ffffffffffffffffffffffffffffffffffffffff16619018565b11156116be5761168b7f33891fd60c32d87ac44e24b2a4bcf97cf1b98a557ba95dfa0d83179d377b55cd60001b61817e565b6116b77f9d2c7f14896d711439656e1438221a2e76b5e2a92f042621c79074d87a87bb0360001b61817e565b5050611adb565b6116ea7f4243f88579f2bcb16b6d0d4ea128dc6d7ece250c3b59199fcd8de99512b5ec4460001b61817e565b6117167f2c40423fc9ab5175df0f30738346c339aace298ca5127e8ea788b4a8ca08049460001b61817e565b6117427f0d599ddb8eeeab15045eb7eb6ccf49bb4741065a2f55c343635756f0bca9f44a60001b61817e565b8073ffffffffffffffffffffffffffffffffffffffff1663ae4e7fdf6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561178d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b1919061e3e3565b61189e576117e17fb4f53a8f3d08cda2c6b5bf86bd62724635684a54a338f6a543f972b4951f1f3f60001b61817e565b61180d7f630509c1c193f41e414cdf0024b48d202734d2dfe440b35f599f673ac37723b960001b61817e565b6118397f222b432495a4cc5bbc6bdded0b5a460c78dbae9fe48c5b6a457de696964a745960001b61817e565b8073ffffffffffffffffffffffffffffffffffffffff166387b652076040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561188157600080fd5b505af1158015611895573d6000803e3d6000fd5b505050506118cb565b6118ca7f99102f5253a56bcdc8962760ce83246bbc01438476842eb601ddd941d48c7a9260001b61817e565b5b6118f77f20b9fa97e04c86f7f9ccb0598acd9be250c7b8bb64114edebd975d964299020160001b61817e565b6119237f7d94097dd501a602d472abe9a9ec9f515e13b496adda69b78495e76b51bf4b0560001b61817e565b600061192e8361918c565b905061195c7fcaef6532b5d983273e038d9d15a3627a16fa50268a34aa4f27341c8dbfc1b21260001b61817e565b6119887f04de80ed6e0bd41956a07422627fc6bfad908985e099df7b3ffa19a827e0840760001b61817e565b8173ffffffffffffffffffffffffffffffffffffffff166333d20e3484836040518363ffffffff1660e01b81526004016119c392919061e410565b600060405180830381600087803b1580156119dd57600080fd5b505af11580156119f1573d6000803e3d6000fd5b50505050611a217f4c3f13c54ac0ad494dc7a5482df89bc0cbb51f0497980ba5796a40b4843417d260001b61817e565b611a4d7fcfebbef3f9a7e39aa7af2b884f3f08ff4505367195a3e630e03fe44969cc9d7b60001b61817e565b611a568361929a565b50611a837f9d64b93fddfdc6c99bfbfbc3a2364cf0429b9eed37afad0a114b916b2857219860001b61817e565b611aaf7f5cb624a68c63aaa064689304dd76e75b3a650f5c148f28c19de26164cfd18bd160001b61817e565b611ad7611ac482611abf86612e4d565b61994e565b61013c54611ad2919061e439565b619a00565b5050505b8080611ae69061e46d565b9150506114a7565b50611b1b7f26a58e80bbff6dc10c443831bed01573e0259ebde61e613868cf169a023ba38160001b61817e565b611b477f0c515450c06a0937f2ef637c0009eb8825392c2054220f6eeab6539ee3cc0f8760001b61817e565b611b59611b546000618181565b61929a565b505050565b600080611b69617fad565b9050611b76858285619b1e565b611b81858585619baa565b60019150509392505050565b600260fb5403611bd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bc99061e4e2565b60405180910390fd5b600260fb81905550611be2619e2c565b611c0e7f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b611c3a7fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b611c667f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b611c6e611075565b611c9a7f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b611cc67f18d19f877d7d519c7ef65e1a1d2f6ed034f1bd48b1c6d6aa66aae75521ce2cd660001b61817e565b611cf27fdb59fe5adc43a98e001314ca5e0a4d8cae10bfeb901d38182002acf0f9ceb53b60001b61817e565b611d1e7f267b7e88f868650640484f59316a84466508382c047a36ab4aeb7502c7cde83560001b61817e565b611d288383619e76565b611dc357611d587fd073da7260828e1ba80a40b3daa21aecbf35f54e588654dbd27f7ed7ccb72dc260001b61817e565b611d847f182eaf0688cd47c932d57b570bd628a9e3805feac4965bc621924f4fbcc0123b60001b61817e565b82826040517f3f4316bd000000000000000000000000000000000000000000000000000000008152600401611dba92919061e523565b60405180910390fd5b611def7fb6767f143bfd1ec7de6c6bb1ba3e477e5f6d30df47f2fe25c366f89a821da99960001b61817e565b611e1b7fb66af0810c9853e0fc48b8e80c948beccb984337c63604c1f42b70b47231769360001b61817e565b611e477f1ba721d16499424ae25c7e521601df32bee7d2b8adf21e9dc098fa697ab9cf6c60001b61817e565b6000611e758484847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff618223565b9050611ea37f77dd970ee68b7b6853f6baaf564b6b2aa09a87aed50702ad055c7852d8c8c35760001b61817e565b611ecf7fdfab4295f48e3dbdefe66dab5fd69faf385908a27209a3ceb1fb7f97d07dadbc60001b61817e565b600081606001511480611ee6575060008160200151145b80611ef5575060008160000151145b15611f9f57611f267f3c3c5a506df63881d9c194ed8b26f4c573d4df926a61a6c77bd665e281aaf18d60001b61817e565b611f527f56ebcf545abea369cd2c970c5a6b3ddee7c52358e5b87ab6ac0c0328b976bb1b60001b61817e565b8060600151816020015182600001516040517f1c44ac5b000000000000000000000000000000000000000000000000000000008152600401611f969392919061e54c565b60405180910390fd5b611fcb7fb2fb5e4b760ae823f11801d83ed358861f8483a96d9318b85de6c63db9a5c45860001b61817e565b611ff77f58a8c2a8cb3cd9ff1a06f01a132206091e5aabb7f0eb7b98c2e27b63e557879d60001b61817e565b6120237f9e25b642a176cb0676c8e9e088fa509be1ce83f6787bfa9f0887525db11d95a960001b61817e565b60008061012e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c212ded484600001516040518263ffffffff1660e01b8152600401612086919061d89e565b6040805180830381865afa1580156120a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c6919061e5ce565b915091506120f67fac6e02ce452a8bdbba21ec3de51d811e3389b9caa27f8d506ad7ba5802c1e1ce60001b61817e565b6121227f6364a4fff4fe879705e703fa466bfb556b01614d0ed719005a4c44a0ea58a66860001b61817e565b6121313387856060015161a33b565b5061215e7f40a72df5e5a62dd2280765fb8a647cd206f2b4b03d0c8b33768e43842255cb2660001b61817e565b61218a7fe66adad8d4a6aa47d74a7c2c9a38330edb938b430669b427fbafa997f15a3e5960001b61817e565b61219533838361a45f565b6121c17f5702af68b90c771f3cf965d4148e2dc20f3ef1de580d3a22dbd379df898ceb3f60001b61817e565b6121ed7f7d724e1c8987285473c688435109ee055fca5c5215d414b75a7e752213f2651260001b61817e565b6121f68561a83d565b1561229f576122277fc0cdb0874f983b49e27376562cfdc1bbc5dc6ce9d5c7a4b38db701b4352562d160001b61817e565b6122537f4c5b0dab83ca31fb1badf242a8183b6a455b66f8dc57a513d9bc71876f14c0fc60001b61817e565b61227f7f0406b4da42b8d84e9505065263cc6398eae95d8a79e9635a431cfbd785f9fe3e60001b61817e565b61229a836040015161013c54612295919061e341565b619a00565b6122cc565b6122cb7f93948cdf6d98fbf4e66ce502af08e6ce075f0aed3502ea52854b5db36697949660001b61817e565b5b6122f87f2074c777071aed0f22a20c901552b73d7281bd6ae626702702ffffc470ab778360001b61817e565b6123247f2cee4cb04b53746cf80d9b13ba5b2b8697331ac66d80134165e3026ae4e9c55a60001b61817e565b6123333386856020015161a902565b506123607fe182f8cc6655119317553855eb102904d65f73ebfc9b1d24a707453755f022fc60001b61817e565b61238c7fa02858af716cd958ed02a10e8b0c114deb5951630744edb9acb7e18a77e739ef60001b61817e565b61239461aa1d565b6123c07f23279c07a84c0a40e9670804a1076b915101514a82d2e7f1ee58ba533637d08060001b61817e565b6123ec7fc587290490da7439cc82f4afd7eb204c28f66d2e1b536cf972be343900ea732b60001b61817e565b6123f461ac85565b505050600160fb81905550505050565b61240c61ae41565b6124387fbc530f0fe2c2324bbbc409ee5d4f96af34bf189f39a748a260dc603c427c436a60001b61817e565b6124647f28c72fcf41a25690e52daeec9668e2305e17a76790b24766035199820e9f82ed60001b61817e565b6124907fb2558e7a252c090244939ec7d8287747ad4a59e7f67c6118d62e6b4cf90a485060001b61817e565b8082111561252f576124c47f7d42e9d63f90bc1494eed37d69e4bb34c7cf9fdc3c875676b053110a3549e49560001b61817e565b6124f07f303cacb664359ea37ce26e233144e6195cf881e70c8639c35eccec561d31878a60001b61817e565b81816040517f4e1deae400000000000000000000000000000000000000000000000000000000815260040161252692919061e60e565b60405180910390fd5b61255b7faf200d1935169726d4e3017b04dad3bfd42bbbc048b7907e9d069118b6a713bb60001b61817e565b6125877fd96bfbc278ab29ced855027d2fbca2a1121a7e71687eb197de48d1afa6cd493b60001b61817e565b6125b37fb35c4356aa1c2ccd4bba2070619c5ad55f67b3eb3893cd4bb7f82e684b8bdc3260001b61817e565b81610133819055506125e77f24c7fd657900fdc2129f73c3590c919b039f4a18b0da3c7f39c498ddfc1fe0e660001b61817e565b6126137fe98957c320f10c6e62795105e99cdbed4d495b60ac8911d1eb9b1d4dbbfae8a560001b61817e565b80610134819055506126477fba35e8dba51344975bf53df0cfe8a6cc97e3a7da4057438373161ef3f911831860001b61817e565b6126737fc54342af06fef892a4a132f2ae3de9aaccce09133df3d1b16df295c04dd30d1060001b61817e565b7fa40bc974b2b7304c66b9d01fc43100ec5b6171732d074da0bda432a2f33530ea82826040516126a492919061e60e565b60405180910390a15050565b6101386020528060005260406000206000915090505481565b6006600a6126d7919061e76a565b81565b60006127087f51a4f32684dd7ebaff422024acf478115290ff79a3a325a887ad192f4a6bf79660001b61817e565b6127347f90343db7ab7d16eb48710471fe77472743d53f6c7ff7418714f451a7c666b6e360001b61817e565b6127607fe5e6c074134ab6a1d8b3a211ec97366728c8db256f61cd4aafb2b0f2c496371560001b61817e565b61012d60009054906101000a900460ff16905090565b60606127a47f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b6127d07fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b6127fc7f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b612804611075565b6128307f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b61285c7f092223749b24d0ae4dc94cabd418968917f03a12fedaaa55fc9576fbbfddacce60001b61817e565b6128887f5e62a24f8fc2ecfbe42c4071284edfeb31af697bf46db7e5958fb111e30b657f60001b61817e565b6128b47f26d49ec6f02d5b3a3230e76aa9cb7b791c7c6f93d4557d1db6cbc72f4123f46b60001b61817e565b60006128be618f82565b90506128ec7f65f20508451acc0dc8d48226f20b9527b7e604541582d5b4bee776aeefad1eee60001b61817e565b6129187fb1867f8fa317b7b053c6ba31799a35483a8ea27b9adfa0ee94465f3013fcc63b60001b61817e565b60008167ffffffffffffffff8111156129345761293361deb1565b5b6040519080825280602002602001820160405280156129625781602001602082028036833780820191505090505b5090506129917ffc9f7f0a23905ae4995aeb9d4c16d105975cd6b3e91a5cbabb62a6548cd29a1360001b61817e565b6129bd7fd3d7f8ccc8feb24a230853e8ca677716ee38150ff8a1ca036ada58f17067724d60001b61817e565b600061013c541115612aaa576129f57f8dfd20b12130afc206823e3fea7ccdacbc2730f31b42235f5b1479dc4a28dc8360001b61817e565b612a217f573e1a1d1845e5ee08e98928dcdb44b1a4142441f6455dcd96f979bda124178360001b61817e565b612a4d7fa671992a56bbefef0363ebdeb491d348f92884c1f458bc514a251203b805288060001b61817e565b612a576000618181565b81600081518110612a6b57612a6a61e7b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612ad7565b612ad67f3acf819921bd33d64b3cf499135599ce50bc15dec15227262bbb9c8c75c78c8d60001b61817e565b5b612b037fb7365bcf82c7313ed6794862db5bc70999544ca510516a7fe1761baa885ced6160001b61817e565b612b2f7fa3c3ef6db28f1a4edb70e42cf211f417f8acdb95fbec00fd784fbca7065384a260001b61817e565b6000600190505b82811015612dec57612b6a7fa1fbe0137f670d2c2f2d0f271839fd1037a1f116af936e45d78e974769e0e0c660001b61817e565b612b967f73a96998af86407f83215adf4a5eaae836497dec6b3d675863df0214f81fa6a760001b61817e565b6000612ba182618181565b9050612bcf7fd29e5cab001d2813566f6f831686c896b6d808ba915fd3e3523ccb0bf2916f4360001b61817e565b612bfb7fc82ddb491a5bc34b2a0c55a8f6827c78ae2129022e5391f31399be1d37c91e0b60001b61817e565b60008173ffffffffffffffffffffffffffffffffffffffff166364c9ec6f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c6c919061e38a565b9050612c9a7ff728048bda3d61859d283a08a315c3458521a65fb97b633552bc4ce8310b672860001b61817e565b612cc67f530be2ab01942dc74d509fe5e4d6ed899241bb85a8f929cd351bfd2733d077b860001b61817e565b612ccf81618db6565b612daa57612cff7f8d2dd2ea261902d13d8505480dcf6be6fc99fd576a11899f96e55e58827833c160001b61817e565b612d2b7f6fda49310517fc588bc8a27ce956de790e4543ad6f7ed1c98a4cfc6afc6a676060001b61817e565b612d577ff17a7fa21784d1de098367b86aabfff09f8672326fc9ede2a6ed268236757cc160001b61817e565b81848481518110612d6b57612d6a61e7b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612dd7565b612dd67f0950ff4fbe5479819990f106321c598e6a8025128db27bb5f236e8ce220705d060001b61817e565b5b50508080612de49061e7e4565b915050612b36565b50612e197fcf9ac3dc4a3f811d1fdce964202a110b59e52de0806ad8b6afa48f53eb78ea5a60001b61817e565b612e457f38ad1e4e7f995a451da45aa1ccf3d96f07a347d294a68103423de984916ede3960001b61817e565b809250505090565b6000612e7b7f81af453d683887c7bba9bdc71c4d5bbf2c4ac9ff22494c700e8817af28a601b360001b61817e565b612ea77f9d1c67e4b85376071647eb5fd50e674ebd797c8eb09e6fdcf3ed4fa7fdb62c1460001b61817e565b612ed37fa86bb394e35f2fc57802d2225b17f22e8c955a20fe8701ba7005c0c552e4134260001b61817e565b600061013960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050612f447f0f823ef9ca619d21b13c899339430da2729fbd371cde565fe99932e4f1c92e3860001b61817e565b612f707f468556883ba4274d3bc3638aac909bb3b46f2eb68185e73667258f6c29f3e6cb60001b61817e565b6000811161301a5761013060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166317d9b034846040518263ffffffff1660e01b8152600401612fd4919061d6ff565b602060405180830381865afa158015612ff1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613015919061e82c565b61301c565b805b915050919050565b60008061302f617fad565b9050613050818585613041858961769e565b61304b919061e439565b617fb5565b600191505092915050565b6130877f1e14cdc4c7716496573268ca5b4ef259b5f7c8b8bda8b8a7a8efcf9ba073cf2f60001b61817e565b6130b37fd6a407369739847083101930563077e546ee9f7c872018eb2513aa09d0f19c5960001b61817e565b6130df7f20f61c7a67db2e1c2faa39453e55cde7c06d872a74c6e45e6df213ccef9978e960001b61817e565b6130e7617fad565b73ffffffffffffffffffffffffffffffffffffffff1661012d60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146131fd576131687fded2da8dd4c4b6def231b4bd1c098e35b6234df8bc1e48bcb85d877fec8f95b360001b61817e565b6131947fe5d4d315da5a7959bc022df06ff0738f8577d7c9c36514b504f95aa7df0c679760001b61817e565b61319c617fad565b61012d60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040517f91658dbc0000000000000000000000000000000000000000000000000000000081526004016131f492919061e859565b60405180910390fd5b6132297f4c65e525359bea4c3e996ced72e74fe235c3c863b4878c9b5020db342d8778c360001b61817e565b6132557f8f37792c7a5e33878ef23dbbab5969721379d8c07f358f52bd0f4f2f6ae074dc60001b61817e565b6132817f2acd680e8b26b33f98b2542c2ab97f877fbf325f9e9d3a750b0d047f847ec92260001b61817e565b6132ad7f0e8c86bf8233c044b9f6f8a0224f9b91cbb5b8e27a77af7656a6569597272c9a60001b61817e565b6132d97fc8c0cd3dacb2fdc0b7f7adaba8ca2f4bffde9033f7faa211f4ddd22416d93b7360001b61817e565b6132e161aebf565b565b6132f46132ee617fad565b8261af22565b50565b600260fb540361333c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133339061e4e2565b60405180910390fd5b600260fb8190555061334c619e2c565b6133787f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b6133a47fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b6133d07f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b6133d8611075565b6134047f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b6134307fe6a9b3c7d774e5f6c5b3b47fee2c576a6c7c15ef42a9b227ce9dd3c80c1c490a60001b61817e565b61345c7fdec2b5d7da0d7cf60d233547cfc5d6d35d72bfc432083c5349dec020156911f060001b61817e565b6134887feef248673933b54f36da9a959c7b444a5db9d57d909eaaa4c2b662d212657c4760001b61817e565b60008273ffffffffffffffffffffffffffffffffffffffff166364c9ec6f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156134d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134f9919061e38a565b90506135277fd370433679a7c89fa4e236f4bd69e3c95865e671acaa1afbf0a04aadcc59787c60001b61817e565b6135537f7050cf46e9849d84931263ed6f78b16f9316cd8bd1c802ac7097a9fcd2ef0abe60001b61817e565b61013260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166320e8e89e846040518263ffffffff1660e01b81526004016135af919061e882565b602060405180830381865afa1580156135cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135f0919061e3e3565b158061364b575061013260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b1561370a5761367c7fc0c033cd43d0f8e179c2e00883077b8e844fd55d120792b3b1febe159ddbd05660001b61817e565b6136a87f58054db75e64856389e1699e08ecde8e52d63943487983f24e413dd98aa6228460001b61817e565b8261013260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040517ff81af68300000000000000000000000000000000000000000000000000000000815260040161370192919061e89d565b60405180910390fd5b6137367fa33df73b788494570475026d51293af49df7a943e33ee5a752f9f073b6cbc2dc60001b61817e565b6137627f55d3b2362badb9de42307d482efb3ccdcd3c179498632c30c34b8a4892add67360001b61817e565b61378e7f6f663fe8db1321d32b6524662c786b1220870e5e46284cd175f79cd2ebab100a60001b61817e565b600061379a848461b0fa565b90506137c87fec93ec419766bf91597875d8125e72b9d3a9b3e4bdf4f9871b6aaf6325ebc61a60001b61817e565b6137f47fac5591029fddf2d94cce41a1d6789c105abb86a1820fad8612c9ea04146bb31b60001b61817e565b60008314806138035750600081145b1561389f576138347f83a413f93d41fa5aa4eeb78226e727d0f525c4115047a9ce5be83af3e6bfc1be60001b61817e565b6138607f32adec0f07ded8adbf1dc555ab7f7f9f7c33f45e7641b38e09e4aa644e312a8660001b61817e565b82816040517fedffabb900000000000000000000000000000000000000000000000000000000815260040161389692919061e60e565b60405180910390fd5b6138cb7f47b98058cb153db972936761e6dfafd7110ca70c8673eb985b640a7e6ff939bb60001b61817e565b6138f77f8613d1743ff6994979573d284d100160d5977716b1576e68c859109cd83e878a60001b61817e565b6139237f886b23e5c6ae15059a7b6dbda63a54ce4e82b186318a4120884be681977faa5660001b61817e565b60008061012e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccbbe510846040518263ffffffff1660e01b8152600401613982919061d89e565b6040805180830381865afa15801561399e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139c2919061e5ce565b915091506139f27f30b4c9159611bcd28f371a01aeb0a37b7bd68952cf212ce95689e4485b282b0a60001b61817e565b613a1e7f85c8546da4f1c341c836d89c3bf1ec287f0ea707b476cdfffc72e4bb97ea27cf60001b61817e565b613a2933878761a33b565b50613a567fab41acbe624a99d45bdedfd42dca5adf1cd8b8a97abc62d2f8d5bd7c75ea2c1a60001b61817e565b613a827f95105a0e641cb1d4f3ca7f14cc4a8ffbeba26da5d346ad9594257e49b072568960001b61817e565b613a8c338461b37a565b613ab87fc38827fd676ac372379552b0d7f094fff92f46dcf2bb4550b90f474f23a101b960001b61817e565b613ae47f67de296518fc6cd37fc736bad5f8097768c9fbda4f1911e9a92e9610aab9d8e660001b61817e565b613aef33838361a45f565b613b1b7f829092bc92f031a7158302ea43db43c2c92d0b3cf914461ded3ed12a9e551a4f60001b61817e565b613b477fd583c82eb47b49d90444d01967cbc88e55ea7423f2629d2d6f994a0445e5b5d360001b61817e565b8261013860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254613b97919061e439565b92505081905550613bca7f7636b58eddcdd3090ed6ccc9b5b471e0f8c034c7e8dc0754c3b1b397bec73fb860001b61817e565b613bf67f534b89c2c242c4a6301b73be149316ff98038717a0cc243f49b859e641d90c3b60001b61817e565b613bff8661b4da565b613c2b7f1f0b2594e2dd4184a80c81058584fa8dad97789d2be22e0e6d9b9e627450c17c60001b61817e565b613c577f925590089fcca209c66cce64e5e108d9a202ab5cc367fa405e54d7714b80c6d260001b61817e565b613c5f61ac85565b50505050600160fb819055505050565b613c7761ae41565b613ca37f95be776ef135c1c796920cf1d26ff6da56ebb2159e0f87195f5f72a0c0f3145760001b61817e565b613ccf7fb7af94b5088ec0f3f5b54d7f8239b4f9808ccd1ed66b6fef2ee15ea8ad12fa1260001b61817e565b613cfb7f35145c5fa3ee640c4f2df11fbf4ff65aca6abff6381095a23dc267509b3d3a6060001b61817e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603613db957613d5b7fed417902db99c0d6f2ef00df04613018f3717c565e61f4d718c59f1ad0362d0f60001b61817e565b613d877f433374e896d3fa70b7185774cfe11ac8e4442b0d3bc3c582208255e9d6d466ef60001b61817e565b6040517fe21d05d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613de57f5f5f07caba9f45ae7574895925463bf0bfb8014c1c2095a9663dc315848ddf4460001b61817e565b613e117f37966b57fd622042e317cef5ab413c9ba48b21cfbe0d8d1019757807fa8c50b760001b61817e565b613e3d7f6b9b06a2202d7da12be9925ceae0fb394ea3f1087073ece05122c594e9fd42bd60001b61817e565b600860ff168173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015613e8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613eb1919061e8f2565b60ff1614613fbf57613ee57faa4b05d3a18a04d3ecb810ce69ed3c94e2c13fe930b9696597aaeb462f4d698e60001b61817e565b613f117f9f893c8862288456c29bb446eb53ab2ec4ade82433febe1cadc7da29da607a0360001b61817e565b8073ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015613f5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f80919061e8f2565b60086040517f1dd7cdcd000000000000000000000000000000000000000000000000000000008152600401613fb692919061e950565b60405180910390fd5b613feb7f9ca45637c26055a0d4fbd941729462799892c5db6c2f7e2756c102915f2f5b6e60001b61817e565b6140177f905f52496a5e34c7aee3b9f083825acaa77d65b793efaf75ea20618f804b692960001b61817e565b6140437f6343cdbfee6ce6b0dd698893a158073aac85a5892a704437678b300f8666737760001b61817e565b8061012f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506140b17f4209660529be46f2503f314f1fc6d1f1e36ca65cdf371c8b50232f1ceb12cf4860001b61817e565b6140dd7ffd3a5491b6783359c7aa108155c8ae7e63470e3228867e112c40ba9b66bc2af860001b61817e565b7ff523a7f068712cfe690e1d0ac9d9390f8053cded5617400d4004311bf0157c278160405161410c919061dc85565b60405180910390a150565b600060c960009054906101000a900460ff16905090565b600061415c7f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b6141887fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b6141b47f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b6141bc611075565b6141e87f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b6142147fdd0f7745a134d10ef551ddf4e7cd84cb98ef1f0e29d6ed2dbccf04564d851be360001b61817e565b6142407fc4c881fc861842463826ff09c552af44ddd9d2761d5a7463b40e734d7df8547360001b61817e565b61426c7f8955b7ddb95c744c65931d2273a55435ea7ae17083a71c58dfec74b70fcd795d60001b61817e565b6142758261b6b4565b9050919050565b6101335481565b60006142b17f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b6142dd7fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b6143097f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b614311611075565b61433d7f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b6143697f14a2ea735c237b94205bdccba207ffb37a3970e32a5c03730f220997a27f676b60001b61817e565b6143957f19355a773788aa75889c838fd47e38d55955e2ae2e920a33ec96f394db1abd2260001b61817e565b6143c17f09a56a99eac8efd65d6d2b28c663b403420e51d043b9a47b13fc08df9d812f1460001b61817e565b6143cb838361b0fa565b905092915050565b60006144017f68cce6a5787c02d2d2714f1e573e7feaffb3a2d61df7cabed960193da431b7d560001b61817e565b61442d7f50e4c2ec614658efdfe4d86b20ea471dae50c6b76c26919e85fe90c42cc28ed760001b61817e565b6144597fdd5924b27251da8405eae8f3584e2d9da7e3604db1589d1c4f215d7c76290a1860001b61817e565b61012e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663647846a56040518163ffffffff1660e01b8152600401602060405180830381865afa1580156144c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144eb919061e98e565b905090565b600061451e7f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b61454a7fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b6145767f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b61457e611075565b6145aa7f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b6145d67fe7203ba330617f2c29a0d456207e25f5083726514f00e26ab001210d7cadabeb60001b61817e565b6146027fde4baa4a8c9e836a1560537ba9a35da408227ad7061e1c6ea899d0562f56a14c60001b61817e565b61462e7fbe16bfc74399fc95ab0e49fa73c3d12476d2d906c98b5bf06248cd119099789d60001b61817e565b6146388383619e76565b905092915050565b6000603360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61469161ae41565b61469b600061b756565b565b61013160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600681565b61012f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b614702826146fc617fad565b83619b1e565b61470c828261af22565b5050565b600061473e7f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b61476a7fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b6147967f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b61479e611075565b6147ca7f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b6147f67f20ffa425816a05359daf280e666d57265fbeef55cc51419ae4ca63afc6577b7a60001b61817e565b6148227f0f9ca9003624e7a854ba95b6daedd22bcb958e7dafcede6eb16c5da6223b433c60001b61817e565b61484e7f6d9ab7ac33e82927c4a38d34a6463df8de0f1b02a636f607265e299d7036eb1860001b61817e565b61013c54905090565b61013060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6148aa7f1e14cdc4c7716496573268ca5b4ef259b5f7c8b8bda8b8a7a8efcf9ba073cf2f60001b61817e565b6148d67fd6a407369739847083101930563077e546ee9f7c872018eb2513aa09d0f19c5960001b61817e565b6149027f20f61c7a67db2e1c2faa39453e55cde7c06d872a74c6e45e6df213ccef9978e960001b61817e565b61490a617fad565b73ffffffffffffffffffffffffffffffffffffffff1661012d60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614a205761498b7fded2da8dd4c4b6def231b4bd1c098e35b6234df8bc1e48bcb85d877fec8f95b360001b61817e565b6149b77fe5d4d315da5a7959bc022df06ff0738f8577d7c9c36514b504f95aa7df0c679760001b61817e565b6149bf617fad565b61012d60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040517f91658dbc000000000000000000000000000000000000000000000000000000008152600401614a1792919061e859565b60405180910390fd5b614a4c7f4c65e525359bea4c3e996ced72e74fe235c3c863b4878c9b5020db342d8778c360001b61817e565b614a787f8f37792c7a5e33878ef23dbbab5969721379d8c07f358f52bd0f4f2f6ae074dc60001b61817e565b614aa47f9773ae104382084c29b002190a630bc7a4836ac5311e0c5cf8d35a39247792e960001b61817e565b614ad07fbc679052196500558fdf799fab8b6df07577006956ece4d9549b186eda15626060001b61817e565b614afc7ff27b84414b9f9ebb60515e4f1d6c464d2f828f5c3705a5d23087861db6d5b51260001b61817e565b614b0461b81c565b565b6006600a614b14919061e76a565b6064614b20919061e9bb565b81565b6000614b517fc87bda01cfe03b18bbeab628e635f38b9087e9ce3e9970db00e3d0fb7fc2ff8860001b61817e565b614b7d7f746d7d881f1c7a275336b9031097d23799ee5d1ed0b8a2181ec448075c335f4c60001b61817e565b614ba97fe7bf1d62983b150ba9d615b67efa81f0307c8e2b24ee9cc8b13fc0ceeef5020760001b61817e565b614bb1614bbd565b905090565b6101375481565b6000609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000614c157f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b614c417fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b614c6d7f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b614c75611075565b614ca17f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b614ccd7f1aef930e33af6eec3984713525721fa8f21904631bd493291982f897e7e4649360001b61817e565b614cf97f9b19f3ef2658c9377b9f85d8f2653b53d3c793c7dd194ace3b412ce41a30022260001b61817e565b614d257f0ae6d86e3d60e5b5f082ea6353baef409587e6b8b89e3e15b3cef186a1899dff60001b61817e565b61013260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b614d5661ae41565b614d827fba87ec40593aea2c54a447c850030d14786bdbca34c90b018eb932c90b1aadc860001b61817e565b614dae7fd124e438d672cf3bce9141bc05024c2ab3f69792eedfcc5daebab70f09e32afb60001b61817e565b614dda7f99349b6fe831d85fcfd01d700bd3a37011e6abd834d1fbd9bcdf575bf82b6b5a60001b61817e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603614e9857614e3a7f4d8861453c937574a403300b315c7ea5a6a2aa146a5b4cc4452c5c1fc590e31060001b61817e565b614e667f0f07584d59e5386db9490690b970b4f8ee4fe4414fde678b5d3e5f734a20359460001b61817e565b6040517fe21d05d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b614ec47fb7eb26ac35891d30c75443cf86626d0efae65e4c1df46bc5803f52823152007660001b61817e565b614ef07f6876494ed8f966b4dc1464f5fb2eb4795aefdaa6c139b44dfb2d20035cf0c24c60001b61817e565b614f1c7fa77927e01c57f222a21d13ae9ddbbb1d5d5d749fa8a8b67d1a254a87d729cc0160001b61817e565b8073ffffffffffffffffffffffffffffffffffffffff1663d8dfeb456040518163ffffffff1660e01b8152600401602060405180830381865afa158015614f67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614f8b919061e38a565b73ffffffffffffffffffffffffffffffffffffffff16614fab6000618181565b73ffffffffffffffffffffffffffffffffffffffff16146150d457614ff27f7ab84510cd5571e342a6f8de2c0ad62c93f58dfc12e1b30b048f10ef7afeb7a560001b61817e565b61501e7fafe409c2408fa740d745e4badfcdc35b951ca152df1923f855d613f0da3f71e460001b61817e565b8073ffffffffffffffffffffffffffffffffffffffff1663d8dfeb456040518163ffffffff1660e01b8152600401602060405180830381865afa158015615069573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061508d919061e38a565b6150976000618181565b6040517f077602540000000000000000000000000000000000000000000000000000000081526004016150cb92919061e859565b60405180910390fd5b6151007fa2299638d2bceba42bc69e2534fce912334b7b897b5d888a662777ff31a84e4860001b61817e565b61512c7f2413ab98990eedfdc258453c0353a7ab3a86ea325e0493e3b84d9e3ae736fc1a60001b61817e565b6151587f4d77580f766c79be8ca1c5182c0b8cb61e8a0116c4a3826811af25276cff0ab460001b61817e565b8061013160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506151c67f8897e5dbab9f7dfe710553e6e07c9a7b323c9b8186e116a342c0d701d9c46e7460001b61817e565b6151f27f2489714a76f2af6356ce06d79e0e8e49cf2055c5e5163b6008348cf0892bfc8760001b61817e565b7fce2d1e798d2ce42e86a515798c5267d8a0775f0c6c0d724bb7bc91e24d3cce9781604051615221919061dc49565b60405180910390a150565b61012e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61525b61ae41565b6152877f564d7153724f1ccb809f921e405836acb9b4956a66d97c09db91679c901eae9a60001b61817e565b6152b37f879142ce630896bfa07db0cf653eaec59a2cb47cecb908bf24eb4e5bc773b64e60001b61817e565b6152df7fc406e672493722e2e70441f8510b88ced70053e3e61fcb8020448512e376986f60001b61817e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361539d5761533f7f8b92b302b1e99b285a300f671da633c9813f3b0c5f843dfb843159bc66069f5860001b61817e565b61536b7f9fbe16e9fed3c7b5d704b021908aef6f875435d31b0a9b82d67b4ccfdbe0d59660001b61817e565b6040517fe21d05d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6153c97f4ffd22688241783f60ea50745160b1091dbd2a421438da4156f749df1b544ad060001b61817e565b6153f57f86351a7eb7470b54c73b0692417796e7f91cb1dc5cec6771192fce132deb701360001b61817e565b6154217f3f7a9bb35607a8a5b17894c79e9427b541d2b887de6b3f911df7c4bae1f1484b60001b61817e565b601260ff168173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015615471573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190615495919061e8f2565b60ff16146155a3576154c97f333ba19af90954fce35170a7305ed62693773872dff379fdcbeb0b72ec5b19f360001b61817e565b6154f57f8985fc724d4312b9967b01937599a32ea602524bb0f3b6f758ef603b26cc1e8d60001b61817e565b8073ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015615540573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190615564919061e8f2565b60126040517f1dd7cdcd00000000000000000000000000000000000000000000000000000000815260040161559a92919061e950565b60405180910390fd5b6155cf7fec213db3e343c71eb4cfe7befcba7480b2660996acab3aff0233310cae917ade60001b61817e565b6155fb7f80fb2a2b2d4e8b2519e1052b8abe64e073a3e972f7b0cfd37dea2277f85a9c7260001b61817e565b6156277f6ef58174d5e4c8de3cf13eaa64b098e93d004308065dcd64be428f5840259ecc60001b61817e565b8061013060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506156957fcdd5f9e474e1ab323e1db7d9da017f22b5443696e03523b57f6ca4b71261fdd560001b61817e565b6156c17f04e6bf760b89e9dd5b8a89f3ccc61dbd750d5b7b48aab7a18576cb6a3516b17160001b61817e565b7f2b42f26d9e3870f84933cb34c05b2463a97259bf9adf3582d70d6bd06e832aec816040516156f0919061dcc1565b60405180910390a150565b60606037805461570a9061e276565b80601f01602080910402602001604051908101604052809291908181526020018280546157369061e276565b80156157835780601f1061575857610100808354040283529160200191615783565b820191906000526020600020905b81548152906001019060200180831161576657829003601f168201915b5050505050905090565b61579561ae41565b6157c17f44ed09e6306b0e6e275b01040473e19632565fc08c404e113f810c9a1b51104760001b61817e565b6157ed7f8e5c825f0198d3b2c7efc147cd5045d8394654e6d73a3fcaaad71b2565c7aae260001b61817e565b6158197f76f491cd3c052cfc046119e52a524fada9d124900403a95c1e318fc9861da5d060001b61817e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036158d7576158797f43cc95d5442d16db6ae0bf8230cfe462648f3b63f80a7c2c2543ee126da7bdaf60001b61817e565b6158a57f55752d16eb523b0d186af324df96f0ab38e7e9fbf5a2e09ac75889d85cf1ed3d60001b61817e565b6040517fe21d05d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6159037f9b324718242f5ec1d0a2987dfcac0eab739941ae3c26687118aa97e3ae9f430960001b61817e565b61592f7f19a3f9d4891cf241ca893f492debda9feb653fd511bd9f6b56be8b4e6d8bc2bf60001b61817e565b61595b7f68e406fd44d866b1a912daa323ee51196874d41e9cfb1667500de84d23955bbc60001b61817e565b600061012d60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506159af7f7e5590ac14597e4796a6ab48824785a9b9a22ccecf79cfccbea80d9dc8d63ce360001b61817e565b6159db7f0508ec84836445c67c4cedb7cbaa4d7244dd4fc2abea7c6ec8e2140e9c004ff560001b61817e565b8161012d60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550615a497ff4db8ee8abd940b5a22572c25b8dd2c6c9b3499adcd0a631901e9ef7921ec63e60001b61817e565b615a757fa3c3badc8dc72d090c3a0f8142c34de6dccd4919ff59420ff8061930f30eb92d60001b61817e565b7f60ed9ffad04b70bf58c43b18d1f0e54642250116c1137ac1cc483144912435088183604051615aa692919061e859565b60405180910390a15050565b6000615ae07f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b615b0c7fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b615b387f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b615b40611075565b615b6c7f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b615b987feb4d68d5d27dec10c145b0549f3377e9e96852b6b044d19012bd55f97ccfd80860001b61817e565b615bc47f0c0b850270a8f966879fbd29c6dbcfeaad4499840f0044b1a2a35028e795703c60001b61817e565b615bf07fbc5c11f483f789dd3015c867eddd5abaec5cf187c13ec2e5d54e8518ff597a0660001b61817e565b615bf8618f82565b905090565b615c297f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b615c557fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b615c817f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b615c89611075565b615cb57f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b615cbd61ae41565b615ce97f7879219e6e53e3841461e468b8c8ce5f3c205d41ae74cfce834570983e20a21760001b61817e565b615d157f9ed5ef3c911073d6d1a666692c2e260a7600fc89feccec2727449486b8bffd5f60001b61817e565b615d417f26351d057dac1fa9598ff9f39da6f3bbb7ad31b835c62f6162153402d0c661b760001b61817e565b615d4a8361b6b4565b80615d8757508273ffffffffffffffffffffffffffffffffffffffff16615d6f6143d3565b73ffffffffffffffffffffffffffffffffffffffff16145b15615e2157615db87f7f37e05c935b0239f95c986426972d8b6bc6f9c29a7e99270c9809896d6699fc60001b61817e565b615de47f761d7225be01c202a52aa03e21e9635a8f78ada7cfc6e69323a5250c39a8f8e760001b61817e565b826040517f97f05cc5000000000000000000000000000000000000000000000000000000008152600401615e18919061d6ff565b60405180910390fd5b615e4d7f77102d80692e76d575e2d300e475daf7483358f04c0fe1509ff0d0d6a811963d60001b61817e565b615e797f37a28f212167f201898948dbd866240c40d5f0acfb6250439f716842e11925d860001b61817e565b615ea57f30c5330db84258a8b86bfe09cb75133488612ef0769574c0427798b6e1286c7f60001b61817e565b615ed082828573ffffffffffffffffffffffffffffffffffffffff1661b87f9092919063ffffffff16565b505050565b600080615ee0617fad565b90506000615eee828661769e565b905083811015615f33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401615f2a9061ea6f565b60405180910390fd5b615f408286868403617fb5565b60019250505092915050565b600080615f57617fad565b9050615f64818585619baa565b600191505092915050565b61012d60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6101355481565b6008600a615fab919061e76a565b81565b615fb661ae41565b615fe27fa835fb038809d4d6bcbe410cfc2603a0c7f0d0a5031107b287859e0e9698274560001b61817e565b61600e7f31a8791bc67412144ae95ac469158a944950609b36808834fbbfbbadad29791960001b61817e565b61603a7f3083f18a1c5d3578c76d324d9f3ac1aa741679772de9a8013be653849e758c2860001b61817e565b816101368190555061606e7f0dcb89cd7cd7a901013fe9a2b31f5345bbeb5dd0a9331f0e3876221d48ad325560001b61817e565b61609a7f64cf2fbb7d575b74a72322eba92a1ee782ba2bf5434755704cfe5a7dcdc3fffb60001b61817e565b80610137819055506160ce7f9d48256c11a2e58e6c0c46ecc163af5702334e0c99624d960105bfce2780086860001b61817e565b6160fa7f1540a7b44ddd32353585fa6b183d0334b1cca8fb38b2bb80af13130445ca9d4260001b61817e565b7f020bf23f373ccabbafa51024353ff2a1475f224779d55f4d18f8ccc5c7ecfaed828260405161612b92919061e60e565b60405180910390a15050565b6012600a616145919061e76a565b81565b60006161767f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b6161a27fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b6161ce7f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b6161d6611075565b6162027f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b61622e7f6bdaba3e379257962243fb73d01a5a9287580804524c820176480c228e7b107960001b61817e565b61625a7fa164d65a033c0d54de108124861c98e7dd7020f4df858f3ce5f21e0fca1bb0af60001b61817e565b6162867fb7ef44037acc72ad58706274702719545939d321889c1c7e8006edc783b4321560001b61817e565b61628f8261b6b4565b616320576162bf7f25f962b40563aba4ce30dd09ba9431d55c42e91f114b1818a4ee3d838f029a3b60001b61817e565b6162eb7f96eb4551a5d3d6eef922da2c6c865960a4176313f4a62ad2c7eb1a9d059e746860001b61817e565b6163177f6685e7705c236da755b2b3c075d8fdd56fbff2e1c9639b70911d1eac029f9fdc60001b61817e565b600090506163c7565b61634c7f04822522cc1a57c8d671fc4f81996107e7004d8f8a2a3d3158829b386ac2d12960001b61817e565b6163787f26d5801040aa25149c8b1c94c5dc65bc8c672ff4eeeb24c6fcea0ed55631bc6a60001b61817e565b6163a47f1002202a7b889577cd95265e3432438b3e9ba895697afb959191bf0ad9f37d1c60001b61817e565b6163ad8261a83d565b6163bf576163ba8261918c565b6163c4565b61013c545b90505b919050565b60008060019054906101000a900460ff161590508080156163fd5750600160008054906101000a900460ff1660ff16105b8061642a575061640c3061b905565b1580156164295750600160008054906101000a900460ff1660ff16145b5b616469576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016164609061eb01565b60405180910390fd5b60016000806101000a81548160ff021916908360ff16021790555080156164a6576001600060016101000a81548160ff0219169083151502179055505b6164d27f7a10b7a2a72f7bb26aae26c9a7144bed7c16a7adb85bc3fc06d0eee535fbdbb260001b61817e565b6164fe7f7eb7f86c145323db75e9d1c59576dfeccca6bac58f383da76e810f0e8a42fc1f60001b61817e565b61652a7fb82d1144d125134bdb6c8ad2bfa23615f67ea38f8a04d392da40234c058a61a160001b61817e565b616534888861b928565b6165607f51a34d4014ed0388e3e3774ffec69073e7797946461997b68bb4851025dd859e60001b61817e565b61658c7f27add12d71c217e4429c0b530f56cac7908e06660eae36c53f3bfb3aa4aea88b60001b61817e565b61659461b985565b6165c07f6fcc0e7ad926b0061dfae76cfc682ee29340e5dfbf38a66856d44838e4f125e960001b61817e565b6165ec7f89de7b3a6c6677e048993855ee5b49fbafeaceac90c43929725ba5d46fcd428260001b61817e565b8573ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015616637573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061665b919061e8f2565b61012d60006101000a81548160ff021916908360ff1602179055506166a27ff756a3682fd154199bed4a312faec08a887a5faf46daaed416cae5ab0041d2b760001b61817e565b6166ce7f51c0cc499005e5155e3e31b15cf25c2a808e8196b12c3ce0780207bc93e5027760001b61817e565b6166e38661013a61b9de90919063ffffffff16565b506167107f3272b6845d8d68874832456598bef754fd5d6db196bd5d93e77862fc6bc8b2b460001b61817e565b61673c7ff10f7082676448b59512b439bc6c38c33c9aad132d0588d039ca0b315d5153d760001b61817e565b6167458661929a565b506167727f154d66acf78bf30a87d935eefd3275e25a9e464ad6de14ee5d1c391d88e5186a60001b61817e565b61679e7fe70fee723cee76f3b5229777ff9922f84ba8259daf224829d6a74b649f4f6d0460001b61817e565b6167b5866012600a6167b0919061e76a565b61ba0e565b6167e17fc8253148f06ab7d74fddcefb1b2ba8ba1d3f1b54db181abe79d84d36137cfef060001b61817e565b61680d7f2164ff5b0353b4a36b2843a42231d8b6595c2627b928f2d4dcbc910d856c973c60001b61817e565b61681685614d4e565b6168427f945d91cfbeb1f84a8c6993f364c4a7a6afad311886c6f639baf31a4933c698c760001b61817e565b61686e7fef59e71783438eac6c1f1de6d4f9fca1164a117fe2521ba8594fa0e2b7add4b560001b61817e565b61687784616b03565b6168a37fa231b035b01a434e8c97567cf484d0f86c28e56370c8b0d9de5329bdc6f64d2760001b61817e565b6168cf7f8549ed59c9c05ec06caa874e08816a9eb465e511f3df71db6b614b21e80ad45d60001b61817e565b6168d883613c6f565b6169047fff5a19b4e74032d881cfb5ad2b4ea6a480e04d880326889416ce2265da4b5c0a60001b61817e565b6169307f672eb7826dbca8faaa6d14e69e1f0d494c240cc6a7f48c3e6a24d220abebd6ce60001b61817e565b61693982615253565b6169657fdcee329f65a490bc3e5254b3914e3cd8bedf6f6e40afdf13253c6b44e636021460001b61817e565b6169917f8c4ae27c825e1306a5fca5c4f709a670f638a050da1ba1cf3de361632807852d60001b61817e565b6169bc60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff612404565b6169e87f674a8a4e5af1fed72b98376a0717fd5c51dd00f1e8b6bc4aaae57ef6fe7a7df260001b61817e565b616a147f0e2f1ea06ba522da3beca59a1a725496600583fb85b9cee12029894752824d5760001b61817e565b616a3e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80615fae565b616a6a7f59094eaffd8af45ef73912f2f1f81ebbfcd7c5c41763864b00813a6fa3b61e8360001b61817e565b616a967fdfbd9d1950f84ff934da26ed2618977f48edf762e3081c47a5b9b1b264a324fe60001b61817e565b616aa0600061790e565b8015616af95760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051616af0919061eb5c565b60405180910390a15b5050505050505050565b616b0b61ae41565b616b377fa86ff0f8461233a00abedaa2a5f62f7562d06ec14ce13689f4830ce9247bf6ae60001b61817e565b616b637fc998d6ab5ff6290a515862c29f05cf99f25d587bb4db244ff3dc75899969343860001b61817e565b616b8f7ffe8a4756e84c38b5704ba23862d199fd17d978492055b0c1f87a27576f510ad560001b61817e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603616c4d57616bef7fc30e99f53b0c7eb8b1b5aa524f0052947d31555e079a2d1c28ffdb6964c41ea860001b61817e565b616c1b7f5882d438953cf2efa0b42fb14cb5f1b78bf1f4081015c003b27dd0105701ad6560001b61817e565b6040517fe21d05d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b616c797f76bcb1fd0da2e56634cb14821094090d08cc26bf24e4fc3a1b284a433fa437cb60001b61817e565b616ca57ff6799c9d46e09a6c042ca0e874c5802ea1dab082ed3e822b6ed7ad231f6d50a560001b61817e565b616cd17f31dc26bfe7e8fcf74ec52ee320973c4b407c0848aca5fa5cd4e7e07257c2d73560001b61817e565b8061012e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550616d3f7fd8abfc46cda2424384e4728e7304728e08cd9dcbcfda98f5ac8ee891a8c0f0a960001b61817e565b616d6b7f4dabfc9d89cf5ebb11dd706a5863c786dd4f3c80ec027118119fb1d0a478eef260001b61817e565b7fe3c5028b6066630edda64ff80edd17ecbaf6db73936adf66833b8eac3f46603b81604051616d9a919061ddce565b60405180910390a150565b6000616dd37f668be87fd30b79acd1753d7ff8bd568f68ee0642be93c62ae7761b0beca921e360001b61817e565b616dff7f343fcd9b2cb0ec3e67e741b30d34720ac2a74faa4991e089cde7992fed74f5cb60001b61817e565b616e2b7fd623d74f730a52903c5036915d5c9016139fc0abd6cf5409d54470538bbecaba60001b61817e565b30905090565b6101365481565b6000616e667f652adef71a3de8a77f51893ad556564178b4c8dfabc3b4f308d7b9450fde250a60001b61817e565b616e927fa9c124b5195c19b2902ad933f99aeb4d314cca35beedf2e31ea726e1d6a7819360001b61817e565b616ebe7f8ecc475684715c2970e0304d8f07f84ad9de5876bfc0b987b4f3e355a4a1023f60001b61817e565b616ec86000618181565b905090565b600260fb5403616f12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401616f099061e4e2565b60405180910390fd5b600260fb81905550616f22619e2c565b616f4e7f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b616f7a7fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b616fa67f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b616fae611075565b616fda7f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b6170067f75c61aa90a7dce0a8177d3a79e7f546ffc7e516ef2edff8bdff2a79360d176d260001b61817e565b6170327fdf1e9051e3de6c9c6dc274e6515034423ac9d1f97898b097aabb93eb42b3ac6b60001b61817e565b61705e7f70c4c1be5f7e2cf850eda0b58b67f4e3c903fff0e5625cce4abb4613db63bb6560001b61817e565b600061706861106b565b90506170967fba4785474cac433ed535ae31434008ce522cf3b702143bc5ede306248b73df4460001b61817e565b6170c27f6f168f5494cbc2b1f9d3b5a90174fe3aa2d916d3bcbd78435b6bd00b0d7cb9f460001b61817e565b60008214806170d057508082115b1561716c576171017fca8e90451e8fdb1b5c0565b5c48d6a307f608f6d5fe3769464d3cafd2a32ed3760001b61817e565b61712d7fa25f16ee9ebcc250d1e10eee6c7fc45ec0f41c5de79bc4a9ea6917ac2f5bf13a60001b61817e565b81816040517fa520f62300000000000000000000000000000000000000000000000000000000815260040161716392919061e60e565b60405180910390fd5b6171987f84d4d3d391b1104db2ffc3b6271aa3fb443ef8d732dc6ff5b7bf869105c3219560001b61817e565b6171c47fc7be6900629344e095eb23e52f60d30b70576bef42280e0fa67b4cc490958d5b60001b61817e565b6171f07ffd4be61e6a89916f18bef032048680f2a9bf192b6337d311582947f6e81c28f560001b61817e565b6000806171fc8461bc9b565b9150915061722c7f6235b6b7ca1dc0c0a6da93878b3b45a63d10dc848a4a46bbe859a0dcb6fdec1f60001b61817e565b6172587f2c52ac3f69464591c35f4c0504d604281ffaf438c6dbc289e120aaa1f721ba3b60001b61817e565b60008061012e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dcc30919876040518263ffffffff1660e01b81526004016172b7919061d89e565b6040805180830381865afa1580156172d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906172f7919061e5ce565b915091506173267e48326e4b1034c9e8da887bd26d31af1e75419ef1bde96ac743f7411e3e27a660001b61817e565b6173527f6096d740fbae36cbff085152d6156571ef6af1e8a0a795528bb398554b5fdcef60001b61817e565b61737f858787617362919061e341565b61013c54617370919061e9bb565b61737a919061eba6565b619a00565b6173ab7ff534fe261271ff878a1191284b9d322b09de57daa97e48f68921a16ea838363c60001b61817e565b6173d77ff995801e10e74aa8a4a0f20678d0829d2c9fd86b02ee26f8a296ea92e66f352760001b61817e565b6173e233838361a45f565b61740e7f9e5579e97601365266afd9a16c7790f735a13db4c70b873444fd91cdfae9b0f860001b61817e565b61743a7ffd0af3af56014df6188378f9a6889c7fdad6b6c88fd2223bc8c3612f54128e3860001b61817e565b617444338761af22565b6174707f8e984fb5359b7646dd4915272b6145cbc259bb6a744eb09275ab5cfc466b2e0660001b61817e565b61749c7f7847ce030c3a1126e89fa394dcf56f1615251d40c9d689a909cda692c3a2f4f460001b61817e565b60005b845181101561762c576174d47fd8b5f3ea54396e02600c3ee0ee3967c04c6583eb9887efea29ac89b660b3184460001b61817e565b6175007f9324a8fbe0a13ed32e63542d114dfa3b08f22658175456e6514e7e1b3121469b60001b61817e565b60008482815181106175155761751461e7b5565b5b602002602001015111156175ec5761754f7fb24494c279a765f283d1e3bdace5a28be00fd2bdfc474de97138b97b0ce6f6e860001b61817e565b61757b7fd7a3371f0496ce08b4bb1f90a414399bba064777c60127374d73cc58ef104b3560001b61817e565b6175a77fe133544b43909e07fd4b37fbcdb9de775be910ca1ac0009d7b7a58ad8785ed0160001b61817e565b6175e6338683815181106175be576175bd61e7b5565b5b60200260200101518684815181106175d9576175d861e7b5565b5b602002602001015161a902565b50617619565b6176187fceeb9c946cfaa29b47b5ccffc729dcde29b7f8064fc09d1e9c84694dbb12c7a760001b61817e565b5b80806176249061e7e4565b91505061749f565b506176597f7c9a61e55e1381fa65e0161623804e29d3404fbe9dea6b5d6062297fd4e2ba0c60001b61817e565b6176857f9d8339b35944191637d04094d09c57bfb9c02c10483012a3bf9f76841852a07760001b61817e565b61768e8561c128565b5050505050600160fb8190555050565b6000603460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006177537f053205fb42c2af8c5162d21b964b51a671ffecb23c9d1be35da0fdbd318d756760001b61817e565b61777f7fa37a6ee92cdf610d9096426457d0f30a95b11ea463aa4a4deaa493d5c4176bff60001b61817e565b6177ab7f889c683ff2e70d3616cde73a8f49c80ce89b98f1ac3164cf6eed6ce94df9df7b60001b61817e565b6177b48261a83d565b61785a5761012f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c061e080836040518263ffffffff1660e01b8152600401617814919061e882565b602060405180830381865afa158015617831573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190617855919061e82c565b617907565b61012f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663233f953e836178a38561918c565b61013c546040518463ffffffff1660e01b81526004016178c59392919061ebd7565b602060405180830381865afa1580156178e2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190617906919061e82c565b5b9050919050565b61791661ae41565b6179427ff326cdb8ab9227f45228b50a174fb27cc6dc89e364c1b1a2bf07f5e0116ec1da60001b61817e565b61796e7f6b4f5011e02ffccabe4ef12111dbc2b9f97a76df2ca405cdee2aee0b39bc7ab860001b61817e565b61799a7ffe1f5c72b7f352371d91a077edcf1672197b0eb15bf410321a1282d731d399d960001b61817e565b6006600a6179a8919061e76a565b60646179b4919061e9bb565b811115617a50576179e77ff1abe02a2db6412d513d785fed3c332439f7288aae29010fdbd88e2b730208b660001b61817e565b617a137f6b70cf6ff5c4bfef5802878c657ca540f25e3460b740cf0733701f25f0cd94e360001b61817e565b806040517fc18bc93a000000000000000000000000000000000000000000000000000000008152600401617a47919061d89e565b60405180910390fd5b617a7c7f84fa7b8100dfc6b27c72ef8e948aae6c779b167367a75b51f936f6d2d73ac51160001b61817e565b617aa87f816631dc93dd11467dcb9cb47025312f82fbd6d7be487e3a067c563d4c68e87660001b61817e565b617ad47f38a9fe58cd6395b0e59ce2a0f190659e9e69c71af83a6aa0d56f5e685dffb3be60001b61817e565b8061013581905550617b087f0c771acc0c521cedec3ee4d4c90bb0ab3ce803116bfe98fd4ae98330446447c360001b61817e565b617b347fa2dc9275e3694df57e9edb8490af201afc5009b3c870a23c83ae99ecd5afb7f860001b61817e565b7fc7cffa4415f19fda37aaf051c84a1126b4968fb93a228c99cee161bd2258c5e961013554604051617b66919061d89e565b60405180910390a150565b6101345481565b6000617ba67f5d02c59985b18da06aad93b8b554e1da28966990a15d1a528ed9d747066b9d9160001b61817e565b617bd27fd8ba9b8edddd00abacc7e2c4e55826d14dadabf423c89e56de7c42eb2ba1863960001b61817e565b617bfe7f4f484ef50b590710e0561f7d7993e3c79f03e5aa8755775f4c48a18f45fac9b660001b61817e565b30905090565b606080617c337f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b617c5f7fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b617c8b7f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b617c93611075565b617cbf7f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b617ceb7ff673be39189f88dd7a6aff51a04c58ff09edecb3bb020c99cf2d38fc070124d960001b61817e565b617d177ffa0f3fe9f84c5e512cf8fce293ff2fa01f90b1ead7e3a1d5d5b9f9f93ec4d93e60001b61817e565b617d437f619bff111bb613dafd7bf8b3bfe9155ea45871da2d6737f7a6aec2755be40cf260001b61817e565b617d4c8361bc9b565b91509150915091565b6000617d837f551f7d7b36bbf8cd2411279d4dc173fc1ba16ee22507b9d15cf27bca000667d060001b61817e565b617daf7fdfc0a0225b0d9b7d9038e08c5a92c1431d86b907d9b917a6e29e81e38230852a60001b61817e565b617ddb7f303030a167d48149392978fe67462d1c9fc379ccfbb49d6065a176f4045d4f3260001b61817e565b617de3611075565b617e0f7f5a4af93e7fe97872f29b54286f62ecef301c636454ee430f63a47953722f64d660001b61817e565b617e3b7f605a2ba61a8ecdb417dce57ea53ccb41fa61a4cb84d5c4d426c5ebadc4ebc39460001b61817e565b617e677faa99ce6014d84febbd136e8d7155fc65befb525e281194895cb0f4c04d859d2b60001b61817e565b617e937fa2e7601b9f8cfe0f757f137003355b30b51ef07a4dcb7bbbffe4668d2b20c89760001b61817e565b6000617e9d61106b565b9050617ecb7f39d9bfead6eeb38e0ce315335c0cbf6b28ad417a967022f67079a667d66c903c60001b61817e565b617ef77fcbcb091e6b1f9a53c05ae78b2f33c01250fcee9f14560006f4c4f0f6290f1c4360001b61817e565b60008111617f06576000617f1a565b80617f0f61c2de565b617f19919061eba6565b5b91505090565b600881565b601281565b617f3261ae41565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603617fa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401617f989061ec80565b60405180910390fd5b617faa8161b756565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603618024576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161801b9061ed12565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603618093576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161808a9061eda4565b60405180910390fd5b80603460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051618171919061d89e565b60405180910390a3505050565b50565b60006181af7f25bd61ecf5d3bad55c67d2562fb53eb8f56612ab95890c24920fa450eab14cb360001b61817e565b6181db7fa479fb045cc0b4fb3ce21831cb4975ab4cddd9e170520265efd6bfbd12b499e060001b61817e565b6182077f958f63451061ca922134675926c947c2921e203c65c0394f8ce9acf9ef94885260001b61817e565b61821c8261013a61c5bf90919063ffffffff16565b9050919050565b61822b61d474565b6182577faca784b367a41ab80d92fa9133bc7858e5173e138ba869e0dadfd0c8f5f0b20c60001b61817e565b6182837ffd70e1924225cd3f27bb9b237286d802be81db25ed29d9dc3d320f5c09a349ca60001b61817e565b6182af7f303c6792d53654a44cbbc2e9b9bce2604769944cf929f41523693d7571ed855660001b61817e565b6182b761d474565b6182e37fb56b207879956bc6a8add7f832719ac83872783d93a23a6ab98b9f067171bc5360001b61817e565b61830f7f0d0b39af3f93a8bc5fcf3797d18afecab3c8285f5fcffd94138f5dca40e7854960001b61817e565b600061831a87612e4d565b90506183487f91ca9fd7bcd2a2b867483400709bfbf654694c3fd05d9bf36a3fe5b68bc247a260001b61817e565b6183747fccda20b5730b9b4291441dabc9617f43129c58da5cd3c7d3bc5ea9a99d85bbfe60001b61817e565b600061837f87612e4d565b90506183ad7f0c73c4b1dc302b26c2a48975e9d5f40e5a1798c5b76821bc199347a060c22e4060001b61817e565b6183d97f496c76aadfa9fc8d47808e6a1ef64b895111603e88da52a0badadc484a68ff7560001b61817e565b60006183e489617725565b90506184127f74a5626eccdc9b36cf6bf820c0892e05b921dc13fe946749c347fc5e98ee10ac60001b61817e565b61843e7f3f35d582c868d63af27f95f01f09a2b6b42ef7ecefa33356ad3ac4bed74478c760001b61817e565b600061844989617725565b90506184777f7b752c850de6d0a09719e55952905825e6efcf4929c1bd4f0bf9873996335ddd60001b61817e565b6184a37f1120914b6d30f59c0c2db07de17a479a888847554dcf442b5151b54c9560343460001b61817e565b60006184ae8a61918c565b90506184dc7f91bce1b09e8ba6c7492db99a245970950b88720e2e91ac0d287cb737358a323660001b61817e565b6185087ff5cfa818dc2a36deda092fdcbf7a93f7694a9fa37b6d6919d053869af0aed54560001b61817e565b618512888261c5d9565b97506185407f5e1a128c951141c2908f77f880d34e1d65e0f53666892b19c8cfa64d1498ab0960001b61817e565b61856c7f7114a6dd09badacf34d87708b7f9cb59a7f1e0f7066f3326d04b56dda6d29be960001b61817e565b600085148061857b5750600084145b806185865750600083145b806185915750600082145b1561868a576185c27f4e49e8e263c9c102778c02bf4d6b4df9e2a86a08f783c3bc903755ebe354588860001b61817e565b6185ee7f3bd000b451b98b0687037eed4c6772cf38869d04a13698bf193775ddf1637fd660001b61817e565b61861a7f4554a2e18b262923424b2a3dc2dd7c670108f3ab4dcb76b4a6dbd46c69f3a9d860001b61817e565b888660800181815250506186507f7efb1af68cb876669ab7e2cecb41592a7dff960f883d0b3457e3be5a40bb3d3c60001b61817e565b61867c7f987ddbce3caab65e0cf458f2201086a513b0d373ac0eb5724ed5abf7e6dca89060001b61817e565b859650505050505050618dae565b6186b67fd9d32972b59531b6f53b30cfb55c3581d65ee012220d755751e376d885d1630360001b61817e565b6186e27f5168a401c9d9ea3fb27cc9d555b41358f0e8754576a27f854e82b69b1fc98e0160001b61817e565b61870e7f7f7bec02090c5c9fdfea206010459b52d2b299274e9070073643d3b2144d352260001b61817e565b888660600181815250506187447f11bbe788d328ac48e68ce974501f5dcfc3874f2e7c86f95ae4db6c2fa83274e560001b61817e565b6187707f997e0171e633a03c01b559a1d6885ff1d893eeeca9615ace74d9209afcd317a060001b61817e565b600061877c8a8761994e565b90506187aa7f93fb88123825ea3260d0f7e1e59d444a42ca114d29dfeb7a2d852997e609e9bf60001b61817e565b6187d67f06cf6c518b92e4051ecdad7cb84ade388e03d88538dc1783bfc6464bfbf2b4c460001b61817e565b60008385836187e5919061e9bb565b6187ef919061eba6565b905061881d7f8a2aa45bf08f9a807838bd085d157362d76827dd6af6dd4c0f7c65601d9831f360001b61817e565b6188497fc5715f051dfb3926a12f6eb27416a1cd5d5552652ff3433c7d244aad14d2875360001b61817e565b618853818761c5f2565b8860400181815250506188887f5dc87af37d915d4579780d770542cb818f161c1e8bd4113261b44ff8a141c20e60001b61817e565b6188b47f198ca67ad4cfc88c72f1534a75ff911d5c3551f0320ebfcd49f28bbc3cc0074860001b61817e565b60006188bf8d61a83d565b90506188ed7fb90a7de98a81a164bf7dae84bcd2d1ce3a13b26cf7f7aa43acddfbb2a500b60d60001b61817e565b6189197f625a59527a7efc2fe0448aad3e2aff6acfad32a2983f5ab088bd12b6832c520f60001b61817e565b80618928578860400151618947565b61013c5489604001518561893c919061e9bb565b618946919061eba6565b5b89602001818152505061897c7fe3a242f682843eff05e556d0bd922ea6a5a4d3e17eb163cfdb098253333f42c760001b61817e565b6189a87f8c422bdf75d9ac68a3d44591662cef526a0b8d8b17acb7b318ed668159f098fa60001b61817e565b8a89602001511115618c1a576189e07f0b770251f3afaeace58c1c3754851d75370d8ead7c708f362ce966c6e9c8d9b460001b61817e565b618a0c7fe334e91570f5d97d979ffccc4d183d77bc1e6a858a3f1bdfb5bafd78d0307c5460001b61817e565b618a387f663487e2f264cd1b2e36889d02d0809964b274f7620012a3859c669fcec82eaf60001b61817e565b8a896020018181525050618a6e7f60272ff7c115c8d708fa4d83756f91023beaac33bc1e4eb16c3847caff19cd4260001b61817e565b618a9a7fabee65dd61c5c7b37cef7fcce43deae56851a56afe8bb552e46c374887e5212860001b61817e565b80618aa9578860200151618ac8565b83896020015161013c54618abd919061e9bb565b618ac7919061eba6565b5b896040018181525050618afd7ffd8e00bbbb9220e7655a88d04e2300180051e9f96dbac57b684c0ceac2bf932a60001b61817e565b618b297fb3f82b828b641e379631f840704f35c0baf196309a2531e7b691d39e2001967660001b61817e565b618b3789604001518861994e565b9150618b657fb98a0c9bbc6c038f73db64039dd27be52f8377770e2241b738b4f794e3063dd960001b61817e565b618b917f41a7c5f726f8db46cc162f9e140f0ba12f15b3ae3f6140d28f22a92f22488f7d60001b61817e565b858583618b9e919061e9bb565b618ba8919061eba6565b9250618bd67fe484620ca5a361ca4dad8320d04d925ad760564bba50ef5e4e3232f1a69cee5d60001b61817e565b618c027fe4c3158f8244be6e1b1289fec958c2a2ac2cde24fce8b2ccf69808fa17a08e1760001b61817e565b618c0c838961c5f2565b896060018181525050618c47565b618c467f35af4519171f473fef5a4c3c125a6b279abe5b3ffdfc150be4a6453bc9d7cb6860001b61817e565b5b618c737f9ffe00bc74723bea7dcd9868593cf68a2d13107e033b236b9c1f3ae56944036360001b61817e565b618c9f7fbd33996db3b73820c987fd63e7b4d219d977e21568c338e5b9100b9c8be377ff60001b61817e565b618ca761c2de565b618caf61106b565b8684618cbb919061e9bb565b618cc5919061e9bb565b618ccf919061eba6565b896000018181525050618d047fb60d24656ebc7ef1560363d17fd922423c1bfcaee5843948347be1c063a6d9b360001b61817e565b618d307f96dfb56c16c77c462cbfc023370d0bbc598a47b7aa43e8f916bd953d837706fe60001b61817e565b88606001518c618d40919061e341565b896080018181525050618d757fc7d24197686d8a75c556d2781eb159c8d008b1905078f9952e1d50ccc5ef5b1660001b61817e565b618da17f119e23360136bb5b048cef47ef0fefe376edfa5caa6fa583f2437e9419f681fc60001b61817e565b8899505050505050505050505b949350505050565b6000618de47fb6e3efc2ae5e24627cbddafff57fe6dda47582314905eb97896700740cf8aa7360001b61817e565b618e107f92385b8d104b5b0c3ae76ce978d8aa5d9837718b4641578989260a20843d0fa160001b61817e565b618e3c7fbc153942e499ceb2192525284c4dbb6d8d1824b385b3d29d6ebdfe997aeeb50560001b61817e565b6000618e5d8373ffffffffffffffffffffffffffffffffffffffff16619018565b9050618e8b7f84fe6f27464da3d6138cff42d9b833038100fc4fd6a238b41dc7ea24e01a9b7560001b61817e565b618eb77f3e5eab018865ecb6648436657e1723907aed4e110c0ec97b34d78052664906a360001b61817e565b8273ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b8152600401602060405180830381865afa158015618f02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190618f26919061e38a565b73ffffffffffffffffffffffffffffffffffffffff16618f466000618181565b73ffffffffffffffffffffffffffffffffffffffff16148015618f6c5750610133548110155b8015618f7a57506101345481105b915050919050565b6000618fb07fa97ee7395a1b0050c048354f060a29fa2baa6f3d9a1dafff6c795f2f2074898460001b61817e565b618fdc7f0d5052dd14d58ddc089722ff8c9535697f6f8eb3087a990c2eea84f54a173f8b60001b61817e565b6190087f4aafbaa0b3a47343c2a14af236196d258d0f482afdbb19d9c66a528e98bf592c60001b61817e565b61901361013a61c6a4565b905090565b60006190467fb7f980168adc791d818af53e590c23f006d7e5ed6b098cd2338990d0e381b97a60001b61c6b9565b6190727fda2d029e690305abc6022e9bf0e3de413840bc957d7b761738b0f0add5696dc660001b61c6b9565b61909e7f36b958f4355042548ea4504d68cc4ae0d2d8951f7a336c87c46426eb5208315660001b61c6b9565b60008273ffffffffffffffffffffffffffffffffffffffff1663d59624b46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156190eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061910f919061e82c565b905061913d7fbc2b64ef0e340446a027823b2633d7a6cacfffccddaf2ae11229a1f0bc666ced60001b61c6b9565b6191697f817e224b63dbc11b6f0af28ff2a2771056b1c1d76cffd9de34224c644804f42d60001b61c6b9565b428111619177576000619184565b4281619183919061e341565b5b915050919050565b60006191ba7ff28581cfbd1f650811ab2d7db123c935c21fb4db07526ce3e99f8a088bd88eff60001b61817e565b6191e67fec992c5ad162835bd7e28b3050d2fbbf12ce2881d7742320b73e5479970c863c60001b61817e565b6192127fea32b2835eff5ef4aab09502015fa1aca9f720359c9546ff7eb48a36bc2230a660001b61817e565b8173ffffffffffffffffffffffffffffffffffffffff166370a08231619236616da5565b6040518263ffffffff1660e01b8152600401619252919061dceb565b602060405180830381865afa15801561926f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190619293919061e82c565b9050919050565b60006192c87fec4ffddf040ca1e71797fd29d29dbd668c76ffd2dfe2121f35b5c23121a050e760001b61817e565b6192f47f5598f813497fe21b3436acd155b9471b240644b91da4d74e4aa106897b454f7360001b61817e565b61931f7e98bfe2d4f10cf33f7ec6d56ecb81e3b1541157bb45bfa06228777ec85d83a160001b61817e565b600061932a8361918c565b90506193587f03e0757eb7c1d7ceb8ca7978ccfb01164723c715c2d750abb5002222852e5a5b60001b61817e565b6193847f12b5bcd9edc7da6403703e6db48ac246fb94cc51a5b12507f327c549f1d693f060001b61817e565b7fd1fbbd81a5fd46d869b5cd6883d99108cd295072be1b09d36381bbc78b68693983826040516193b592919061edc4565b60405180910390a16193e97fc28ee7c57c1b38b468979d2eb809a76c82f13d27eacda05d0d93bd996b13aace60001b61817e565b6194157f921a703207b7e2a74ede092d22703ebb5d8ad1f2e746303c3c197634fbca74a560001b61817e565b61941e8361a83d565b156194b05761944f7f2af30fe4e99cc916a050e072725e2de1852a55368fcebc5c9e660d400f495cc960001b61817e565b61947b7fa2201c154ee4dc3c35d88cebd04365489178d49719e23df3cdc99612d0fcc5ff60001b61817e565b6194a77f83fbd748dd46fddabb156721e3e204a0148649c7b3a1883d58769c66e865da2560001b61817e565b80915050619949565b6194dc7f43819dcd394b1902aba8c0a760308b4bf40cf5f9b3c8a2e510121c4304fb373e60001b61817e565b6195087f9055fcf0c05bee6135bdcc7360f16fad0ab9b303dd92a133415428bec7e8972c60001b61817e565b6195347f7a96f33d349f7406c1dc1a94ce8b0266b1460258aabe7a3d261c8e78aa445aa160001b61817e565b600061953f8461b6b4565b905061956d7f6618740f4a3f95da5dc8b257c636e39b75c5e4cf18c0ceb9538ba7b9e61cddf860001b61817e565b6195997f13c834e23f4fee06af8beee4c0dd04edbf37eee99d58ed32708b13bdb4722fbd60001b61817e565b6000821180156195a7575080155b156196b5576195d87ffa8bfeead948e27f6a24742e4a99110ffa51847e4b54c8de36e05ef2637e0bbf60001b61817e565b6196047f29364c381a2289da3475a56e9a06c4d78000272c499d480327763b491b16d1ca60001b61817e565b6196307f6831d2c66cdce84626e5e178f46c6b29c5287e7ba03eabd8bda826bf47d393e860001b61817e565b6196458461013a61b9de90919063ffffffff16565b506196727f7f1d50cdcb898a8782ecc002e4dc8779ed3ffa32002f0ff3620795f3ac8ccbed60001b61817e565b61969e7f9d540d7e3bc932ea6f5d94669fbee6edbc488b3c0a1799a8407d14ce09ffa38560001b61817e565b6196b0846196ab86612e4d565b61ba0e565b6196e2565b6196e17fd6ca80b93719dbc0439e34f0c2295355cc9b123635e629ce1e243fd3178c475f60001b61817e565b5b61970e7f455cf4a108722bdc4ce13b5167b39963e83e45c8b50f9abbacae4739211d9b6460001b61817e565b61973a7f07d99b486e946c683817523d08c4a09013add4a2e159e64542d2efec9ddc30b560001b61817e565b6000821480156197475750805b156198be576197787f4585a37914b28cf37351c30d00a4dad64fbb8e58c3adbd0ce0c05c5b34f6f6e360001b61817e565b6197a47fa9d6dbf3047eb065cca3c8434ec255dc72982e70e87d085853ad0d33efeeb11360001b61817e565b6197d07fbc0ee343df23593e9ec3e033372afeb8121a0f903b8b5be400b15e790f58dcb760001b61817e565b6197e58461013a61c6bc90919063ffffffff16565b506198127f38b663c9cd764d9454e911783cc4524ec85e5c837e36dbef25758b39a0633fca60001b61817e565b61983e7f77e72570412254b8aba8c2473c47f16af71a0a794d8b2557096f4a13880123b360001b61817e565b61984984600061ba0e565b6198757f0f8c65bf9744f6bf116f53aa9662ffe67ee240467e92efe1cb36ecbaa62369f660001b61817e565b61013860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600090556198eb565b6198ea7f460e8d0e4e0cac69d9deb417cad3ab8ed6bf719d92c4d7e70f973aa62b35149360001b61817e565b5b6199177f11d41a3432409458c68277ade9d8421a8b0a7971230fe1aa90e750773a5fc73260001b61817e565b6199437ffd37bcd8ca2508dc9ccdf6bb8feb744be698aa19ca17a29aaa74448522a18f2f60001b61817e565b81925050505b919050565b600061997c7fd3f4d4e9f7f7114e34dec1b603b95cb0fe8740cca16a678d789090e2a586846760001b61817e565b6199a87ff84dca655a548895cd657e995df7c02b3ad67c761b05e12b92f6d70e6e35edd360001b61817e565b6199d47ffda4c5999a7a5728f9ab71deb827c20ad8724de0202e620b30fce7aa3faf42d460001b61817e565b6012600a6199e2919061e76a565b82846199ee919061e9bb565b6199f8919061eba6565b905092915050565b619a2c7fe57450373c34c0d547092b6a9550c646dc83396fc35a9f833e669148747b7ff760001b61817e565b619a587f0e1672ae4eeafacf1b58af7fab44cf009a98574353bbcb0ab9ce708329654c1d60001b61817e565b619a847f437d6bcf31a3e4dfe065610363b058161eb36b257ed113c7e755bc6da27c9ffe60001b61817e565b8061013c81905550619ab87fc25e7304613f3596a597a775ca2507c2b6db27b93d2b4ab6f5d418f2b59eba0e60001b61817e565b619ae47f06b0bdfc6be9551866d9e486110ce6cb9595d0d1caf22877d5fe809f3505dd0e60001b61817e565b7f9cc737f332356ffc0bee94f3125342b67a356a00505e0f85891ff6f662c5103181604051619b13919061d89e565b60405180910390a150565b6000619b2a848461769e565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114619ba45781811015619b96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401619b8d9061ee39565b60405180910390fd5b619ba38484848403617fb5565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603619c19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401619c109061eecb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603619c88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401619c7f9061ef5d565b60405180910390fd5b619c9383838361c6ec565b6000603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015619d1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401619d119061efef565b60405180910390fd5b818103603360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254619daf919061e439565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051619e13919061d89e565b60405180910390a3619e2684848461c6f1565b50505050565b619e34614117565b15619e74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401619e6b9061f05b565b60405180910390fd5b565b6000619ea47fd00f4ecb349cd471acae2bef825c8ac13bb0cbb1aeb0385f79aa4a4ce6a5ea6860001b61817e565b619ed07f0cbb054943c121e1ddfb30983afe20467f129d136c6a652ae62b759c632ec7b760001b61817e565b619efc7f3f0e93e7baa8b4b3940080ad0be28f2c9c4c9e0c6adab95b1b138bb50c5d93c260001b61817e565b60008373ffffffffffffffffffffffffffffffffffffffff166364c9ec6f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015619f49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190619f6d919061e38a565b9050619f9b7f9a95db065af9be4e69f2ea1194d47180590dea564c938f1b77aa0031340ef74c60001b61817e565b619fc77f830822fac61b5cded1dcac3eb1f5a26f53c0594d2ee16c70581877683ec63e2260001b61817e565b619fd08361a83d565b1561a0b35761a0017fe9d2d9a56f32bea19b6c3c9e5a00fa9747130901531c91eeb198cdd2506a5e7960001b61817e565b61a02d7f1359e7b1ec2fdca8172f01dbe37598b83e4e77653d3224e6f6adb4b69155018a60001b61817e565b61a0597f443960a60a0742b01ee81abaaffdd00eb5c4c33b00056c288f6f7b872b15086b60001b61817e565b61013260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161491505061a335565b61a0df7f2635d8226025aaa070aab5493790b2a704929b64349ce1a3eff79bb2f41cbee860001b61817e565b61a10b7fb38f89fb4548631130d144ea251971db9c04144a47501d019e7a44d449a578c260001b61817e565b61a1377fdd70c0fa5bed715617a82026af054f2c2630021a4f04825409ba5ad2184f233560001b61817e565b600083905061a1687fc862e3040a9ef605e1c5d8fb1781e41086c9d28b2a58f18163fde1da0d5e105a60001b61817e565b61a1947fd14ad362877b2aa3fdef19f1e61ceccad8fa7c4fbff4349fdf4e6c83415285be60001b61817e565b60008173ffffffffffffffffffffffffffffffffffffffff166364c9ec6f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561a1e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061a205919061e38a565b905061a2337fe100f567220f2e41470f684b0b94a65b732c01568196527a3eb662724126771f60001b61817e565b61a25f7f80a2441c942128007ca27d8116b60370bffb63e836996f7eac29abcd0ca2bd6760001b61817e565b61013260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561a30c575061013260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561a31d575061a31c8261b6b4565b5b801561a32f575061a32d81618db6565b155b93505050505b92915050565b600061a3697f634fab3bac0b896d4287ee3df5267d76ebbcf79c600fb6183f97ffcad07b05fc60001b61817e565b61a3957f5fd00702aad48bdab3d4ae77012839d5300f00088b6bedf94b7e3b053af5af4660001b61817e565b61a3c17fd4a7b3da8aa62cf5969c179d07ab0ae79ad85663fe54ad07469437e4c82cd60660001b61817e565b61a3f58461a3cd616da5565b848673ffffffffffffffffffffffffffffffffffffffff1661c6f6909392919063ffffffff16565b61a4217fd7a229f78d2032f7c86cc5f930f80b02771c6333100bbe781939862c88a461df60001b61817e565b61a44d7f1c66b741f8dd6b95bb451516cda465e70f565bb1aa397b964303abca4ce61fdb60001b61817e565b61a4568361929a565b90509392505050565b61a48b7f406b880321af53c0daba78c95862414e7870d0ae6bf52d9572e397b26f5574b460001b61817e565b61a4b77f63efcb8f2339bdd7c1ebe9620abf08d301efbe31b3d690e84eab24e8117865e160001b61817e565b61a4e37f61b7aa73778b463919c8b2fe34b7a4887b89daf2d80ef11ab66c469d4bb7867c60001b61817e565b600061a4ee8361c77f565b905061a51c7fc996545b598a47e7a0d3ed9c3506edfb5c8728f3e37f6a17f691b52049a08f2160001b61817e565b61a5487f2aeae6ed08279e55760073d5819422f321e435a3a5301aed70af2a4b6e88071a60001b61817e565b600083131561a5ec5761a57d7ffe21aac626e6988051304f8384e0633f862ad9c7242d143157208bcc38b79e4860001b61817e565b61a5a97f8e0f58a7fea970ceb347729e3a1d0b7b15f60b74d0761907d17eb3fedef23a0660001b61817e565b61a5d57f4c7c407a569c8c15338df01a95fb98749e72d9fbed47031bb8d37232accc11eb60001b61817e565b61a5e78461a5e1616da5565b8361c79b565b61a70e565b61a6187fc23319a667ba51fe7d595fb0a7ecfe3fa6fb713510bb64d072954a89df4eaf6c60001b61817e565b61a6447f071cbea46793a545d4faf792bfcfcf12ae824024e5a607259b9dc1994a993ddb60001b61817e565b600083121561a6e05761a6797f1ae849f9305b16243a688f6b53b4ebe0b85ebdcfe120175bcdd6ce745e77d9ee60001b61817e565b61a6a57f689f8dd7d2cf80a2fffa100be0a079f00b35609def108186ef25e725f6b8078c60001b61817e565b61a6d17f3b97b96ca69e52a985d9a01c71e2d6b9ba1056be9c6f742fd21e1f0b9704944b60001b61817e565b61a6db848261ca67565b61a70d565b61a70c7ff058bad544b3c836c63d6cce2ef15647441081e025d44c48cdbc8e5133a56aeb60001b61817e565b5b5b61a73a7fa88a311c31b417b40367ab7b27f7790f36f11e922b37171764786318669b37a360001b61817e565b61a7667f2bacc7cbd66b6d73c50e78cad4abb804a63cd1de4b46ab59824cada80eedfc8e60001b61817e565b600082111561a80a5761a79b7f7c11a7f150069c70cea049ce0e207849840eb30c021892a9db39e2b88a83229e60001b61817e565b61a7c77fed295807e3f4d2965b6c509ebea45961b9fbfbdaeee2dfe826373d311ea55a0660001b61817e565b61a7f37f77f5c3012d688d05ebb944a07ba1e128068a359a6590a637b47c107b7f31f75460001b61817e565b61a8058461a7ff614b23565b8461c79b565b61a837565b61a8367f569d65c58a4951e9c6642e291b0066be3d8fd76ce73361367920e6fa186b294360001b61817e565b5b50505050565b600061a86b7ff8fba7a47dd65d8540c4753546ea9d1a86313c432a7eb5263d6208dcd46d854360001b61817e565b61a8977f9b494ce01a664d63f773505816e8ac8929eecfdae638ea1c397b5a6dcc60590f60001b61817e565b61a8c37f8086cb3aa1a6305dacf93544099cf2ef92c5778c1a6a895ed338c2bb53323b4b60001b61817e565b61a8cd6000618181565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16149050919050565b600061a9307f3727ada4132eff29832679c8f165e437aa25a9318ba0676ffd0120fdbed0f1d660001b61817e565b61a95c7fd02973341cddbe6ac79abc59d319d340f19646ba8bdbe79d20bbbe656ce11f7f60001b61817e565b61a9887f72425880e86be2fc3f9eb6d1666dbf73aa5ef524b62f7621fbe9fafaa082c4ee60001b61817e565b61a9b384838573ffffffffffffffffffffffffffffffffffffffff1661b87f9092919063ffffffff16565b61a9df7f9e37ec9bbeb13f9583bf036d36768208d8e5ff4bc2dbe10609c9059739096b7160001b61817e565b61aa0b7f9f3c9f814ecd80f794c4c58fb5924e4e71d5a074ff3ae3b0271bfdcc8b4314db60001b61817e565b61aa148361929a565b90509392505050565b61aa497fd0416ffd7d9bc9f41d42945e2a002b30bca6a42aaac3cedd468ecde2e1b1f44660001b61817e565b61aa757f74be75e7968a92c52d2e5cfa564493d5e46a2415fbd799742ccce9f79cf0c6ad60001b61817e565b61aaa17f3e1cd593bf26c5eaa1150aa9e3f18a9dfce576e2352aa87233983661f2197a1c60001b61817e565b600061aab561aab06000618181565b617725565b61013c5461aac3919061e9bb565b905061aaf17fdd39f444747e8b87e36039d80f076b982e244d7234b02b7674bed312dc12328860001b61817e565b61ab1d7f190a77c2698bc5ab5a2b798dba35625843bc6550800f9c8e993d6cb14cc60e2e60001b61817e565b600061ab2761c2de565b6006600a61ab35919061e76a565b606461ab41919061e9bb565b8361ab4c919061e9bb565b61ab56919061eba6565b905061ab847f4dff9bedf15d19b267b3dc5a47c4d75ac2c370416f42867d170343a708bae67b60001b61817e565b61abb07fa583e19faf510e17a4dff3c1406e50d36d697c89236d022efc59d667c0a2c7e460001b61817e565b6101355481101561ac555761abe77f420d53b7601d35a780dacdff51cccf967be6355d538907e70ab684a6e03f449a60001b61817e565b61ac137f7fab65726e4ea36039edbe8dda5dcc7138c226c10dd52cf0f502945de75710e960001b61817e565b80610135546040517f25ba9b1600000000000000000000000000000000000000000000000000000000815260040161ac4c92919061e60e565b60405180910390fd5b61ac817fcc08208db10d8e365484717e6dc892d6a18b8c445a75482187df8045e9af5e5660001b61817e565b5050565b61acb17f392aadc528a433f934e0f1724536a75b3a26130ed98efa1a8338768cc5d7e68260001b61817e565b61acdd7f4290f72e477b379260c613ebbd84c6566ccd984633a6ddece59607f4f3b58ecc60001b61817e565b61ad097f9fc94d0f3b316b8f4cf449395e57adda06f3c670cdd4878d7d6b62567728e08760001b61817e565b600061ad1361106b565b905061ad417f92bf2a33b0fce0c8d8bf141c9b3cfff90317afd47568aa2dc563ab5b2c47eefd60001b61817e565b61ad6d7fb09d32c7624f27ffd8e6e18ea4e5625b06d239165a98f65cd719fa2bce363e7460001b61817e565b6101365481111561ae125761ada47f3195da66c72a5df9a42ad8af2e2d6d1f18feb530eaf54c11c6af9c5801c0d47960001b61817e565b61add07fedbd70501c4e50bd8ba8d9b728230706fa1981e9262c2775e242a82e1ccd8cb760001b61817e565b80610136546040517f23b53af800000000000000000000000000000000000000000000000000000000815260040161ae0992919061e60e565b60405180910390fd5b61ae3e7fa87b631b4a26b19e3b33a5b0ad016603eece1ab307dc3a2c75ab2c7ee20961b860001b61817e565b50565b61ae49617fad565b73ffffffffffffffffffffffffffffffffffffffff1661ae67614bbd565b73ffffffffffffffffffffffffffffffffffffffff161461aebd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161aeb49061f0c7565b60405180910390fd5b565b61aec761ceea565b600060c960006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61af0b617fad565b60405161af18919061dceb565b60405180910390a1565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361af91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161af889061f159565b60405180910390fd5b61af9d8260008361c6ec565b6000603360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561b024576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161b01b9061f1eb565b60405180910390fd5b818103603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816035600082825461b07c919061e341565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161b0e1919061d89e565b60405180910390a361b0f58360008461c6f1565b505050565b600061b1287f6ba6c09f658fca66c867f8b44fe95671b775bafde18811debbe53901ddcf31c460001b61817e565b61b1547f5806a9a9aaa1ae9ef73d842788c2949955316863d84aa96958caf6dfecb8b70160001b61817e565b61b1807f6c95172faa467dc758f4d4bdf0a60577580c0f507bce2dfe35fd891d881f4ccc60001b61817e565b600061b18a61106b565b905061b1b87febeef2272c49baf3e4ac5bc756cf78eb96f7a80aef680019959833350534950660001b61817e565b61b1e47f53e3e5e09ff490f6707725922ba92f1a3ce4887e4a2bad715816e239c35d8a6360001b61817e565b600061b1f88461b1f387612e4d565b61994e565b905061b2267f09c12d07f59eb9894b678f85696bb63978c8a52495e558dbd899bb90a845d12a60001b61817e565b61b2527fa5300afa99bcba0476988dae7492cf3f6d1c3a5d49e2985f1d1346289a3ddfe960001b61817e565b600061b25d86617725565b905061b28b7fea68ed567ddbc9ed13759ebf0ad38424ec58856bf6b677b5f490811f0b14dc8360001b61817e565b61b2b77f3d9e69d91860c35fefe7e307e552d689142327108adb19a2af8b1038114a6e5f60001b61817e565b600080841161b2e9576008600a61b2ce919061e76a565b828461b2da919061e9bb565b61b2e4919061eba6565b61b313565b61b2f161c2de565b84838561b2fe919061e9bb565b61b308919061e9bb565b61b312919061eba6565b5b905061b3417fc8e5b0c07e6fe97eefafd9a3756f3d6f3d67bf8d48c4189d17b9da65aab9ca8e60001b61817e565b61b36d7f0ad395cd3c81b27e610cc24345ac0c478fdb4137a4902e79be73f07908cab7d060001b61817e565b8094505050505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361b3e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161b3e09061f257565b60405180910390fd5b61b3f56000838361c6ec565b806035600082825461b407919061e439565b9250508190555080603360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461b45d919061e439565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161b4c2919061d89e565b60405180910390a361b4d66000838361c6f1565b5050565b61b5067f848277dbafb970884efe661be8b078946bf808900c9fb7139071378f4538684860001b61817e565b61b5327f41514a19547b95b178011cc3c198ee6df9282139050387b72069086f2932053360001b61817e565b61b55e7faacd86a6a2af44c1d03b422cb56fcda47a6d13d80e439224149e186b484b895c60001b61817e565b6101375461013860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111561b6855761b5d57f22d93e0a5e890a3e777bc2b5d76bc21cd893988f54c44addf25083955761883c60001b61817e565b61b6017ff3011b8068499c9eed3982bbe70a01547ad7daf35402081ad8f624d53459ce6c60001b61817e565b8061013860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610137546040517f22e4089f00000000000000000000000000000000000000000000000000000000815260040161b67c9392919061f277565b60405180910390fd5b61b6b17f7b497268fbd6ff0e939aeb8a8da90c4f4066f40b42f2129c40d29e3d759dfbca60001b61817e565b50565b600061b6e27f1e214cab3749f68bb6799489cad507404cd0c35e0b7a397596ec193d9dfa63fe60001b61817e565b61b70e7f1272e4b5413680ce09a6109e866c133f66a80fb5406597c2049c7fc4bfbd7e6560001b61817e565b61b73a7f134a547eb86266715a3cea2d1315e7db9d3bc5802ccec562b6d9c43e2e2f60bf60001b61817e565b61b74f8261013a61cf3390919063ffffffff16565b9050919050565b6000609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081609760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61b824619e2c565b600160c960006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861b868617fad565b60405161b875919061dceb565b60405180910390a1565b61b9008363a9059cbb60e01b848460405160240161b89e92919061e410565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061cf63565b505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff1661b977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161b96e9061f320565b60405180910390fd5b61b981828261d02a565b5050565b600060019054906101000a900460ff1661b9d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161b9cb9061f320565b60405180910390fd5b61b9dc61d09d565b565b600061ba06836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61d0fe565b905092915050565b61ba3a7f5582c9672008c8668ac17a1705637307f05204a542ab2f58e621034eef32801b60001b61817e565b61ba667f248e518f6a76bc43fa50b1f0950aca2922c4f7b0c7f3a6f7647251e340c9bdac60001b61817e565b61ba927ff72bf42d6a21aa7586397b62dd7657a0f6973e396a3a723a46e219ec0f21774f60001b61817e565b600081111561bb695761bac77f333120fe0e0f8fc6bd8665443ee2e99e63d0ed02410e873d49da16c191302f4060001b61817e565b61baf37f5b5730603531ff2ca15d54f3938c61cf0f455f216fc6c8048d8a6a0cb36a6a9060001b61817e565b61bb1f7f7666560604adb98c1f98d802d5489307d6208ebd1c927f55321f6622fc9de0dd60001b61817e565b8061013960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061bc06565b61bb957f30331d34298b2c59f62603c73ba8b76b53645e60fc0963bb303cbf044ba4a3d260001b61817e565b61bbc17fba3492672b8328627d5c2be9325b11ee8b8290e6b8ff6a3184c95a2f3905961f60001b61817e565b61013960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600090555b61bc327fcf0554ccb491e538236050dab400a331932821a414501aa55780803bb802770360001b61817e565b61bc5e7f0e43f9c10db66c1b7e9dcf6fd86584e25a3553399cb47ec6c1ae8c9a8909503e60001b61817e565b7f06399d5691a131b9ea716df732acdd7df7a4223509ae80d3bbf84f525d917b69828260405161bc8f92919061edc4565b60405180910390a15050565b60608061bcca7fd8516f983f0bb4f253d287b56e9cb28efd630e8b5af2b4ebf80a71a4be174da460001b61817e565b61bcf67f3c3dd6352c1d2cf87b64b3351b18e70696f9a6200d9bf270625884da06bee30a60001b61817e565b61bd227f7762436f8297a583309de2955b09b867bcd8ab9d37c7c5f71d8d7f95db9e438460001b61817e565b600061bd2c61106b565b905061bd5a7f26b3628ff0442ef15aa36968976ff61f5f2a452212a23611606ad50f4e3a64f460001b61817e565b61bd867f1d67aead9a72660bf8bedaa194ac8f3243a41d47999e583364bb095645d25ad860001b61817e565b600061bd90618f82565b905061bdbe7f399ca3bc182d7d091e2a48ff46335ec657dcfae57818c0e60279ab8d5f83a85960001b61817e565b61bdea7f1c41e87b4c865207d0c6c9f680f28717e638b021d3444b7cd2c694837387657a60001b61817e565b60008167ffffffffffffffff81111561be065761be0561deb1565b5b60405190808252806020026020018201604052801561be345781602001602082028036833780820191505090505b50905061be637fc85490b6b3aed37c18b9fcfba513ec918c620bac058a3956d8da55516a80ab0360001b61817e565b61be8f7f8572113ff484249679485335fa364c59d5a6fce236697031e82e92d08bd6912860001b61817e565b60008267ffffffffffffffff81111561beab5761beaa61deb1565b5b60405190808252806020026020018201604052801561bed95781602001602082028036833780820191505090505b50905061bf087f0f30023855c1c1f2d70089b58c9556c87b872f25b33e506f8643fb9b06de7cf960001b61817e565b61bf347ff22099ff52fea2f186299ecd036cf7a946736eeb3070399de6f179b93703a52560001b61817e565b60005b8381101561c0c05761bf6b7f52873f778ca4c6774d41965c838c83e2f3ed13107f77e5488393658bd489bfaa60001b61817e565b61bf977fa5d114a852415a745ad5efe586b522254c4ad50824605ff9b3b7ab44abd05ced60001b61817e565b61bfa081618181565b83828151811061bfb35761bfb261e7b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061c0197f23babd2d68317fdb58bf753a2e62f4180989f59f25acf58ff6a0da654f30158e60001b61817e565b61c0457f2745d7cd6fbe03e118bfe1db4d0ba1c491b10a3b73e88fb18e72f98d54a7c6e460001b61817e565b6000851161c05457600061c08e565b848861c07985848151811061c06c5761c06b61e7b5565b5b602002602001015161918c565b61c083919061e9bb565b61c08d919061eba6565b5b82828151811061c0a15761c0a061e7b5565b5b602002602001018181525050808061c0b89061e7e4565b91505061bf37565b5061c0ed7f91eb6a4c2f1ab00ef55f8453e828c5d9ad34d81982669b927d760d539210a55360001b61817e565b61c1197f4cca870ec3d24492c31d30dbad2d2fb7d0b715fb9e6d7d4a02733db8152cdfaf60001b61817e565b81819550955050505050915091565b61c1547f66a077f53bd95ff45eeb1c39591f63e04461f77d17d49df3fa7d665ba15148e960001b61817e565b61c1807f31d839eae1fca926d9947874bfefcd023cc1a3a16bf81ac269eed80435c933c460001b61817e565b61c1ac7f368c17b2312ead9f88c22165bf5d494f717ef00d5b7945d1b6097e1d9b14036660001b61817e565b600061c1b661106b565b905061c1e47f0cb5a0c95b483f140fef3b63860c05a77128ee6f40c412354cd913c6ee05914f60001b61817e565b61c2107f56a5c61821679595e9149d13b3d7c8ebaa8e0f0920ec2a9930a81e4eb1e953b860001b61817e565b81811061c2ae5761c2437fad6f3d79c3225f522cacfc95e2e06d7d4c1db74693ce51624250cc6ec771f81060001b61817e565b61c26f7f1a185365c67aee292d88c46b732a5d54c865ead0c40abb7df521fd377ce1d0a960001b61817e565b80826040517f1790876600000000000000000000000000000000000000000000000000000000815260040161c2a592919061e60e565b60405180910390fd5b61c2da7f69fa6a1e187ac58a87604a78558a314e617df67fd2773ec9d2553d3b1d93f4f860001b61817e565b5050565b600061c30c7f8bc4e19f088a81699b04bd566cb3ba6cb8488c675d11dac7af401a128623317660001b61817e565b61c3387f2a1775fec90c51e4069badfbb6ae3cfb78c0c738de3e3cbff1bfbce01997a71860001b61817e565b61c3647fef46b0a9afc22acf7b26c1896d8f73a28d763e9cde24eb6831c0743047182df460001b61817e565b600061c37861c3736000618181565b617725565b61013c5461c386919061e9bb565b905061c3b47f7119286d2685e445aed037030f10184c0f3ed8f6d3b3df6968e5659d015c255360001b61817e565b61c3e07fd1f080162d4b30661ae81d2ee2e646c88c1756c409cb78e54977f2638d2ae2fb60001b61817e565b6000600190505b61c3ef618f82565b81101561c55f5761c4227fd3c874e9acf063fd065e4b8c1201a117cc62a516988ed19b69e2770875c4854d60001b61817e565b61c44e7f979f6e2d152015a9107b77be0169dd03d9c1cd16a412bc9b241e158abc023b3160001b61817e565b600061c45982618181565b905061c4877fac6f1b78d3e3f37c3aaea842e28966d078a5e17a842183c303b1b6e420594a5b60001b61817e565b61c4b37fcb3718a2bcfd45b505907881bf7b30e0efd9ff99ac7608f3a6244ba709afb1f960001b61817e565b600061c4cf61c4c18361918c565b61c4ca84612e4d565b61994e565b905061c4fd7feb2d140e7971914a003527c1cbb7c53dd24219c169f483452e35b6f3d87f53ba60001b61817e565b61c5297f6002140a4f357b2f8d5c4c0e6107f89292cc14d947a17a4a9db64dd80df23a9260001b61817e565b61c53282617725565b8161c53d919061e9bb565b8461c548919061e439565b93505050808061c5579061e7e4565b91505061c3e7565b5061c58c7fc4045c4c7cace628abd816945e9e50d6d3c2c95ae268be64f35277f2a8008ad960001b61817e565b61c5b87f980f71996b6dc40608255e597f092af0456998a14a6cf455203a5fd22f8c827c60001b61817e565b8091505090565b600061c5ce836000018361d16e565b60001c905092915050565b600081831061c5e8578161c5ea565b825b905092915050565b600061c6207f40514dfdb5cb5066b3deef6d60e662d7638c6a53aef51ae6bc8b2d4137aca04760001b61817e565b61c64c7f5e69e4a79a3e7b06e4fd1fa26c3d32de96eac9bbdc53a043d32848090c1ff33260001b61817e565b61c6787f4778b01816ca247f557dfd188491bd460135c342ca2bc70dc4df59e70204c76c60001b61817e565b816012600a61c687919061e76a565b8461c692919061e9bb565b61c69c919061eba6565b905092915050565b600061c6b28260000161d199565b9050919050565b50565b600061c6e4836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61d1aa565b905092915050565b505050565b505050565b61c779846323b872dd60e01b85858560405160240161c7179392919061f340565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061cf63565b50505050565b60008082121561c792578160000361c794565b815b9050919050565b61c7c77ff5a83f59cc3137f0a206a0540202b4198ddab55c54fd623bedd338007edd8d6d60001b61817e565b61c7f37f90bbc6f27ad7a65ff37b26d87f984ec74f6a736b064dfb8fe69406471af865cb60001b61817e565b61c81f7f6d772f910c3672045215a866870b88c410ecd06da1f0b07d7a70846396a3ecd060001b61817e565b600061c8296143d3565b905061c8577f5da1ae01a564d20000b191023c26d1f82ac062d2b79ded38e3dad0f3a5375ccc60001b61817e565b61c8837f9a2914c82c6da691b755b5a8be2860fd058f87ec8d596f45aa0d3f86ef9c86e560001b61817e565b600061c88d617b78565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905061c8e97f2f177e056be1b74ad1f21688932fd4606aaee230a4652abc1745c958f41cd8c060001b61817e565b61c9157f662700a77afd41b7d45ec1701ea7fcc11cd82ed14b11c6272a410fcd10a9069960001b61817e565b801561c9af5761c9477fdf7dd35978671da3bb89de4d77c6baca57267a5496f11abd9e512f14d94f002b60001b61817e565b61c9737fcb3711a2c905c461ba12a4984ce6198eac434491257889b78812f26e3dd1a98b60001b61817e565b61c99f7f6cc1bcc5dafcce44a88e878f8ef4c8ed6dbd04623090f55898bda39ca2818bcc60001b61817e565b61c9a98484615f4c565b5061ca60565b61c9db7f39ef87ef8bf44c7153b4dc86ca011d311373f7593aed162f9f517d43b809279160001b61817e565b61ca067e4c8799bd9d2957c4ee6ba16706a461d0586c20255554dd84eb3bdae87b656c60001b61817e565b61ca327fc4d30b63a666a92735a5fc780dc8e6e6e61f8aaece3142bacab79dc38e48195c60001b61817e565b61ca5f8585858573ffffffffffffffffffffffffffffffffffffffff1661c6f6909392919063ffffffff16565b5b5050505050565b61ca937fc2b39400da071dc497b9fa274edd758bcafa4eadc1c86c198051affa1f1ee40660001b61817e565b61cabe7e72268b85dbff689839982aeb8b6e9485ee982a5ec174d15dff20ca83de037560001b61817e565b61caea7feae5e45282bccff15a259c53d8f2995c8deb7b88e051f533a76def7f1b363be860001b61817e565b600061caf46143d3565b905061cb227feddd8422808cba26b9169e50ff6b452b658885c2cfc9514e1f8eae8c9d33dd7960001b61817e565b61cb4e7f75b223667844d3cf3e3d89414d1a41574fb19b3c18af9797afe0bb5fff6e9c7a60001b61817e565b600061cb58617b78565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905061cbb47ffa6273fdb2a1631d902eeb8ec6ae10f71891043813140da7c360c4dbab022a2e60001b61817e565b61cbe07f26469f5e0ce09f71b7ede83e333458fd0134e649248532e44aff60d2b7c85ca160001b61817e565b801561ce345761cc127f5d8e8da70e3c91945e1fde087f38093b7cc38ba3af5ef44bf1bb54149e52755c60001b61817e565b61cc3e7f880c8a173c77067e5e62a16a63f66dede4444e47e088f783945a45ea4ac5939960001b61817e565b61cc6a7f4dafad54c96e042b855da5ff508e238518622f8cd292847a2a500990fa254c6d60001b61817e565b600061cc758361918c565b905061cca37fe8ef47454ba2c59d013244bffb7acdabccceaf1a170178fe85b1bdeac983b12860001b61817e565b61cccf7ff136ed2a7050f342d992812974602cbcb5e17221e26b4106bfbcee2eea30776260001b61817e565b61cd038561ccdd868461c5d9565b8573ffffffffffffffffffffffffffffffffffffffff1661b87f9092919063ffffffff16565b61cd2f7f070f8c63695947637571286767de7482e084f646b4451f1e7dc33d5a40bbf61c60001b61817e565b61cd5b7fe64c8e6c6c7faceffb3838eb1e04812c9d7e34b3c2f4b9d89a55d175813d85ed60001b61817e565b8381101561ce015761cd8f7fad0a51a1f6b0ae7fd33a807139f1fa67253a8b10cea8f89bcd4b27cfabba605b60001b61817e565b61cdbb7faeb6d08e2cfd90420931855ff57cc6ed925b1982ebc7f5093d1833f7e8bb8e0a60001b61817e565b61cde77ffc72cfa8bc6cb8c4c93b8061dd8121d89d38501b3871aa9b75ca89b47777dbf560001b61817e565b61cdfc85828661cdf7919061e341565b61b37a565b61ce2e565b61ce2d7f37a8cc7265988abb8a58e64e957665af948b4addf2e85266f335d9a57083d2fd60001b61817e565b5b5061cee4565b61ce607f321440236a1195aaa7b40bdb2d635741a96d25b0cae352ef89dbea3b3b0cd99760001b61817e565b61ce8c7f54040d8ec3a02e07ef598f027985f126f7bac8c629f48182fc1a318cd686176d60001b61817e565b61ceb87fe0f1da1130df3a547e7a4e81d567b67eb73b11ef444d24a73df2cad2b3ee235860001b61817e565b61cee384848473ffffffffffffffffffffffffffffffffffffffff1661b87f9092919063ffffffff16565b5b50505050565b61cef2614117565b61cf31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161cf289061f3c3565b60405180910390fd5b565b600061cf5b836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61d2be565b905092915050565b600061cfc5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661d2e19092919063ffffffff16565b905060008151111561d025578080602001905181019061cfe5919061e3e3565b61d024576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161d01b9061f455565b60405180910390fd5b5b505050565b600060019054906101000a900460ff1661d079576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161d0709061f320565b60405180910390fd5b816036908161d088919061f617565b50806037908161d098919061f617565b505050565b600060019054906101000a900460ff1661d0ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161d0e39061f320565b60405180910390fd5b61d0fc61d0f7617fad565b61b756565b565b600061d10a838361d2be565b61d16357826000018290806001815401808255809150506001900390600052602060002001600090919091909150558260000180549050836001016000848152602001908152602001600020819055506001905061d168565b600090505b92915050565b600082600001828154811061d1865761d18561e7b5565b5b9060005260206000200154905092915050565b600081600001805490509050919050565b6000808360010160008481526020019081526020016000205490506000811461d2b257600060018261d1dc919061e341565b905060006001866000018054905061d1f4919061e341565b905081811461d26357600086600001828154811061d2155761d21461e7b5565b5b906000526020600020015490508087600001848154811061d2395761d23861e7b5565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b8560000180548061d2775761d27661f6e9565b5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061d2b8565b60009150505b92915050565b600080836001016000848152602001908152602001600020541415905092915050565b606061d2f0848460008561d2f9565b90509392505050565b60608247101561d33e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161d3359061f78a565b60405180910390fd5b61d3478561b905565b61d386576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161d37d9061f7f6565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161d3af919061f85d565b60006040518083038185875af1925050503d806000811461d3ec576040519150601f19603f3d011682016040523d82523d6000602084013e61d3f1565b606091505b509150915061d40182828661d40d565b92505050949350505050565b6060831561d41d5782905061d46d565b60008351111561d4305782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161d464919061d533565b60405180910390fd5b9392505050565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b600081519050919050565b600082825260208201905092915050565b60005b8381101561d4dd57808201518184015260208101905061d4c2565b60008484015250505050565b6000601f19601f8301169050919050565b600061d5058261d4a3565b61d50f818561d4ae565b935061d51f81856020860161d4bf565b61d5288161d4e9565b840191505092915050565b6000602082019050818103600083015261d54d818461d4fa565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061d5948261d569565b9050919050565b61d5a48161d589565b811461d5af57600080fd5b50565b60008135905061d5c18161d59b565b92915050565b6000819050919050565b61d5da8161d5c7565b811461d5e557600080fd5b50565b60008135905061d5f78161d5d1565b92915050565b6000806040838503121561d6145761d61361d55f565b5b600061d6228582860161d5b2565b925050602061d6338582860161d5e8565b9150509250929050565b60008115159050919050565b61d6528161d63d565b82525050565b600060208201905061d66d600083018461d649565b92915050565b60006020828403121561d6895761d68861d55f565b5b600061d6978482850161d5e8565b91505092915050565b6000819050919050565b600061d6c561d6c061d6bb8461d569565b61d6a0565b61d569565b9050919050565b600061d6d78261d6aa565b9050919050565b600061d6e98261d6cc565b9050919050565b61d6f98161d6de565b82525050565b600060208201905061d714600083018461d6f0565b92915050565b600061d7258261d589565b9050919050565b61d7358161d71a565b811461d74057600080fd5b50565b60008135905061d7528161d72c565b92915050565b600061d7638261d589565b9050919050565b61d7738161d758565b811461d77e57600080fd5b50565b60008135905061d7908161d76a565b92915050565b6000806000806080858703121561d7b05761d7af61d55f565b5b600061d7be8782880161d743565b945050602061d7cf8782880161d781565b935050604061d7e08782880161d5e8565b925050606061d7f18782880161d5e8565b91505092959194509250565b61d8068161d5c7565b82525050565b60a08201600082015161d822600085018261d7fd565b50602082015161d835602085018261d7fd565b50604082015161d848604085018261d7fd565b50606082015161d85b606085018261d7fd565b50608082015161d86e608085018261d7fd565b50505050565b600060a08201905061d889600083018461d80c565b92915050565b61d8988161d5c7565b82525050565b600060208201905061d8b3600083018461d88f565b92915050565b60008060006060848603121561d8d25761d8d161d55f565b5b600061d8e08682870161d5b2565b935050602061d8f18682870161d5b2565b925050604061d9028682870161d5e8565b9150509250925092565b60008060006060848603121561d9255761d92461d55f565b5b600061d9338682870161d743565b935050602061d9448682870161d781565b925050604061d9558682870161d5e8565b9150509250925092565b6000806040838503121561d9765761d97561d55f565b5b600061d9848582860161d5e8565b925050602061d9958582860161d5e8565b9150509250929050565b60006020828403121561d9b55761d9b461d55f565b5b600061d9c38482850161d743565b91505092915050565b600060ff82169050919050565b61d9e28161d9cc565b82525050565b600060208201905061d9fd600083018461d9d9565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61da388161d6de565b82525050565b600061da4a838361da2f565b60208301905092915050565b6000602082019050919050565b600061da6e8261da03565b61da78818561da0e565b935061da838361da1f565b8060005b8381101561dab457815161da9b888261da3e565b975061daa68361da56565b92505060018101905061da87565b5085935050505092915050565b6000602082019050818103600083015261dadb818461da63565b905092915050565b60006020828403121561daf95761daf861d55f565b5b600061db078482850161d781565b91505092915050565b6000806040838503121561db275761db2661d55f565b5b600061db358582860161d743565b925050602061db468582860161d5e8565b9150509250929050565b600061db5b8261d589565b9050919050565b61db6b8161db50565b811461db7657600080fd5b50565b60008135905061db888161db62565b92915050565b60006020828403121561dba45761dba361d55f565b5b600061dbb28482850161db79565b91505092915050565b6000806040838503121561dbd25761dbd161d55f565b5b600061dbe08582860161d743565b925050602061dbf18582860161d781565b9150509250929050565b60006020828403121561dc115761dc1061d55f565b5b600061dc1f8482850161d5b2565b91505092915050565b600061dc338261d6cc565b9050919050565b61dc438161dc28565b82525050565b600060208201905061dc5e600083018461dc3a565b92915050565b600061dc6f8261d6cc565b9050919050565b61dc7f8161dc64565b82525050565b600060208201905061dc9a600083018461dc76565b92915050565b600061dcab8261d6cc565b9050919050565b61dcbb8161dca0565b82525050565b600060208201905061dcd6600083018461dcb2565b92915050565b61dce58161d589565b82525050565b600060208201905061dd00600083018461dcdc565b92915050565b600061dd118261d6cc565b9050919050565b61dd218161dd06565b82525050565b600060208201905061dd3c600083018461dd18565b92915050565b600061dd4d8261d589565b9050919050565b61dd5d8161dd42565b811461dd6857600080fd5b50565b60008135905061dd7a8161dd54565b92915050565b60006020828403121561dd965761dd9561d55f565b5b600061dda48482850161dd6b565b91505092915050565b600061ddb88261d6cc565b9050919050565b61ddc88161ddad565b82525050565b600060208201905061dde3600083018461ddbf565b92915050565b600061ddf48261d589565b9050919050565b61de048161dde9565b811461de0f57600080fd5b50565b60008135905061de218161ddfb565b92915050565b60006020828403121561de3d5761de3c61d55f565b5b600061de4b8482850161de12565b91505092915050565b60008060006060848603121561de6d5761de6c61d55f565b5b600061de7b8682870161d781565b935050602061de8c8682870161d5b2565b925050604061de9d8682870161d5e8565b9150509250925092565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61dee98261d4e9565b810181811067ffffffffffffffff8211171561df085761df0761deb1565b5b80604052505050565b600061df1b61d555565b905061df27828261dee0565b919050565b600067ffffffffffffffff82111561df475761df4661deb1565b5b61df508261d4e9565b9050602081019050919050565b82818337600083830152505050565b600061df7f61df7a8461df2c565b61df11565b90508281526020810184848401111561df9b5761df9a61deac565b5b61dfa684828561df5d565b509392505050565b600082601f83011261dfc35761dfc261dea7565b5b813561dfd384826020860161df6c565b91505092915050565b600061dfe78261d589565b9050919050565b61dff78161dfdc565b811461e00257600080fd5b50565b60008135905061e0148161dfee565b92915050565b600080600080600080600060e0888a03121561e0395761e03861d55f565b5b600088013567ffffffffffffffff81111561e0575761e05661d564565b5b61e0638a828b0161dfae565b975050602088013567ffffffffffffffff81111561e0845761e08361d564565b5b61e0908a828b0161dfae565b965050604061e0a18a828b0161d781565b955050606061e0b28a828b0161dd6b565b945050608061e0c38a828b0161e005565b93505060a061e0d48a828b0161db79565b92505060c061e0e58a828b0161de12565b91505092959891949750929550565b60006020828403121561e10a5761e10961d55f565b5b600061e1188482850161e005565b91505092915050565b6000806040838503121561e1385761e13761d55f565b5b600061e1468582860161d5b2565b925050602061e1578582860161d5b2565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600061e199838361d7fd565b60208301905092915050565b6000602082019050919050565b600061e1bd8261e161565b61e1c7818561e16c565b935061e1d28361e17d565b8060005b8381101561e20357815161e1ea888261e18d565b975061e1f58361e1a5565b92505060018101905061e1d6565b5085935050505092915050565b6000604082019050818103600083015261e22a818561da63565b9050818103602083015261e23e818461e1b2565b90509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061e28e57607f821691505b60208210810361e2a15761e2a061e247565b5b50919050565b600061e2b28261d589565b9050919050565b61e2c28161e2a7565b811461e2cd57600080fd5b50565b60008151905061e2df8161e2b9565b92915050565b60006020828403121561e2fb5761e2fa61d55f565b5b600061e3098482850161e2d0565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061e34c8261d5c7565b915061e3578361d5c7565b925082820390508181111561e36f5761e36e61e312565b5b92915050565b60008151905061e3848161d59b565b92915050565b60006020828403121561e3a05761e39f61d55f565b5b600061e3ae8482850161e375565b91505092915050565b61e3c08161d63d565b811461e3cb57600080fd5b50565b60008151905061e3dd8161e3b7565b92915050565b60006020828403121561e3f95761e3f861d55f565b5b600061e4078482850161e3ce565b91505092915050565b600060408201905061e425600083018561dcdc565b61e432602083018461d88f565b9392505050565b600061e4448261d5c7565b915061e44f8361d5c7565b925082820190508082111561e4675761e46661e312565b5b92915050565b600061e4788261d5c7565b91506000820361e48b5761e48a61e312565b5b600182039050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b600061e4cc601f8361d4ae565b915061e4d78261e496565b602082019050919050565b6000602082019050818103600083015261e4fb8161e4bf565b9050919050565b600061e50d8261d6cc565b9050919050565b61e51d8161e502565b82525050565b600060408201905061e538600083018561e514565b61e545602083018461d6f0565b9392505050565b600060608201905061e561600083018661d88f565b61e56e602083018561d88f565b61e57b604083018461d88f565b949350505050565b6000819050919050565b61e5968161e583565b811461e5a157600080fd5b50565b60008151905061e5b38161e58d565b92915050565b60008151905061e5c88161d5d1565b92915050565b6000806040838503121561e5e55761e5e461d55f565b5b600061e5f38582860161e5a4565b925050602061e6048582860161e5b9565b9150509250929050565b600060408201905061e623600083018561d88f565b61e630602083018461d88f565b9392505050565b60008160011c9050919050565b6000808291508390505b600185111561e68e5780860481111561e66a5761e66961e312565b5b600185161561e6795780820291505b808102905061e6878561e637565b945061e64e565b94509492505050565b60008261e6a7576001905061e763565b8161e6b5576000905061e763565b816001811461e6cb576002811461e6d55761e704565b600191505061e763565b60ff84111561e6e75761e6e661e312565b5b8360020a91508482111561e6fe5761e6fd61e312565b5b5061e763565b5060208310610133831016604e8410600b841016171561e7395782820a90508381111561e7345761e73361e312565b5b61e763565b61e746848484600161e644565b9250905081840481111561e75d5761e75c61e312565b5b81810290505b9392505050565b600061e7758261d5c7565b915061e7808361d9cc565b925061e7ad7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461e697565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061e7ef8261d5c7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361e8215761e82061e312565b5b600182019050919050565b60006020828403121561e8425761e84161d55f565b5b600061e8508482850161e5b9565b91505092915050565b600060408201905061e86e600083018561dcdc565b61e87b602083018461dcdc565b9392505050565b600060208201905061e897600083018461e514565b92915050565b600060408201905061e8b2600083018561e514565b61e8bf602083018461dd18565b9392505050565b61e8cf8161d9cc565b811461e8da57600080fd5b50565b60008151905061e8ec8161e8c6565b92915050565b60006020828403121561e9085761e90761d55f565b5b600061e9168482850161e8dd565b91505092915050565b600061e93a61e93561e9308461d9cc565b61d6a0565b61d5c7565b9050919050565b61e94a8161e91f565b82525050565b600060408201905061e965600083018561e941565b61e972602083018461e941565b9392505050565b60008151905061e9888161d76a565b92915050565b60006020828403121561e9a45761e9a361d55f565b5b600061e9b28482850161e979565b91505092915050565b600061e9c68261d5c7565b915061e9d18361d5c7565b925082820261e9df8161d5c7565b9150828204841483151761e9f65761e9f561e312565b5b5092915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b600061ea5960258361d4ae565b915061ea648261e9fd565b604082019050919050565b6000602082019050818103600083015261ea888161ea4c565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600061eaeb602e8361d4ae565b915061eaf68261ea8f565b604082019050919050565b6000602082019050818103600083015261eb1a8161eade565b9050919050565b6000819050919050565b600061eb4661eb4161eb3c8461eb21565b61d6a0565b61d9cc565b9050919050565b61eb568161eb2b565b82525050565b600060208201905061eb71600083018461eb4d565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061ebb18261d5c7565b915061ebbc8361d5c7565b92508261ebcc5761ebcb61eb77565b5b828204905092915050565b600060608201905061ebec600083018661d6f0565b61ebf9602083018561d88f565b61ec06604083018461d88f565b949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061ec6a60268361d4ae565b915061ec758261ec0e565b604082019050919050565b6000602082019050818103600083015261ec998161ec5d565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061ecfc60248361d4ae565b915061ed078261eca0565b604082019050919050565b6000602082019050818103600083015261ed2b8161ecef565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b600061ed8e60228361d4ae565b915061ed998261ed32565b604082019050919050565b6000602082019050818103600083015261edbd8161ed81565b9050919050565b600060408201905061edd9600083018561d6f0565b61ede6602083018461d88f565b9392505050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061ee23601d8361d4ae565b915061ee2e8261eded565b602082019050919050565b6000602082019050818103600083015261ee528161ee16565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061eeb560258361d4ae565b915061eec08261ee59565b604082019050919050565b6000602082019050818103600083015261eee48161eea8565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061ef4760238361d4ae565b915061ef528261eeeb565b604082019050919050565b6000602082019050818103600083015261ef768161ef3a565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b600061efd960268361d4ae565b915061efe48261ef7d565b604082019050919050565b6000602082019050818103600083015261f0088161efcc565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b600061f04560108361d4ae565b915061f0508261f00f565b602082019050919050565b6000602082019050818103600083015261f0748161f038565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061f0b160208361d4ae565b915061f0bc8261f07b565b602082019050919050565b6000602082019050818103600083015261f0e08161f0a4565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b600061f14360218361d4ae565b915061f14e8261f0e7565b604082019050919050565b6000602082019050818103600083015261f1728161f136565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b600061f1d560228361d4ae565b915061f1e08261f179565b604082019050919050565b6000602082019050818103600083015261f2048161f1c8565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b600061f241601f8361d4ae565b915061f24c8261f20b565b602082019050919050565b6000602082019050818103600083015261f2708161f234565b9050919050565b600060608201905061f28c600083018661e514565b61f299602083018561d88f565b61f2a6604083018461d88f565b949350505050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b600061f30a602b8361d4ae565b915061f3158261f2ae565b604082019050919050565b6000602082019050818103600083015261f3398161f2fd565b9050919050565b600060608201905061f355600083018661dcdc565b61f362602083018561dcdc565b61f36f604083018461d88f565b949350505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b600061f3ad60148361d4ae565b915061f3b88261f377565b602082019050919050565b6000602082019050818103600083015261f3dc8161f3a0565b9050919050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b600061f43f602a8361d4ae565b915061f44a8261f3e3565b604082019050919050565b6000602082019050818103600083015261f46e8161f432565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261f4d77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261f49a565b61f4e1868361f49a565b95508019841693508086168417925050509392505050565b600061f51461f50f61f50a8461d5c7565b61d6a0565b61d5c7565b9050919050565b6000819050919050565b61f52e8361f4f9565b61f54261f53a8261f51b565b84845461f4a7565b825550505050565b600090565b61f55761f54a565b61f56281848461f525565b505050565b5b8181101561f5865761f57b60008261f54f565b60018101905061f568565b5050565b601f82111561f5cb5761f59c8161f475565b61f5a58461f48a565b8101602085101561f5b4578190505b61f5c861f5c08561f48a565b83018261f567565b50505b505050565b600082821c905092915050565b600061f5ee6000198460080261f5d0565b1980831691505092915050565b600061f607838361f5dd565b9150826002028217905092915050565b61f6208261d4a3565b67ffffffffffffffff81111561f6395761f63861deb1565b5b61f643825461e276565b61f64e82828561f58a565b600060209050601f83116001811461f681576000841561f66f578287015190505b61f679858261f5fb565b86555061f6e1565b601f19841661f68f8661f475565b60005b8281101561f6b75784890151825560018201915060208501945060208101905061f692565b8683101561f6d4578489015161f6d0601f89168261f5dd565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b600061f77460268361d4ae565b915061f77f8261f718565b604082019050919050565b6000602082019050818103600083015261f7a38161f767565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b600061f7e0601d8361d4ae565b915061f7eb8261f7aa565b602082019050919050565b6000602082019050818103600083015261f80f8161f7d3565b9050919050565b600081519050919050565b600081905092915050565b600061f8378261f816565b61f841818561f821565b935061f85181856020860161d4bf565b80840191505092915050565b600061f869828461f82c565b91508190509291505056fea26469706673582212200704ac00b00c6c5884542f293c7d994e119d8b3488da92a05f0642cb7f5208ad64736f6c63430008110033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/spot-contracts/exported-artifacts/RouterV1.json b/spot-contracts/exported-artifacts/RouterV1.json new file mode 100644 index 00000000..50f1e105 --- /dev/null +++ b/spot-contracts/exported-artifacts/RouterV1.json @@ -0,0 +1,276 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "RouterV1", + "sourceName": "contracts/RouterV1.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IPerpetualTranche", + "name": "perp", + "type": "address" + }, + { + "internalType": "contract ITranche", + "name": "trancheIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "trancheInAmt", + "type": "uint256" + } + ], + "name": "previewDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + }, + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IPerpetualTranche", + "name": "perp", + "type": "address" + }, + { + "internalType": "uint256", + "name": "perpAmtBurnt", + "type": "uint256" + } + ], + "name": "previewRedeem", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable[]", + "name": "", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + }, + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IPerpetualTranche", + "name": "perp", + "type": "address" + }, + { + "internalType": "contract ITranche", + "name": "trancheIn", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "trancheInAmtRequested", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTokenOutAmtUsed", + "type": "uint256" + } + ], + "name": "previewRollover", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "perpRolloverAmt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenOutAmt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "trancheOutAmt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "trancheInAmt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "remainingTrancheInAmt", + "type": "uint256" + } + ], + "internalType": "struct IPerpetualTranche.RolloverPreview", + "name": "", + "type": "tuple" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + }, + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IPerpetualTranche", + "name": "perp", + "type": "address" + }, + { + "internalType": "uint256", + "name": "collateralAmount", + "type": "uint256" + } + ], + "name": "previewTranche", + "outputs": [ + { + "internalType": "contract IBondController", + "name": "", + "type": "address" + }, + { + "internalType": "contract ITranche[]", + "name": "", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IPerpetualTranche", + "name": "perp", + "type": "address" + }, + { + "internalType": "contract IBondController", + "name": "bond", + "type": "address" + }, + { + "internalType": "uint256", + "name": "collateralAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feePaid", + "type": "uint256" + } + ], + "name": "trancheAndDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IPerpetualTranche", + "name": "perp", + "type": "address" + }, + { + "internalType": "contract IBondController", + "name": "bond", + "type": "address" + }, + { + "internalType": "uint256", + "name": "collateralAmount", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "contract ITranche", + "name": "trancheIn", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "tokenOut", + "type": "address" + }, + { + "internalType": "uint256", + "name": "trancheInAmt", + "type": "uint256" + } + ], + "internalType": "struct RouterV1.RolloverBatch[]", + "name": "rollovers", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "feePaid", + "type": "uint256" + } + ], + "name": "trancheAndRollover", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50616ad980620000216000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80630782a5ac1461006757806356152767146100835780637cd878eb146100b5578063944ded33146100e7578063cbe52ae314610119578063d6e9cf9d1461014c575b600080fd5b610081600480360381019061007c91906154de565b610168565b005b61009d60048036038101906100989190615545565b611282565b6040516100ac93929190615772565b60405180910390f35b6100cf60048036038101906100ca91906157f5565b611645565b6040516100de93929190615891565b60405180910390f35b61010160048036038101906100fc9190615906565b611b52565b604051610110939291906159e9565b60405180910390f35b610133600480360381019061012e9190615545565b61231d565b6040516101439493929190615acd565b60405180910390f35b61016660048036038101906101619190615b85565b612835565b005b836101957fe6714300a3a677d46e02b3f710875fdffb42d818e8196c305eddd14460b6094a60001b613bef565b6101c17f2062535d08b0341f3a8dda701bd1c7fc58f4fc9c97c0fc0eb341a823fba677d760001b613bef565b6101ed7fd5b269c58097fc8fa4d7eb52fb608ed07e7a7bf7c3d74b5f4b19472ab20a6e9c60001b613bef565b8073ffffffffffffffffffffffffffffffffffffffff16631d8557d76040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561023557600080fd5b505af1158015610249573d6000803e3d6000fd5b505050506102797fcdaafccdcb8af5a3980110d3725da08287a295dac6c5b1648c470754becbb7f960001b613bef565b6102a57f91283f013d87de0cf84808925a2e1177371774b8f2928e00599d4fa197f119fb60001b613bef565b6102d17f1b8e50aa342a700521e71ff13b0177664a749adbc7e2b8f55fb074f70103720760001b613bef565b6102fd7f7fa978f8cdf68753aba4aae9498b5e5dd676d6e60a7fbcbff388ddb5c0c3962260001b613bef565b600061031e8573ffffffffffffffffffffffffffffffffffffffff16613bf2565b905061034c7ff32468a37bde41f3360ce50b793a79b31d1eba2e0b1f200fee73c7a3a8254ae660001b613bef565b6103787f4d4aada639df5570e10dbcfed4025acb0303b86c1c204d7b10554f6846e00a5f60001b613bef565b60008573ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190615c4b565b90506104177feb5b313488322fb58e94fb2fc9393a15afaddf3afd5ed9efe05baf63e41a28d860001b613bef565b6104437fdd8359a02fff677d0777f113b4dc55fc7611551e58667a921e9c9dc4126fd3bd60001b613bef565b60008773ffffffffffffffffffffffffffffffffffffffff1663647846a56040518163ffffffff1660e01b8152600401602060405180830381865afa158015610490573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b49190615c8d565b90506104e27ffdc0bf4b9dc1c44eda67254030bafb164fc278732279bfff85c8e2e3929018c060001b613bef565b61050e7fe30951c68acb77c7ef554ecda29c41096a5923d008c89263ff03e5089647743660001b613bef565b61053b3330888573ffffffffffffffffffffffffffffffffffffffff166141ae909392919063ffffffff16565b6105677fca0372b55ea9f8ebda0cb448ffad6633e2da06416f484777733267e81ad3eeab60001b613bef565b6105937fa481c79befda30b8072f74ef188fd4ab04e10dc3a7dc1665519558d8b82870ef60001b613bef565b6000851115610652576105c87fafd5feb08fa3f42bc2c7bf57593f0c88c3e023eba7a0b6b67093666bbddcddd160001b613bef565b6105f47f91ff2602d2f7e804ee474f675b4965b3cccb6246cc58b3d554643a01bf90743060001b613bef565b6106207faefeaa2a4d0c2e960f84124717223458f7ce5dc0ef47007273e96dd347d8e86f60001b613bef565b61064d3330878473ffffffffffffffffffffffffffffffffffffffff166141ae909392919063ffffffff16565b61067f565b61067e7f2bf15de6413d8c809a5e4f009f9f516accb98d9e2d5ee280ab0e10cfea47b9ba60001b613bef565b5b6106ab7f0a9a8d63e1438975e615e054ecbc96d908621dffa913559e356be05af905baa860001b613bef565b6106d77fae7949c5bc47bba1239893ff7b439537e4eb2dfe4515cc79a9b567210dd073f460001b613bef565b6106e2828888614237565b61070e7fe9b98a0a98c6adbb5908ba0b617e60c1e3d9726f77b08e2fccb86d6fd806795e60001b613bef565b61073a7f399676d8d42da60139ee45c2633171068e342c0a287a839c087908a0e7aa2aad60001b613bef565b8673ffffffffffffffffffffffffffffffffffffffff1663b6b55f25876040518263ffffffff1660e01b81526004016107739190615cba565b600060405180830381600087803b15801561078d57600080fd5b505af11580156107a1573d6000803e3d6000fd5b505050506107d17ff2205c02ecf3292cf9e07353f2205c878e32afc228e7537eba154adb2b9fab0060001b613bef565b6107fd7fc5a26e5dbcd88926ca422da49bc446ca0dbe94f83866844da5687fad0d5c082360001b613bef565b610808818987614237565b6108347fb13f31ca0e9833c8ad7ef538210efc6f000643145a164775560582887b463d1860001b613bef565b6108607fd117d743d007975749f7fcdbdbdfc527ae713fbb63d628b048b1a332e2e0cab560001b613bef565b60005b836040015160ff168160ff161015610d49576108a17f7c9569a7e990d486acccd21346bfbf1ec076aace27f8290e66e0bb03b8a9ffb760001b613bef565b6108cd7ff95e15543c858970b55d4c4854be4b2527dce550a15e3aa2b7831d2e0c7b4d0d60001b613bef565b600084600001518260ff16815181106108e9576108e8615cd5565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016109299190615d13565b602060405180830381865afa158015610946573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096a9190615d43565b90506109987f9b53ab4ceca20028071ec467721f13f8a7ca9e55a3593d1755c2986c800534bf60001b613bef565b6109c47f4fa82930c2a3eadaf582a370ef95b59de45168284e9270c0c735d65b95d612c360001b613bef565b60008a73ffffffffffffffffffffffffffffffffffffffff166361902ffc87600001518560ff16815181106109fc576109fb615cd5565b5b6020026020010151846040518363ffffffff1660e01b8152600401610a22929190615d7f565b6020604051808303816000875af1158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a659190615d43565b9050610a937f79395928d82e80090bb9ae7909283eb19e6ebf280e792a37ea5e957778c7fea560001b613bef565b610abf7f974583185fc1152ad34b9ae8fdd525b99b678cf20790d60ec689936a5ae9c79260001b613bef565b6000811115610c6357610af47feffdead7432c315042f7180e146916cb4fa84c5cdf54bf293ef78237caf4896160001b613bef565b610b207f627105fc4217295853d4e64de84243aca926596621022c9765a4c9977632da8c60001b613bef565b610b4c7fc13c700bf73ac49e7b5cd91158845efe444da0d5c6fa79e62c494aa77c5fe80260001b613bef565b610b7886600001518460ff1681518110610b6957610b68615cd5565b5b60200260200101518c84614237565b610ba47fc2065a3469c36d02881f0484a9abb6d76ac68486eadaae2ed4161e7867454c3060001b613bef565b610bd07f2ad9a0857519c46621ee4d6e0ba23016911b9e8071e403aacd6179c53c35d6db60001b613bef565b8a73ffffffffffffffffffffffffffffffffffffffff166347e7ef2487600001518560ff1681518110610c0657610c05615cd5565b5b6020026020010151846040518363ffffffff1660e01b8152600401610c2c929190615d7f565b600060405180830381600087803b158015610c4657600080fd5b505af1158015610c5a573d6000803e3d6000fd5b50505050610d34565b610c8f7f21a5155e3fae68dd42f7f0b138778863b4a1e7395ee58f24398dbb4ded1263b160001b613bef565b610cbb7f0394542df9fee8d6852062f5ae26a28e31a142dd53089843ad5ac49b3674bf6f60001b613bef565b610ce77fc923b5cf9287cc55157c4d163643ce209dfec0e0c463bd6fde4a8d2ef0e2ac7160001b613bef565b610d33338388600001518660ff1681518110610d0657610d05615cd5565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff166144a29092919063ffffffff16565b5b50508080610d4190615de4565b915050610863565b50610d767f37c220b9da6a6f8701d57e081fb35bcab1831417bdbb471b846920c9c90b5c1b60001b613bef565b610da27f110ef4c5af08c8dec9cb4dc79fc1e0dd1defac03acfb5dcabaabcadc46ab209660001b613bef565b60008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610ddd9190615d13565b602060405180830381865afa158015610dfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1e9190615d43565b9050610e4c7feac011cfece75c2de722a020ee605d185fafb08a402ad6adb6697b13ec37a43660001b613bef565b610e787f3bbb43f3743e5a9cb9dcae448112ad116494837e0b1b5890916c3035e2fabd1f60001b613bef565b6000811115610f3557610ead7f04193f2f8593257479fbfff90e993ce934c1717d50a067519b0c91848e18a67e60001b613bef565b610ed97f1ccfbc2ae455cd665a24fc68b24750c9eab82424f8fbd82f0a37b991f5dc364060001b613bef565b610f057f25f3c0e3d8f0722b52532c36197032fe92593c2ba2888325e1175f9b513924b160001b613bef565b610f3033828573ffffffffffffffffffffffffffffffffffffffff166144a29092919063ffffffff16565b610f62565b610f617fe59f9ff09c12c1dbd384a73d3f46da2af019fa6950a194ed1d9d720e47c08bff60001b613bef565b5b610f8e7fb17137667cc48916f58c1296a26decac701f9dbb071ea532aa16891de35b0f1a60001b613bef565b610fba7fb086ef601009595a81196355f745ecded34c745e7c699856c9299ea1263aa4b160001b613bef565b60008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610ff59190615d13565b602060405180830381865afa158015611012573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110369190615d43565b90506110647f4bb0e5a79fb247ef77fb35e3c81ab9c18cfacfa3d9d98ac34a66c3fa9785011a60001b613bef565b6110907f43c60229af1f53f23e8cefba7f5f6a5f78a731098dad570d0b52d3fc1e8dc95460001b613bef565b600081111561114d576110c57fd8fc1fd846254d9f3daaab8ccb69a2344e8a26bae56262ec5be24f699bb1c7ba60001b613bef565b6110f17f8a5b3e062c386ad64b77542493804c004638e37829f856be4551981c75e54b4260001b613bef565b61111d7fb0efd7c8ab8d8d26ee4cbe1917dad9f9b4607fbaa72005810e856cc356b8128860001b613bef565b61114833828573ffffffffffffffffffffffffffffffffffffffff166144a29092919063ffffffff16565b61117a565b6111797f4dc7f81836b8a0d1551a78db6b64fa39f4240aa406d20ef8a709a810966f8a5960001b613bef565b5b6111a67f8134b878c85b20d5cbc4a53b8cdbe5e8bc30124d72e124d77e81de7a2f56027260001b613bef565b6111d27f4c21652c765f4f900ca9bf54a6696f690d9b7fa5c07be625e4bb0a297327309460001b613bef565b611276338b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161120f9190615d13565b602060405180830381865afa15801561122c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112509190615d43565b8c73ffffffffffffffffffffffffffffffffffffffff166144a29092919063ffffffff16565b50505050505050505050565b6000606080846112b47fe6714300a3a677d46e02b3f710875fdffb42d818e8196c305eddd14460b6094a60001b613bef565b6112e07f2062535d08b0341f3a8dda701bd1c7fc58f4fc9c97c0fc0eb341a823fba677d760001b613bef565b61130c7fd5b269c58097fc8fa4d7eb52fb608ed07e7a7bf7c3d74b5f4b19472ab20a6e9c60001b613bef565b8073ffffffffffffffffffffffffffffffffffffffff16631d8557d76040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561135457600080fd5b505af1158015611368573d6000803e3d6000fd5b505050506113987fcdaafccdcb8af5a3980110d3725da08287a295dac6c5b1648c470754becbb7f960001b613bef565b6113c47f2639dbd2072542a8f6e973fab75235c1623069f663ba44d48a47092841823fc160001b613bef565b6113f07fca430c96ea88b9c34e7c78d7aba037ea3dd66bd7a1fc77b84efa25356f78a12260001b613bef565b61141c7fa4c993cc64ae31f03069fd81e967f040c8d7ee028b1b3b296af8dc0fb90bd36060001b613bef565b60008673ffffffffffffffffffffffffffffffffffffffff16638fb69c4b6040518163ffffffff1660e01b81526004016020604051808303816000875af115801561146b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148f9190615e22565b90506114bd7f2b8353f2c61b68b7c47b7321de5d1bea5eec3368f5b2d006a3bdf779a01652f460001b613bef565b6114e97fa0502e8dae988fa9795b3333acaf9e8aced43129bc954d2b24f8730cef43484860001b613bef565b6114f1615393565b61151d7f4e383db6b4aa73df04348d2b8bc8868408b637f750b096c8b3f6590905a60c2560001b613bef565b6115497fc0fa8a0fce33de519add1b3fa1e8532a2731919a012abf57b56f5514aea99d1860001b613bef565b60606115777fdea126eea33dddfeaf263b13c429439750dfd8b0677925075b96dff4722b8a8a60001b613bef565b6115a37f6a7ce074930b40e38a0e02fc3d626dfc9391ed24185c564c5531147317b2bcf960001b613bef565b6115cc888473ffffffffffffffffffffffffffffffffffffffff1661452890919063ffffffff16565b5080925081935050506116017f44109113903f1dd53c1c674088428b56468d5eb25ce1f77f0b99ed5a038c831960001b613bef565b61162d7fbcdfc2b54e4c0085b983731297d156aca2cac32af30cf280e500fae0849fa29e60001b613bef565b82826000015182965096509650505050509250925092565b6000806000856116777fe6714300a3a677d46e02b3f710875fdffb42d818e8196c305eddd14460b6094a60001b613bef565b6116a37f2062535d08b0341f3a8dda701bd1c7fc58f4fc9c97c0fc0eb341a823fba677d760001b613bef565b6116cf7fd5b269c58097fc8fa4d7eb52fb608ed07e7a7bf7c3d74b5f4b19472ab20a6e9c60001b613bef565b8073ffffffffffffffffffffffffffffffffffffffff16631d8557d76040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561171757600080fd5b505af115801561172b573d6000803e3d6000fd5b5050505061175b7fcdaafccdcb8af5a3980110d3725da08287a295dac6c5b1648c470754becbb7f960001b613bef565b6117877fd974578e98050b79c3b9a538e3b9f6d16ae2cb705252e15d44655f388f525f9f60001b613bef565b6117b37fc7b49a5f0adebe5cfe10d03c818d54296b3b7e26129f471d2e7f6f3edce85a1960001b613bef565b6117df7f18ebd67b1a729a70e064dcd72cb95499a8f19203fa75eda12c0ecafb9308778260001b613bef565b60008773ffffffffffffffffffffffffffffffffffffffff166361902ffc88886040518363ffffffff1660e01b815260040161181c929190615d7f565b6020604051808303816000875af115801561183b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185f9190615d43565b905061188d7f0e3934eeebb6b08fc621bfdfb8912c9fe175ba99fb04e7f7bdc2bf1cf8427c6060001b613bef565b6118b97f9b17cb9c4b1eca2e07189604cff96d5798572e822a6a7ba3e832719062f7bb7f60001b613bef565b60008873ffffffffffffffffffffffffffffffffffffffff1663647846a56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611906573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061192a9190615c8d565b90506119587f4efd7cf94b8e6fc238afaef16fba85659b0d02d0deeacddeaf7dc0a7b619f61260001b613bef565b6119847f32698f021df4d843842c86d2b805e3b53012745780257ba48c34724e731a2d2560001b613bef565b6000808a73ffffffffffffffffffffffffffffffffffffffff1663949b22ae6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f69190615e8d565b73ffffffffffffffffffffffffffffffffffffffff1663ccbbe510856040518263ffffffff1660e01b8152600401611a2e9190615cba565b6040805180830381865afa158015611a4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a6e9190615ee6565b91509150611a9e7f60159caaf78e52f9099406eac0a1f0e0d82faa6be64bbca2746f6f411e14e87560001b613bef565b611aca7f3b60bec2dbcc9d8154c948e9c53d9b1d12f2344719b5c3ffdf327dcbb447bac360001b613bef565b6000611ad582614f07565b83611ae09190615f26565b9050611b0e7f6adacdb2f7b931d77d2799f22bd4e56ff043c0a1c7aec101fcc2a1e6121f9e0360001b613bef565b611b3a7fe56978cb97add935127dee25fcb8b8df4c3cd0e15045a5f86e78acce35b55eb760001b613bef565b84848298509850985050505050505093509350939050565b611b5a6153b7565b60008087611b8a7fe6714300a3a677d46e02b3f710875fdffb42d818e8196c305eddd14460b6094a60001b613bef565b611bb67f2062535d08b0341f3a8dda701bd1c7fc58f4fc9c97c0fc0eb341a823fba677d760001b613bef565b611be27fd5b269c58097fc8fa4d7eb52fb608ed07e7a7bf7c3d74b5f4b19472ab20a6e9c60001b613bef565b8073ffffffffffffffffffffffffffffffffffffffff16631d8557d76040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611c2a57600080fd5b505af1158015611c3e573d6000803e3d6000fd5b50505050611c6e7fcdaafccdcb8af5a3980110d3725da08287a295dac6c5b1648c470754becbb7f960001b613bef565b611c9a7f96f94d5713d3bc99c53ab43e2e5c6b369b0642a5891bdcf90dce1d27696170e460001b613bef565b611cc67f68b85e7d2286601c14d24bb5a24cefa6b7da0ba428e8ca5f9dc4a4105427fd8960001b613bef565b611cf27fae08b151e6bcc292952b24699594915debe60c1026004ff902913a1d718c288960001b613bef565b611cfa6153b7565b611d267fa74d3a0f5b03e4d95d31b9714fd48be171d1d13a17fcb5ae95d75b604252999960001b613bef565b611d527f80e1df7e2201b480cd72fc149c1e2b021ece99bdbd4a6c4a2689b8edb0350e7960001b613bef565b86816080018181525050611d887fc528caebe9590eaa668f0e34aa25b75c1a19df32620b923b75d1a488f89bc43c60001b613bef565b611db47f053e9ddb61880f7296f341c94b1edcdf15272c65663a1c70c1b7719dda1758f360001b613bef565b60008a73ffffffffffffffffffffffffffffffffffffffff1663647846a56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e259190615c8d565b9050611e537f5173026e57b7838827061916a6ddaaff8d0150a93e48ea5e213fdbb111f857ec60001b613bef565b611e7f7fe5c52f8f119e47256d499aed160d2a01711d70c51eef4a7233246f803f26954660001b613bef565b6000611ead7f1c0e24bb0c3c07c51a7b1ed2e192981eed8acc4fcbc96c59f0849d4d62682bba60001b613bef565b611ed97f26bbe5d977c5fe307b1047ccf11c62b15ed4323f975867e9c19e04adcaa8ded960001b613bef565b6000611f077f38da0edfea8324cf54c5d6dc281de5a452c7733f9efff67b9a0ab502c644f5fb60001b613bef565b611f337f86e5b89a3d1144e99a9c5199cebf33b744ad7ef3dfe5d4596e2013c7a61483bc60001b613bef565b8c73ffffffffffffffffffffffffffffffffffffffff1663679556e88d8d6040518363ffffffff1660e01b8152600401611f6e929190615f6a565b6020604051808303816000875af1158015611f8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb19190615fcb565b1561220e57611fe27f0ac6728dc9bc9e3a8915f153f4566b772cbbd89f8962ffb23d49829e7a1e99c560001b613bef565b61200e7f8193df71a2f1bbb7bc13310e280b3782372d6d6a97b62a21efb99496123f3a5060001b613bef565b61203a7f651cdcb11358a7581bc577fae4126ee61592a9e5c7e096896f490dc9aeec115b60001b613bef565b8c73ffffffffffffffffffffffffffffffffffffffff1663151b499c8d8d8d8d6040518563ffffffff1660e01b81526004016120799493929190615ff8565b60a0604051808303816000875af1158015612098573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120bc919061615a565b93506120ea7fe92f3aa612ac17be4b82d0b2f7cff7ade0cc2a5a7449f8d6971a3c62ffd3c88060001b613bef565b6121167f45b5c946094576851d788befb3f105256ecaef5d86b461cb11ba1295e9f2dd2260001b613bef565b8c73ffffffffffffffffffffffffffffffffffffffff1663949b22ae6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612161573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121859190615e8d565b73ffffffffffffffffffffffffffffffffffffffff1663c212ded485600001516040518263ffffffff1660e01b81526004016121c19190615cba565b6040805180830381865afa1580156121dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122019190615ee6565b809250819350505061223b565b61223a7f6a3bf6c32239851382e8a5ef98b41e57dafee6519cf1bd29ba20a66600b0519860001b613bef565b5b6122677f7bbbacf219ee20282432f549fc4c4c80d3732acd1f3b138f4750018a5d2b909360001b613bef565b6122937f01b8279abf32ae6ba5e767372d6d27fb0a4d24405bc5cafbebffa497dc62fd1060001b613bef565b600061229e82614f07565b836122a99190615f26565b90506122d77f278d34ed4b3c22088b55bc159a721ddd0d434867e3e2e47c6460c2bfad1dec4560001b613bef565b6123037fa6a0fce2efce48e929eaf9e4b1116b1dcefeedb526dc175865b7ddd219c042be60001b613bef565b848482985098509850505050505050955095509592505050565b606080600080856123507fe6714300a3a677d46e02b3f710875fdffb42d818e8196c305eddd14460b6094a60001b613bef565b61237c7f2062535d08b0341f3a8dda701bd1c7fc58f4fc9c97c0fc0eb341a823fba677d760001b613bef565b6123a87fd5b269c58097fc8fa4d7eb52fb608ed07e7a7bf7c3d74b5f4b19472ab20a6e9c60001b613bef565b8073ffffffffffffffffffffffffffffffffffffffff16631d8557d76040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156123f057600080fd5b505af1158015612404573d6000803e3d6000fd5b505050506124347fcdaafccdcb8af5a3980110d3725da08287a295dac6c5b1648c470754becbb7f960001b613bef565b6124607fc16959dddbef3943ab9aec6ebee2f3c1042ab7b1bc7d39e520d49a84fba643e160001b613bef565b61248c7fd4b43b4bc39b65f73398ee8bab912f6fc64fd1b4a3f990557af6374d9cb79cd860001b613bef565b6124b87f0c379d524d7744d4426c1576de0e386d357a0c6fb4970bc02316bfcec3ebb1ab60001b613bef565b6000808873ffffffffffffffffffffffffffffffffffffffff1663ef98f884896040518263ffffffff1660e01b81526004016124f49190615cba565b6000604051808303816000875af1158015612513573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061253c919061630d565b9150915061256c7f1c26c0eb54893175047c0660439e3720cc8335d5a88b6bc22fb80c7b129791f860001b613bef565b6125987fd0f4b29c5531aa9349109f305711c63071c7733743e3baabe7bd5b6716f760fd60001b613bef565b6000808a73ffffffffffffffffffffffffffffffffffffffff1663949b22ae6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156125e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061260a9190615e8d565b73ffffffffffffffffffffffffffffffffffffffff1663dcc309198b6040518263ffffffff1660e01b81526004016126429190615cba565b6040805180830381865afa15801561265e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126829190615ee6565b915091506126b27f91f59c948f36c8be49783f979daf3ae02553fbca2504786c1214de8614f6001460001b613bef565b6126de7f29918b9a5d5b01893743218b7b8553a1b7cd2ba055fcebdbbbef0fb5b959672760001b613bef565b60006126e982614f07565b836126f49190615f26565b90506127227fbeb8e005ebe9ed10f3c280e5bb98dbd9478487ea706f5e410dfb0a9c72cb499b60001b613bef565b61274e7f09a697038eef846fe3c99e62840fb77d160d40856e937460d6e69ef621b4ff9260001b613bef565b60008c73ffffffffffffffffffffffffffffffffffffffff1663647846a56040518163ffffffff1660e01b8152600401602060405180830381865afa15801561279b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127bf9190615c8d565b90506127ed7fcd5ec97da4d06091ea144ceab337cad5c5d9fa98ddd8097accc2dd040ed7f97360001b613bef565b6128197ff52b4be572db48c7c8c6439560bd8125c887d7a4372a4338adee7a432a60b26360001b613bef565b858582849a509a509a509a505050505050505092959194509250565b856128627fe6714300a3a677d46e02b3f710875fdffb42d818e8196c305eddd14460b6094a60001b613bef565b61288e7f2062535d08b0341f3a8dda701bd1c7fc58f4fc9c97c0fc0eb341a823fba677d760001b613bef565b6128ba7fd5b269c58097fc8fa4d7eb52fb608ed07e7a7bf7c3d74b5f4b19472ab20a6e9c60001b613bef565b8073ffffffffffffffffffffffffffffffffffffffff16631d8557d76040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561290257600080fd5b505af1158015612916573d6000803e3d6000fd5b505050506129467fcdaafccdcb8af5a3980110d3725da08287a295dac6c5b1648c470754becbb7f960001b613bef565b6129727faa8eb61b35cb11657bc04f08e97b046f4ac9026467424ec3a2a24cd48203d22360001b613bef565b61299e7f2cd740f7acd155cec03cd78790e047c388e87f9013297f02df4970b0d1eca16560001b613bef565b6129ca7f89ee354b2b338c7ae4c76a423133c37ded41bd74312f3d02fee9cdaea60693e560001b613bef565b60006129eb8773ffffffffffffffffffffffffffffffffffffffff16613bf2565b9050612a197fab0d6d9f4e1512b29c12dae8ea4192f83f206f9d7f24eaa192009682a48872b160001b613bef565b612a457f2c278cef8341f956be4b9963aa64857c1468f19c3e648ba2aee5087144ea1fe460001b613bef565b60008773ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ab69190615c4b565b9050612ae47f8a1a7c47c10207fd13c53908fb52ae4b3b5e215ec77e70eea61f181904fb896660001b613bef565b612b107f86a64507c3ae70b0b0b290d8359f051ad2d8c5156773484182bc081c9a1cc1ba60001b613bef565b60008973ffffffffffffffffffffffffffffffffffffffff1663647846a56040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b819190615c8d565b9050612baf7f3992e0234cb990c4e6da647b904b04ffb2c550914b162a44b64b61f23e93e7d460001b613bef565b612bdb7f1a4ef36e698b51f5397478df6b9f3f8fcabeb3e324b0aea31b6832dcab919afa60001b613bef565b612c0833308a8573ffffffffffffffffffffffffffffffffffffffff166141ae909392919063ffffffff16565b612c347f76d6b57987bca38b0a5d216cffe74046b03c2c0fefd7362820c8a6acc260bb6d60001b613bef565b612c607f1f260bd4a3ef931403956a61061082b74468bd247bffcabba1e17bde5e0bc30460001b613bef565b6000851115612d1f57612c957f4248894f0474fc2bd6e21b186bf333c3ae7cec14ba4f3b2ce18be9dbf15e126c60001b613bef565b612cc17f7e75b457d40f110f9c76fa278798371ab9065bb7a939eda7bd097756aaa85fbf60001b613bef565b612ced7fb3f91c0d167fd168c7cf9bfd33915ade90a8bb4f0843dbe6f43d3016bbb7f19860001b613bef565b612d1a3330878473ffffffffffffffffffffffffffffffffffffffff166141ae909392919063ffffffff16565b612d4c565b612d4b7f3aa28eccc36e69e926cdfb889055382cd8e646221c668b7959b97b1ea396572e60001b613bef565b5b612d787f88f99d2e3cb5842d891f45b976c5cddd65432b7f881e9d317929660cdbd0c18d60001b613bef565b612da47fc9eaf576837f757e72ff7b6f393d56bbdde98d6c424f041432145384cfb939d360001b613bef565b612daf828a8a614237565b612ddb7f830829db180723948f078f1803cb4f7b25273243b7b95c1031974b40d39f9f5560001b613bef565b612e077f675372fa0344af7114cbba43fdbce38f97d7eeb4d4f6b5958fbb25cef8a2f07260001b613bef565b8873ffffffffffffffffffffffffffffffffffffffff1663b6b55f25896040518263ffffffff1660e01b8152600401612e409190615cba565b600060405180830381600087803b158015612e5a57600080fd5b505af1158015612e6e573d6000803e3d6000fd5b50505050612e9e7fb6c2961828675a7d97f3d2b15f30a897a3fffd2bcfb15aa5538f65c7ede0f4a660001b613bef565b612eca7fc352d0018e286be841e556dd77a479814c85223a270d06d4d7897b2f052d3cfc60001b613bef565b6000851115612f6757612eff7ff771ecc401cab6e6084a70e7736fa2cd03d362b084905edf37ee4a705c93ee3560001b613bef565b612f2b7f6e02353486cee409c8aef865ed62ac0cf5662c427998e575323f9c2ee999e69e60001b613bef565b612f577f7b1991b5c68a3949b4fcd0fd4e329fcfdc92fb77b9b71e39bc49334c0495048d60001b613bef565b612f62818b87614237565b612f94565b612f937ffe036ced44dc8f0230944570ae458b6c5b0c7bf386117a844b0f855bcfcf43de60001b613bef565b5b612fc07fb150d7bae7be76808505eaf5479eee16a5fbf9da764161c20e6d3b4dc8dfc5ea60001b613bef565b612fec7f8f46f0ea8a58b49ff8f5a4265fb6984f64bfb2f35daddf933afc9a84956582bf60001b613bef565b60005b878790508110156131ed576130267f9dbbdcdeb246d6005f81ac09b11607cdc0567e3f5b298a7754c4e92ab664564f60001b613bef565b6130527f8b3f72083722b2f6a317a4db3ace906501b23865e62312a46eb0eebf8e03723360001b613bef565b6130a388888381811061306857613067615cd5565b5b90506060020160000160208101906130809190616385565b8c8a8a8581811061309457613093615cd5565b5b90506060020160400135614237565b6130cf7f080b3bde800bcfc398e027d62e6856489d2d2765e67a1f1af6b25a8fb9e0ccbe60001b613bef565b6130fb7f44fe4bd0e5a204bd76c67f889cc7c38e6c842c18135030e012b68251cd7c052060001b613bef565b8a73ffffffffffffffffffffffffffffffffffffffff16632bf8f1a589898481811061312a57613129615cd5565b5b90506060020160000160208101906131429190616385565b8a8a8581811061315557613154615cd5565b5b905060600201602001602081019061316d91906163b2565b8b8b868181106131805761317f615cd5565b5b905060600201604001356040518463ffffffff1660e01b81526004016131a8939291906163df565b600060405180830381600087803b1580156131c257600080fd5b505af11580156131d6573d6000803e3d6000fd5b5050505080806131e590616416565b915050612fef565b5061321a7f567cf3c252be65bc407f0ab53cf85ae3f8e03a2ee34026f6dc8bafe2c951d21660001b613bef565b6132467ffb763a6c053239a1eed7a2d2880c131d3790a89dfa9dea623e51b19b1349feb360001b613bef565b60005b878790508110156134d4576132807fe3633d0ed30863020d4406e6f496deea21f530b8b0195654e0f395ecb1ca22fb60001b613bef565b6132ac7fff199068cf008f862d3cb922bc4c532295545662982378563f6e29467b6f17ed60001b613bef565b60008888838181106132c1576132c0615cd5565b5b90506060020160200160208101906132d991906163b2565b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016133119190615d13565b602060405180830381865afa15801561332e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133529190615d43565b90506133807f7f2157ee24413134f3df3db2c086992b89d5619350536f0a13dc06bd12e30d2160001b613bef565b6133ac7f68bf813112a35257f75e9d4a1a6d7614998a7a18205ef0fcfaad43d39254f1f560001b613bef565b6000811115613493576133e17f900b7742400d2d0af7ecf772aff7276fa67aa08d7384fc2e53ebf45f0f901ce060001b613bef565b61340d7f8beb7550109d87d11f1e4be0f3996bedd830f3a38727cd2ce8750481f71c4f6b60001b613bef565b6134397f22cf4e513a072eb43861bc8e3563613ce59c4066f08757bdabfbea045b31f4c360001b613bef565b61348e33828b8b8681811061345157613450615cd5565b5b905060600201602001602081019061346991906163b2565b73ffffffffffffffffffffffffffffffffffffffff166144a29092919063ffffffff16565b6134c0565b6134bf7f4bcb71d982ad3fc6f418aa3d24669173f1ca717b392869f5186025e2867b985c60001b613bef565b5b5080806134cc90616416565b915050613249565b506135017f01d0b547a1fd3749598b828ea482ad28cefab34c442713fedfa059aa6552863060001b613bef565b61352d7ffe0a715696fdbef224a4c6606ad19696ec5fdf44969b4e1f25cf6bec342d4dd660001b613bef565b60005b836040015160ff168160ff1610156137b05761356e7f2ebfc2232471d0fca37eb952ac26253a72ec0e53a8901a512e9a4cd2d17328d660001b613bef565b61359a7f2d3918ae1125a19fa44e6f669f9c069679e6396d5ea65b2c9b822d074bc602ad60001b613bef565b600084600001518260ff16815181106135b6576135b5615cd5565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016135f69190615d13565b602060405180830381865afa158015613613573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136379190615d43565b90506136657f88528625ffc464158d0ef6347986c38ef12419cecb982f2af47643aa502aebe660001b613bef565b6136917f72b55f1a617c8235f302ab5e20c51e472fe043b3ef1155745f49ffb078c0b30260001b613bef565b600081111561376f576136c67f0981fadb37b3ab56852349e9c43b6e05c2168861689d6671fbc58f77c11c26fd60001b613bef565b6136f27f59ad32676ad3993568a48e5428178348fcead704d5188886ffb4dbfd5fd5fb4c60001b613bef565b61371e7f44bdecabbf1c6c145e07323ca7ddb78d8671130fc603d471eec1b207a09dc85360001b613bef565b61376a338287600001518560ff168151811061373d5761373c615cd5565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff166144a29092919063ffffffff16565b61379c565b61379b7ffa483a7b9c29428fb3c8f674f2fb1da8afb33ed08692592a33c77aa0ea7b2d6160001b613bef565b5b5080806137a890615de4565b915050613530565b506137dd7f635616f9799a3bc8462ef2b06dabe990d77e9bbdc512f6da78592a047e4f1fcf60001b613bef565b6138097f65a81685fcf28c74a5407aa554f10ac829912e0d87a8fc4a40130ee78d8429b660001b613bef565b60008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016138449190615d13565b602060405180830381865afa158015613861573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138859190615d43565b90506138b37ffaf990ed71324d6a0c2f5cd0d847b1a75989ba2af25489acce2deb6e630d529560001b613bef565b6138df7fb1254c73bfa893fc08b16c5c30221e2f07e6180f835a781b5d21e1c21ff9f8b460001b613bef565b600081111561399c576139147fa95015364221752952d951b0473ad9f3e06b8340c394508fd53a63bb0b90141660001b613bef565b6139407fda24631c8dd19c5e99fc8b4f15e187867c465683a3b76061af4dfdf5ceef731860001b613bef565b61396c7fccdf1e7eea534af615236b27210390f83f764e69752f7c3f3511a59cfb817d9260001b613bef565b61399733828573ffffffffffffffffffffffffffffffffffffffff166144a29092919063ffffffff16565b6139c9565b6139c87fa5f97b4ce248286bae8cdbcd9b29f63f56c5c70643fe2d804779bb094048cf0160001b613bef565b5b6139f57fc56b47bd38b49a05ac63f6f98a68520e90a7957c55c9224b6a2886fd1641931a60001b613bef565b613a217f4974e3412514f583d4e7638db7ce253c01b54ff0f09a1703b32f008fb696e03660001b613bef565b60008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401613a5c9190615d13565b602060405180830381865afa158015613a79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a9d9190615d43565b9050613acb7f029130494acd867b443a703d218d158728f289f51ef344db2ffd0305831765d460001b613bef565b613af77fe3c6d5d6804bb1ed73807a1d80b977fa3047b4e501a73acfbb516929a5f338b760001b613bef565b6000811115613bb457613b2c7f319f0eb35492a080046bf693c09faca1ab6ec14ee23af97f445889827b36005560001b613bef565b613b587ff3a1bd9f20a6e9fd96e2bd7451fa535dcb7dc657b288a565ccae7b7c4fe0c2f060001b613bef565b613b847fa4e6a5d7c425319d879b1db2de82b4052a107a3734ce14ea9fcad290434288c860001b613bef565b613baf33828573ffffffffffffffffffffffffffffffffffffffff166144a29092919063ffffffff16565b613be1565b613be07f632aff64a6f54db5e34724c71b815d3ae67bb1a0a9ae0fa0333164dd9953539860001b613bef565b5b505050505050505050505050565b50565b613bfa615393565b613c267f35b354f9bc18c675635f828327fe5711b02fd208f54da6064e8c25b0c1f3ac5360001b614f74565b613c527f54fbb170347b6ae763be7e46b72d9052f7c49c55249d6518dfefecb39ae99cb760001b614f74565b613c7e7f4ada503d631a3956fd188e1aa6da54bd384bf9d6a948e3bd3dc7410b248329a160001b614f74565b613c86615393565b613cb27f7833f1e78e428c96cb093700d8cd6227c0392480cc25b6f29ad5465fdcc7fe2760001b614f74565b613cde7f4494aea8194234b08d4b2781c973d693cd1a6ca021574f2e33885495e97f9c5360001b614f74565b613d558373ffffffffffffffffffffffffffffffffffffffff166359eb82246040518163ffffffff1660e01b8152600401602060405180830381865afa158015613d2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d509190615d43565b614f77565b816040019060ff16908160ff1681525050613d927fb26a3db7483f3c29c62420629e7a74984aafdf56d88f6eb2640c840069f3483960001b614f74565b613dbe7f8848adf916991163b2eb9c8a7a870bb7253f95855524906ba26edba93f09d76060001b614f74565b806040015160ff1667ffffffffffffffff811115613ddf57613dde616053565b5b604051908082528060200260200182016040528015613e0d5781602001602082028036833780820191505090505b508160000181905250613e427f6d8926b13bd6b4d86007c335e91939da020b733b0f1d6c99bdb10d8a01f433f260001b614f74565b613e6e7fb66cfa3a46a168660e8b4444f63a58f91bcde3ae1a9d5d0dda899350a6e8238960001b614f74565b806040015160ff1667ffffffffffffffff811115613e8f57613e8e616053565b5b604051908082528060200260200182016040528015613ebd5781602001602082028036833780820191505090505b508160200181905250613ef27f72c2d8d3490709fabe4918e26a8f1f31b03c05ad31f982f9646e1b56d0b0db1160001b614f74565b613f1e7f03fe22dafb7ff760e567eece9899c8e2b4eab1d93da771f45eb804c856f2ecde60001b614f74565b60005b816040015160ff168160ff16101561414c57613f5f7f1c9789f5c6caf693a1b211c93d0e19561d47a5ac869862328072fb18896c30d760001b614f74565b613f8b7f977e89eb8bd9f659a06a84a7f73833dfe20baf2070854a3833447733289023c960001b614f74565b6000808573ffffffffffffffffffffffffffffffffffffffff166326c25962846040518263ffffffff1660e01b8152600401613fc7919061648f565b6040805180830381865afa158015613fe3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061400791906164bf565b915091506140377fa614d8796382e82f360c28aa2e858f4addbb15399c77d3dd43b78978da1b7c2960001b614f74565b6140637fd8123df0e9fba608938c046f328a26d58f4e06cbede4c5d8e168ea48afaa07c260001b614f74565b8184600001518460ff168151811061407e5761407d615cd5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506140e47f3a468b40cadd8c76c2f63d767f733c9e736f12f38693e1475365f76fafeca26360001b614f74565b6141107f92a34ee1b9f7f27e04e780c51498e94e462a1c82fe3e3fd45379329feaff557e60001b614f74565b8084602001518460ff168151811061412b5761412a615cd5565b5b6020026020010181815250505050808061414490615de4565b915050613f21565b506141797f8f08e79823e7e1443be31e65f3c32ccb3aa81084cacdc2251be7809efb8f88c760001b614f74565b6141a57f5facf105fbd8e06b50f2b05034aab8971a8c2760790f013d3116ef39959bb95860001b614f74565b80915050919050565b614231846323b872dd60e01b8585856040516024016141cf939291906164ff565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614fc7565b50505050565b6142637f9a936cda58393a92b0b68cf0c57e25e761d9b24130e1e9eacbbbf05d7f02f87960001b613bef565b61428f7fb05c4a23704f290016e78bf71a48c490c5fbb068045727e0e186addf2d0dee3c60001b613bef565b6142bb7fac9009e361f9eab025a60d675861c3d4b578e8f3c024c6f4b2ee36e934df004460001b613bef565b60008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b81526004016142f8929190616536565b602060405180830381865afa158015614315573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143399190615d43565b90506143677f5bc0a685a9435f2c30d0f09f16852c7b5ac86934c348f0eba60461b5d8c12ec860001b613bef565b6143937f2fd0836fd5e213885bd7e5d35943aca15c4b74b99bbf84a18d0ba97b4b6a4bcf60001b613bef565b8181101561446f576143c77f73e7c116b8abafa444d2915799a63119186a27af4f531b361b569b3687de338860001b613bef565b6143f37fbac6071ecf0a4c2a4f1029ee707a46fcbfe2501e942b90c2f69acee77c69223660001b613bef565b61441f7fdee3a1b4e4b584b8cfd81bbf684cc55eefb1c6f23b793300663ade2499745fc360001b613bef565b61446a837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8673ffffffffffffffffffffffffffffffffffffffff1661508e9092919063ffffffff16565b61449c565b61449b7fc5a464d7e0f5cb89c109c5ab48a1e7d99a412228920e761c4f7e3a0d335d473460001b613bef565b5b50505050565b6145238363a9059cbb60e01b84846040516024016144c192919061655f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614fc7565b505050565b614530615393565b60608061455f7f6104e877c881e4357e3b39e9cb6f78a7feb6fcc103ae6936706366ed2e70ca0360001b614f74565b61458b7f7cddb91aa0cf09f2bf353433881ced491de2d1a4c3b462a1606c90c8aedbf65b60001b614f74565b6145b77fbb4188eb3103e1c9a4ab2d70e160472bdd9cb1ac61def3a603f7e9d875a0ac8960001b614f74565b60006145c286613bf2565b90506145f07f77475ccae0a83aa1fe5afa7ccad6afd5bb41728cb974c76878df9bb18fd77d2c60001b614f74565b61461c7f4e94322f08791ff27a94135b86503b04888bb7e588f02334af8c24564fe11b9560001b614f74565b6000816040015160ff1667ffffffffffffffff81111561463f5761463e616053565b5b60405190808252806020026020018201604052801561466d5781602001602082028036833780820191505090505b50905061469c7f87eb2d60142d11fdaa4ac4d03b6c9dd7cd3ebb7221d4056b24f646ed9a09b6f860001b614f74565b6146c87f14bbfea9b55ac400d58951642fe83961135de275a4a136eb04ad2556a25c343b60001b614f74565b6000826040015160ff1667ffffffffffffffff8111156146eb576146ea616053565b5b6040519080825280602002602001820160405280156147195781602001602082028036833780820191505090505b5090506147487f5fa8ac85eea08f038b0f29abfb6db1c038e204d45ee2de0a088d0d7d0b19bf0160001b614f74565b6147747fb4c5a1ac7a7f8efbe9ee07dfa50c7872a9c69a6b6a95cd12f429f4e306e06cc460001b614f74565b60008873ffffffffffffffffffffffffffffffffffffffff1663fc7b9c186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156147c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147e59190615d43565b90506148137f4d2f12e5f4e3ee69f629ac0c6ceb45f27d1ee1ed864757f9dadd617d7e882a8b60001b614f74565b61483f7f2052c239a113a1e41a4556dd9ef2c1b80e06092b4825d485e28cf5534b770e7160001b614f74565b60008973ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561488c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148b09190615c4b565b73ffffffffffffffffffffffffffffffffffffffff166370a082318b6040518263ffffffff1660e01b81526004016148e89190615d13565b602060405180830381865afa158015614905573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149299190615d43565b90506149577f4f053b2a08c36a879232db62ed1e96d16f82b81105d8489b4142e08e5d82867d60001b614f74565b6149837f33238a3682c753bacc00b6f008666a0428738f32a3ae726c9f554dbcb5f8b5a760001b614f74565b60008a73ffffffffffffffffffffffffffffffffffffffff166324a9d8536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156149d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149f49190615d43565b9050614a227f95a042215d6cb8734909d7d36b4bbc576c74125efd1b7a2b9f99a6cd67523b1260001b614f74565b614a4e7f4661b7ebf212cebdab366112503c17ee92ab3cd6a4497a525f9a98dc5a1aa58860001b614f74565b60005b866040015160ff16811015614e9857614a8c7fb06a210e85ad53979f72521c5aa170c51dd0e0a15dd959b5591d9be067aa10ba60001b614f74565b614ab87f45a9d409b4debb3a0cc9c463481f4abedea732365dcca697ca718c3afd6485fe60001b614f74565b60006103e888602001518381518110614ad457614ad3615cd5565b5b60200260200101518d614ae79190616588565b614af191906165f9565b9050614b1f7f48276be8885af99f83c6389de85d2c9561ab620c80bdd0b023d919d71037443760001b614f74565b614b4b7f5c627a397694895ff50d14a5d282ad5031ffbcb01c59d50b409a70a9a645b11160001b614f74565b6000841115614bf657614b807f6e55ddf585de5eb795083f2ae9cfdeac7aed2b6fbc68db785313d771694955a060001b614f74565b614bac7f33a0839bccd9b511d4aa2304b0af3f31c6dca94b6d0f6c600a137e82f4ae17c560001b614f74565b614bd87f0110ff25acb794463f42c94b8427fe0fb75355c8faf891af1a5e7199fe9175c260001b614f74565b838582614be59190616588565b614bef91906165f9565b9050614c23565b614c227f40fdfceef34f77019926c466dd0f5b2bc6ffc7b9c6a64cf1488f6373ff695dcc60001b614f74565b5b614c4f7f743b8796b6140e08e6293de6f471a4819c77326c816a7c9dd160695ba67bef7760001b614f74565b614c7b7f5bf1652e30ce88304ef299a0724a7ed64f3de58b76fa453ed4a4227bec9285fa60001b614f74565b6127108382614c8a9190616588565b614c9491906165f9565b868381518110614ca757614ca6615cd5565b5b602002602001018181525050614cdf7f6306b1581508397aef4c54770142bdea277de9cf3b3b04bf5d677e6a109df08760001b614f74565b614d0b7fd650a07abdafa85b692862ef50432a550f553771174d9921ab5b6bea61972fc360001b614f74565b6000868381518110614d2057614d1f615cd5565b5b60200260200101511115614ddf57614d5a7f3baed1d71120841042d7decaf19032ca93f99fd01f67dc776bc640e3b92a003760001b614f74565b614d867fe29b45f1c3c2b2b3d5b4d4b60dacc86307287489088466f61394b46382fccd3860001b614f74565b614db27f40c7803ca92537a6d051c45c592b4fd18f93f07c01cfdf7442905d8b139c678d60001b614f74565b858281518110614dc557614dc4615cd5565b5b602002602001015181614dd8919061662a565b9050614e0c565b614e0b7f740c373bf2e5346cd998eb4ebe67e01fb2760ff7ba6b5dd19865350daae6c04d60001b614f74565b5b614e387f6e10314df2c7f86401fa6ca5b749b3605a636e753670b1cc80d46215ca012c5a60001b614f74565b614e647f793f88e4848329ae4c899636eaeef8c0fc247b89add1326ee2edc5fbee10a3b460001b614f74565b80878381518110614e7857614e77615cd5565b5b602002602001018181525050508080614e9090616416565b915050614a51565b50614ec57f226f18a17924cb348e0afbad7fedd000ac24ece40e43f5d42f97ec7e0e0cf6ab60001b614f74565b614ef17f490609b7874766bb8bcf71cdee8ca1a3c2603cbf6d8560bb3bbc3cf8d4b2f3e360001b614f74565b8585859850985098505050505050509250925092565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821115614f6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401614f63906166e1565b60405180910390fd5b819050919050565b50565b600060ff8016821115614fbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401614fb690616773565b60405180910390fd5b819050919050565b6000615029826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166151dd9092919063ffffffff16565b905060008151111561508957808060200190518101906150499190615fcb565b615088576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161507f90616805565b60405180910390fd5b5b505050565b6000811480615118575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b81526004016150d5929190616536565b602060405180830381865afa1580156150f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906151169190615d43565b145b615157576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161514e90616897565b60405180910390fd5b6151d88363095ea7b360e01b848460405160240161517692919061655f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050614fc7565b505050565b60606151ec84846000856151f5565b90509392505050565b60608247101561523a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161523190616929565b60405180910390fd5b61524385615309565b615282576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161527990616995565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516152ab9190616a26565b60006040518083038185875af1925050503d80600081146152e8576040519150601f19603f3d011682016040523d82523d6000602084013e6152ed565b606091505b50915091506152fd82828661532c565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561533c5782905061538c565b60008351111561534f5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016153839190616a81565b60405180910390fd5b9392505050565b60405180606001604052806060815260200160608152602001600060ff1681525090565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000615425826153fa565b9050919050565b60006154378261541a565b9050919050565b6154478161542c565b811461545257600080fd5b50565b6000813590506154648161543e565b92915050565b60006154758261541a565b9050919050565b6154858161546a565b811461549057600080fd5b50565b6000813590506154a28161547c565b92915050565b6000819050919050565b6154bb816154a8565b81146154c657600080fd5b50565b6000813590506154d8816154b2565b92915050565b600080600080608085870312156154f8576154f76153f0565b5b600061550687828801615455565b945050602061551787828801615493565b9350506040615528878288016154c9565b9250506060615539878288016154c9565b91505092959194509250565b6000806040838503121561555c5761555b6153f0565b5b600061556a85828601615455565b925050602061557b858286016154c9565b9150509250929050565b6000819050919050565b60006155aa6155a56155a0846153fa565b615585565b6153fa565b9050919050565b60006155bc8261558f565b9050919050565b60006155ce826155b1565b9050919050565b6155de816155c3565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600061561b826155b1565b9050919050565b61562b81615610565b82525050565b600061563d8383615622565b60208301905092915050565b6000602082019050919050565b6000615661826155e4565b61566b81856155ef565b935061567683615600565b8060005b838110156156a757815161568e8882615631565b975061569983615649565b92505060018101905061567a565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6156e9816154a8565b82525050565b60006156fb83836156e0565b60208301905092915050565b6000602082019050919050565b600061571f826156b4565b61572981856156bf565b9350615734836156d0565b8060005b8381101561576557815161574c88826156ef565b975061575783615707565b925050600181019050615738565b5085935050505092915050565b600060608201905061578760008301866155d5565b81810360208301526157998185615656565b905081810360408301526157ad8184615714565b9050949350505050565b60006157c28261541a565b9050919050565b6157d2816157b7565b81146157dd57600080fd5b50565b6000813590506157ef816157c9565b92915050565b60008060006060848603121561580e5761580d6153f0565b5b600061581c86828701615455565b935050602061582d868287016157e0565b925050604061583e868287016154c9565b9150509250925092565b615851816154a8565b82525050565b6000615862826155b1565b9050919050565b61587281615857565b82525050565b6000819050919050565b61588b81615878565b82525050565b60006060820190506158a66000830186615848565b6158b36020830185615869565b6158c06040830184615882565b949350505050565b60006158d38261541a565b9050919050565b6158e3816158c8565b81146158ee57600080fd5b50565b600081359050615900816158da565b92915050565b600080600080600060a08688031215615922576159216153f0565b5b600061593088828901615455565b9550506020615941888289016157e0565b9450506040615952888289016158f1565b9350506060615963888289016154c9565b9250506080615974888289016154c9565b9150509295509295909350565b60a08201600082015161599760008501826156e0565b5060208201516159aa60208501826156e0565b5060408201516159bd60408501826156e0565b5060608201516159d060608501826156e0565b5060808201516159e360808501826156e0565b50505050565b600060e0820190506159fe6000830186615981565b615a0b60a0830185615869565b615a1860c0830184615882565b949350505050565b600081519050919050565b6000819050602082019050919050565b615a4481615857565b82525050565b6000615a568383615a3b565b60208301905092915050565b6000602082019050919050565b6000615a7a82615a20565b615a8481856155ef565b9350615a8f83615a2b565b8060005b83811015615ac0578151615aa78882615a4a565b9750615ab283615a62565b925050600181019050615a93565b5085935050505092915050565b60006080820190508181036000830152615ae78187615a6f565b90508181036020830152615afb8186615714565b9050615b0a6040830185615869565b615b176060830184615882565b95945050505050565b600080fd5b600080fd5b600080fd5b60008083601f840112615b4557615b44615b20565b5b8235905067ffffffffffffffff811115615b6257615b61615b25565b5b602083019150836060820283011115615b7e57615b7d615b2a565b5b9250929050565b60008060008060008060a08789031215615ba257615ba16153f0565b5b6000615bb089828a01615455565b9650506020615bc189828a01615493565b9550506040615bd289828a016154c9565b945050606087013567ffffffffffffffff811115615bf357615bf26153f5565b5b615bff89828a01615b2f565b93509350506080615c1289828a016154c9565b9150509295509295509295565b615c288161541a565b8114615c3357600080fd5b50565b600081519050615c4581615c1f565b92915050565b600060208284031215615c6157615c606153f0565b5b6000615c6f84828501615c36565b91505092915050565b600081519050615c87816158da565b92915050565b600060208284031215615ca357615ca26153f0565b5b6000615cb184828501615c78565b91505092915050565b6000602082019050615ccf6000830184615848565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b615d0d8161541a565b82525050565b6000602082019050615d286000830184615d04565b92915050565b600081519050615d3d816154b2565b92915050565b600060208284031215615d5957615d586153f0565b5b6000615d6784828501615d2e565b91505092915050565b615d7981615610565b82525050565b6000604082019050615d946000830185615d70565b615da16020830184615848565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060ff82169050919050565b6000615def82615dd7565b915060ff8203615e0257615e01615da8565b5b600182019050919050565b600081519050615e1c8161547c565b92915050565b600060208284031215615e3857615e376153f0565b5b6000615e4684828501615e0d565b91505092915050565b6000615e5a8261541a565b9050919050565b615e6a81615e4f565b8114615e7557600080fd5b50565b600081519050615e8781615e61565b92915050565b600060208284031215615ea357615ea26153f0565b5b6000615eb184828501615e78565b91505092915050565b615ec381615878565b8114615ece57600080fd5b50565b600081519050615ee081615eba565b92915050565b60008060408385031215615efd57615efc6153f0565b5b6000615f0b85828601615ed1565b9250506020615f1c85828601615d2e565b9150509250929050565b6000615f3182615878565b9150615f3c83615878565b925082820190508281121560008312168382126000841215161715615f6457615f63615da8565b5b92915050565b6000604082019050615f7f6000830185615d70565b615f8c6020830184615869565b9392505050565b60008115159050919050565b615fa881615f93565b8114615fb357600080fd5b50565b600081519050615fc581615f9f565b92915050565b600060208284031215615fe157615fe06153f0565b5b6000615fef84828501615fb6565b91505092915050565b600060808201905061600d6000830187615d70565b61601a6020830186615869565b6160276040830185615848565b6160346060830184615848565b95945050505050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61608b82616042565b810181811067ffffffffffffffff821117156160aa576160a9616053565b5b80604052505050565b60006160bd6153e6565b90506160c98282616082565b919050565b600060a082840312156160e4576160e361603d565b5b6160ee60a06160b3565b905060006160fe84828501615d2e565b600083015250602061611284828501615d2e565b602083015250604061612684828501615d2e565b604083015250606061613a84828501615d2e565b606083015250608061614e84828501615d2e565b60808301525092915050565b600060a082840312156161705761616f6153f0565b5b600061617e848285016160ce565b91505092915050565b600067ffffffffffffffff8211156161a2576161a1616053565b5b602082029050602081019050919050565b60006161c66161c184616187565b6160b3565b905080838252602082019050602084028301858111156161e9576161e8615b2a565b5b835b8181101561621257806161fe8882615c78565b8452602084019350506020810190506161eb565b5050509392505050565b600082601f83011261623157616230615b20565b5b81516162418482602086016161b3565b91505092915050565b600067ffffffffffffffff82111561626557616264616053565b5b602082029050602081019050919050565b60006162896162848461624a565b6160b3565b905080838252602082019050602084028301858111156162ac576162ab615b2a565b5b835b818110156162d557806162c18882615d2e565b8452602084019350506020810190506162ae565b5050509392505050565b600082601f8301126162f4576162f3615b20565b5b8151616304848260208601616276565b91505092915050565b60008060408385031215616324576163236153f0565b5b600083015167ffffffffffffffff811115616342576163416153f5565b5b61634e8582860161621c565b925050602083015167ffffffffffffffff81111561636f5761636e6153f5565b5b61637b858286016162df565b9150509250929050565b60006020828403121561639b5761639a6153f0565b5b60006163a9848285016157e0565b91505092915050565b6000602082840312156163c8576163c76153f0565b5b60006163d6848285016158f1565b91505092915050565b60006060820190506163f46000830186615d70565b6164016020830185615869565b61640e6040830184615848565b949350505050565b6000616421826154a8565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361645357616452615da8565b5b600182019050919050565b600061647961647461646f84615dd7565b615585565b6154a8565b9050919050565b6164898161645e565b82525050565b60006020820190506164a46000830184616480565b92915050565b6000815190506164b9816157c9565b92915050565b600080604083850312156164d6576164d56153f0565b5b60006164e4858286016164aa565b92505060206164f585828601615d2e565b9150509250929050565b60006060820190506165146000830186615d04565b6165216020830185615d04565b61652e6040830184615848565b949350505050565b600060408201905061654b6000830185615d04565b6165586020830184615d04565b9392505050565b60006040820190506165746000830185615d04565b6165816020830184615848565b9392505050565b6000616593826154a8565b915061659e836154a8565b92508282026165ac816154a8565b915082820484148315176165c3576165c2615da8565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000616604826154a8565b915061660f836154a8565b92508261661f5761661e6165ca565b5b828204905092915050565b6000616635826154a8565b9150616640836154a8565b925082820390508181111561665857616657615da8565b5b92915050565b600082825260208201905092915050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e206160008201527f6e20696e74323536000000000000000000000000000000000000000000000000602082015250565b60006166cb60288361665e565b91506166d68261666f565b604082019050919050565b600060208201905081810360008301526166fa816166be565b9050919050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203860008201527f2062697473000000000000000000000000000000000000000000000000000000602082015250565b600061675d60258361665e565b915061676882616701565b604082019050919050565b6000602082019050818103600083015261678c81616750565b9050919050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006167ef602a8361665e565b91506167fa82616793565b604082019050919050565b6000602082019050818103600083015261681e816167e2565b9050919050565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b600061688160368361665e565b915061688c82616825565b604082019050919050565b600060208201905081810360008301526168b081616874565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b600061691360268361665e565b915061691e826168b7565b604082019050919050565b6000602082019050818103600083015261694281616906565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b600061697f601d8361665e565b915061698a82616949565b602082019050919050565b600060208201905081810360008301526169ae81616972565b9050919050565b600081519050919050565b600081905092915050565b60005b838110156169e95780820151818401526020810190506169ce565b60008484015250505050565b6000616a00826169b5565b616a0a81856169c0565b9350616a1a8185602086016169cb565b80840191505092915050565b6000616a3282846169f5565b915081905092915050565b600081519050919050565b6000616a5382616a3d565b616a5d818561665e565b9350616a6d8185602086016169cb565b616a7681616042565b840191505092915050565b60006020820190508181036000830152616a9b8184616a48565b90509291505056fea2646970667358221220a8c87f3a40999683b60ce8e7904e0e58df229fd83f374573711272578249a7a364736f6c63430008110033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/spot-contracts/external-artifacts/ERC20ABI.json b/spot-contracts/external-artifacts/ERC20ABI.json new file mode 100644 index 00000000..405d6b36 --- /dev/null +++ b/spot-contracts/external-artifacts/ERC20ABI.json @@ -0,0 +1,222 @@ +[ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + } +] diff --git a/spot-contracts/external-artifacts/RebasingERC20ABI.json b/spot-contracts/external-artifacts/RebasingERC20ABI.json new file mode 100644 index 00000000..09bb9cb7 --- /dev/null +++ b/spot-contracts/external-artifacts/RebasingERC20ABI.json @@ -0,0 +1,344 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newScalar", + "type": "uint256" + } + ], + "name": "Rebase", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + } + ], + "name": "LogRebase", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rebase", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "who", + "type": "address" + } + ], + "name": "scaledBalanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "scaledTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "transferAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "transferAllFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/spot-contracts/hardhat.config.ts b/spot-contracts/hardhat.config.ts index bc81681c..56840a33 100644 --- a/spot-contracts/hardhat.config.ts +++ b/spot-contracts/hardhat.config.ts @@ -31,6 +31,7 @@ export default { chainId: 1337, }, goerli: { + // url: `https://goerli.infura.io/v3/${process.env.INFURA_SECRET}`, url: `https://eth-goerli.g.alchemy.com/v2/${process.env.ALCHEMY_SECRET}`, accounts: { mnemonic: process.env.PROD_MNEMONIC || Wallet.createRandom().mnemonic.phrase, @@ -39,7 +40,8 @@ export default { allowUnlimitedContractSize: true, }, mainnet: { - url: `https://mainnet.infura.io/v3/${process.env.INFURA_SECRET}`, + // url: `https://mainnet.infura.io/v3/${process.env.INFURA_SECRET}`, + url: `https://eth-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_SECRET}`, accounts: { mnemonic: process.env.PROD_MNEMONIC || Wallet.createRandom().mnemonic.phrase, }, diff --git a/spot-contracts/tasks/goeril.sh b/spot-contracts/tasks/goeril.sh index 94a1868e..698b057b 100644 --- a/spot-contracts/tasks/goeril.sh +++ b/spot-contracts/tasks/goeril.sh @@ -1,13 +1,18 @@ ######################################################################## ## DEPLOYMENT -yarn hardhat --network goerli deploy:MockAMPL + +# using staging AMPL instance deployed to: 0x08c5b39F000705ebeC8427C1d64D6262392944EE +# https://github.com/ampleforth/ampleforth-contracts + +# using button wood's stating factory deployed to: 0xda5DbE504e7D532E4F8921B38E1F970D4b881BFB +# https://docs.prl.one/buttonwood/developers/deployed-contracts/goerli-testnet yarn hardhat --network goerli deploy:BondIssuer \ --bond-factory-address "0xdDe914EfBF5C472a590e61658d8E342d17E3AAB7" \ --bond-duration "3600" \ --issue-frequency "1200" \ --issue-window-offset "0" \ - --collateral-token-address "0x74567107828843070087F1c6ec8322A3e8450725" \ + --collateral-token-address "0x08c5b39F000705ebeC8427C1d64D6262392944EE" \ --tranche-ratios "[500,500]" yarn hardhat --network goerli deploy:PerpetualTranche \ @@ -18,8 +23,8 @@ yarn hardhat --network goerli deploy:PerpetualTranche \ --pricing-strategy-ref "CDRPricingStrategy" yarn hardhat --network goerli deploy:DiscountStrategy:setDiscount \ - --discount-strategy-address "0x9649fa62f182a4922B9bb49129B20C8502027fEe" \ - --collateral-token-address "0x74567107828843070087F1c6ec8322A3e8450725" \ + --discount-strategy-address "0xEDB171C18cE90B633DB442f2A6F72874093b49Ef" \ + --collateral-token-address "0x08c5b39F000705ebeC8427C1d64D6262392944EE" \ --tranche-ratios "[500,500]" \ --tranche-index "0" \ --tranche-discount "1.0" @@ -39,13 +44,13 @@ yarn hardhat --network goerli ops:perp:info 0x95014Bc18F82a98CFAA3253fbD3184125A yarn hardhat --network goerli ops:updateState 0x95014Bc18F82a98CFAA3253fbD3184125A01f848 yarn hardhat --network goerli ops:trancheAndDeposit \ - --router-address 0x5e902bdCC408550b4BD612678bE2d57677664Dc9 \ - --perp-address 0x95014Bc18F82a98CFAA3253fbD3184125A01f848 \ + --router-address 0x8be9cC958680A6b0AE8609150B489a161baD3dCd \ + --perp-address 0x6Da15e0ab0524841Ac5e55a77CFC3F5CB040a7B7 \ --collateral-amount 250 yarn hardhat --network goerli ops:redeem \ - --router-address 0x5e902bdCC408550b4BD612678bE2d57677664Dc9 \ - --perp-address 0x95014Bc18F82a98CFAA3253fbD3184125A01f848 \ + --router-address 0x8be9cC958680A6b0AE8609150B489a161baD3dCd \ + --perp-address 0x6Da15e0ab0524841Ac5e55a77CFC3F5CB040a7B7 \ --amount 10 yarn hardhat --network goerli ops:redeemTranches \ @@ -60,8 +65,8 @@ yarn hardhat --network goerli ops:preview_tx:trancheAndRollover \ --perp-address 0x95014Bc18F82a98CFAA3253fbD3184125A01f848 yarn hardhat --network goerli ops:trancheAndRollover \ - --router-address 0x5e902bdCC408550b4BD612678bE2d57677664Dc9 \ - --perp-address 0x95014Bc18F82a98CFAA3253fbD3184125A01f848 \ + --router-address 0x8be9cC958680A6b0AE8609150B489a161baD3dCd \ + --perp-address 0x6Da15e0ab0524841Ac5e55a77CFC3F5CB040a7B7 \ --collateral-amount 200 yarn hardhat --network goerli ops:rebase:MockAMPL \ diff --git a/spot-subgraph/.eslintrc b/spot-subgraph/.eslintrc new file mode 100644 index 00000000..ed30f472 --- /dev/null +++ b/spot-subgraph/.eslintrc @@ -0,0 +1,5 @@ +{ + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint"], + "extends": ["plugin:@typescript-eslint/recommended", "prettier", "prettier/@typescript-eslint"] +} diff --git a/spot-subgraph/.gitignore b/spot-subgraph/.gitignore new file mode 100644 index 00000000..af741cf1 --- /dev/null +++ b/spot-subgraph/.gitignore @@ -0,0 +1,8 @@ +# generated entities +generated/ + +# subgraph file +subgraph.yaml + +# subgraph build +build \ No newline at end of file diff --git a/spot-subgraph/.prettierrc b/spot-subgraph/.prettierrc new file mode 100644 index 00000000..bd9e46e2 --- /dev/null +++ b/spot-subgraph/.prettierrc @@ -0,0 +1,7 @@ +{ + "semi": false, + "trailingComma": "all", + "singleQuote": true, + "bracketSpacing": true, + "printWidth": 80 +} diff --git a/spot-subgraph/LICENSE b/spot-subgraph/LICENSE new file mode 100644 index 00000000..20d40b6b --- /dev/null +++ b/spot-subgraph/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file diff --git a/spot-subgraph/README.md b/spot-subgraph/README.md new file mode 100644 index 00000000..23d3a7b2 --- /dev/null +++ b/spot-subgraph/README.md @@ -0,0 +1,37 @@ +## Spot subgraph + +The Graph is a tool for for indexing events emitted on the Ethereum blockchain. It provides you with an easy-to-use GraphQL API. + +``` +Public graphql endpoint: +https://api.thegraph.com/subgraphs/name/ampleforth/spot +``` + +## Getting started + +Run a local instance of the graph node: + +``` +git clone https://github.com/graphprotocol/graph-node +cd graph-node/docker + +# update docker-compose.yaml with alchemy rpc endpoint +docker-compose up +``` + +Setup project: +``` +yarn global add mustache +yarn +``` + +To build and deploy the subgraph to the graph hosted service: + +``` +# local deployment +./scripts/deploy-local.sh goerli ampleforth/spot-goerli + +# prod deployment +./scripts/deploy.sh goerli ampleforth/spot-goerli +./scripts/deploy.sh mainnet ampleforth/spot +``` \ No newline at end of file diff --git a/spot-subgraph/package.json b/spot-subgraph/package.json new file mode 100644 index 00000000..ea2eb386 --- /dev/null +++ b/spot-subgraph/package.json @@ -0,0 +1,25 @@ +{ + "name": "@ampleforthorg/spot-subgraph", + "version": "1.0.0", + "license": "GPL-3.0-or-later", + "scripts": { + "auth": "graph auth --studio", + "codegen": "graph codegen --output-dir ./generated", + "build": "graph build", + "lint": "yarn prettier --config .prettierrc --write '**/*.ts'", + "create-local": "graph create --node http://localhost:8020/ ampleforth/spot", + "remove-local": "graph remove --node http://localhost:8020/ ampleforth/spot", + "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 ampleforth/spot", + "test": "echo 'TO_BE_IMPL'" + }, + "devDependencies": { + "@graphprotocol/graph-cli": "^0.21.1", + "@graphprotocol/graph-ts": "^0.20.0", + "@typescript-eslint/eslint-plugin": "^2.0.0", + "@typescript-eslint/parser": "^2.0.0", + "eslint": "^6.2.2", + "eslint-config-prettier": "^6.1.0", + "prettier": "^1.18.2", + "typescript": "^3.5.2" + } +} diff --git a/spot-subgraph/schema.graphql b/spot-subgraph/schema.graphql new file mode 100644 index 00000000..41afae68 --- /dev/null +++ b/spot-subgraph/schema.graphql @@ -0,0 +1,232 @@ +type BondFactory @entity { + " factory address " + id: ID! + + " number of bonds created by the factory " + bondCount: BigInt! + + " list of bonds created by the factory " + bonds: [BondController!] @derivedFrom(field: "factory") +} + +type BondController @entity { + " bond address " + id: ID! + + " factory used to create the bond " + factory: BondFactory + + " bond issuer used to create the bond " + issuer: BondIssuer + + " address of the owner " + owner: String! + + " deposit limit of the bond " + depositLimit: BigInt! + + " fee percentage collected by bond owner " + feePerc: BigDecimal! + + " reference to the collateral token " + collateral: Token! + + " date of bond creation as a unix timestamp " + creationDate: BigInt! + + " date of maturity as a unix timestamp " + maturityDate: BigInt! + + " date bond was matured as a unix timestamp " + maturedDate: BigInt + + " true if this bond is mature, else false " + isMature: Boolean! + + " total amount of debt distributed. Equal to the sum of tranche total supplies " + totalDebt: BigDecimal! + + " Total amount of debt distributed at time bond matured. Equal to the sum of tranche total supplies " + totalDebtAtMaturity: BigDecimal + + " amount of collateral locked in this bond " + totalCollateral: BigDecimal! + + " The amount of collateral locked in this bond at time bond matured " + totalCollateralAtMaturity: BigDecimal + + " tranches and ratios in a list " + tranches: [Tranche!]! +} + +type Tranche @entity { + " tranche token address " + id: ID! + + " reference to the bond in which this tranche belongs " + bond: BondController! + + " reference to the tranche token contract " + token: Token! + + " ratio of this tranche, all tranche ratios sum to 1000 " + ratio: BigInt! + + " index of this tranche, i.e. A-tranche is 0, B is 1 and so on " + index: BigInt! + + " The amount of collateral in this tranche for redemption " + totalCollateral: BigDecimal! + + " The amount of collateral in this tranche for redemption at time bond matured " + totalCollateralAtMaturity: BigDecimal + + " token total supply at time bond matured " + totalSupplyAtMaturity: BigDecimal +} + +type Token @entity { + " token address " + id: ID! + + " token symbol " + symbol: String! + + " token name " + name: String! + + " token decimals " + decimals: BigInt! + + " token total supply as floating point " + totalSupply: BigDecimal! + + " Token balances of all accounts " + balances: [AccountBalance!]! @derivedFrom(field: "token") +} + +type AccountBalance @entity { + " Equals to: -" + id: ID! + + " token reference " + token: Token! + + " account address " + account: Account! + + " current account balance as floating point" + amount: BigDecimal! + + " Block number in which the balance was last modified " + block: BigInt + + " Last modified timestamp in seconds " + modified: BigInt + + " Hash of the last transaction that modified the balance " + transaction: Bytes +} + +type Account @entity { + " Account address " + id: ID! + + " Token balances that this account holds " + balances: [AccountBalance!]! @derivedFrom(field: "account") +} + + +type BondIssuer @entity { + " issuer address " + id: ID! + + " the minimum time between issues " + minIssueTimeIntervalSec: BigInt! + + " issue window offset time " + issueWindowOffsetSec: BigInt! + + " maximum bond duration " + maxMaturityDuration: BigInt! + + " timestamp of last issue " + lastIssueTimestamp: BigInt + + " Block number of last issue " + lastIssueBlock: BigInt + + " list of bonds issued by the issuer " + issuedBonds: [BondController!] @derivedFrom(field: "issuer") +} + + +type PerpetualTranche @entity { + " perp token address " + id: ID! + + " reference to the ERC20 token attributes " + token: Token! + + " reference to the collateral " + collateral: Token! + + " address of the owner " + owner: String! + + " address of the keeper " + keeper: String! + + " address of the bond issuer " + issuer: BondIssuer! + + " address of the fee strategy " + feeStrategy: String! + + " address of the pricing strategy " + pricingStrategy: String! + + " address of the discount strategy " + discountStrategy: String! + + " allowed time to maturity before tranche is moved to the holding pen " + minTrancheMaturitySec: BigInt! + + " allowed time from maturity after which tranche can be accepted " + maxTrancheMaturitySec: BigInt! + + " supply ceiling " + maxSupply: BigDecimal! + + " maximum mint allowed per tranche " + maxMintAmtPerTranche: BigDecimal! + + " percentage of reserve value allowed to be held in the holding pen " + matureValueTargetPerc: BigDecimal! + + " reference to the current deposit bond " + depositBond: BondController + + " the virtual holding pen tranche balance " + matureTrancheBalance: BigDecimal! + + " reference to assets held in the reserve " + reserves: [PerpetualTrancheReserveAsset!]! @derivedFrom(field: "perp") +} + +type PerpetualTrancheReserveAsset @entity { + " Equals to: -" + id: ID! + + " reference to the perpetual tranche token " + perp: PerpetualTranche! + + " reference to the token " + token: Token! + + " reference to the underlying tranche " + tranche: Tranche + + " balance held by the reserve " + balance: BigDecimal! +} \ No newline at end of file diff --git a/spot-subgraph/scripts/deploy-local.sh b/spot-subgraph/scripts/deploy-local.sh new file mode 100755 index 00000000..86709b29 --- /dev/null +++ b/spot-subgraph/scripts/deploy-local.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -e + +mustache ../spot-contracts/deployments/$1.json subgraph.template.yaml > ./subgraph.yaml + +yarn codegen + +yarn build + +yarn create-local + +yarn deploy-local diff --git a/spot-subgraph/scripts/deploy.sh b/spot-subgraph/scripts/deploy.sh new file mode 100755 index 00000000..4020278d --- /dev/null +++ b/spot-subgraph/scripts/deploy.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -e + +mustache ../spot-contracts/deployments/$1.json subgraph.template.yaml > ./subgraph.yaml + +yarn auth $GRAPH_AUTH + +yarn codegen + +yarn build + +yarn graph deploy \ + --product hosted-service \ + --access-token $GRAPH_AUTH $2 diff --git a/spot-subgraph/src/data/bondIssuer.ts b/spot-subgraph/src/data/bondIssuer.ts new file mode 100644 index 00000000..faccdd41 --- /dev/null +++ b/spot-subgraph/src/data/bondIssuer.ts @@ -0,0 +1,21 @@ +import { Address } from '@graphprotocol/graph-ts' +import { BondIssuer } from '../../generated/schema' +import { BondIssuer as BondIssuerABI } from '../../generated/BondIssuer/BondIssuer' +import { stringToAddress } from '../utils' +import { fetchToken } from './token' + +export function fetchBondIssuer(address: Address): BondIssuer { + let id = address.toHexString() + let issuer = BondIssuer.load(id) + if (issuer == null) { + let address = stringToAddress(id) + let issuerContract = BondIssuerABI.bind(address) + issuer = new BondIssuer(id) + + issuer.minIssueTimeIntervalSec = issuerContract.minIssueTimeIntervalSec() + issuer.issueWindowOffsetSec = issuerContract.issueWindowOffsetSec() + issuer.maxMaturityDuration = issuerContract.maxMaturityDuration() + issuer.save() + } + return issuer as BondIssuer +} diff --git a/spot-subgraph/src/data/buttonTranche.ts b/spot-subgraph/src/data/buttonTranche.ts new file mode 100644 index 00000000..df8a6897 --- /dev/null +++ b/spot-subgraph/src/data/buttonTranche.ts @@ -0,0 +1,165 @@ +import { + BigInt, + Address, + ethereum, + DataSourceContext, +} from '@graphprotocol/graph-ts' +import { + BondFactory, + BondController, + Tranche, + Token, +} from '../../generated/schema' +import { BondController as BondControllerABI } from '../../generated/BondFactory/BondController' +import { ERC20 as ERC20ABI } from '../../generated/BondFactory/ERC20' +import { + BondController as BondControllerTemplate, + RebasingToken as RebasingTokenTemplate, +} from '../../generated/templates' +import { + BIGINT_ZERO, + BIGDECIMAL_ZERO, + stringToAddress, + formatBalance, +} from '../utils' +import { fetchToken } from './token' + +export function fetchBondFactory(address: Address): BondFactory { + let id = address.toHexString() + let factory = BondFactory.load(id) + if (factory == null) { + factory = new BondFactory(id) + factory.bondCount = BIGINT_ZERO + factory.save() + } + return factory as BondFactory +} + +export function fetchBond(address: Address): BondController { + let id = address.toHexString() + let bond = BondController.load(id) + if (bond == null) { + let bondContract = BondControllerABI.bind(address) + bond = new BondController(id) + bond.owner = bondContract.owner().toHexString() + bond.collateral = fetchToken(bondContract.collateralToken()).id + bond.depositLimit = bondContract.depositLimit() + bond.feePerc = formatBalance(bondContract.feeBps(), BigInt.fromI32(2)) + bond.creationDate = bondContract.creationDate() + bond.maturityDate = bondContract.maturityDate() + bond.isMature = bondContract.isMature() + bond.totalDebt = BIGDECIMAL_ZERO + bond.totalCollateral = BIGDECIMAL_ZERO + let trancheCount = bondContract.trancheCount().toI32() + let tranches: string[] = [] + for (let i = 0; i < trancheCount; i++) { + let tranche = fetchTranche(bond as BondController, i) + tranches.push(tranche.id) + } + bond.tranches = tranches + bond.save() + + BondControllerTemplate.create(address) + + let collateralContext = new DataSourceContext() + collateralContext.setString('bond', id) + RebasingTokenTemplate.createWithContext( + stringToAddress(bond.collateral), + collateralContext, + ) + } + return bond as BondController +} + +export function fetchTranche( + bond: BondController, + trancheIndex: number, +): Tranche { + let bondAddress = stringToAddress(bond.id) + let bondContract = BondControllerABI.bind(bondAddress) + let trancheResult = bondContract.try_tranches( + BigInt.fromI32(trancheIndex as i32), + ) + if (trancheResult.reverted) { + throw new Error('Unable to fetch tranche') + } + let address = trancheResult.value.value0 + let id = address.toHexString() + let tranche = Tranche.load(id) + if (tranche === null) { + tranche = new Tranche(id) + tranche.bond = bond.id + tranche.token = fetchToken(address).id + tranche.index = BigInt.fromI32(trancheIndex as i32) + tranche.ratio = trancheResult.value.value1 + tranche.totalCollateral = BIGDECIMAL_ZERO + tranche.save() + } + return tranche as Tranche +} + +export function refreshBond(bond: BondController): void { + let bondAddress = stringToAddress(bond.id) + let bondContract = BondControllerABI.bind(bondAddress) + let collateralAddress = stringToAddress(bond.collateral) + let collateralContract = ERC20ABI.bind(collateralAddress) + let collateral = fetchToken(collateralAddress) + + bond.totalDebt = formatBalance(bondContract.totalDebt(), collateral.decimals) + bond.totalCollateral = formatBalance( + collateralContract.balanceOf(bondAddress), + collateral.decimals, + ) + collateral.totalSupply = formatBalance( + collateralContract.totalSupply(), + collateral.decimals, + ) + + let tranches = bond.tranches + for (let i = 0; i < tranches.length; i++) { + let tranche = fetchTranche(bond, i) + let trancheAddress = stringToAddress(tranche.id) + let trancheContract = ERC20ABI.bind(trancheAddress) + let trancheToken = fetchToken(trancheAddress) + + trancheToken.totalSupply = formatBalance( + trancheContract.totalSupply(), + collateral.decimals, + ) + tranche.totalCollateral = formatBalance( + collateralContract.balanceOf(trancheAddress), + collateral.decimals, + ) + + trancheToken.save() + tranche.save() + } + + collateral.save() + bond.save() +} + +export function matureBond(bond: BondController, block: ethereum.Block): void { + bond.isMature = true + bond.maturedDate = block.timestamp + bond.totalDebtAtMaturity = bond.totalDebt + + let totalCollateralAtMaturity = BIGDECIMAL_ZERO + let tranches = bond.tranches + for (let i = 0; i < tranches.length; i++) { + let tranche = fetchTranche(bond, i) + let trancheAddress = stringToAddress(tranche.id) + let trancheToken = fetchToken(trancheAddress) + + totalCollateralAtMaturity = totalCollateralAtMaturity.plus( + tranche.totalCollateral, + ) + + tranche.totalSupplyAtMaturity = trancheToken.totalSupply + tranche.totalCollateralAtMaturity = tranche.totalCollateral + tranche.save() + } + + bond.totalCollateralAtMaturity = totalCollateralAtMaturity + bond.save() +} diff --git a/spot-subgraph/src/data/perpetualTranche.ts b/spot-subgraph/src/data/perpetualTranche.ts new file mode 100644 index 00000000..87d80dbf --- /dev/null +++ b/spot-subgraph/src/data/perpetualTranche.ts @@ -0,0 +1,99 @@ +import { BigInt, Address, DataSourceContext } from '@graphprotocol/graph-ts' +import { + PerpetualTranche, + PerpetualTrancheReserveAsset, +} from '../../generated/schema' +import { PerpetualTranche as PerpetualTrancheABI } from '../../generated/PerpetualTranche/PerpetualTranche' +import { ERC20 as ERC20ABI } from '../../generated/BondFactory/ERC20' +import { RebasingToken as RebasingTokenTemplate } from '../../generated/templates' +import { + ADDRESS_ZERO, + BIGDECIMAL_ZERO, + stringToAddress, + formatBalance, +} from '../utils' +import { fetchToken } from './token' + +export function refreshPerpetualTrancheStore(perp: PerpetualTranche): void { + let address = stringToAddress(perp.id) + let perpContract = PerpetualTrancheABI.bind(address) + let decimals = BigInt.fromI32(perpContract.decimals()) + let collateralAddress = perpContract.collateral() + let collateralContract = ERC20ABI.bind(collateralAddress) + let collateral = fetchToken(collateralAddress) + perp.collateral = collateral.id + perp.owner = perpContract.owner().toHexString() + perp.keeper = perpContract.keeper().toHexString() + perp.issuer = perpContract.bondIssuer().toHexString() + perp.feeStrategy = perpContract.feeStrategy().toHexString() + perp.pricingStrategy = perpContract.pricingStrategy().toHexString() + perp.discountStrategy = perpContract.discountStrategy().toHexString() + perp.minTrancheMaturitySec = perpContract.minTrancheMaturitySec() + perp.maxTrancheMaturitySec = perpContract.maxTrancheMaturitySec() + perp.maxSupply = formatBalance(perpContract.maxSupply(), decimals) + perp.maxMintAmtPerTranche = formatBalance( + perpContract.maxMintAmtPerTranche(), + decimals, + ) + perp.matureValueTargetPerc = formatBalance( + perpContract.matureValueTargetPerc(), + BigInt.fromI32(2), + ) + perp.save() + + let reserveCollateral = fetchPerpetualTrancheReserveAsset( + address, + collateralAddress, + ) + reserveCollateral.balance = formatBalance( + collateralContract.balanceOf(perpContract.reserve()), + decimals, + ) + reserveCollateral.save() +} + +export function fetchPerpetualTranche(address: Address): PerpetualTranche { + let id = address.toHexString() + let perp = PerpetualTranche.load(id) + if (perp == null) { + let perpToken = fetchToken(address) + perp = new PerpetualTranche(id) + perp.token = perpToken.id + perp.depositBond = null + perp.matureTrancheBalance = BIGDECIMAL_ZERO + refreshPerpetualTrancheStore(perp as PerpetualTranche) + + let collateralContext = new DataSourceContext() + collateralContext.setString('perp', id) + RebasingTokenTemplate.createWithContext( + stringToAddress(perp.collateral), + collateralContext, + ) + perp.save() + } + + return perp as PerpetualTranche +} + +export function fetchPerpetualTrancheReserveAsset( + perpAddress: Address, + tokenAddress: Address, +): PerpetualTrancheReserveAsset { + let perpId = perpAddress.toHexString() + let tokenId = tokenAddress.toHexString() + let id = perpId.concat('-').concat(tokenId) + let reserveToken = PerpetualTrancheReserveAsset.load(id) + if (reserveToken === null) { + let perpContract = PerpetualTrancheABI.bind(perpAddress) + let collateralAddress = perpContract.collateral() + reserveToken = new PerpetualTrancheReserveAsset(id) + reserveToken.perp = perpId + reserveToken.token = tokenId + reserveToken.balance = BIGDECIMAL_ZERO + if (tokenAddress != collateralAddress) { + reserveToken.tranche = tokenId + } + reserveToken.save() + } + return reserveToken as PerpetualTrancheReserveAsset +} diff --git a/spot-subgraph/src/data/token.ts b/spot-subgraph/src/data/token.ts new file mode 100644 index 00000000..899123f1 --- /dev/null +++ b/spot-subgraph/src/data/token.ts @@ -0,0 +1,55 @@ +import { BigInt, Address } from '@graphprotocol/graph-ts' +import { Token, Account, AccountBalance } from '../../generated/schema' +import { Token as TokenTemplate } from '../../generated/templates' +import { ERC20 as ERC20ABI } from '../../generated/BondFactory/ERC20' +import { BIGDECIMAL_ZERO, stringToAddress, formatBalance } from '../utils' + +export function refreshSupply(token: Token): void { + let tokenContract = ERC20ABI.bind(stringToAddress(token.id)) + token.totalSupply = formatBalance(tokenContract.totalSupply(), token.decimals) + token.save() +} + +export function fetchToken(address: Address): Token { + let id = address.toHexString() + let token = Token.load(id) + if (token === null) { + let tokenContract = ERC20ABI.bind(stringToAddress(id)) + token = new Token(id) + token.symbol = tokenContract.symbol() + token.name = tokenContract.name() + token.decimals = BigInt.fromI32(tokenContract.decimals()) + token.totalSupply = BIGDECIMAL_ZERO + token.save() + TokenTemplate.create(address) + } + return token as Token +} + +export function fetchAccount(address: Address): Account { + let id = address.toHexString() + let account = Account.load(id) + if (account === null) { + let account = new Account(id) + account.save() + } + return account as Account +} + +export function fetchAccountBalance( + accountAddress: Address, + tokenAddress: Address, +): AccountBalance { + let accountId = accountAddress.toHexString() + let tokenId = tokenAddress.toHexString() + let id = accountId.concat('-').concat(tokenId) + let balance = AccountBalance.load(id) + if (balance === null) { + balance = new AccountBalance(id) + balance.account = accountId + balance.token = tokenId + balance.amount = BIGDECIMAL_ZERO + balance.save() + } + return balance as AccountBalance +} diff --git a/spot-subgraph/src/mappings/bondController.ts b/spot-subgraph/src/mappings/bondController.ts new file mode 100644 index 00000000..a908405b --- /dev/null +++ b/spot-subgraph/src/mappings/bondController.ts @@ -0,0 +1,55 @@ +import { log } from '@graphprotocol/graph-ts' +import { BigInt } from '@graphprotocol/graph-ts' +import { + Deposit, + FeeUpdate, + Mature, + OwnershipTransferred, + Redeem, + RedeemMature, +} from '../../generated/templates/BondController/BondController' +import { + fetchTranche, + fetchBond, + refreshBond, + matureBond, +} from '../data/buttonTranche' +import { fetchToken } from '../data/token' + +import { BIGDECIMAL_ZERO, stringToAddress, formatBalance } from '../utils' + +export function handleOwnershipTransferred(event: OwnershipTransferred): void { + log.debug('triggered handleOwnershipTransferred', []) + let bond = fetchBond(event.address) + bond.owner = event.params.newOwner.toHexString() + bond.save() +} + +export function handleFeeUpdate(event: FeeUpdate): void { + log.debug('triggered handleFeeUpdate', []) + let bond = fetchBond(event.address) + bond.feePerc = formatBalance(event.params.newFee, BigInt.fromI32(2)) + bond.save() +} + +export function handleDeposit(event: Deposit): void { + log.debug('triggered handleDeposit', []) + refreshBond(fetchBond(event.address)) +} + +export function handleRedeem(event: Redeem): void { + log.debug('triggered handleRedeem', []) + refreshBond(fetchBond(event.address)) +} + +export function handleRedeemMature(event: RedeemMature): void { + log.debug('triggered handleRedeemMature', []) + refreshBond(fetchBond(event.address)) +} + +export function handleMature(event: Mature): void { + log.debug('triggered handleMature', []) + let bond = fetchBond(event.address) + refreshBond(bond) + matureBond(bond, event.block) +} diff --git a/spot-subgraph/src/mappings/bondFactory.ts b/spot-subgraph/src/mappings/bondFactory.ts new file mode 100644 index 00000000..46e07fc5 --- /dev/null +++ b/spot-subgraph/src/mappings/bondFactory.ts @@ -0,0 +1,16 @@ +import { log } from '@graphprotocol/graph-ts' +import { BigInt } from '@graphprotocol/graph-ts' +import { BondCreated } from '../../generated/BondFactory/BondFactory' +import { fetchBondFactory, fetchBond } from '../data/buttonTranche' + +export function handleBondCreated(event: BondCreated): void { + log.debug('triggered handleBondCreated', []) + let factory = fetchBondFactory(event.address) + factory.bondCount = factory.bondCount.plus(BigInt.fromI32(1)) + factory.save() + + let bondAddress = event.params.newBondAddress + let bond = fetchBond(bondAddress) + bond.factory = factory.id + bond.save() +} diff --git a/spot-subgraph/src/mappings/bondIssuer.ts b/spot-subgraph/src/mappings/bondIssuer.ts new file mode 100644 index 00000000..295160ed --- /dev/null +++ b/spot-subgraph/src/mappings/bondIssuer.ts @@ -0,0 +1,17 @@ +import { log } from '@graphprotocol/graph-ts' +import { BondIssued } from '../../generated/BondIssuer/BondIssuer' +import { fetchBondIssuer } from '../data/bondIssuer' +import { fetchBond } from '../data/buttonTranche' + +export function handleBondIssued(event: BondIssued): void { + log.debug('triggered handleBondIssued', []) + + let issuer = fetchBondIssuer(event.address) + issuer.lastIssueTimestamp = event.block.timestamp + issuer.lastIssueBlock = event.block.number + issuer.save() + + let bond = fetchBond(event.params.bond) + bond.issuer = issuer.id + bond.save() +} diff --git a/spot-subgraph/src/mappings/perpetualTranche.ts b/spot-subgraph/src/mappings/perpetualTranche.ts new file mode 100644 index 00000000..c43ffbfc --- /dev/null +++ b/spot-subgraph/src/mappings/perpetualTranche.ts @@ -0,0 +1,55 @@ +import { log, ethereum } from '@graphprotocol/graph-ts' +import { + ReserveSynced, + UpdatedDepositBond, + UpdatedMatureTrancheBalance, +} from '../../generated/PerpetualTranche/PerpetualTranche' +import { + fetchPerpetualTranche, + refreshPerpetualTrancheStore, + fetchPerpetualTrancheReserveAsset, +} from '../data/perpetualTranche' +import { fetchBond } from '../data/buttonTranche' +import { fetchToken } from '../data/token' +import { formatBalance } from '../utils' + +export function handleGenericStorageUpdate(event: ethereum.Event): void { + log.debug('triggered handleGenericStorageUpdate', []) + refreshPerpetualTrancheStore(fetchPerpetualTranche(event.address)) +} + +export function handleReserveSynced(event: ReserveSynced): void { + log.debug('triggered handleReserveSynced', []) + + let perp = fetchPerpetualTranche(event.address) + let perpToken = fetchToken(event.address) + let reserveAsset = fetchPerpetualTrancheReserveAsset( + event.address, + event.params.token, + ) + reserveAsset.balance = formatBalance(event.params.balance, perpToken.decimals) + reserveAsset.save() +} + +export function handleUpdatedDepositBond(event: UpdatedDepositBond): void { + log.debug('triggered handleUpdatedDepositBond', []) + + let perp = fetchPerpetualTranche(event.address) + let bond = fetchBond(event.params.bond) + perp.depositBond = bond.id + perp.save() +} + +export function handleUpdatedMatureTrancheBalance( + event: UpdatedMatureTrancheBalance, +): void { + log.debug('triggered handleUpdatedMatureTrancheBalance', []) + + let perp = fetchPerpetualTranche(event.address) + let perpToken = fetchToken(event.address) + perp.matureTrancheBalance = formatBalance( + event.params.matureTrancheBalance, + perpToken.decimals, + ) + perp.save() +} diff --git a/spot-subgraph/src/mappings/rebasingToken.ts b/spot-subgraph/src/mappings/rebasingToken.ts new file mode 100644 index 00000000..6168b6e8 --- /dev/null +++ b/spot-subgraph/src/mappings/rebasingToken.ts @@ -0,0 +1,42 @@ +import { log, dataSource, Address } from '@graphprotocol/graph-ts' +import { + LogRebase, + Rebase, +} from '../../generated/templates/RebasingToken/RebasingERC20' +import { fetchToken, refreshSupply } from '../data/token' +import { fetchBond, refreshBond } from '../data/buttonTranche' +import { + fetchPerpetualTranche, + refreshPerpetualTrancheStore, +} from '../data/perpetualTranche' +import { stringToAddress } from '../utils' + +function _handleRebase(address: Address): void { + let token = fetchToken(address) + refreshSupply(token) + + let context = dataSource.context() + if (context.get('bond') != null) { + let bondId = context.getString('bond') + log.debug('bondRefresh: {}', [bondId]) + let bond = fetchBond(stringToAddress(bondId)) + refreshBond(bond) + } + + if (context.get('perp') != null) { + let perpId = context.getString('perp') + log.debug('perpRefresh: {}', [perpId]) + let perp = fetchPerpetualTranche(stringToAddress(perpId)) + refreshPerpetualTrancheStore(perp) + } +} + +export function handleRebase(event: Rebase): void { + log.debug('triggered handleRebase', []) + _handleRebase(event.address) +} + +export function handleLogRebase(event: LogRebase): void { + log.debug('triggered handleLogRebase', []) + _handleRebase(event.address) +} diff --git a/spot-subgraph/src/mappings/token.ts b/spot-subgraph/src/mappings/token.ts new file mode 100644 index 00000000..b9673124 --- /dev/null +++ b/spot-subgraph/src/mappings/token.ts @@ -0,0 +1,42 @@ +import { BigInt } from '@graphprotocol/graph-ts' +import { Transfer } from '../../generated/templates/Token/ERC20' +import { fetchToken, fetchAccount, fetchAccountBalance } from '../data/token' +import { ADDRESS_ZERO, formatBalance } from '../utils' + +export function handleTransfer(event: Transfer): void { + let from = event.params.from + let to = event.params.to + let tokenAddress = event.address + let token = fetchToken(tokenAddress) + let amount = formatBalance(event.params.value, token.decimals) + + if (from != ADDRESS_ZERO) { + let fromAccount = fetchAccount(from) + let fromAccountBalance = fetchAccountBalance(from, tokenAddress) + fromAccountBalance.amount = fromAccountBalance.amount.minus(amount) + fromAccountBalance.block = event.block.number + fromAccountBalance.modified = event.block.timestamp + fromAccountBalance.transaction = event.transaction.hash + fromAccountBalance.save() + } + + if (to != ADDRESS_ZERO) { + let toAccount = fetchAccount(to) + let toAccountBalance = fetchAccountBalance(to, tokenAddress) + toAccountBalance.amount = toAccountBalance.amount.plus(amount) + toAccountBalance.block = event.block.number + toAccountBalance.modified = event.block.timestamp + toAccountBalance.transaction = event.transaction.hash + toAccountBalance.save() + } + + if (from == ADDRESS_ZERO && to != ADDRESS_ZERO) { + token.totalSupply = token.totalSupply.plus(amount) + token.save() + } + + if (from != ADDRESS_ZERO && to == ADDRESS_ZERO) { + token.totalSupply = token.totalSupply.minus(amount) + token.save() + } +} diff --git a/spot-subgraph/src/utils.ts b/spot-subgraph/src/utils.ts new file mode 100644 index 00000000..a7287004 --- /dev/null +++ b/spot-subgraph/src/utils.ts @@ -0,0 +1,21 @@ +import { BigDecimal, BigInt, Address } from '@graphprotocol/graph-ts' + +export let BIGINT_ZERO = BigInt.fromI32(0) +export let BIGINT_ONE = BigInt.fromI32(1) +export let BIGDECIMAL_ZERO = new BigDecimal(BIGINT_ZERO) +export let BIGDECIMAL_ONE = new BigDecimal(BIGINT_ONE) +export let ADDRESS_ZERO = Address.fromString( + '0x0000000000000000000000000000000000000000', +) + +export const formatBalance = (wei: BigInt, decimals: BigInt): BigDecimal => { + return wei.toBigDecimal().div( + BigInt.fromI32(10) + .pow(decimals.toI32() as u8) + .toBigDecimal(), + ) +} + +export const stringToAddress = (id: string): Address => { + return Address.fromString(id) +} diff --git a/spot-subgraph/subgraph.template.yaml b/spot-subgraph/subgraph.template.yaml new file mode 100644 index 00000000..a157a023 --- /dev/null +++ b/spot-subgraph/subgraph.template.yaml @@ -0,0 +1,196 @@ +specVersion: 0.0.2 +description: Perpetual Tranche is a protocol to create fungible tranches +repository: https://github.com/buttonwood-protocol/subgraph +schema: + file: ./schema.graphql + +dataSources: + - kind: ethereum/contract + name: BondFactory + network: {{ network }} + source: + abi: BondFactory + address: "{{ bondFactory }}" + startBlock: {{ startBlock }} + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - BondCreated + abis: + - name: BondFactory + file: ../spot-contracts/external-artifacts/BondFactory.json + - name: BondController + file: ../spot-contracts/external-artifacts/BondController.json + - name: ERC20 + file: ../spot-contracts/external-artifacts/ERC20ABI.json + eventHandlers: + - event: BondCreated(address,address) + handler: handleBondCreated + file: ./src/mappings/bondFactory.ts + + - kind: ethereum/contract + name: BondIssuer + network: {{ network }} + source: + abi: BondIssuer + address: "{{ bondIssuer }}" + startBlock: {{ startBlock }} + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - BondIssued + abis: + - name: BondIssuer + file: ../spot-contracts/exported-artifacts/BondIssuer.json + - name: BondController + file: ../spot-contracts/external-artifacts/BondController.json + eventHandlers: + - event: BondIssued(address) + handler: handleBondIssued + file: ./src/mappings/bondIssuer.ts + + - kind: ethereum/contract + name: Spot + network: {{ network }} + source: + abi: PerpetualTranche + address: "{{ spot }}" + startBlock: {{ startBlock }} + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - UpdatedKeeper + - UpdatedBondIssuer + - UpdatedFeeStrategy + - UpdatedPricingStrategy + - UpdatedDiscountStrategy + - UpdatedTolerableTrancheMaturity + - UpdatedMintingLimits + - UpdatedMatureValueTargetPerc + - UpdatedDepositBond + - UpdatedMatureTrancheBalance + - ReserveSynced + abis: + - name: PerpetualTranche + file: ../spot-contracts/exported-artifacts/PerpetualTranche.json + - name: BondController + file: ../spot-contracts/external-artifacts/BondController.json + - name: ERC20 + file: ../spot-contracts/external-artifacts/ERC20ABI.json + - name: RebasingERC20 + file: ../spot-contracts/external-artifacts/RebasingERC20ABI.json + eventHandlers: + - event: UpdatedKeeper(address,address) + handler: handleGenericStorageUpdate + - event: UpdatedBondIssuer(address) + handler: handleGenericStorageUpdate + - event: UpdatedFeeStrategy(address) + handler: handleGenericStorageUpdate + - event: UpdatedPricingStrategy(address) + handler: handleGenericStorageUpdate + - event: UpdatedDiscountStrategy(address) + handler: handleGenericStorageUpdate + - event: UpdatedTolerableTrancheMaturity(uint256,uint256) + handler: handleGenericStorageUpdate + - event: UpdatedMintingLimits(uint256,uint256) + handler: handleGenericStorageUpdate + - event: UpdatedMatureValueTargetPerc(uint256) + handler: handleGenericStorageUpdate + - event: ReserveSynced(address,uint256) + handler: handleReserveSynced + - event: UpdatedDepositBond(address) + handler: handleUpdatedDepositBond + - event: UpdatedMatureTrancheBalance(uint256) + handler: handleUpdatedMatureTrancheBalance + file: ./src/mappings/perpetualTranche.ts + +templates: + - kind: ethereum/contract + name: BondController + network: {{ network }} + source: + abi: BondController + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - OwnershipTransferred + - FeeUpdate + - Deposit + - Mature + - Redeem + - RedeemMature + abis: + - name: BondController + file: ../spot-contracts/external-artifacts/BondController.json + - name: ERC20 + file: ../spot-contracts/external-artifacts/ERC20ABI.json + eventHandlers: + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleOwnershipTransferred + - event: FeeUpdate(uint256) + handler: handleFeeUpdate + - event: Deposit(address,uint256,uint256) + handler: handleDeposit + - event: Mature(address) + handler: handleMature + - event: Redeem(address,uint256[]) + handler: handleRedeem + - event: RedeemMature(address,address,uint256) + handler: handleRedeemMature + file: ./src/mappings/bondController.ts + + - kind: ethereum/contract + name: Token + network: {{ network }} + source: + abi: ERC20 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - Transfer + abis: + - name: ERC20 + file: ../spot-contracts/external-artifacts/ERC20ABI.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + file: ./src/mappings/token.ts + + - kind: ethereum/contract + name: RebasingToken + network: {{ network }} + source: + abi: RebasingERC20 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - Rebase + - LogRebase + abis: + - name: PerpetualTranche + file: ../spot-contracts/exported-artifacts/PerpetualTranche.json + - name: BondController + file: ../spot-contracts/external-artifacts/BondController.json + - name: ERC20 + file: ../spot-contracts/external-artifacts/ERC20ABI.json + - name: RebasingERC20 + file: ../spot-contracts/external-artifacts/RebasingERC20ABI.json + eventHandlers: + - event: Rebase(indexed uint256,uint256) + handler: handleRebase + - event: LogRebase(indexed uint256,uint256) + handler: handleLogRebase + file: ./src/mappings/rebasingToken.ts + diff --git a/yarn.lock b/yarn.lock index 0b1efb78..83bb2f38 100644 --- a/yarn.lock +++ b/yarn.lock @@ -60,6 +60,21 @@ __metadata: languageName: unknown linkType: soft +"@ampleforthorg/spot-subgraph@workspace:spot-subgraph": + version: 0.0.0-use.local + resolution: "@ampleforthorg/spot-subgraph@workspace:spot-subgraph" + dependencies: + "@graphprotocol/graph-cli": ^0.21.1 + "@graphprotocol/graph-ts": ^0.20.0 + "@typescript-eslint/eslint-plugin": ^2.0.0 + "@typescript-eslint/parser": ^2.0.0 + eslint: ^6.2.2 + eslint-config-prettier: ^6.1.0 + prettier: ^1.18.2 + typescript: ^3.5.2 + languageName: unknown + linkType: soft + "@babel/code-frame@npm:^7.0.0": version: 7.18.6 resolution: "@babel/code-frame@npm:7.18.6" @@ -857,6 +872,45 @@ __metadata: languageName: node linkType: hard +"@graphprotocol/graph-cli@npm:^0.21.1": + version: 0.21.3 + resolution: "@graphprotocol/graph-cli@npm:0.21.3" + dependencies: + assemblyscript: "git+https://github.com/AssemblyScript/assemblyscript.git#v0.6" + chalk: ^3.0.0 + chokidar: ^3.0.2 + debug: ^4.1.1 + docker-compose: ^0.23.2 + dockerode: ^2.5.8 + fs-extra: ^9.0.0 + glob: ^7.1.2 + gluegun: ^4.3.1 + graphql: ^15.5.0 + immutable: ^3.8.2 + ipfs-http-client: 55.0.0 + jayson: 4.0.0 + js-yaml: ^3.13.1 + node-fetch: ^2.3.0 + pkginfo: ^0.4.1 + prettier: ^1.13.5 + request: ^2.88.0 + tmp-promise: ^3.0.2 + yaml: ^1.5.1 + bin: + graph: bin/graph + checksum: 9528c2b2414f3f678a87e836e01b23be50c341a59ceb2b8dbf27e12270fc8ba65d72c0f7755c799e3ee7dad55c27197d2d92474a93fc4e929be0e83fb6b08e17 + languageName: node + linkType: hard + +"@graphprotocol/graph-ts@npm:^0.20.0": + version: 0.20.1 + resolution: "@graphprotocol/graph-ts@npm:0.20.1" + dependencies: + assemblyscript: "git+https://github.com/AssemblyScript/assemblyscript.git#v0.6" + checksum: d98e729d08b10e65f88f64ef619fb99bb76788ae01a1805169908de2d2aa42d6ea21f8d69fecd77375d6a5d79d920e70d0e815f67068b84cf071b388b4984afa + languageName: node + linkType: hard + "@humanwhocodes/config-array@npm:^0.9.2": version: 0.9.5 resolution: "@humanwhocodes/config-array@npm:0.9.5" @@ -875,6 +929,35 @@ __metadata: languageName: node linkType: hard +"@ipld/dag-cbor@npm:^7.0.0": + version: 7.0.3 + resolution: "@ipld/dag-cbor@npm:7.0.3" + dependencies: + cborg: ^1.6.0 + multiformats: ^9.5.4 + checksum: c0c59907ab6146a214c1ecb2341cc02904bc952255e15544554990690f7841380a87636d5937aaa23e9004b1c141e90238277d088ed6932b5b0e6d2e6ee1fe02 + languageName: node + linkType: hard + +"@ipld/dag-json@npm:^8.0.1": + version: 8.0.11 + resolution: "@ipld/dag-json@npm:8.0.11" + dependencies: + cborg: ^1.5.4 + multiformats: ^9.5.4 + checksum: 5ce25e4ed4004839a0dc18a51b09d0e2bda02a00bc15e8066809ddcedf5927ef8829a7dacaaf71ba0eb1c8699599130389af6d137da1d6f524394f5ddb0763f0 + languageName: node + linkType: hard + +"@ipld/dag-pb@npm:^2.1.3": + version: 2.1.18 + resolution: "@ipld/dag-pb@npm:2.1.18" + dependencies: + multiformats: ^9.5.4 + checksum: 46b9a7dabf6e87698fc268f88d94b710ba3988e26ab7918bcdf10c4356e15eb32393b6ab56eaf0d8936b369cb77456e491495f1025f78b099f1bd26cc5ccda06 + languageName: node + linkType: hard + "@jridgewell/resolve-uri@npm:^3.0.3": version: 3.0.8 resolution: "@jridgewell/resolve-uri@npm:3.0.8" @@ -1369,6 +1452,79 @@ __metadata: languageName: node linkType: hard +"@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/aspromise@npm:1.1.2" + checksum: 011fe7ef0826b0fd1a95935a033a3c0fd08483903e1aa8f8b4e0704e3233406abb9ee25350ec0c20bbecb2aad8da0dcea58b392bbd77d6690736f02c143865d2 + languageName: node + linkType: hard + +"@protobufjs/base64@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/base64@npm:1.1.2" + checksum: 67173ac34de1e242c55da52c2f5bdc65505d82453893f9b51dc74af9fe4c065cf4a657a4538e91b0d4a1a1e0a0642215e31894c31650ff6e3831471061e1ee9e + languageName: node + linkType: hard + +"@protobufjs/codegen@npm:^2.0.4": + version: 2.0.4 + resolution: "@protobufjs/codegen@npm:2.0.4" + checksum: 59240c850b1d3d0b56d8f8098dd04787dcaec5c5bd8de186fa548de86b86076e1c50e80144b90335e705a044edf5bc8b0998548474c2a10a98c7e004a1547e4b + languageName: node + linkType: hard + +"@protobufjs/eventemitter@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/eventemitter@npm:1.1.0" + checksum: 0369163a3d226851682f855f81413cbf166cd98f131edb94a0f67f79e75342d86e89df9d7a1df08ac28be2bc77e0a7f0200526bb6c2a407abbfee1f0262d5fd7 + languageName: node + linkType: hard + +"@protobufjs/fetch@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/fetch@npm:1.1.0" + dependencies: + "@protobufjs/aspromise": ^1.1.1 + "@protobufjs/inquire": ^1.1.0 + checksum: 3fce7e09eb3f1171dd55a192066450f65324fd5f7cc01a431df01bb00d0a895e6bfb5b0c5561ce157ee1d886349c90703d10a4e11a1a256418ff591b969b3477 + languageName: node + linkType: hard + +"@protobufjs/float@npm:^1.0.2": + version: 1.0.2 + resolution: "@protobufjs/float@npm:1.0.2" + checksum: 5781e1241270b8bd1591d324ca9e3a3128d2f768077a446187a049e36505e91bc4156ed5ac3159c3ce3d2ba3743dbc757b051b2d723eea9cd367bfd54ab29b2f + languageName: node + linkType: hard + +"@protobufjs/inquire@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/inquire@npm:1.1.0" + checksum: ca06f02eaf65ca36fb7498fc3492b7fc087bfcc85c702bac5b86fad34b692bdce4990e0ef444c1e2aea8c034227bd1f0484be02810d5d7e931c55445555646f4 + languageName: node + linkType: hard + +"@protobufjs/path@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/path@npm:1.1.2" + checksum: 856eeb532b16a7aac071cacde5c5620df800db4c80cee6dbc56380524736205aae21e5ae47739114bf669ab5e8ba0e767a282ad894f3b5e124197cb9224445ee + languageName: node + linkType: hard + +"@protobufjs/pool@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/pool@npm:1.1.0" + checksum: d6a34fbbd24f729e2a10ee915b74e1d77d52214de626b921b2d77288bd8f2386808da2315080f2905761527cceffe7ec34c7647bd21a5ae41a25e8212ff79451 + languageName: node + linkType: hard + +"@protobufjs/utf8@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/utf8@npm:1.1.0" + checksum: f9bf3163d13aaa3b6f5e6fbf37a116e094ea021c0e1f2a7ccd0e12a29e2ce08dafba4e8b36e13f8ed7397e1591610ce880ed1289af4d66cf4ace8a36a9557278 + languageName: node + linkType: hard + "@resolver-engine/core@npm:^0.3.3": version: 0.3.3 resolution: "@resolver-engine/core@npm:0.3.3" @@ -1689,6 +1845,22 @@ __metadata: languageName: node linkType: hard +"@types/connect@npm:^3.4.33": + version: 3.4.35 + resolution: "@types/connect@npm:3.4.35" + dependencies: + "@types/node": "*" + checksum: fe81351470f2d3165e8b12ce33542eef89ea893e36dd62e8f7d72566dfb7e448376ae962f9f3ea888547ce8b55a40020ca0e01d637fab5d99567673084542641 + languageName: node + linkType: hard + +"@types/eslint-visitor-keys@npm:^1.0.0": + version: 1.0.0 + resolution: "@types/eslint-visitor-keys@npm:1.0.0" + checksum: a90f0b023e357a59ea04268e0387cfb0ea06703068cc48fe2ca97fa158bcf3c51a6611a56bdbdf763e3451150b92bba3fb5d0b689fc55f856cae8555ec366a63 + languageName: node + linkType: hard + "@types/form-data@npm:0.0.33": version: 0.0.33 resolution: "@types/form-data@npm:0.0.33" @@ -1708,6 +1880,13 @@ __metadata: languageName: node linkType: hard +"@types/json-schema@npm:^7.0.3": + version: 7.0.12 + resolution: "@types/json-schema@npm:7.0.12" + checksum: 00239e97234eeb5ceefb0c1875d98ade6e922bfec39dd365ec6bd360b5c2f825e612ac4f6e5f1d13601b8b30f378f15e6faa805a3a732f4a1bbe61915163d293 + languageName: node + linkType: hard + "@types/json-schema@npm:^7.0.9": version: 7.0.11 resolution: "@types/json-schema@npm:7.0.11" @@ -1731,6 +1910,13 @@ __metadata: languageName: node linkType: hard +"@types/long@npm:^4.0.1": + version: 4.0.2 + resolution: "@types/long@npm:4.0.2" + checksum: d16cde7240d834cf44ba1eaec49e78ae3180e724cd667052b194a372f350d024cba8dd3f37b0864931683dab09ca935d52f0c4c1687178af5ada9fc85b0635f4 + languageName: node + linkType: hard + "@types/lru-cache@npm:^5.1.0": version: 5.1.1 resolution: "@types/lru-cache@npm:5.1.1" @@ -1738,7 +1924,7 @@ __metadata: languageName: node linkType: hard -"@types/minimatch@npm:*": +"@types/minimatch@npm:*, @types/minimatch@npm:^3.0.4": version: 3.0.5 resolution: "@types/minimatch@npm:3.0.5" checksum: c41d136f67231c3131cf1d4ca0b06687f4a322918a3a5adddc87ce90ed9dbd175a3610adee36b106ae68c0b92c637c35e02b58c8a56c424f71d30993ea220b92 @@ -1778,6 +1964,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:>=13.7.0": + version: 20.5.6 + resolution: "@types/node@npm:20.5.6" + checksum: d2ce44f1cfa3fd00fe7426f7cf9a46d680cd57802b874ed5618e7d9101a9c6b8de37f08c0e7185ee06fb363ad492549c3ea69665c7e8e31c7813210ed8e89005 + languageName: node + linkType: hard + "@types/node@npm:^10.0.3": version: 10.17.60 resolution: "@types/node@npm:10.17.60" @@ -1785,7 +1978,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^12.12.6": +"@types/node@npm:^12.12.54, @types/node@npm:^12.12.6": version: 12.20.55 resolution: "@types/node@npm:12.20.55" checksum: e4f86785f4092706e0d3b0edff8dca5a13b45627e4b36700acd8dfe6ad53db71928c8dee914d4276c7fd3b6ccd829aa919811c9eb708a2c8e4c6eb3701178c37 @@ -1806,6 +1999,13 @@ __metadata: languageName: node linkType: hard +"@types/parse-json@npm:^4.0.0": + version: 4.0.0 + resolution: "@types/parse-json@npm:4.0.0" + checksum: fd6bce2b674b6efc3db4c7c3d336bd70c90838e8439de639b909ce22f3720d21344f52427f1d9e57b265fcb7f6c018699b99e5e0c208a1a4823014269a6bf35b + languageName: node + linkType: hard + "@types/pbkdf2@npm:^3.0.0": version: 3.1.0 resolution: "@types/pbkdf2@npm:3.1.0" @@ -1899,6 +2099,33 @@ __metadata: languageName: node linkType: hard +"@types/ws@npm:^7.4.4": + version: 7.4.7 + resolution: "@types/ws@npm:7.4.7" + dependencies: + "@types/node": "*" + checksum: b4c9b8ad209620c9b21e78314ce4ff07515c0cadab9af101c1651e7bfb992d7fd933bd8b9c99d110738fd6db523ed15f82f29f50b45510288da72e964dedb1a3 + languageName: node + linkType: hard + +"@typescript-eslint/eslint-plugin@npm:^2.0.0": + version: 2.34.0 + resolution: "@typescript-eslint/eslint-plugin@npm:2.34.0" + dependencies: + "@typescript-eslint/experimental-utils": 2.34.0 + functional-red-black-tree: ^1.0.1 + regexpp: ^3.0.0 + tsutils: ^3.17.1 + peerDependencies: + "@typescript-eslint/parser": ^2.0.0 + eslint: ^5.0.0 || ^6.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 028adcb70015fec8198f801524223b3fa53d807fabd91e44e438e02df5cc4eac0ae53fcaeb8627f14a84fd72a2dcfbab561bdb8d4969cbb810849c789ae66548 + languageName: node + linkType: hard + "@typescript-eslint/eslint-plugin@npm:^5.0.0": version: 5.31.0 resolution: "@typescript-eslint/eslint-plugin@npm:5.31.0" @@ -1922,6 +2149,37 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/experimental-utils@npm:2.34.0": + version: 2.34.0 + resolution: "@typescript-eslint/experimental-utils@npm:2.34.0" + dependencies: + "@types/json-schema": ^7.0.3 + "@typescript-eslint/typescript-estree": 2.34.0 + eslint-scope: ^5.0.0 + eslint-utils: ^2.0.0 + peerDependencies: + eslint: "*" + checksum: 3d267185a727dad276921d4b7b9d95247ffc50740f944c8f3f66ae1556b9f3529632bff4e921a9bfe0d0b0c55542ff2ff6479615a4f4a01645e49893f32b6350 + languageName: node + linkType: hard + +"@typescript-eslint/parser@npm:^2.0.0": + version: 2.34.0 + resolution: "@typescript-eslint/parser@npm:2.34.0" + dependencies: + "@types/eslint-visitor-keys": ^1.0.0 + "@typescript-eslint/experimental-utils": 2.34.0 + "@typescript-eslint/typescript-estree": 2.34.0 + eslint-visitor-keys: ^1.1.0 + peerDependencies: + eslint: ^5.0.0 || ^6.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 2cd9890760bc1be48102e8cc2404b2c9323f049990de07b356d9f97b9d29b3cf905ef06b69eea8e0834b67eb54e1f58dcc67e20edd8c98f10cd11b8732fb6894 + languageName: node + linkType: hard + "@typescript-eslint/parser@npm:^5.0.0": version: 5.31.0 resolution: "@typescript-eslint/parser@npm:5.31.0" @@ -1972,6 +2230,24 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:2.34.0": + version: 2.34.0 + resolution: "@typescript-eslint/typescript-estree@npm:2.34.0" + dependencies: + debug: ^4.1.1 + eslint-visitor-keys: ^1.1.0 + glob: ^7.1.6 + is-glob: ^4.0.1 + lodash: ^4.17.15 + semver: ^7.3.2 + tsutils: ^3.17.1 + peerDependenciesMeta: + typescript: + optional: true + checksum: 6eb689513765350daaf0ba12ef204061e12a8add557b4eafcc63fb0ab9345eee6ca68e64e4b88625a2b844802cfc44cbad47468840cfc990a40d27457ec75390 + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:5.31.0": version: 5.31.0 resolution: "@typescript-eslint/typescript-estree@npm:5.31.0" @@ -2030,6 +2306,30 @@ __metadata: languageName: node linkType: hard +"JSONStream@npm:1.3.2": + version: 1.3.2 + resolution: "JSONStream@npm:1.3.2" + dependencies: + jsonparse: ^1.2.0 + through: ">=2.2.7 <3" + bin: + JSONStream: ./bin.js + checksum: d83b86f846eaeba7b947181245b977bb7e32c49e25d210234ecbf6b2d9128924610224e150558deeb65d063b07b8c28e5a1a4ab8daeb89d4c34e718047f046fd + languageName: node + linkType: hard + +"JSONStream@npm:^1.3.5": + version: 1.3.5 + resolution: "JSONStream@npm:1.3.5" + dependencies: + jsonparse: ^1.2.0 + through: ">=2.2.7 <3" + bin: + JSONStream: ./bin.js + checksum: 2605fa124260c61bad38bb65eba30d2f72216a78e94d0ab19b11b4e0327d572b8d530c0c9cc3b0764f727ad26d39e00bf7ebad57781ca6368394d73169c59e46 + languageName: node + linkType: hard + "abbrev@npm:1": version: 1.1.1 resolution: "abbrev@npm:1.1.1" @@ -2114,7 +2414,7 @@ __metadata: languageName: node linkType: hard -"acorn-jsx@npm:^5.0.0, acorn-jsx@npm:^5.3.2": +"acorn-jsx@npm:^5.0.0, acorn-jsx@npm:^5.2.0, acorn-jsx@npm:^5.3.2": version: 5.3.2 resolution: "acorn-jsx@npm:5.3.2" peerDependencies: @@ -2139,6 +2439,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^7.1.1": + version: 7.4.1 + resolution: "acorn@npm:7.4.1" + bin: + acorn: bin/acorn + checksum: 1860f23c2107c910c6177b7b7be71be350db9e1080d814493fae143ae37605189504152d1ba8743ba3178d0b37269ce1ffc42b101547fdc1827078f82671e407 + languageName: node + linkType: hard + "acorn@npm:^8.4.1": version: 8.7.1 resolution: "acorn@npm:8.7.1" @@ -2260,6 +2569,13 @@ __metadata: languageName: node linkType: hard +"ansi-colors@npm:^3.2.1": + version: 3.2.4 + resolution: "ansi-colors@npm:3.2.4" + checksum: 026c51880e9f8eb59b112669a87dbea4469939ff94b131606303bbd697438a6691b16b9db3027aa9bf132a244214e83ab1508b998496a34d2aea5b437ac9e62d + languageName: node + linkType: hard + "ansi-colors@npm:^4.1.1": version: 4.1.3 resolution: "ansi-colors@npm:4.1.3" @@ -2274,7 +2590,7 @@ __metadata: languageName: node linkType: hard -"ansi-escapes@npm:^4.3.0": +"ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.0": version: 4.3.2 resolution: "ansi-escapes@npm:4.3.2" dependencies: @@ -2352,6 +2668,23 @@ __metadata: languageName: node linkType: hard +"any-signal@npm:^2.1.2": + version: 2.1.2 + resolution: "any-signal@npm:2.1.2" + dependencies: + abort-controller: ^3.0.0 + native-abort-controller: ^1.0.3 + checksum: 498603e30357f82e438ddc972086b3180ddbaf5ea9772f535d103b754711eb13d4c24577e497d5a1146e571ee38f167c316ace7dc1a03b62a8a8c7677e9d660f + languageName: node + linkType: hard + +"any-signal@npm:^3.0.0": + version: 3.0.1 + resolution: "any-signal@npm:3.0.1" + checksum: 073eb14c365b7552f9f16fbf36cd76171e4a0fe156a8faa865fe1d5ac4ed2f5c5ab6e3faad0ac0d4c69511b5892971c5573baa8a1cbf85fe250d0c54ff0734ff + languageName: node + linkType: hard + "anymatch@npm:~3.1.1, anymatch@npm:~3.1.2": version: 3.1.2 resolution: "anymatch@npm:3.1.2" @@ -2362,6 +2695,22 @@ __metadata: languageName: node linkType: hard +"apisauce@npm:^2.1.5": + version: 2.1.6 + resolution: "apisauce@npm:2.1.6" + dependencies: + axios: ^0.21.4 + checksum: 3db1447f03ecfa0d8fb9be0991bd4732a8eb4a5c96282c964c0b5f9d215dc1bca1e0fec7f5187080286368c1028deb0de8fb69cd7bccb92441b327aa1028598a + languageName: node + linkType: hard + +"app-module-path@npm:^2.2.0": + version: 2.2.0 + resolution: "app-module-path@npm:2.2.0" + checksum: b52aa49cfa809efbad41b514222e8ef3f8ee9e147f5eccf79280b45eddcc61f7aeb302b0049474e3f42072dd53a28348c57dd96f36cd461d2e31cc8ab1ef56b5 + languageName: node + linkType: hard + "aproba@npm:^1.0.3 || ^2.0.0": version: 2.0.0 resolution: "aproba@npm:2.0.0" @@ -2549,6 +2898,23 @@ __metadata: languageName: node linkType: hard +"assemblyscript@git+https://github.com/AssemblyScript/assemblyscript.git#v0.6": + version: 0.6.0 + resolution: "assemblyscript@https://github.com/AssemblyScript/assemblyscript.git#commit=3ed76a97f05335504166fce1653da75f4face28f" + dependencies: + "@protobufjs/utf8": ^1.1.0 + binaryen: 77.0.0-nightly.20190407 + glob: ^7.1.3 + long: ^4.0.0 + opencollective-postinstall: ^2.0.0 + source-map-support: ^0.5.11 + bin: + asc: bin/asc + asinit: bin/asinit + checksum: 8a407db6179addfaa5fcc637543a755ecc22ae8dd5e8259492305afd0d2bb73eae019d4178f79b515f75648d71dfda2c1ceb0c7421bff7817aebb2e2f5c8bfe7 + languageName: node + linkType: hard + "assert-plus@npm:1.0.0, assert-plus@npm:^1.0.0": version: 1.0.0 resolution: "assert-plus@npm:1.0.0" @@ -2669,6 +3035,15 @@ __metadata: languageName: node linkType: hard +"axios@npm:^0.21.4": + version: 0.21.4 + resolution: "axios@npm:0.21.4" + dependencies: + follow-redirects: ^1.14.0 + checksum: 44245f24ac971e7458f3120c92f9d66d1fc695e8b97019139de5b0cc65d9b8104647db01e5f46917728edfc0cfd88eb30fc4c55e6053eef4ace76768ce95ff3c + languageName: node + linkType: hard + "babel-code-frame@npm:^6.26.0": version: 6.26.0 resolution: "babel-code-frame@npm:6.26.0" @@ -3391,6 +3766,17 @@ __metadata: languageName: node linkType: hard +"binaryen@npm:77.0.0-nightly.20190407": + version: 77.0.0-nightly.20190407 + resolution: "binaryen@npm:77.0.0-nightly.20190407" + bin: + binaryen-as: bin/as.js + binaryen-dis: bin/dis.js + binaryen-opt: bin/opt.js + checksum: 756334720191ec02b28b1fa153009338bee63ead43d5923faa7c651b7b97183b020f2ade712fab45d4cc714cae5bfeef3e8a5624246f87207ee4d847e181f6a9 + languageName: node + linkType: hard + "bip39@npm:2.5.0": version: 2.5.0 resolution: "bip39@npm:2.5.0" @@ -3404,6 +3790,16 @@ __metadata: languageName: node linkType: hard +"bl@npm:^1.0.0": + version: 1.2.3 + resolution: "bl@npm:1.2.3" + dependencies: + readable-stream: ^2.3.5 + safe-buffer: ^5.1.1 + checksum: 123f097989ce2fa9087ce761cd41176aaaec864e28f7dfe5c7dab8ae16d66d9844f849c3ad688eb357e3c5e4f49b573e3c0780bb8bc937206735a3b6f8569a5f + languageName: node + linkType: hard + "blakejs@npm:^1.1.0": version: 1.2.1 resolution: "blakejs@npm:1.2.1" @@ -3411,6 +3807,15 @@ __metadata: languageName: node linkType: hard +"blob-to-it@npm:^1.0.1": + version: 1.0.4 + resolution: "blob-to-it@npm:1.0.4" + dependencies: + browser-readablestream-to-it: ^1.0.3 + checksum: e7fbebe5bd7b8187a4a88203639777456596a0cc68372e7b2dbcfbae6dea2b80e2a89522140039b538140bc3e3a6b1e90d1778e725eb8899070f799e61591751 + languageName: node + linkType: hard + "bluebird@npm:^3.5.0, bluebird@npm:^3.5.2": version: 3.7.2 resolution: "bluebird@npm:3.7.2" @@ -3524,6 +3929,13 @@ __metadata: languageName: node linkType: hard +"browser-readablestream-to-it@npm:^1.0.0, browser-readablestream-to-it@npm:^1.0.1, browser-readablestream-to-it@npm:^1.0.3": + version: 1.0.3 + resolution: "browser-readablestream-to-it@npm:1.0.3" + checksum: 07895bbc54cdeea62c8e9b7e32d374ec5c340ed1d0bc0c6cd6f1e0561ad931b160a3988426c763672ddf38ac1f75e45b9d8ae267b43f387183edafcad625f30a + languageName: node + linkType: hard + "browser-stdout@npm:1.3.1": version: 1.3.1 resolution: "browser-stdout@npm:1.3.1" @@ -3627,6 +4039,30 @@ __metadata: languageName: node linkType: hard +"buffer-alloc-unsafe@npm:^1.1.0": + version: 1.1.0 + resolution: "buffer-alloc-unsafe@npm:1.1.0" + checksum: c5e18bf51f67754ec843c9af3d4c005051aac5008a3992938dda1344e5cfec77c4b02b4ca303644d1e9a6e281765155ce6356d85c6f5ccc5cd21afc868def396 + languageName: node + linkType: hard + +"buffer-alloc@npm:^1.2.0": + version: 1.2.0 + resolution: "buffer-alloc@npm:1.2.0" + dependencies: + buffer-alloc-unsafe: ^1.1.0 + buffer-fill: ^1.0.0 + checksum: 560cd27f3cbe73c614867da373407d4506309c62fe18de45a1ce191f3785ec6ca2488d802ff82065798542422980ca25f903db078c57822218182c37c3576df5 + languageName: node + linkType: hard + +"buffer-fill@npm:^1.0.0": + version: 1.0.0 + resolution: "buffer-fill@npm:1.0.0" + checksum: c29b4723ddeab01e74b5d3b982a0c6828f2ded49cef049ddca3dac661c874ecdbcecb5dd8380cf0f4adbeb8cff90a7de724126750a1f1e5ebd4eb6c59a1315b1 + languageName: node + linkType: hard + "buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" @@ -3667,7 +4103,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^6.0.3": +"buffer@npm:^6.0.1, buffer@npm:^6.0.3": version: 6.0.3 resolution: "buffer@npm:6.0.3" dependencies: @@ -3902,6 +4338,15 @@ __metadata: languageName: node linkType: hard +"cborg@npm:^1.5.4, cborg@npm:^1.6.0": + version: 1.10.2 + resolution: "cborg@npm:1.10.2" + bin: + cborg: cli.js + checksum: 7743a8f125046ac27fb371c4ea18af54fbe853f7210f1ffacc6504a79566480c39d52ac4fbc1a5b5155e27b13c3b58955dc29db1bf20c4d651549d55fec2fa7f + languageName: node + linkType: hard + "chai-as-promised@npm:^7.1.1": version: 7.1.1 resolution: "chai-as-promised@npm:7.1.1" @@ -3952,6 +4397,16 @@ __metadata: languageName: node linkType: hard +"chalk@npm:^3.0.0": + version: 3.0.0 + resolution: "chalk@npm:3.0.0" + dependencies: + ansi-styles: ^4.1.0 + supports-color: ^7.1.0 + checksum: 8e3ddf3981c4da405ddbd7d9c8d91944ddf6e33d6837756979f7840a29272a69a5189ecae0ff84006750d6d1e92368d413335eab4db5476db6e6703a1d1e0505 + languageName: node + linkType: hard + "chalk@npm:^4.0.0, chalk@npm:^4.1.0": version: 4.1.2 resolution: "chalk@npm:4.1.2" @@ -4011,7 +4466,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:3.5.3, chokidar@npm:^3.4.0": +"chokidar@npm:3.5.3, chokidar@npm:^3.0.2, chokidar@npm:^3.4.0": version: 3.5.3 resolution: "chokidar@npm:3.5.3" dependencies: @@ -4030,7 +4485,7 @@ __metadata: languageName: node linkType: hard -"chownr@npm:^1.1.4": +"chownr@npm:^1.0.1, chownr@npm:^1.1.4": version: 1.1.4 resolution: "chownr@npm:1.1.4" checksum: 115648f8eb38bac5e41c3857f3e663f9c39ed6480d1349977c4d96c95a47266fcacc5a5aabf3cb6c481e22d72f41992827db47301851766c4fd77ac21a4f081d @@ -4123,7 +4578,23 @@ __metadata: languageName: node linkType: hard -"cli-table3@npm:^0.5.0": +"cli-cursor@npm:^3.1.0": + version: 3.1.0 + resolution: "cli-cursor@npm:3.1.0" + dependencies: + restore-cursor: ^3.1.0 + checksum: 2692784c6cd2fd85cfdbd11f53aea73a463a6d64a77c3e098b2b4697a20443f430c220629e1ca3b195ea5ac4a97a74c2ee411f3807abf6df2b66211fec0c0a29 + languageName: node + linkType: hard + +"cli-spinners@npm:^2.2.0": + version: 2.9.0 + resolution: "cli-spinners@npm:2.9.0" + checksum: a9c56e1f44457d4a9f4f535364e729cb8726198efa9e98990cfd9eda9e220dfa4ba12f92808d1be5e29029cdfead781db82dc8549b97b31c907d55f96aa9b0e2 + languageName: node + linkType: hard + +"cli-table3@npm:^0.5.0, cli-table3@npm:~0.5.0": version: 0.5.1 resolution: "cli-table3@npm:0.5.1" dependencies: @@ -4144,6 +4615,13 @@ __metadata: languageName: node linkType: hard +"cli-width@npm:^3.0.0": + version: 3.0.0 + resolution: "cli-width@npm:3.0.0" + checksum: 4c94af3769367a70e11ed69aa6095f1c600c0ff510f3921ab4045af961820d57c0233acfa8b6396037391f31b4c397e1f614d234294f979ff61430a6c166c3f6 + languageName: node + linkType: hard + "cliui@npm:^3.2.0": version: 3.2.0 resolution: "cliui@npm:3.2.0" @@ -4193,6 +4671,13 @@ __metadata: languageName: node linkType: hard +"clone@npm:^1.0.2": + version: 1.0.4 + resolution: "clone@npm:1.0.4" + checksum: d06418b7335897209e77bdd430d04f882189582e67bd1f75a04565f3f07f5b3f119a9d670c943b6697d0afb100f03b866b3b8a1f91d4d02d72c4ecf2bb64b5dd + languageName: node + linkType: hard + "code-point-at@npm:^1.0.0": version: 1.1.0 resolution: "code-point-at@npm:1.1.0" @@ -4251,7 +4736,7 @@ __metadata: languageName: node linkType: hard -"colors@npm:1.4.0, colors@npm:^1.1.2": +"colors@npm:1.4.0, colors@npm:^1.1.2, colors@npm:^1.3.3": version: 1.4.0 resolution: "colors@npm:1.4.0" checksum: 98aa2c2418ad87dedf25d781be69dc5fc5908e279d9d30c34d8b702e586a0474605b3a189511482b9d5ed0d20c867515d22749537f7bc546256c6014f3ebdcec @@ -4325,6 +4810,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^2.20.3": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: ab8c07884e42c3a8dbc5dd9592c606176c7eb5c1ca5ff274bcf907039b2c41de3626f684ea75ccf4d361ba004bbaff1f577d5384c155f3871e456bdf27becf9e + languageName: node + linkType: hard + "compare-versions@npm:^4.0.0": version: 4.1.3 resolution: "compare-versions@npm:4.1.3" @@ -4353,7 +4845,7 @@ __metadata: languageName: node linkType: hard -"concat-stream@npm:^1.5.1, concat-stream@npm:^1.6.0, concat-stream@npm:^1.6.2": +"concat-stream@npm:^1.5.1, concat-stream@npm:^1.6.0, concat-stream@npm:^1.6.2, concat-stream@npm:~1.6.2": version: 1.6.2 resolution: "concat-stream@npm:1.6.2" dependencies: @@ -4481,6 +4973,19 @@ __metadata: languageName: node linkType: hard +"cosmiconfig@npm:6.0.0": + version: 6.0.0 + resolution: "cosmiconfig@npm:6.0.0" + dependencies: + "@types/parse-json": ^4.0.0 + import-fresh: ^3.1.0 + parse-json: ^5.0.0 + path-type: ^4.0.0 + yaml: ^1.7.2 + checksum: 8eed7c854b91643ecb820767d0deb038b50780ecc3d53b0b19e03ed8aabed4ae77271198d1ae3d49c3b110867edf679f5faad924820a8d1774144a87cb6f98fc + languageName: node + linkType: hard + "cosmiconfig@npm:^5.0.7": version: 5.2.1 resolution: "cosmiconfig@npm:5.2.1" @@ -4569,7 +5074,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.2": +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -4662,7 +5167,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:^3.1.0, debug@npm:^3.2.7": +"debug@npm:^3.1.0, debug@npm:^3.2.6, debug@npm:^3.2.7": version: 3.2.7 resolution: "debug@npm:3.2.7" dependencies: @@ -4747,6 +5252,15 @@ __metadata: languageName: node linkType: hard +"defaults@npm:^1.0.3": + version: 1.0.4 + resolution: "defaults@npm:1.0.4" + dependencies: + clone: ^1.0.2 + checksum: 3a88b7a587fc076b84e60affad8b85245c01f60f38fc1d259e7ac1d89eb9ce6abb19e27215de46b98568dd5bc48471730b327637e6f20b0f1bc85cf00440c80a + languageName: node + linkType: hard + "defer-to-connect@npm:^1.0.1": version: 1.1.3 resolution: "defer-to-connect@npm:1.1.3" @@ -4818,6 +5332,13 @@ __metadata: languageName: node linkType: hard +"delay@npm:^5.0.0": + version: 5.0.0 + resolution: "delay@npm:5.0.0" + checksum: 62f151151ecfde0d9afbb8a6be37a6d103c4cb24f35a20ef3fe56f920b0d0d0bb02bc9c0a3084d0179ef669ca332b91155f2ee4d9854622cd2cdba5fc95285f9 + languageName: node + linkType: hard + "delayed-stream@npm:~1.0.0": version: 1.0.0 resolution: "delayed-stream@npm:1.0.0" @@ -4942,6 +5463,49 @@ __metadata: languageName: node linkType: hard +"dns-over-http-resolver@npm:^1.2.3": + version: 1.2.3 + resolution: "dns-over-http-resolver@npm:1.2.3" + dependencies: + debug: ^4.3.1 + native-fetch: ^3.0.0 + receptacle: ^1.3.2 + checksum: 3cc1a1d77fc43e7a8a12453da987b80860ac96dc1031386c5eb1a39154775a87cfa1d50c0eaa5ea5e397e898791654608f6e2acf03f750f4098ab8822bb7d928 + languageName: node + linkType: hard + +"docker-compose@npm:^0.23.2": + version: 0.23.19 + resolution: "docker-compose@npm:0.23.19" + dependencies: + yaml: ^1.10.2 + checksum: 1704825954ec8645e4b099cc2641531955eef5a8a9729c885fab7067ae4d7935c663252e51b49878397e51cd5a3efcf2f13c8460e252aa39d14a0722c0bacfe5 + languageName: node + linkType: hard + +"docker-modem@npm:^1.0.8": + version: 1.0.9 + resolution: "docker-modem@npm:1.0.9" + dependencies: + JSONStream: 1.3.2 + debug: ^3.2.6 + readable-stream: ~1.0.26-4 + split-ca: ^1.0.0 + checksum: b34829f5abecf28332f1870c88bdf795750520264e9fdc8e9041058f18b1846543061ee32fb21ff14e9da6b5498af6b2cb4d96422d8c2dc02d9f622b01f34fe6 + languageName: node + linkType: hard + +"dockerode@npm:^2.5.8": + version: 2.5.8 + resolution: "dockerode@npm:2.5.8" + dependencies: + concat-stream: ~1.6.2 + docker-modem: ^1.0.8 + tar-fs: ~1.16.3 + checksum: 01381da98f98a3236b735fb2bb2a66f521da39200a2a11b83777cee3b104b32966ba7dfeb93f3fa8ab85b5e639265842d66f576e7db9562b1049564c2af6ec84 + languageName: node + linkType: hard + "doctrine@npm:^2.1.0": version: 2.1.0 resolution: "doctrine@npm:2.1.0" @@ -5009,6 +5573,22 @@ __metadata: languageName: node linkType: hard +"ejs@npm:^2.6.1": + version: 2.7.4 + resolution: "ejs@npm:2.7.4" + checksum: a1d2bfc7d1f0b39e99ae19b20c9469a25aeddba1ffc225db098110b18d566f73772fcdcc740b108cfda7452276f67d7b64eb359f90285414c942f4ae70713371 + languageName: node + linkType: hard + +"electron-fetch@npm:^1.7.2": + version: 1.9.1 + resolution: "electron-fetch@npm:1.9.1" + dependencies: + encoding: ^0.1.13 + checksum: 33b5d363b9a234288e847237ef34536bd415f31cba3b1c69b2ae4679a2bae66fb7ded2b576b90a0b7cd240e3df71cf16f2b961d4ab82864df02b6b53cf49f05c + languageName: node + linkType: hard + "electron-to-chromium@npm:^1.3.47": version: 1.4.172 resolution: "electron-to-chromium@npm:1.4.172" @@ -5081,7 +5661,7 @@ __metadata: languageName: node linkType: hard -"end-of-stream@npm:^1.1.0": +"end-of-stream@npm:^1.0.0, end-of-stream@npm:^1.1.0": version: 1.4.4 resolution: "end-of-stream@npm:1.4.4" dependencies: @@ -5090,6 +5670,15 @@ __metadata: languageName: node linkType: hard +"enquirer@npm:2.3.4": + version: 2.3.4 + resolution: "enquirer@npm:2.3.4" + dependencies: + ansi-colors: ^3.2.1 + checksum: e1dc49cfd9ca0c5d952dd5729e3129d5170016a89e490fbd3fee92aeaf7511b4f01be5cef1053faecbb5874f58a63acac1c494050e63c7020e509ddc6590d310 + languageName: node + linkType: hard + "enquirer@npm:^2.3.0": version: 2.3.6 resolution: "enquirer@npm:2.3.6" @@ -5113,6 +5702,13 @@ __metadata: languageName: node linkType: hard +"err-code@npm:^3.0.1": + version: 3.0.1 + resolution: "err-code@npm:3.0.1" + checksum: aede1f1d5ebe6d6b30b5e3175e3cc13e67de2e2e1ad99ce4917e957d7b59e8451ed10ee37dbc6493521920a47082c479b9097e5c39438d4aff4cc84438568a5a + languageName: node + linkType: hard + "errno@npm:~0.1.1": version: 0.1.8 resolution: "errno@npm:0.1.8" @@ -5213,6 +5809,22 @@ __metadata: languageName: node linkType: hard +"es6-promise@npm:^4.0.3": + version: 4.2.8 + resolution: "es6-promise@npm:4.2.8" + checksum: 95614a88873611cb9165a85d36afa7268af5c03a378b35ca7bda9508e1d4f1f6f19a788d4bc755b3fd37c8ebba40782018e02034564ff24c9d6fa37e959ad57d + languageName: node + linkType: hard + +"es6-promisify@npm:^5.0.0": + version: 5.0.0 + resolution: "es6-promisify@npm:5.0.0" + dependencies: + es6-promise: ^4.0.3 + checksum: fbed9d791598831413be84a5374eca8c24800ec71a16c1c528c43a98e2dadfb99331483d83ae6094ddb9b87e6f799a15d1553cebf756047e0865c753bc346b92 + languageName: node + linkType: hard + "es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3": version: 3.1.3 resolution: "es6-symbol@npm:3.1.3" @@ -5270,6 +5882,19 @@ __metadata: languageName: node linkType: hard +"eslint-config-prettier@npm:^6.1.0": + version: 6.15.0 + resolution: "eslint-config-prettier@npm:6.15.0" + dependencies: + get-stdin: ^6.0.0 + peerDependencies: + eslint: ">=3.14.1" + bin: + eslint-config-prettier-check: bin/cli.js + checksum: 02f461a5d7fbf06bd17077e76857eb7cf70def81762fb853094ae16e895231b2bf53c7ca83f535b943d7558fdd02ac41b33eb6d59523e60b1d8c6d1730d00f1e + languageName: node + linkType: hard + "eslint-config-prettier@npm:^8.5.0": version: 8.5.0 resolution: "eslint-config-prettier@npm:8.5.0" @@ -5435,7 +6060,7 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^5.1.1": +"eslint-scope@npm:^5.0.0, eslint-scope@npm:^5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" dependencies: @@ -5455,7 +6080,7 @@ __metadata: languageName: node linkType: hard -"eslint-utils@npm:^1.3.1": +"eslint-utils@npm:^1.3.1, eslint-utils@npm:^1.4.3": version: 1.4.3 resolution: "eslint-utils@npm:1.4.3" dependencies: @@ -5551,6 +6176,53 @@ __metadata: languageName: node linkType: hard +"eslint@npm:^6.2.2": + version: 6.8.0 + resolution: "eslint@npm:6.8.0" + dependencies: + "@babel/code-frame": ^7.0.0 + ajv: ^6.10.0 + chalk: ^2.1.0 + cross-spawn: ^6.0.5 + debug: ^4.0.1 + doctrine: ^3.0.0 + eslint-scope: ^5.0.0 + eslint-utils: ^1.4.3 + eslint-visitor-keys: ^1.1.0 + espree: ^6.1.2 + esquery: ^1.0.1 + esutils: ^2.0.2 + file-entry-cache: ^5.0.1 + functional-red-black-tree: ^1.0.1 + glob-parent: ^5.0.0 + globals: ^12.1.0 + ignore: ^4.0.6 + import-fresh: ^3.0.0 + imurmurhash: ^0.1.4 + inquirer: ^7.0.0 + is-glob: ^4.0.0 + js-yaml: ^3.13.1 + json-stable-stringify-without-jsonify: ^1.0.1 + levn: ^0.3.0 + lodash: ^4.17.14 + minimatch: ^3.0.4 + mkdirp: ^0.5.1 + natural-compare: ^1.4.0 + optionator: ^0.8.3 + progress: ^2.0.0 + regexpp: ^2.0.1 + semver: ^6.1.2 + strip-ansi: ^5.2.0 + strip-json-comments: ^3.0.1 + table: ^5.2.3 + text-table: ^0.2.0 + v8-compile-cache: ^2.0.3 + bin: + eslint: ./bin/eslint.js + checksum: d4edbe69589ef194e7d3470a18632560c5399a5f685295bd59a11cddba4c6f7e03a137a15a21389f8f85712ebd82d0a628ee4e9cd4391113556029c486616e25 + languageName: node + linkType: hard + "eslint@npm:^8.20.0": version: 8.20.0 resolution: "eslint@npm:8.20.0" @@ -5607,6 +6279,17 @@ __metadata: languageName: node linkType: hard +"espree@npm:^6.1.2": + version: 6.2.1 + resolution: "espree@npm:6.2.1" + dependencies: + acorn: ^7.1.1 + acorn-jsx: ^5.2.0 + eslint-visitor-keys: ^1.1.0 + checksum: 99c508950b5b9f53d008d781d2abb7a4ef3496ea699306fb6eb737c7e513aa594644314364c50ec27abb220124c6851fff64a6b62c358479534369904849360b + languageName: node + linkType: hard + "espree@npm:^9.3.2": version: 9.3.2 resolution: "espree@npm:9.3.2" @@ -6306,6 +6989,24 @@ __metadata: languageName: node linkType: hard +"execa@npm:^3.0.0": + version: 3.4.0 + resolution: "execa@npm:3.4.0" + dependencies: + cross-spawn: ^7.0.0 + get-stream: ^5.0.0 + human-signals: ^1.1.1 + is-stream: ^2.0.0 + merge-stream: ^2.0.0 + npm-run-path: ^4.0.0 + onetime: ^5.1.0 + p-finally: ^2.0.0 + signal-exit: ^3.0.2 + strip-final-newline: ^2.0.0 + checksum: 72832ff72f79f9082dc3567775cbb52f4682452f7d8015714d924e476a37c36a98183fd669317327ed2e7800ffe7ec2a7be4bfe704a2173ef22ae00109fe9123 + languageName: node + linkType: hard + "expand-brackets@npm:^2.1.4": version: 2.1.4 resolution: "expand-brackets@npm:2.1.4" @@ -6436,6 +7137,13 @@ __metadata: languageName: node linkType: hard +"eyes@npm:^0.1.8": + version: 0.1.8 + resolution: "eyes@npm:0.1.8" + checksum: c31703a92bf36ba75ee8d379ee7985c24ee6149f3a6175f44cec7a05b178c38bce9836d3ca48c9acb0329a960ac2c4b2ead4e60cdd4fe6e8c92cad7cd6913687 + languageName: node + linkType: hard + "fake-merkle-patricia-tree@npm:^1.0.1": version: 1.0.1 resolution: "fake-merkle-patricia-tree@npm:1.0.1" @@ -6459,6 +7167,13 @@ __metadata: languageName: node linkType: hard +"fast-fifo@npm:^1.0.0": + version: 1.3.2 + resolution: "fast-fifo@npm:1.3.2" + checksum: 6bfcba3e4df5af7be3332703b69a7898a8ed7020837ec4395bb341bd96cc3a6d86c3f6071dd98da289618cf2234c70d84b2a6f09a33dd6f988b1ff60d8e54275 + languageName: node + linkType: hard + "fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.9": version: 3.2.11 resolution: "fast-glob@npm:3.2.11" @@ -6513,6 +7228,15 @@ __metadata: languageName: node linkType: hard +"figures@npm:^3.0.0": + version: 3.2.0 + resolution: "figures@npm:3.2.0" + dependencies: + escape-string-regexp: ^1.0.5 + checksum: 85a6ad29e9aca80b49b817e7c89ecc4716ff14e3779d9835af554db91bac41c0f289c418923519392a1e582b4d10482ad282021330cd045bb7b80c84152f2a2b + languageName: node + linkType: hard + "file-entry-cache@npm:^5.0.1": version: 5.0.1 resolution: "file-entry-cache@npm:5.0.1" @@ -6715,6 +7439,16 @@ __metadata: languageName: node linkType: hard +"follow-redirects@npm:^1.14.0": + version: 1.15.2 + resolution: "follow-redirects@npm:1.15.2" + peerDependenciesMeta: + debug: + optional: true + checksum: faa66059b66358ba65c234c2f2a37fcec029dc22775f35d9ad6abac56003268baf41e55f9ee645957b32c7d9f62baf1f0b906e68267276f54ec4b4c597c2b190 + languageName: node + linkType: hard + "for-each@npm:^0.3.3, for-each@npm:~0.3.3": version: 0.3.3 resolution: "for-each@npm:0.3.3" @@ -6808,6 +7542,13 @@ __metadata: languageName: node linkType: hard +"fs-constants@npm:^1.0.0": + version: 1.0.0 + resolution: "fs-constants@npm:1.0.0" + checksum: 18f5b718371816155849475ac36c7d0b24d39a11d91348cfcb308b4494824413e03572c403c86d3a260e049465518c4f0d5bd00f0371cdfcad6d4f30a85b350d + languageName: node + linkType: hard + "fs-extra@npm:^0.30.0": version: 0.30.0 resolution: "fs-extra@npm:0.30.0" @@ -6854,7 +7595,7 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^9.1.0": +"fs-extra@npm:^9.0.0, fs-extra@npm:^9.1.0": version: 9.1.0 resolution: "fs-extra@npm:9.1.0" dependencies: @@ -6866,6 +7607,16 @@ __metadata: languageName: node linkType: hard +"fs-jetpack@npm:^2.2.2": + version: 2.4.0 + resolution: "fs-jetpack@npm:2.4.0" + dependencies: + minimatch: ^3.0.2 + rimraf: ^2.6.3 + checksum: 486a2974f5bbd3181b787416ff9c5fe128e2fa4a902e7314c659f0e141431ff075da1c674b98ba96e4f5b667a5f492231c51703ac3f073920f6388221394e92b + languageName: node + linkType: hard + "fs-minipass@npm:^1.2.7": version: 1.2.7 resolution: "fs-minipass@npm:1.2.7" @@ -7073,6 +7824,13 @@ __metadata: languageName: node linkType: hard +"get-iterator@npm:^1.0.2": + version: 1.0.2 + resolution: "get-iterator@npm:1.0.2" + checksum: 4a819aa91ecb61f4fd507bd62e3468d55f642f06011f944c381a739a21f685c36a37feb9324c8971e7c0fc70ca172066c45874fa2d1dcdf4b4fb8e43f16058c2 + languageName: node + linkType: hard + "get-port@npm:^3.1.0": version: 3.2.0 resolution: "get-port@npm:3.2.0" @@ -7080,6 +7838,13 @@ __metadata: languageName: node linkType: hard +"get-stdin@npm:^6.0.0": + version: 6.0.0 + resolution: "get-stdin@npm:6.0.0" + checksum: 593f6fb4fff4c8d49ec93a07c430c1edc6bd4fe7e429d222b5da2f367276a98809af9e90467ad88a2d83722ff95b9b35bbaba02b56801421c5e3668173fe12b4 + languageName: node + linkType: hard + "get-stream@npm:^3.0.0": version: 3.0.0 resolution: "get-stream@npm:3.0.0" @@ -7096,7 +7861,7 @@ __metadata: languageName: node linkType: hard -"get-stream@npm:^5.1.0": +"get-stream@npm:^5.0.0, get-stream@npm:^5.1.0": version: 5.2.0 resolution: "get-stream@npm:5.2.0" dependencies: @@ -7143,7 +7908,7 @@ __metadata: languageName: node linkType: hard -"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.0, glob-parent@npm:~5.1.2": +"glob-parent@npm:^5.0.0, glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.0, glob-parent@npm:~5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" dependencies: @@ -7216,7 +7981,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.0.0, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:~7.2.0": +"glob@npm:^7.0.0, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:~7.2.0": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -7280,6 +8045,15 @@ __metadata: languageName: node linkType: hard +"globals@npm:^12.1.0": + version: 12.4.0 + resolution: "globals@npm:12.4.0" + dependencies: + type-fest: ^0.8.1 + checksum: 7ae5ee16a96f1e8d71065405f57da0e33267f6b070cd36a5444c7780dd28639b48b92413698ac64f04bf31594f9108878bd8cb158ecdf759c39e05634fefcca6 + languageName: node + linkType: hard + "globals@npm:^13.15.0": version: 13.17.0 resolution: "globals@npm:13.17.0" @@ -7326,6 +8100,46 @@ __metadata: languageName: node linkType: hard +"gluegun@npm:^4.3.1": + version: 4.7.1 + resolution: "gluegun@npm:4.7.1" + dependencies: + apisauce: ^2.1.5 + app-module-path: ^2.2.0 + cli-table3: ~0.5.0 + colors: ^1.3.3 + cosmiconfig: 6.0.0 + cross-spawn: ^7.0.0 + ejs: ^2.6.1 + enquirer: 2.3.4 + execa: ^3.0.0 + fs-jetpack: ^2.2.2 + lodash.camelcase: ^4.3.0 + lodash.kebabcase: ^4.1.1 + lodash.lowercase: ^4.3.0 + lodash.lowerfirst: ^4.3.1 + lodash.pad: ^4.5.1 + lodash.padend: ^4.6.1 + lodash.padstart: ^4.6.1 + lodash.repeat: ^4.1.0 + lodash.snakecase: ^4.1.1 + lodash.startcase: ^4.4.0 + lodash.trim: ^4.5.1 + lodash.trimend: ^4.5.1 + lodash.trimstart: ^4.5.1 + lodash.uppercase: ^4.3.0 + lodash.upperfirst: ^4.3.1 + ora: ^4.0.0 + pluralize: ^8.0.0 + semver: ^7.0.0 + which: ^2.0.0 + yargs-parser: ^16.1.0 + bin: + gluegun: bin/gluegun + checksum: 1e67278ba7208025b5fcc54824427afc2de44223f03fba1eb6318763e72d0b384b55e01fb83fade693a2ce52656d958de15d011e7608f93955aef67372ae5e13 + languageName: node + linkType: hard + "got@npm:9.6.0": version: 9.6.0 resolution: "got@npm:9.6.0" @@ -7374,6 +8188,13 @@ __metadata: languageName: node linkType: hard +"graphql@npm:^15.5.0": + version: 15.8.0 + resolution: "graphql@npm:15.8.0" + checksum: 423325271db8858428641b9aca01699283d1fe5b40ef6d4ac622569ecca927019fce8196208b91dd1d8eb8114f00263fe661d241d0eb40c10e5bfd650f86ec5e + languageName: node + linkType: hard + "growl@npm:1.10.5": version: 1.10.5 resolution: "growl@npm:1.10.5" @@ -7792,6 +8613,13 @@ __metadata: languageName: node linkType: hard +"human-signals@npm:^1.1.1": + version: 1.1.1 + resolution: "human-signals@npm:1.1.1" + checksum: d587647c9e8ec24e02821b6be7de5a0fc37f591f6c4e319b3054b43fd4c35a70a94c46fc74d8c1a43c47fde157d23acd7421f375e1c1365b09a16835b8300205 + languageName: node + linkType: hard + "humanize-ms@npm:^1.2.1": version: 1.2.1 resolution: "humanize-ms@npm:1.2.1" @@ -7863,6 +8691,13 @@ __metadata: languageName: node linkType: hard +"immutable@npm:^3.8.2": + version: 3.8.2 + resolution: "immutable@npm:3.8.2" + checksum: 41909b386950ff84ca3cfca77c74cfc87d225a914e98e6c57996fa81a328da61a7c32216d6d5abad40f54747ffdc5c4b02b102e6ad1a504c1752efde8041f964 + languageName: node + linkType: hard + "immutable@npm:^4.0.0-rc.12": version: 4.1.0 resolution: "immutable@npm:4.1.0" @@ -7880,7 +8715,7 @@ __metadata: languageName: node linkType: hard -"import-fresh@npm:^3.0.0, import-fresh@npm:^3.2.1": +"import-fresh@npm:^3.0.0, import-fresh@npm:^3.1.0, import-fresh@npm:^3.2.1": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" dependencies: @@ -7956,6 +8791,45 @@ __metadata: languageName: node linkType: hard +"inquirer@npm:^7.0.0": + version: 7.3.3 + resolution: "inquirer@npm:7.3.3" + dependencies: + ansi-escapes: ^4.2.1 + chalk: ^4.1.0 + cli-cursor: ^3.1.0 + cli-width: ^3.0.0 + external-editor: ^3.0.3 + figures: ^3.0.0 + lodash: ^4.17.19 + mute-stream: 0.0.8 + run-async: ^2.4.0 + rxjs: ^6.6.0 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + through: ^2.3.6 + checksum: 4d387fc1eb6126acbd58cbdb9ad99d2887d181df86ab0c2b9abdf734e751093e2d5882c2b6dc7144d9ab16b7ab30a78a1d7f01fb6a2850a44aeb175d1e3f8778 + languageName: node + linkType: hard + +"interface-datastore@npm:^6.0.2": + version: 6.1.1 + resolution: "interface-datastore@npm:6.1.1" + dependencies: + interface-store: ^2.0.2 + nanoid: ^3.0.2 + uint8arrays: ^3.0.0 + checksum: a0388adabf029be229bbfce326bbe64fd3353373512e7e6ed4283e06710bfa141db118e3536f8535a65016a0abeec631b888d42790b00637879d6ae56cf728cd + languageName: node + linkType: hard + +"interface-store@npm:^2.0.2": + version: 2.0.2 + resolution: "interface-store@npm:2.0.2" + checksum: 0e80adb1de9ff57687cfa1b08499702b72cacf33a7e0320ac7781989f3685d73f2a84996358f540250229afa19c7acebf03085087762f718035622ea6a1a5b8a + languageName: node + linkType: hard + "internal-slot@npm:^1.0.3": version: 1.0.3 resolution: "internal-slot@npm:1.0.3" @@ -8006,6 +8880,13 @@ __metadata: languageName: node linkType: hard +"ip-regex@npm:^4.0.0": + version: 4.3.0 + resolution: "ip-regex@npm:4.3.0" + checksum: 7ff904b891221b1847f3fdf3dbb3e6a8660dc39bc283f79eb7ed88f5338e1a3d1104b779bc83759159be266249c59c2160e779ee39446d79d4ed0890dfd06f08 + languageName: node + linkType: hard + "ip@npm:^1.1.5": version: 1.1.8 resolution: "ip@npm:1.1.8" @@ -8020,6 +8901,106 @@ __metadata: languageName: node linkType: hard +"ipfs-core-types@npm:^0.9.0": + version: 0.9.0 + resolution: "ipfs-core-types@npm:0.9.0" + dependencies: + interface-datastore: ^6.0.2 + multiaddr: ^10.0.0 + multiformats: ^9.4.13 + checksum: 22db8e039348dc372c99b45a87ce8dce81e15fa710cee410c1731004d528e0bd0da96b5a4c5571d501313fae93316af3b902c2220c486d2fade2e53f07a7d17b + languageName: node + linkType: hard + +"ipfs-core-utils@npm:^0.13.0": + version: 0.13.0 + resolution: "ipfs-core-utils@npm:0.13.0" + dependencies: + any-signal: ^2.1.2 + blob-to-it: ^1.0.1 + browser-readablestream-to-it: ^1.0.1 + debug: ^4.1.1 + err-code: ^3.0.1 + ipfs-core-types: ^0.9.0 + ipfs-unixfs: ^6.0.3 + ipfs-utils: ^9.0.2 + it-all: ^1.0.4 + it-map: ^1.0.4 + it-peekable: ^1.0.2 + it-to-stream: ^1.0.0 + merge-options: ^3.0.4 + multiaddr: ^10.0.0 + multiaddr-to-uri: ^8.0.0 + multiformats: ^9.4.13 + nanoid: ^3.1.23 + parse-duration: ^1.0.0 + timeout-abort-controller: ^2.0.0 + uint8arrays: ^3.0.0 + checksum: af46717a69cf2e4f1bfbd77c7c1951eaa8b9619bdb888ca971849dc2d2468aceb0238e2f47ae45568478b2ceb1428ae7061239afc92aac06691f7bea9e21e4eb + languageName: node + linkType: hard + +"ipfs-http-client@npm:55.0.0": + version: 55.0.0 + resolution: "ipfs-http-client@npm:55.0.0" + dependencies: + "@ipld/dag-cbor": ^7.0.0 + "@ipld/dag-json": ^8.0.1 + "@ipld/dag-pb": ^2.1.3 + abort-controller: ^3.0.0 + any-signal: ^2.1.2 + debug: ^4.1.1 + err-code: ^3.0.1 + ipfs-core-types: ^0.9.0 + ipfs-core-utils: ^0.13.0 + ipfs-utils: ^9.0.2 + it-first: ^1.0.6 + it-last: ^1.0.4 + merge-options: ^3.0.4 + multiaddr: ^10.0.0 + multiformats: ^9.4.13 + native-abort-controller: ^1.0.3 + parse-duration: ^1.0.0 + stream-to-it: ^0.2.2 + uint8arrays: ^3.0.0 + checksum: b44394475dd9f6ef2e68cf22fb5bacf93c1a8967712f12a56baf9e90f183d625569bcabfe2e7c0d1cd2f0a2eed577ab8282f5a737552faf83d3b8a82d7910494 + languageName: node + linkType: hard + +"ipfs-unixfs@npm:^6.0.3": + version: 6.0.9 + resolution: "ipfs-unixfs@npm:6.0.9" + dependencies: + err-code: ^3.0.1 + protobufjs: ^6.10.2 + checksum: 025d852c3cfb09b813b35f7a4f7a06bd0ff904f88b35cdf54c6ea1eb021f1597ab9c2739adabbae9cfe645a2323598bd7974ff4a8898701bc4ba92842bf21736 + languageName: node + linkType: hard + +"ipfs-utils@npm:^9.0.2": + version: 9.0.14 + resolution: "ipfs-utils@npm:9.0.14" + dependencies: + any-signal: ^3.0.0 + browser-readablestream-to-it: ^1.0.0 + buffer: ^6.0.1 + electron-fetch: ^1.7.2 + err-code: ^3.0.1 + is-electron: ^2.2.0 + iso-url: ^1.1.5 + it-all: ^1.0.4 + it-glob: ^1.0.1 + it-to-stream: ^1.0.0 + merge-options: ^3.0.4 + nanoid: ^3.1.20 + native-fetch: ^3.0.0 + node-fetch: ^2.6.8 + react-native-fetch-api: ^3.0.0 + stream-to-it: ^0.2.2 + checksum: 08108e03ea7b90e0fa11b76a4e24bd29d7e027c603494b53c1cc37b367fb559eaeea7b0f10b2e83ee419d50cdcb4d8105febdf185cab75c7e55afd4c8ed51aba + languageName: node + linkType: hard + "is-accessor-descriptor@npm:^0.1.6": version: 0.1.6 resolution: "is-accessor-descriptor@npm:0.1.6" @@ -8189,6 +9170,13 @@ __metadata: languageName: node linkType: hard +"is-electron@npm:^2.2.0": + version: 2.2.2 + resolution: "is-electron@npm:2.2.2" + checksum: de5aa8bd8d72c96675b8d0f93fab4cc21f62be5440f65bc05c61338ca27bd851a64200f31f1bf9facbaa01b3dbfed7997b2186741d84b93b63e0aff1db6a9494 + languageName: node + linkType: hard + "is-extendable@npm:^0.1.0, is-extendable@npm:^0.1.1": version: 0.1.1 resolution: "is-extendable@npm:0.1.1" @@ -8272,6 +9260,22 @@ __metadata: languageName: node linkType: hard +"is-interactive@npm:^1.0.0": + version: 1.0.0 + resolution: "is-interactive@npm:1.0.0" + checksum: 824808776e2d468b2916cdd6c16acacebce060d844c35ca6d82267da692e92c3a16fdba624c50b54a63f38bdc4016055b6f443ce57d7147240de4f8cdabaf6f9 + languageName: node + linkType: hard + +"is-ip@npm:^3.1.0": + version: 3.1.0 + resolution: "is-ip@npm:3.1.0" + dependencies: + ip-regex: ^4.0.0 + checksum: da2c2b282407194adf2320bade0bad94be9c9d0bdab85ff45b1b62d8185f31c65dff3884519d57bf270277e5ea2046c7916a6e5a6db22fe4b7ddcdd3760f23eb + languageName: node + linkType: hard + "is-lambda@npm:^1.0.1": version: 1.0.1 resolution: "is-lambda@npm:1.0.1" @@ -8374,6 +9378,13 @@ __metadata: languageName: node linkType: hard +"is-stream@npm:^2.0.0": + version: 2.0.1 + resolution: "is-stream@npm:2.0.1" + checksum: b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66 + languageName: node + linkType: hard + "is-string@npm:^1.0.5, is-string@npm:^1.0.7": version: 1.0.7 resolution: "is-string@npm:1.0.7" @@ -8466,6 +9477,13 @@ __metadata: languageName: node linkType: hard +"iso-url@npm:^1.1.5": + version: 1.2.1 + resolution: "iso-url@npm:1.2.1" + checksum: 1af98c4ed6a39598407fd8c3c13e997c978985f477af2be3390d2aa3e422b4b5992ffbb0dac68656b165c71850fff748ac1309d29d4f2a728707d76bf0f98557 + languageName: node + linkType: hard + "isobject@npm:^2.0.0": version: 2.1.0 resolution: "isobject@npm:2.1.0" @@ -8482,6 +9500,15 @@ __metadata: languageName: node linkType: hard +"isomorphic-ws@npm:^4.0.1": + version: 4.0.1 + resolution: "isomorphic-ws@npm:4.0.1" + peerDependencies: + ws: "*" + checksum: d7190eadefdc28bdb93d67b5f0c603385aaf87724fa2974abb382ac1ec9756ed2cfb27065cbe76122879c2d452e2982bc4314317f3d6c737ddda6c047328771a + languageName: node + linkType: hard + "isstream@npm:~0.1.2": version: 0.1.2 resolution: "isstream@npm:0.1.2" @@ -8499,6 +9526,87 @@ __metadata: languageName: node linkType: hard +"it-all@npm:^1.0.4": + version: 1.0.6 + resolution: "it-all@npm:1.0.6" + checksum: 7ca9a528c08ebe2fc8a3c93a41409219d18325ed31fedb9834ebac2822f0b2a96d7abcb6cbfa092114ab4d5f08951e694c7a2c3929ce4b5300769e710ae665db + languageName: node + linkType: hard + +"it-first@npm:^1.0.6": + version: 1.0.7 + resolution: "it-first@npm:1.0.7" + checksum: 0c9106d29120f02e68a08118de328437fb44c966385635d672684d4f0321ee22ca470a30f390132bdb454da0d4d3abb82c796dad8e391a827f1a3446711c7685 + languageName: node + linkType: hard + +"it-glob@npm:^1.0.1": + version: 1.0.2 + resolution: "it-glob@npm:1.0.2" + dependencies: + "@types/minimatch": ^3.0.4 + minimatch: ^3.0.4 + checksum: 629e7b66510006041df98882acfd73ac785836d51fc3ffa5c83c7099f931b3287a64c5a3772e7c1e46b63f1d511a9222f5b637c50f1c738222b46d104ff2e91c + languageName: node + linkType: hard + +"it-last@npm:^1.0.4": + version: 1.0.6 + resolution: "it-last@npm:1.0.6" + checksum: bc7b68ddd6cae902f0095d0c7ccb0078abdfa41fbf55862a9df9e30ae74be08282b5b3d21f40e6103af0d202144974e216d3c44f3e8f93c2c3f890322b02fcfa + languageName: node + linkType: hard + +"it-map@npm:^1.0.4": + version: 1.0.6 + resolution: "it-map@npm:1.0.6" + checksum: 5eb9da69e5d58624c79cea13dd8eeffe8a1ab6a28a527ac4d0301304279ffbe8da94faf50aa269e2a1630c94dc30a6bfe7a135bfb0c7e887216efad7c41a9f52 + languageName: node + linkType: hard + +"it-peekable@npm:^1.0.2": + version: 1.0.3 + resolution: "it-peekable@npm:1.0.3" + checksum: 6e9d68cbf582e301f191b8ad2660957c12c8100804a298fd5732ee35f2dd466a6af64d88d91343f2614675b4d4fb546618335303e9356659a9a0868c08b1ca54 + languageName: node + linkType: hard + +"it-to-stream@npm:^1.0.0": + version: 1.0.0 + resolution: "it-to-stream@npm:1.0.0" + dependencies: + buffer: ^6.0.3 + fast-fifo: ^1.0.0 + get-iterator: ^1.0.2 + p-defer: ^3.0.0 + p-fifo: ^1.0.0 + readable-stream: ^3.6.0 + checksum: e0c5a3f3c90d4bc52686217865b8fa202f64bd3af493dec0fdacd58b4237166fb68935ff2823ed0a16414ba5becb9a5fb8c98f3ec99584789776d7277c1d129f + languageName: node + linkType: hard + +"jayson@npm:4.0.0": + version: 4.0.0 + resolution: "jayson@npm:4.0.0" + dependencies: + "@types/connect": ^3.4.33 + "@types/node": ^12.12.54 + "@types/ws": ^7.4.4 + JSONStream: ^1.3.5 + commander: ^2.20.3 + delay: ^5.0.0 + es6-promisify: ^5.0.0 + eyes: ^0.1.8 + isomorphic-ws: ^4.0.1 + json-stringify-safe: ^5.0.1 + uuid: ^8.3.2 + ws: ^7.4.5 + bin: + jayson: bin/jayson.js + checksum: 39eed3dc8d0e35320b0234f0faf7d6195b0cdc6940ec969f603a3ea14de8da98f2bd2775e3b982fe1ee6de63e66428fbf322d426e659fa25ea86c8ac92c8710d + languageName: node + linkType: hard + "js-sha3@npm:0.5.7, js-sha3@npm:^0.5.7": version: 0.5.7 resolution: "js-sha3@npm:0.5.7" @@ -8601,6 +9709,13 @@ __metadata: languageName: node linkType: hard +"json-parse-even-better-errors@npm:^2.3.0": + version: 2.3.1 + resolution: "json-parse-even-better-errors@npm:2.3.1" + checksum: 798ed4cf3354a2d9ccd78e86d2169515a0097a5c133337807cdf7f1fc32e1391d207ccfc276518cc1d7d8d4db93288b8a50ba4293d212ad1336e52a8ec0a941f + languageName: node + linkType: hard + "json-rpc-engine@npm:^3.4.0, json-rpc-engine@npm:^3.6.0": version: 3.8.0 resolution: "json-rpc-engine@npm:3.8.0" @@ -8668,7 +9783,7 @@ __metadata: languageName: node linkType: hard -"json-stringify-safe@npm:~5.0.1": +"json-stringify-safe@npm:^5.0.1, json-stringify-safe@npm:~5.0.1": version: 5.0.1 resolution: "json-stringify-safe@npm:5.0.1" checksum: 48ec0adad5280b8a96bb93f4563aa1667fd7a36334f79149abd42446d0989f2ddc58274b479f4819f1f00617957e6344c886c55d05a4e15ebb4ab931e4a6a8ee @@ -8739,6 +9854,13 @@ __metadata: languageName: node linkType: hard +"jsonparse@npm:^1.2.0": + version: 1.3.1 + resolution: "jsonparse@npm:1.3.1" + checksum: 6514a7be4674ebf407afca0eda3ba284b69b07f9958a8d3113ef1005f7ec610860c312be067e450c569aab8b89635e332cee3696789c750692bb60daba627f4d + languageName: node + linkType: hard + "jsonschema@npm:^1.2.4": version: 1.4.1 resolution: "jsonschema@npm:1.4.1" @@ -9092,6 +10214,13 @@ __metadata: languageName: node linkType: hard +"lines-and-columns@npm:^1.1.6": + version: 1.2.4 + resolution: "lines-and-columns@npm:1.2.4" + checksum: 0c37f9f7fa212b38912b7145e1cd16a5f3cd34d782441c3e6ca653485d326f58b3caccda66efce1c5812bde4961bbde3374fae4b0d11bf1226152337f3894aa5 + languageName: node + linkType: hard + "load-json-file@npm:^1.0.0": version: 1.1.0 resolution: "load-json-file@npm:1.1.0" @@ -9162,6 +10291,27 @@ __metadata: languageName: node linkType: hard +"lodash.kebabcase@npm:^4.1.1": + version: 4.1.1 + resolution: "lodash.kebabcase@npm:4.1.1" + checksum: 5a6c59161914e1bae23438a298c7433e83d935e0f59853fa862e691164696bc07f6dfa4c313d499fbf41ba8d53314e9850416502376705a357d24ee6ca33af78 + languageName: node + linkType: hard + +"lodash.lowercase@npm:^4.3.0": + version: 4.3.0 + resolution: "lodash.lowercase@npm:4.3.0" + checksum: 463d7e50db29aea736563352f05adcff1f7c60574fe201f47ad98d2834f3dc64bee84a31702e1661d0f94913e89a46ded04befd425bbd3b95d23697689118f98 + languageName: node + linkType: hard + +"lodash.lowerfirst@npm:^4.3.1": + version: 4.3.1 + resolution: "lodash.lowerfirst@npm:4.3.1" + checksum: e1688e18873777d394db4994d150dfc14cf01bf450169cf8296af4d84ecd7c3c4ae4dab3746f77f8719a093e4fff58bee3ae73ae7e23ef508b7d970b189d9952 + languageName: node + linkType: hard + "lodash.merge@npm:^4.6.2": version: 4.6.2 resolution: "lodash.merge@npm:4.6.2" @@ -9169,6 +10319,69 @@ __metadata: languageName: node linkType: hard +"lodash.pad@npm:^4.5.1": + version: 4.5.1 + resolution: "lodash.pad@npm:4.5.1" + checksum: 325805c929dad67d61470348046bc92bdad017a9edbda11322cc8945da92a10f943f935d24c340aa6d47cd9a3ff8f5ed6f4a77283266a54e32afae09be0c41ff + languageName: node + linkType: hard + +"lodash.padend@npm:^4.6.1": + version: 4.6.1 + resolution: "lodash.padend@npm:4.6.1" + checksum: c2e6e789debf83b98f5c085305cdcfff1067e7a31bda2a110fd765d3c11a99edfbeef570d9ef737ab3212006bdb8114e77622e518c18c1fce52b8fdfd9dab685 + languageName: node + linkType: hard + +"lodash.padstart@npm:^4.6.1": + version: 4.6.1 + resolution: "lodash.padstart@npm:4.6.1" + checksum: 0d6ad92c626d351db85de539e41df3238d7d36c5fbfc5f57c4f060c90c73ad9f1db566463487795fdf0bf290a8f133189a0bd91d051032f6eb2d15b7e1863b5e + languageName: node + linkType: hard + +"lodash.repeat@npm:^4.1.0": + version: 4.1.0 + resolution: "lodash.repeat@npm:4.1.0" + checksum: dac15fc59ed783678e1a9f986fefa180bfdbf95280852165965ecc8e15b871c6f0eaf7b325768a176014594d5186f1d6558fb72a18527bddd82539fb3ef8a4d3 + languageName: node + linkType: hard + +"lodash.snakecase@npm:^4.1.1": + version: 4.1.1 + resolution: "lodash.snakecase@npm:4.1.1" + checksum: 1685ed3e83dda6eae5a4dcaee161a51cd210aabb3e1c09c57150e7dd8feda19e4ca0d27d0631eabe8d0f4eaa51e376da64e8c018ae5415417c5890d42feb72a8 + languageName: node + linkType: hard + +"lodash.startcase@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.startcase@npm:4.4.0" + checksum: c03a4a784aca653845fe09d0ef67c902b6e49288dc45f542a4ab345a9c406a6dc194c774423fa313ee7b06283950301c1221dd2a1d8ecb2dac8dfbb9ed5606b5 + languageName: node + linkType: hard + +"lodash.trim@npm:^4.5.1": + version: 4.5.1 + resolution: "lodash.trim@npm:4.5.1" + checksum: 64b08e97d94d4c7620159371e6fe6cbb706514a41d737db2f189d9ec738305eb08cb772a9bbd2459e90f1c22f96174ec1047ceb8272f2f6040cb5bd63d8f9f2b + languageName: node + linkType: hard + +"lodash.trimend@npm:^4.5.1": + version: 4.5.1 + resolution: "lodash.trimend@npm:4.5.1" + checksum: 8d0c013e95529f6b8af0cbe987a730a4befdd1ab3674ae72199731109929d3ed9892217fdb282361a4cdd78c3a1d3aa7d6aadd313dd3c38b61248fb60e2f6627 + languageName: node + linkType: hard + +"lodash.trimstart@npm:^4.5.1": + version: 4.5.1 + resolution: "lodash.trimstart@npm:4.5.1" + checksum: 4b2d37505ac15f501f4f2378928455a40e858fa56c924494dbc21d5d828c55e821cda8543f25fe265e3d552937e915264a2567ba9291a172262c24c33e9ad6b0 + languageName: node + linkType: hard + "lodash.truncate@npm:^4.4.2": version: 4.4.2 resolution: "lodash.truncate@npm:4.4.2" @@ -9176,6 +10389,20 @@ __metadata: languageName: node linkType: hard +"lodash.uppercase@npm:^4.3.0": + version: 4.3.0 + resolution: "lodash.uppercase@npm:4.3.0" + checksum: 0a435cccd3acfe732c968deb4897d6237051d69f58f18e55e7faa781b1731176012e3286505780e93a4e0acb93a6799e39908c7ea3367678bdd2aecb963f469d + languageName: node + linkType: hard + +"lodash.upperfirst@npm:^4.3.1": + version: 4.3.1 + resolution: "lodash.upperfirst@npm:4.3.1" + checksum: cadec6955900afe1928cc60cdc4923a79c2ef991e42665419cc81630ed9b4f952a1093b222e0141ab31cbc4dba549f97ec28ff67929d71e01861c97188a5fa83 + languageName: node + linkType: hard + "lodash@npm:4.17.20": version: 4.17.20 resolution: "lodash@npm:4.17.20" @@ -9190,7 +10417,7 @@ __metadata: languageName: node linkType: hard -"log-symbols@npm:3.0.0": +"log-symbols@npm:3.0.0, log-symbols@npm:^3.0.0": version: 3.0.0 resolution: "log-symbols@npm:3.0.0" dependencies: @@ -9209,6 +10436,13 @@ __metadata: languageName: node linkType: hard +"long@npm:^4.0.0": + version: 4.0.0 + resolution: "long@npm:4.0.0" + checksum: 16afbe8f749c7c849db1f4de4e2e6a31ac6e617cead3bdc4f9605cb703cd20e1e9fc1a7baba674ffcca57d660a6e5b53a9e236d7b25a295d3855cca79cc06744 + languageName: node + linkType: hard + "looper@npm:^2.0.0": version: 2.0.0 resolution: "looper@npm:2.0.0" @@ -9464,6 +10698,22 @@ __metadata: languageName: node linkType: hard +"merge-options@npm:^3.0.4": + version: 3.0.4 + resolution: "merge-options@npm:3.0.4" + dependencies: + is-plain-obj: ^2.1.0 + checksum: d86ddb3dd6e85d558dbf25dc944f3527b6bacb944db3fdda6e84a3f59c4e4b85231095f58b835758b9a57708342dee0f8de0dffa352974a48221487fe9f4584f + languageName: node + linkType: hard + +"merge-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "merge-stream@npm:2.0.0" + checksum: 6fa4dcc8d86629705cea944a4b88ef4cb0e07656ebf223fa287443256414283dd25d91c1cd84c77987f2aec5927af1a9db6085757cb43d90eb170ebf4b47f4f4 + languageName: node + linkType: hard + "merge2@npm:^1.2.3, merge2@npm:^1.3.0, merge2@npm:^1.4.1": version: 1.4.1 resolution: "merge2@npm:1.4.1" @@ -9584,7 +10834,7 @@ __metadata: languageName: node linkType: hard -"mimic-fn@npm:^2.0.0": +"mimic-fn@npm:^2.0.0, mimic-fn@npm:^2.1.0": version: 2.1.0 resolution: "mimic-fn@npm:2.1.0" checksum: d2421a3444848ce7f84bd49115ddacff29c15745db73f54041edc906c14b131a38d05298dae3081667627a59b2eb1ca4b436ff2e1b80f69679522410418b478a @@ -9621,7 +10871,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:2 || 3, minimatch@npm:^3.0.4, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": +"minimatch@npm:2 || 3, minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -9964,6 +11214,29 @@ __metadata: languageName: node linkType: hard +"multiaddr-to-uri@npm:^8.0.0": + version: 8.0.0 + resolution: "multiaddr-to-uri@npm:8.0.0" + dependencies: + multiaddr: ^10.0.0 + checksum: c70d1f4d98d4eee6f7e47e4bd5b3aeae8394339c455bed3cccfc38a11aa7f61681b5cdfa02f338687d2181526318f66d00c370dca6bf633955be6bfd87cb833d + languageName: node + linkType: hard + +"multiaddr@npm:^10.0.0": + version: 10.0.1 + resolution: "multiaddr@npm:10.0.1" + dependencies: + dns-over-http-resolver: ^1.2.3 + err-code: ^3.0.1 + is-ip: ^3.1.0 + multiformats: ^9.4.5 + uint8arrays: ^3.0.0 + varint: ^6.0.0 + checksum: d53aaf7efd52ee5e6413ef36ececd29239ceb5c1f048c1fa9b820442226dc232067312d25e509a2571a14047465fb934dd35029c7f3166f4d02d13e3c501925d + languageName: node + linkType: hard + "multibase@npm:^0.7.0": version: 0.7.0 resolution: "multibase@npm:0.7.0" @@ -10003,6 +11276,13 @@ __metadata: languageName: node linkType: hard +"multiformats@npm:^9.4.13, multiformats@npm:^9.4.2, multiformats@npm:^9.4.5, multiformats@npm:^9.5.4": + version: 9.9.0 + resolution: "multiformats@npm:9.9.0" + checksum: d3e8c1be400c09a014f557ea02251a2710dbc9fca5aa32cc702ff29f636c5471e17979f30bdcb0a9cbb556f162a8591dc2e1219c24fc21394a56115b820bb84e + languageName: node + linkType: hard + "multihashes@npm:^0.4.15, multihashes@npm:~0.4.15": version: 0.4.21 resolution: "multihashes@npm:0.4.21" @@ -10021,6 +11301,13 @@ __metadata: languageName: node linkType: hard +"mute-stream@npm:0.0.8": + version: 0.0.8 + resolution: "mute-stream@npm:0.0.8" + checksum: ff48d251fc3f827e5b1206cda0ffdaec885e56057ee86a3155e1951bc940fd5f33531774b1cc8414d7668c10a8907f863f6561875ee6e8768931a62121a531a1 + languageName: node + linkType: hard + "nano-json-stream-parser@npm:^0.1.2": version: 0.1.2 resolution: "nano-json-stream-parser@npm:0.1.2" @@ -10037,6 +11324,15 @@ __metadata: languageName: node linkType: hard +"nanoid@npm:^3.0.2, nanoid@npm:^3.1.20, nanoid@npm:^3.1.23": + version: 3.3.6 + resolution: "nanoid@npm:3.3.6" + bin: + nanoid: bin/nanoid.cjs + checksum: 7d0eda657002738aa5206107bd0580aead6c95c460ef1bdd0b1a87a9c7ae6277ac2e9b945306aaa5b32c6dcb7feaf462d0f552e7f8b5718abfc6ead5c94a71b3 + languageName: node + linkType: hard + "nanomatch@npm:^1.2.9": version: 1.2.13 resolution: "nanomatch@npm:1.2.13" @@ -10063,6 +11359,24 @@ __metadata: languageName: node linkType: hard +"native-abort-controller@npm:^1.0.3, native-abort-controller@npm:^1.0.4": + version: 1.0.4 + resolution: "native-abort-controller@npm:1.0.4" + peerDependencies: + abort-controller: "*" + checksum: 7c98800304155300344f586721a12ac4207c9d660c7bc121549f6afb3db9175fe8200cfb3017ea3ea2664a9601b01fdd92f200783b2ce8792d64a4c50bd4030a + languageName: node + linkType: hard + +"native-fetch@npm:^3.0.0": + version: 3.0.0 + resolution: "native-fetch@npm:3.0.0" + peerDependencies: + node-fetch: "*" + checksum: eec8cc78d6da4d0f3f56055e3e557473ac86dd35fd40053ea268d644af7b20babc891d2b53ef821b77ed2428265f60b85e49d754c555de89bfa071a743b853bb + languageName: node + linkType: hard + "natural-compare@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare@npm:1.4.0" @@ -10126,6 +11440,20 @@ __metadata: languageName: node linkType: hard +"node-fetch@npm:^2.3.0, node-fetch@npm:^2.6.8": + version: 2.7.0 + resolution: "node-fetch@npm:2.7.0" + dependencies: + whatwg-url: ^5.0.0 + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: d76d2f5edb451a3f05b15115ec89fc6be39de37c6089f1b6368df03b91e1633fd379a7e01b7ab05089a25034b2023d959b47e59759cb38d88341b2459e89d6e5 + languageName: node + linkType: hard + "node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7": version: 2.6.7 resolution: "node-fetch@npm:2.6.7" @@ -10252,6 +11580,15 @@ __metadata: languageName: node linkType: hard +"npm-run-path@npm:^4.0.0": + version: 4.0.1 + resolution: "npm-run-path@npm:4.0.1" + dependencies: + path-key: ^3.0.0 + checksum: 5374c0cea4b0bbfdfae62da7bbdf1e1558d338335f4cacf2515c282ff358ff27b2ecb91ffa5330a8b14390ac66a1e146e10700440c1ab868208430f56b5f4d23 + languageName: node + linkType: hard + "npmlog@npm:^6.0.0": version: 6.0.2 resolution: "npmlog@npm:6.0.2" @@ -10445,6 +11782,15 @@ __metadata: languageName: node linkType: hard +"onetime@npm:^5.1.0": + version: 5.1.2 + resolution: "onetime@npm:5.1.2" + dependencies: + mimic-fn: ^2.1.0 + checksum: 2478859ef817fc5d4e9c2f9e5728512ddd1dbc9fb7829ad263765bb6d3b91ce699d6e2332eef6b7dff183c2f490bd3349f1666427eaba4469fba0ac38dfd0d34 + languageName: node + linkType: hard + "open@npm:^7.4.2": version: 7.4.2 resolution: "open@npm:7.4.2" @@ -10455,7 +11801,16 @@ __metadata: languageName: node linkType: hard -"optionator@npm:^0.8.1, optionator@npm:^0.8.2": +"opencollective-postinstall@npm:^2.0.0": + version: 2.0.3 + resolution: "opencollective-postinstall@npm:2.0.3" + bin: + opencollective-postinstall: index.js + checksum: 0a68c5cef135e46d11e665d5077398285d1ce5311c948e8327b435791c409744d4a6bb9c55bd6507fb5f2ef34b0ad920565adcdaf974cbdae701aead6f32b396 + languageName: node + linkType: hard + +"optionator@npm:^0.8.1, optionator@npm:^0.8.2, optionator@npm:^0.8.3": version: 0.8.3 resolution: "optionator@npm:0.8.3" dependencies: @@ -10483,6 +11838,22 @@ __metadata: languageName: node linkType: hard +"ora@npm:^4.0.0": + version: 4.1.1 + resolution: "ora@npm:4.1.1" + dependencies: + chalk: ^3.0.0 + cli-cursor: ^3.1.0 + cli-spinners: ^2.2.0 + is-interactive: ^1.0.0 + log-symbols: ^3.0.0 + mute-stream: 0.0.8 + strip-ansi: ^6.0.0 + wcwidth: ^1.0.1 + checksum: 5dcee3a2e143c7b578531ceda051e8c4b64655a019030fe3de4aef67ac28d08fca996aef71522d40b2316a272aa158d65028d7f43c126d318b70a49d9fa4f991 + languageName: node + linkType: hard + "ordinal@npm:^1.0.3": version: 1.0.3 resolution: "ordinal@npm:1.0.3" @@ -10545,6 +11916,23 @@ __metadata: languageName: node linkType: hard +"p-defer@npm:^3.0.0": + version: 3.0.0 + resolution: "p-defer@npm:3.0.0" + checksum: ac3b0976a1c76b67cca1a34e00f7299b0cc230891f820749686aa84f8947326bbe0f8e3b7d9ca511578ee06f0c1a6e0ff68c8e9c325eac455f09d99f91697161 + languageName: node + linkType: hard + +"p-fifo@npm:^1.0.0": + version: 1.0.0 + resolution: "p-fifo@npm:1.0.0" + dependencies: + fast-fifo: ^1.0.0 + p-defer: ^3.0.0 + checksum: 4cdce44ff8266351014a460705a804c02760e5b721a018dbef6fae7d25caf83af2e343be58810297473383c1783bb7048388cb5c22938b3f904818531bc44ee7 + languageName: node + linkType: hard + "p-finally@npm:^1.0.0": version: 1.0.0 resolution: "p-finally@npm:1.0.0" @@ -10552,6 +11940,13 @@ __metadata: languageName: node linkType: hard +"p-finally@npm:^2.0.0": + version: 2.0.1 + resolution: "p-finally@npm:2.0.1" + checksum: 6306a2851c3b28f8b603624f395ae84dce76970498fed8aa6aae2d930595053746edf1e4ee0c4b78a97410d84aa4504d63179f5310d555511ecd226f53ed1e8e + languageName: node + linkType: hard + "p-is-promise@npm:^2.0.0": version: 2.1.0 resolution: "p-is-promise@npm:2.1.0" @@ -10674,6 +12069,13 @@ __metadata: languageName: node linkType: hard +"parse-duration@npm:^1.0.0": + version: 1.1.0 + resolution: "parse-duration@npm:1.1.0" + checksum: 3cfc10aa61b3a06373a347289e1704de47d5d845c79330bbab20b54c02567f3710ba84544a3a44a986c3381c68670d89542fe9de607fb0814e52f78b34893cd9 + languageName: node + linkType: hard + "parse-headers@npm:^2.0.0": version: 2.0.5 resolution: "parse-headers@npm:2.0.5" @@ -10700,6 +12102,18 @@ __metadata: languageName: node linkType: hard +"parse-json@npm:^5.0.0": + version: 5.2.0 + resolution: "parse-json@npm:5.2.0" + dependencies: + "@babel/code-frame": ^7.0.0 + error-ex: ^1.3.1 + json-parse-even-better-errors: ^2.3.0 + lines-and-columns: ^1.1.6 + checksum: 62085b17d64da57f40f6afc2ac1f4d95def18c4323577e1eced571db75d9ab59b297d1d10582920f84b15985cbfc6b6d450ccbf317644cfa176f3ed982ad87e2 + languageName: node + linkType: hard + "parseurl@npm:~1.3.3": version: 1.3.3 resolution: "parseurl@npm:1.3.3" @@ -10810,7 +12224,7 @@ __metadata: languageName: node linkType: hard -"path-key@npm:^3.1.0": +"path-key@npm:^3.0.0, path-key@npm:^3.1.0": version: 3.1.1 resolution: "path-key@npm:3.1.1" checksum: 55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 @@ -10913,6 +12327,20 @@ __metadata: languageName: node linkType: hard +"pkginfo@npm:^0.4.1": + version: 0.4.1 + resolution: "pkginfo@npm:0.4.1" + checksum: 0f13694f3682345647b7cb887fb6fe258df51b635f252324cd75eeb8181b4381cb8b9d91dc2d869849e857192b403bea65038d2f7c05b524eeae69ece5048209 + languageName: node + linkType: hard + +"pluralize@npm:^8.0.0": + version: 8.0.0 + resolution: "pluralize@npm:8.0.0" + checksum: 08931d4a6a4a5561a7f94f67a31c17e6632cb21e459ab3ff4f6f629d9a822984cf8afef2311d2005fbea5d7ef26016ebb090db008e2d8bce39d0a9a9d218736e + languageName: node + linkType: hard + "posix-character-classes@npm:^0.1.0": version: 0.1.1 resolution: "posix-character-classes@npm:0.1.1" @@ -10987,7 +12415,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^1.14.3": +"prettier@npm:^1.13.5, prettier@npm:^1.14.3, prettier@npm:^1.18.2": version: 1.19.1 resolution: "prettier@npm:1.19.1" bin: @@ -11080,6 +12508,30 @@ __metadata: languageName: node linkType: hard +"protobufjs@npm:^6.10.2": + version: 6.11.4 + resolution: "protobufjs@npm:6.11.4" + dependencies: + "@protobufjs/aspromise": ^1.1.2 + "@protobufjs/base64": ^1.1.2 + "@protobufjs/codegen": ^2.0.4 + "@protobufjs/eventemitter": ^1.1.0 + "@protobufjs/fetch": ^1.1.0 + "@protobufjs/float": ^1.0.2 + "@protobufjs/inquire": ^1.1.0 + "@protobufjs/path": ^1.1.2 + "@protobufjs/pool": ^1.1.0 + "@protobufjs/utf8": ^1.1.0 + "@types/long": ^4.0.1 + "@types/node": ">=13.7.0" + long: ^4.0.0 + bin: + pbjs: bin/pbjs + pbts: bin/pbts + checksum: b2fc6a01897b016c2a7e43a854ab4a3c57080f61be41e552235436e7a730711b8e89e47cb4ae52f0f065b5ab5d5989fc932f390337ce3a8ccf07203415700850 + languageName: node + linkType: hard + "proxy-addr@npm:~2.0.7": version: 2.0.7 resolution: "proxy-addr@npm:2.0.7" @@ -11187,6 +12639,16 @@ __metadata: languageName: node linkType: hard +"pump@npm:^1.0.0": + version: 1.0.3 + resolution: "pump@npm:1.0.3" + dependencies: + end-of-stream: ^1.1.0 + once: ^1.3.1 + checksum: 61fe58694f9900020a5cf5bc765d74396891c201afecf06659df2f5874fd832be4e19e2f95cc72d8b9eb98ace0a4db3cebf7343f9fc893a930577be29e3ad8b5 + languageName: node + linkType: hard + "pump@npm:^3.0.0": version: 3.0.0 resolution: "pump@npm:3.0.0" @@ -11306,6 +12768,15 @@ __metadata: languageName: node linkType: hard +"react-native-fetch-api@npm:^3.0.0": + version: 3.0.0 + resolution: "react-native-fetch-api@npm:3.0.0" + dependencies: + p-defer: ^3.0.0 + checksum: f10f435060551c470711ba0b3663e3d49c7701aae84ea645d66992d756b13e923fb5762b324d3583d85c1c0def4138b9cc3f686bab1c1bc10d3ad82dc7175c99 + languageName: node + linkType: hard + "read-pkg-up@npm:^1.0.1": version: 1.0.1 resolution: "read-pkg-up@npm:1.0.1" @@ -11354,6 +12825,21 @@ __metadata: languageName: node linkType: hard +"readable-stream@npm:^2.3.0, readable-stream@npm:^2.3.5": + version: 2.3.8 + resolution: "readable-stream@npm:2.3.8" + dependencies: + core-util-is: ~1.0.0 + inherits: ~2.0.3 + isarray: ~1.0.0 + process-nextick-args: ~2.0.0 + safe-buffer: ~5.1.1 + string_decoder: ~1.1.1 + util-deprecate: ~1.0.1 + checksum: 65645467038704f0c8aaf026a72fbb588a9e2ef7a75cd57a01702ee9db1c4a1e4b03aaad36861a6a0926546a74d174149c8c207527963e0c2d3eee2f37678a42 + languageName: node + linkType: hard + "readable-stream@npm:^3.0.6, readable-stream@npm:^3.6.0": version: 3.6.0 resolution: "readable-stream@npm:3.6.0" @@ -11365,7 +12851,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:~1.0.15": +"readable-stream@npm:~1.0.15, readable-stream@npm:~1.0.26-4": version: 1.0.34 resolution: "readable-stream@npm:1.0.34" dependencies: @@ -11395,6 +12881,15 @@ __metadata: languageName: node linkType: hard +"receptacle@npm:^1.3.2": + version: 1.3.2 + resolution: "receptacle@npm:1.3.2" + dependencies: + ms: ^2.1.1 + checksum: 7c5011f19e6ddcb759c1e6756877cee3c9eb78fbd1278eca4572d75f74993f0ccdc1e5f7761de6e682dff5344ee94f7a69bc492e2e8eb81d8777774a2399ce9c + languageName: node + linkType: hard + "rechoir@npm:^0.6.2": version: 0.6.2 resolution: "rechoir@npm:0.6.2" @@ -11735,6 +13230,16 @@ __metadata: languageName: node linkType: hard +"restore-cursor@npm:^3.1.0": + version: 3.1.0 + resolution: "restore-cursor@npm:3.1.0" + dependencies: + onetime: ^5.1.0 + signal-exit: ^3.0.2 + checksum: f877dd8741796b909f2a82454ec111afb84eb45890eb49ac947d87991379406b3b83ff9673a46012fca0d7844bb989f45cc5b788254cf1a39b6b5a9659de0630 + languageName: node + linkType: hard + "resumer@npm:~0.0.0": version: 0.0.0 resolution: "resumer@npm:0.0.0" @@ -11751,6 +13256,13 @@ __metadata: languageName: node linkType: hard +"retimer@npm:^3.0.0": + version: 3.0.0 + resolution: "retimer@npm:3.0.0" + checksum: f88309196e9d4f2d4be0c76eafc27a9f102c74b40b391ce730785b052c345d7bd59c3e4411a4c422f89f19a42b97b28034639e2f06c63133a06ec8958e9e7516 + languageName: node + linkType: hard + "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -11787,7 +13299,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^3.0.2": +"rimraf@npm:^3.0.0, rimraf@npm:^3.0.2": version: 3.0.2 resolution: "rimraf@npm:3.0.2" dependencies: @@ -11819,7 +13331,7 @@ __metadata: languageName: node linkType: hard -"run-async@npm:^2.2.0": +"run-async@npm:^2.2.0, run-async@npm:^2.4.0": version: 2.4.1 resolution: "run-async@npm:2.4.1" checksum: a2c88aa15df176f091a2878eb840e68d0bdee319d8d97bbb89112223259cebecb94bc0defd735662b83c2f7a30bed8cddb7d1674eb48ae7322dc602b22d03797 @@ -11851,7 +13363,7 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:^6.4.0": +"rxjs@npm:^6.4.0, rxjs@npm:^6.6.0": version: 6.6.7 resolution: "rxjs@npm:6.6.7" dependencies: @@ -11999,6 +13511,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^6.1.2": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: ae47d06de28836adb9d3e25f22a92943477371292d9b665fb023fae278d345d508ca1958232af086d85e0155aee22e313e100971898bbb8d5d89b8b1d4054ca2 + languageName: node + linkType: hard + "semver@npm:^7.0.0, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7": version: 7.3.7 resolution: "semver@npm:7.3.7" @@ -12010,6 +13531,17 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.3.2": + version: 7.5.4 + resolution: "semver@npm:7.5.4" + dependencies: + lru-cache: ^6.0.0 + bin: + semver: bin/semver.js + checksum: 12d8ad952fa353b0995bf180cdac205a4068b759a140e5d3c608317098b3575ac2f1e09182206bf2eb26120e1c0ed8fb92c48c592f6099680de56bb071423ca3 + languageName: node + linkType: hard + "semver@npm:~5.4.1": version: 5.4.1 resolution: "semver@npm:5.4.1" @@ -12489,7 +14021,7 @@ __metadata: languageName: node linkType: hard -"source-map-support@npm:^0.5.13, source-map-support@npm:^0.5.16": +"source-map-support@npm:^0.5.11, source-map-support@npm:^0.5.13, source-map-support@npm:^0.5.16": version: 0.5.21 resolution: "source-map-support@npm:0.5.21" dependencies: @@ -12563,6 +14095,13 @@ __metadata: languageName: node linkType: hard +"split-ca@npm:^1.0.0": + version: 1.0.1 + resolution: "split-ca@npm:1.0.1" + checksum: 1e7409938a95ee843fe2593156a5735e6ee63772748ee448ea8477a5a3e3abde193c3325b3696e56a5aff07c7dcf6b1f6a2f2a036895b4f3afe96abb366d893f + languageName: node + linkType: hard + "split-string@npm:^3.0.1, split-string@npm:^3.0.2": version: 3.1.0 resolution: "split-string@npm:3.1.0" @@ -12642,6 +14181,15 @@ __metadata: languageName: node linkType: hard +"stream-to-it@npm:^0.2.2": + version: 0.2.4 + resolution: "stream-to-it@npm:0.2.4" + dependencies: + get-iterator: ^1.0.2 + checksum: 0725dd8ddb889829cab70b81a883d5a09cd34272ccd44fad195de9fb900a8588fbf801490b6418ae5e234c128743ad829c50cfcd6686fab3b50bb6e76d59238c + languageName: node + linkType: hard + "stream-to-pull-stream@npm:^1.7.1": version: 1.7.3 resolution: "stream-to-pull-stream@npm:1.7.3" @@ -12833,6 +14381,13 @@ __metadata: languageName: node linkType: hard +"strip-final-newline@npm:^2.0.0": + version: 2.0.0 + resolution: "strip-final-newline@npm:2.0.0" + checksum: 69412b5e25731e1938184b5d489c32e340605bb611d6140344abc3421b7f3c6f9984b21dff296dfcf056681b82caa3bb4cc996a965ce37bcfad663e92eae9c64 + languageName: node + linkType: hard + "strip-hex-prefix@npm:1.0.0": version: 1.0.0 resolution: "strip-hex-prefix@npm:1.0.0" @@ -12849,7 +14404,7 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": +"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.0.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 @@ -13016,6 +14571,33 @@ __metadata: languageName: node linkType: hard +"tar-fs@npm:~1.16.3": + version: 1.16.3 + resolution: "tar-fs@npm:1.16.3" + dependencies: + chownr: ^1.0.1 + mkdirp: ^0.5.1 + pump: ^1.0.0 + tar-stream: ^1.1.2 + checksum: 0c78aa173cde0df44e5fbbd85077240b8340444bff5ec026539e9e20806ca31b5d4b8cee58befe5c1dae7fa47cd1bb3f9a0efebf2212c2bfbad31f23de329c79 + languageName: node + linkType: hard + +"tar-stream@npm:^1.1.2": + version: 1.6.2 + resolution: "tar-stream@npm:1.6.2" + dependencies: + bl: ^1.0.0 + buffer-alloc: ^1.2.0 + end-of-stream: ^1.0.0 + fs-constants: ^1.0.0 + readable-stream: ^2.3.0 + to-buffer: ^1.1.1 + xtend: ^4.0.0 + checksum: a5d49e232d3e33321bbd150381b6a4e5046bf12b1c2618acb95435b7871efde4d98bd1891eb2200478a7142ef7e304e033eb29bbcbc90451a2cdfa1890e05245 + languageName: node + linkType: hard + "tar@npm:^4.0.2": version: 4.4.19 resolution: "tar@npm:4.4.19" @@ -13098,7 +14680,7 @@ __metadata: languageName: node linkType: hard -"through@npm:^2.3.6, through@npm:~2.3.4, through@npm:~2.3.8": +"through@npm:>=2.2.7 <3, through@npm:^2.3.6, through@npm:~2.3.4, through@npm:~2.3.8": version: 2.3.8 resolution: "through@npm:2.3.8" checksum: a38c3e059853c494af95d50c072b83f8b676a9ba2818dcc5b108ef252230735c54e0185437618596c790bbba8fcdaef5b290405981ffa09dce67b1f1bf190cbd @@ -13112,6 +14694,26 @@ __metadata: languageName: node linkType: hard +"timeout-abort-controller@npm:^2.0.0": + version: 2.0.0 + resolution: "timeout-abort-controller@npm:2.0.0" + dependencies: + abort-controller: ^3.0.0 + native-abort-controller: ^1.0.4 + retimer: ^3.0.0 + checksum: 7f57cb6d5f4dcdcefe9c89deacc70c07ecafdba32d51333eca6aaf91e70bbff7e6ad13d9c098480d27a6f360383685f84819a3f475a5cfe8d3f3c7da465d1da7 + languageName: node + linkType: hard + +"tmp-promise@npm:^3.0.2": + version: 3.0.3 + resolution: "tmp-promise@npm:3.0.3" + dependencies: + tmp: ^0.2.0 + checksum: f854f5307dcee6455927ec3da9398f139897faf715c5c6dcee6d9471ae85136983ea06662eba2edf2533bdcb0fca66d16648e79e14381e30c7fb20be9c1aa62c + languageName: node + linkType: hard + "tmp@npm:0.0.33, tmp@npm:^0.0.33": version: 0.0.33 resolution: "tmp@npm:0.0.33" @@ -13130,6 +14732,22 @@ __metadata: languageName: node linkType: hard +"tmp@npm:^0.2.0": + version: 0.2.1 + resolution: "tmp@npm:0.2.1" + dependencies: + rimraf: ^3.0.0 + checksum: 8b1214654182575124498c87ca986ac53dc76ff36e8f0e0b67139a8d221eaecfdec108c0e6ec54d76f49f1f72ab9325500b246f562b926f85bcdfca8bf35df9e + languageName: node + linkType: hard + +"to-buffer@npm:^1.1.1": + version: 1.1.1 + resolution: "to-buffer@npm:1.1.1" + checksum: 6c897f58c2bdd8b8b1645ea515297732fec6dafb089bf36d12370c102ff5d64abf2be9410e0b1b7cfc707bada22d9a4084558010bfc78dd7023748dc5dd9a1ce + languageName: node + linkType: hard + "to-fast-properties@npm:^1.0.3": version: 1.0.3 resolution: "to-fast-properties@npm:1.0.3" @@ -13344,7 +14962,7 @@ __metadata: languageName: node linkType: hard -"tsutils@npm:^3.21.0": +"tsutils@npm:^3.17.1, tsutils@npm:^3.21.0": version: 3.21.0 resolution: "tsutils@npm:3.21.0" dependencies: @@ -13431,6 +15049,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.8.1": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: d61c4b2eba24009033ae4500d7d818a94fd6d1b481a8111612ee141400d5f1db46f199c014766b9fa9b31a6a7374d96fc748c6d688a78a3ce5a33123839becb7 + languageName: node + linkType: hard + "type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" @@ -13510,6 +15135,16 @@ __metadata: languageName: node linkType: hard +"typescript@npm:^3.5.2": + version: 3.9.10 + resolution: "typescript@npm:3.9.10" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 46c842e2cd4797b88b66ef06c9c41dd21da48b95787072ccf39d5f2aa3124361bc4c966aa1c7f709fae0509614d76751455b5231b12dbb72eb97a31369e1ff92 + languageName: node + linkType: hard + "typescript@npm:^4.7.4": version: 4.7.4 resolution: "typescript@npm:4.7.4" @@ -13520,6 +15155,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@^3.5.2#~builtin": + version: 3.9.10 + resolution: "typescript@patch:typescript@npm%3A3.9.10#~builtin::version=3.9.10&hash=7ad353" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: dc7141ab555b23a8650a6787f98845fc11692063d02b75ff49433091b3af2fe3d773650dea18389d7c21f47d620fb3b110ea363dab4ab039417a6ccbbaf96fc2 + languageName: node + linkType: hard + "typescript@patch:typescript@^4.7.4#~builtin": version: 4.7.4 resolution: "typescript@patch:typescript@npm%3A4.7.4#~builtin::version=4.7.4&hash=7ad353" @@ -13583,6 +15228,15 @@ __metadata: languageName: node linkType: hard +"uint8arrays@npm:^3.0.0": + version: 3.1.1 + resolution: "uint8arrays@npm:3.1.1" + dependencies: + multiformats: ^9.4.2 + checksum: b93b6c3f0a526b116799f3a3409bd4b5d5553eb3e73e485998ece7974742254fbc0d2f7988dd21ac86c4b974552f45d9ae9cf9cba9647e529f8eb1fdd2ed84d0 + languageName: node + linkType: hard + "ultron@npm:~1.1.0": version: 1.1.1 resolution: "ultron@npm:1.1.1" @@ -13869,6 +15523,13 @@ __metadata: languageName: node linkType: hard +"varint@npm:^6.0.0": + version: 6.0.0 + resolution: "varint@npm:6.0.0" + checksum: 7684113c9d497c01e40396e50169c502eb2176203219b96e1c5ac965a3e15b4892bd22b7e48d87148e10fffe638130516b6dbeedd0efde2b2d0395aa1772eea7 + languageName: node + linkType: hard + "vary@npm:^1, vary@npm:~1.1.2": version: 1.1.2 resolution: "vary@npm:1.1.2" @@ -13887,6 +15548,15 @@ __metadata: languageName: node linkType: hard +"wcwidth@npm:^1.0.1": + version: 1.0.1 + resolution: "wcwidth@npm:1.0.1" + dependencies: + defaults: ^1.0.3 + checksum: 814e9d1ddcc9798f7377ffa448a5a3892232b9275ebb30a41b529607691c0491de47cba426e917a4d08ded3ee7e9ba2f3fe32e62ee3cd9c7d3bafb7754bd553c + languageName: node + linkType: hard + "web3-bzz@npm:1.2.11": version: 1.2.11 resolution: "web3-bzz@npm:1.2.11" @@ -14316,7 +15986,7 @@ __metadata: languageName: node linkType: hard -"which@npm:^2.0.1, which@npm:^2.0.2": +"which@npm:^2.0.0, which@npm:^2.0.1, which@npm:^2.0.2": version: 2.0.2 resolution: "which@npm:2.0.2" dependencies: @@ -14468,6 +16138,21 @@ __metadata: languageName: node linkType: hard +"ws@npm:^7.4.5": + version: 7.5.9 + resolution: "ws@npm:7.5.9" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: c3c100a181b731f40b7f2fddf004aa023f79d64f489706a28bc23ff88e87f6a64b3c6651fbec3a84a53960b75159574d7a7385709847a62ddb7ad6af76f49138 + languageName: node + linkType: hard + "ws@npm:^7.4.6": version: 7.5.8 resolution: "ws@npm:7.5.8" @@ -14593,6 +16278,13 @@ __metadata: languageName: node linkType: hard +"yaml@npm:^1.10.2, yaml@npm:^1.5.1, yaml@npm:^1.7.2": + version: 1.10.2 + resolution: "yaml@npm:1.10.2" + checksum: ce4ada136e8a78a0b08dc10b4b900936912d15de59905b2bf415b4d33c63df1d555d23acb2a41b23cf9fb5da41c256441afca3d6509de7247daa062fd2c5ea5f + languageName: node + linkType: hard + "yargs-parser@npm:13.1.2, yargs-parser@npm:^13.1.0, yargs-parser@npm:^13.1.2": version: 13.1.2 resolution: "yargs-parser@npm:13.1.2" @@ -14610,6 +16302,16 @@ __metadata: languageName: node linkType: hard +"yargs-parser@npm:^16.1.0": + version: 16.1.0 + resolution: "yargs-parser@npm:16.1.0" + dependencies: + camelcase: ^5.0.0 + decamelize: ^1.2.0 + checksum: 29d1e380e24616c67b8897c9fc2159b24418b42b6d8f91535cd504f02ba14e49d75dcd45258936f0fda58c449f441362c5bcc22f0f19cbf3a512cc4f346309fe + languageName: node + linkType: hard + "yargs-parser@npm:^2.4.1": version: 2.4.1 resolution: "yargs-parser@npm:2.4.1" From 877f01fee1f23a017df6e9f35f2305bce493758d Mon Sep 17 00:00:00 2001 From: aalavandhan1984 <6264334+aalavandhan@users.noreply.github.com> Date: Mon, 4 Sep 2023 14:15:31 -0400 Subject: [PATCH 2/3] rollover vault subgraph --- spot-contracts/deployments/mainnet.json | 4 +- .../exported-artifacts/RolloverVault.json | 865 ++++++++++++++++++ spot-subgraph/README.md | 2 + spot-subgraph/schema.graphql | 51 ++ spot-subgraph/src/data/perpetualTranche.ts | 1 + spot-subgraph/src/data/rolloverVault.ts | 104 +++ .../src/mappings/perpetualTranche.ts | 16 +- spot-subgraph/src/mappings/rebasingToken.ts | 11 + spot-subgraph/src/mappings/rolloverVault.ts | 77 ++ spot-subgraph/subgraph.template.yaml | 58 +- 10 files changed, 1174 insertions(+), 15 deletions(-) create mode 100644 spot-contracts/exported-artifacts/RolloverVault.json create mode 100644 spot-subgraph/src/data/rolloverVault.ts create mode 100644 spot-subgraph/src/mappings/rolloverVault.ts diff --git a/spot-contracts/deployments/mainnet.json b/spot-contracts/deployments/mainnet.json index 9467b846..76e026b5 100644 --- a/spot-contracts/deployments/mainnet.json +++ b/spot-contracts/deployments/mainnet.json @@ -2,9 +2,10 @@ "network": "mainnet", "startBlock": 15800099, "ampl": "0xD46bA6D942050d489DBd938a2C909A5d5039A161", - "bondFactory": "0x2b135C839d61808E1eC6F84151CD9429B0920374", + "bondFactory": "0x71868D38Ea3b3eB5e4db9a45ee355548B46c82E0", "bondIssuer": "0x85d1BA777Eb3FCBb10C82cdf3aAa8231e21B6777", "spot": "0xC1f33e0cf7e40a67375007104B929E49a581bafE", + "rolloverVault": "0x82A91a0D599A45d8E9Af781D67f695d7C72869Bd", "proxyAdmin": "0x2978B4103985A6668CE345555b0febdE64Fb092F", "router": "0x38f600e08540178719BF656e6B43FC15A529c393", "previousIssuers": [ @@ -13,6 +14,7 @@ "0x2E2E49eDCd5ce08677Bab6d791C863f1361B52F2" ], "previousBondFactories": [ + "0x2b135C839d61808E1eC6F84151CD9429B0920374", "0x72799FFD1F4CCF92eA2b1eE0CADa16a5461c4d96" ] } diff --git a/spot-contracts/exported-artifacts/RolloverVault.json b/spot-contracts/exported-artifacts/RolloverVault.json new file mode 100644 index 00000000..acac5625 --- /dev/null +++ b/spot-contracts/exported-artifacts/RolloverVault.json @@ -0,0 +1,865 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "RolloverVault", + "sourceName": "contracts/vaults/RolloverVault.sol", + "abi": [ + { + "inputs": [], + "name": "DeployedCountOverLimit", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientDeployment", + "type": "error" + }, + { + "inputs": [], + "name": "OutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "contract ITranche", + "name": "tranche", + "type": "address" + } + ], + "name": "UnacceptableTranche", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + } + ], + "name": "UnauthorizedTransferOut", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + } + ], + "name": "UnexpectedAsset", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "AssetSynced", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": 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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "HUNDRED_PERC", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_DEPLOYED_COUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERC_DECIMALS", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNIT_PERC", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "i", + "type": "uint256" + } + ], + "name": "deployedAt", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deployedCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "i", + "type": "uint256" + } + ], + "name": "earnedAt", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "earnedCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getTVL", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + } + ], + "name": "getVaultAssetValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "contract IPerpetualTranche", + "name": "perp_", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + } + ], + "name": "isVaultAsset", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minDeploymentAmt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "perp", + "outputs": [ + { + "internalType": "contract IPerpetualTranche", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + } + ], + "name": "recover", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "recover", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "recoverAndRedeploy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "notes", + "type": "uint256" + } + ], + "name": "redeem", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct IVault.TokenAmount[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "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": "", + "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": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferERC20", + "outputs": [], + "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": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "underlying", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minDeploymentAmt_", + "type": "uint256" + } + ], + "name": "updateMinDeploymentAmt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + } + ], + "name": "vaultAssetBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50614836806100206000396000f3fe608060405234801561001057600080fd5b50600436106102695760003560e01c8063715018a6116101515780639db5dbe4116100c3578063bfa4c00c11610087578063bfa4c00c146104d7578063ce746024146104eb578063db006a75146104f3578063db81d9ef14610513578063dd62ed3e14610526578063f2fde38b1461053957600080fd5b80639db5dbe414610478578063a457c2d71461048b578063a9059cbb1461049e578063b6b55f25146104b1578063bf5d2214146104c457600080fd5b806379cc67901161011557806379cc6790146104345780638456cb5914610447578063846e7e9f1461044f5780638da5cb5b1461045757806395d89b411461046857806397b3fcaa1461047057600080fd5b8063715018a61461040157806372617687146104095780637375c5d61461041157806375d5179f14610424578063775c300c1461042c57600080fd5b806339697825116101ea5780635c975abb116101ae5780635c975abb1461038b57806362b232a4146103965780636c881178146103a95780636ee5741a146103b15780636f307dc3146103c457806370a08231146103d857600080fd5b806339697825146103335780633e0a26541461033b5780633f45e08f146103665780633f4ba83a1461037057806342966c681461037857600080fd5b80632ad537e3116102315780632ad537e3146102e95780632e0cb4af146102fc578063311705aa14610303578063313ce5671461030b578063395093511461032057600080fd5b806306fdde031461026e578063095ea7b31461028c5780630cd865ec146102af57806318160ddd146102c457806323b872dd146102d6575b600080fd5b61027661054c565b6040516102839190613f90565b60405180910390f35b61029f61029a366004613fd8565b6105de565b6040519015158152602001610283565b6102c26102bd366004614004565b6105f8565b005b6035545b604051908152602001610283565b61029f6102e4366004614021565b610800565b6102c86102f7366004614004565b610826565b60016102c8565b6102c8610a5d565b60125b60405160ff9091168152602001610283565b61029f61032e366004613fd8565b610a6c565b6102c8602f81565b61034e610349366004614062565b610a8e565b6040516001600160a01b039091168152602001610283565b6102c86101305481565b6102c2610a9c565b6102c2610386366004614062565b610aae565b60c95460ff1661029f565b61029f6103a4366004614004565b610abb565b6102c8610afe565b6102c26103bf366004614132565b610b10565b61012d5461034e906001600160a01b031681565b6102c86103e6366004614004565b6001600160a01b031660009081526033602052604090205490565b6102c2610ced565b6102c2610cff565b6102c861041f366004614004565b610d0f565b61030e600681565b6102c2610d51565b6102c2610442366004613fd8565b610e5e565b6102c2610e77565b6102c8610e87565b6097546001600160a01b031661034e565b610276610e9e565b6102c8610ead565b6102c2610486366004614021565b61111d565b61029f610499366004613fd8565b611170565b61029f6104ac366004613fd8565b6111f6565b6102c86104bf366004614062565b611204565b6102c26104d2366004614062565b6112b8565b6101315461034e906001600160a01b031681565b6102c26112c6565b610506610501366004614062565b6114de565b60405161028391906141aa565b61034e610521366004614062565b6117a0565b6102c8610534366004614202565b6117d3565b6102c2610547366004614004565b6117fe565b60606036805461055b9061423b565b80601f01602080910402602001604051908101604052809291908181526020018280546105879061423b565b80156105d45780601f106105a9576101008083540402835291602001916105d4565b820191906000526020600020905b8154815290600101906020018083116105b757829003601f168201915b5050505050905090565b6000336105ec818585611874565b60019150505b92915050565b600260fb54036106235760405162461bcd60e51b815260040161061a9061426f565b60405180910390fd5b600260fb55610630611998565b61063c61012e826119de565b6106645760405163392e11a960e11b81526001600160a01b038216600482015260240161061a565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156106ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d191906142a6565b9050600081116106eb576106e482611a00565b50506107f8565b6000826001600160a01b03166364c9ec6f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561072b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074f91906142bf565b90506000610765826001600160a01b0316611ad6565b1161078357610775818484611b55565b61077e83611a00565b6107de565b600061078e82611c76565b905060005b81515160ff821610156107db576107c982600001518260ff16815181106107bc576107bc6142dc565b6020026020010151611a00565b806107d381614308565b915050610793565b50505b61012d546107f4906001600160a01b0316611d2e565b5050505b50600160fb55565b60003361080e858285611de2565b610819858585611e56565b60019150505b9392505050565b61012d546000906001600160a01b03908116908316036108a9576040516370a0823160e01b81523060048201526001600160a01b038316906370a08231906024015b602060405180830381865afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f291906142a6565b6108b561012e836119de565b15610950576000806108cf846001600160a01b0316612024565b6040516370a0823160e01b81523060048201529193509150610948906001600160a01b038616906370a0823190602401602060405180830381865afa15801561091c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094091906142a6565b839083612110565b949350505050565b610131546001600160a01b0390811690831603610a55576101315460408051633c0799bb60e21b815290516105f2926001600160a01b03169163f01e66ec91600480830192602092919082900301816000875af11580156109b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d991906142a6565b6109e56008600a61440b565b6040516370a0823160e01b81523060048201526001600160a01b038616906370a08231906024015b602060405180830381865afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e91906142a6565b9190612110565b506000919050565b610a696006600a61440b565b81565b6000336105ec818585610a7f83836117d3565b610a89919061441a565b611874565b60006105f261012e836121bf565b610aa46121cb565b610aac612225565b565b610ab83382612277565b50565b61012d546000906001600160a01b0383811691161480610ae25750610ae261012e836119de565b806105f2575050610131546001600160a01b0390811691161490565b6000610b0b61012e6123c5565b905090565b600054610100900460ff1615808015610b305750600054600160ff909116105b80610b4a5750303b158015610b4a575060005460ff166001145b610bad5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161061a565b6000805460ff191660011790558015610bd0576000805461ff0019166101001790555b610bda84846123cf565b610be2612400565b610bea612427565b610bf2612456565b610bfa612485565b816001600160a01b031663d8dfeb456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5c91906142bf565b61012d80546001600160a01b0319166001600160a01b03929092169182179055610c8590611d2e565b61013180546001600160a01b0319166001600160a01b0384161790558015610ce7576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b610cf56121cb565b610aac60006124b4565b610d076112c6565b610aac610d51565b6000610d1a82610abb565b610d255760006105f2565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401610868565b600260fb5403610d735760405162461bcd60e51b815260040161061a9061426f565b600260fb55610d80611998565b600080610e0561013160009054906101000a90046001600160a01b03166001600160a01b0316638fb69c4b6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0091906142bf565b612506565b610131549193509150600090610e24906001600160a01b03168361269f565b90506101305483111580610e36575080155b15610e545760405163167bb86960e11b815260040160405180910390fd5b5050600160fb5550565b610e69823383611de2565b610e738282612277565b5050565b610e7f6121cb565b610aac612a92565b610e936006600a61440b565b610a6990606461442d565b60606037805461055b9061423b565b61012d546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610efb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1f91906142a6565b610f29908261441a565b905060005b610f3961012e6123c5565b81101561100d576000610f4e61012e836121bf565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fbc91906142a6565b90508015610ff857600080610fd9846001600160a01b0316612024565b9092509050610fe9828483612110565b610ff3908761441a565b955050505b5050808061100590614444565b915050610f2e565b50610131546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611058573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107c91906142a6565b90508015611117576101315460408051633c0799bb60e21b8152905161110a926001600160a01b03169163f01e66ec91600480830192602092919082900301816000875af11580156110d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f691906142a6565b6111026008600a61440b565b839190612110565b611114908361441a565b91505b50919050565b6111256121cb565b61112e83610abb565b15611157576040516397f05cc560e01b81526001600160a01b038416600482015260240161061a565b61116b6001600160a01b0384168383612acf565b505050565b6000338161117e82866117d3565b9050838110156111de5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161061a565b6111eb8286868403611874565b506001949350505050565b6000336105ec818585611e56565b6000600260fb54036112285760405162461bcd60e51b815260040161061a9061426f565b600260fb55611235611998565b600061124060355490565b9050600080821161125d57611258620f42408561442d565b611271565b61127184611269610ead565b849190612110565b905061128c3361012d546001600160a01b0316903087612b32565b61012d546112a2906001600160a01b0316611d2e565b6112ac3382612b6a565b600160fb559392505050565b6112c06121cb565b61013055565b600260fb54036112e85760405162461bcd60e51b815260040161061a9061426f565b600260fb556112f5611998565b600061130261012e6123c5565b90506000811161131257506114d7565b60005b8181101561148657600061132b61012e836121bf565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611375573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139991906142a6565b9050600081116113aa575050611474565b6000826001600160a01b03166364c9ec6f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e91906142bf565b90506000611424826001600160a01b0316611ad6565b1161143957611434818484611b55565b611470565b61144d6001600160a01b0382166000612c49565b6001600160a01b0316836001600160a01b0316036114705761146e81611c76565b505b5050505b8061147e81614444565b915050611315565b50805b80156114c0576114ae6114a96114a060018461445d565b61012e906121bf565b611a00565b806114b881614470565b915050611489565b5061012d546107f8906001600160a01b0316611d2e565b600160fb55565b6060600260fb54036115025760405162461bcd60e51b815260040161061a9061426f565b600260fb5561150f611998565b600061151a60355490565b9050600061152961012e6123c5565b9050600061153882600261441a565b905060008167ffffffffffffffff8111156115555761155561407b565b60405190808252806020026020018201604052801561159a57816020015b60408051808201909152600080825260208201528152602001906001900390816115735790505b5061012d5481519192506001600160a01b03169082906000906115bf576115bf6142dc565b60209081029190910101516001600160a01b03909116905260005b83811015611634576115ee61012e826121bf565b826115fa83600161441a565b8151811061160a5761160a6142dc565b60209081029190910101516001600160a01b0390911690528061162c81614444565b9150506115da565b50610131546001600160a01b03168161164e85600161441a565b8151811061165e5761165e6142dc565b60209081029190910101516001600160a01b0390911690526116866116803390565b87612277565b60005b82811015611791576116e187868484815181106116a8576116a86142dc565b6020908102919091010151516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401610a0d565b8282815181106116f3576116f36142dc565b602090810291909101810151015261175933838381518110611717576117176142dc565b602002602001015160200151848481518110611735576117356142dc565b6020026020010151600001516001600160a01b0316612acf9092919063ffffffff16565b61177f82828151811061176e5761176e6142dc565b602002602001015160000151611d2e565b8061178981614444565b915050611689565b50600160fb5595945050505050565b600081156117c157604051632d0483c560e21b815260040160405180910390fd5b5050610131546001600160a01b031690565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6118066121cb565b6001600160a01b03811661186b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161061a565b610ab8816124b4565b6001600160a01b0383166118d65760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161061a565b6001600160a01b0382166119375760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161061a565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60c95460ff1615610aac5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161061a565b6001600160a01b0381166000908152600183016020526040812054151561081f565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611a47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a6b91906142a6565b604080516001600160a01b0385168152602081018390529192507f3498084e435368f22f5e58d4957c351579c10be5ab20874cc78c9d0e28fa0409910160405180910390a180158015611ac55750611ac561012e836119de565b15610e735761116b61012e83612cbe565b600080826001600160a01b031663d59624b46040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3b91906142a6565b9050428111611b4b57600061081f565b61081f428261445d565b826001600160a01b031663ae4e7fdf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb79190614487565b611c0f57826001600160a01b03166387b652076040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611bf657600080fd5b505af1158015611c0a573d6000803e3d6000fd5b505050505b604051630cf4838d60e21b81526001600160a01b038381166004830152602482018390528416906333d20e3490604401600060405180830381600087803b158015611c5957600080fd5b505af1158015611c6d573d6000803e3d6000fd5b50505050505050565b60408051808201909152606080825260208201526060611c9f6001600160a01b03841630612cd3565b8092508193505050600081600081518110611cbc57611cbc6142dc565b6020026020010151111561111757604051637cd7d93560e11b81526001600160a01b0384169063f9afb26a90611cf69084906004016144a9565b600060405180830381600087803b158015611d1057600080fd5b505af1158015611d24573d6000803e3d6000fd5b5050505050919050565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611d75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9991906142a6565b604080516001600160a01b0385168152602081018390529192507f3498084e435368f22f5e58d4957c351579c10be5ab20874cc78c9d0e28fa0409910160405180910390a15050565b6000611dee84846117d3565b90506000198114610ce75781811015611e495760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161061a565b610ce78484848403611874565b6001600160a01b038316611eba5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161061a565b6001600160a01b038216611f1c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161061a565b6001600160a01b03831660009081526033602052604090205481811015611f945760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161061a565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290611fcb90849061441a565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161201791815260200190565b60405180910390a3610ce7565b6000806000836001600160a01b03166364c9ec6f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612067573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208b91906142bf565b90506120aa604051806040016040528060608152602001606081525090565b6060806120b684612f1d565b9194509250905060006120c984896134b0565b60ff1690508281815181106120e0576120e06142dc565b60200260200101518282815181106120fa576120fa6142dc565b6020026020010151965096505050505050915091565b600080806000198587098587029250828110838203039150508060000361214a57838281612140576121406144ed565b049250505061081f565b80841161215657600080fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b600061081f8383613538565b6097546001600160a01b03163314610aac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061a565b61222d613562565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b0382166122d75760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161061a565b6001600160a01b0382166000908152603360205260409020548181101561234b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161061a565b6001600160a01b038316600090815260336020526040812083830390556035805484929061237a90849061445d565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60006105f2825490565b600054610100900460ff166123f65760405162461bcd60e51b815260040161061a90614503565b610e7382826135ab565b600054610100900460ff16610aac5760405162461bcd60e51b815260040161061a90614503565b600054610100900460ff1661244e5760405162461bcd60e51b815260040161061a90614503565b610aac6135eb565b600054610100900460ff1661247d5760405162461bcd60e51b815260040161061a90614503565b610aac61361b565b600054610100900460ff166124ac5760405162461bcd60e51b815260040161061a90614503565b610aac61364e565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000612525604051806040016040528060608152602001606081525090565b6000612539846001600160a01b0316613675565b61012d546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015612588573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125ac91906142a6565b9050600081116125c25750600094909350915050565b61012d546125da906001600160a01b031686836138a0565b60405163b6b55f2560e01b8152600481018290526001600160a01b0386169063b6b55f2590602401600060405180830381600087803b15801561261c57600080fd5b505af1158015612630573d6000803e3d6000fd5b5050505060005b82515160ff8216101561267f5761266d83600001518260ff1681518110612660576126606142dc565b6020026020010151613949565b8061267781614308565b915050612637565b5061012d54612696906001600160a01b0316611d2e565b94909350915050565b600080836001600160a01b031663364d22fc6040518163ffffffff1660e01b81526004016000604051808303816000875af11580156126e2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261270a919081019061454e565b905060008060005b85515160ff83161080156127265750835181105b15612a6857600086600001518360ff1681518110612746576127466142dc565b602002602001015190506000858381518110612764576127646142dc565b602002602001015190506000806001600160a01b0316826001600160a01b031603612790576000612869565b816001600160a01b03166370a082318b6001600160a01b031663cd3293de6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127dd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061280191906142bf565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015612845573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286991906142a6565b9050600081116128865761287c84614444565b9350505050612712565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa1580156128cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128f191906142a6565b90506000811161290f5761290486614308565b955050505050612712565b604051630546d26760e21b81526001600160a01b03858116600483015284811660248301526044820183905260648201849052600091908d169063151b499c9060840160a0604051808303816000875af1158015612971573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129959190614600565b80519091506129b3576129a787614308565b96505050505050612712565b6129be858d846138a0565b604051632bf8f1a560e01b81526001600160a01b0386811660048301528581166024830152604482018490528d1690632bf8f1a590606401600060405180830381600087803b158015612a1057600080fd5b505af1158015612a24573d6000803e3d6000fd5b50505050612a3185611a00565b61012d546001600160a01b03858116911614612a5057612a5084613949565b8051612a5c908961441a565b97505050505050612712565b61012d54612a7e906001600160a01b0316611d2e565b612a8787611d2e565b509095945050505050565b612a9a611998565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861225a3390565b6040516001600160a01b03831660248201526044810182905261116b90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613a50565b6040516001600160a01b0380851660248301528316604482015260648101829052610ce79085906323b872dd60e01b90608401612afb565b6001600160a01b038216612bc05760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161061a565b8060356000828254612bd2919061441a565b90915550506001600160a01b03821660009081526033602052604081208054839290612bff90849061441a565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6040516313612cb160e11b815260ff821660048201526000906001600160a01b038416906326c25962906024016040805180830381865afa158015612c92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cb69190614670565b509392505050565b600061081f836001600160a01b038416613b22565b604080518082019091526060808252602082015260606000612cf485613675565b9050600081600001515167ffffffffffffffff811115612d1657612d1661407b565b604051908082528060200260200182016040528015612d3f578160200160208202803683370190505b50905060001960005b83515160ff82161015612e9457600084600001518260ff1681518110612d7057612d706142dc565b60209081029190910101516040516370a0823160e01b81526001600160a01b038a81166004830152909116906370a0823190602401602060405180830381865afa158015612dc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612de691906142a6565b905084602001518260ff1681518110612e0157612e016142dc565b602002602001015181612e14919061469e565b612e1e908261445d565b90506000612e596103e887602001518560ff1681518110612e4157612e416142dc565b6020026020010151846121109092919063ffffffff16565b905083811015612e67578093505b83600003612e7f5750939550919350612f1692505050565b50508080612e8c90614308565b915050612d48565b5060005b83515160ff82161015612f0e57612edc826103e886602001518460ff1681518110612ec557612ec56142dc565b60200260200101516121109092919063ffffffff16565b838260ff1681518110612ef157612ef16142dc565b602090810291909101015280612f0681614308565b915050612e98565b509193509150505b9250929050565b60408051808201909152606080825260208201526060806000612f3f85613675565b9050600081600001515167ffffffffffffffff811115612f6157612f6161407b565b604051908082528060200260200182016040528015612f8a578160200160208202803683370190505b509050600082600001515167ffffffffffffffff811115612fad57612fad61407b565b604051908082528060200260200182016040528015612fd6578160200160208202803683370190505b509050866001600160a01b031663ae4e7fdf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613017573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061303b9190614487565b1561322d5760005b83515160ff82161015613220578351805160ff8316908110613067576130676142dc565b60200260200101516001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d091906142a6565b828260ff16815181106130e5576130e56142dc565b602002602001018181525050876001600160a01b031663b2016bd46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561312f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061315391906142bf565b6001600160a01b03166370a0823185600001518360ff168151811061317a5761317a6142dc565b60200260200101516040518263ffffffff1660e01b81526004016131ad91906001600160a01b0391909116815260200190565b602060405180830381865afa1580156131ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131ee91906142a6565b838260ff1681518110613203576132036142dc565b60209081029190910101528061321881614308565b915050613043565b50919450925090506134a9565b6000876001600160a01b031663b2016bd46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561326d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061329191906142bf565b6040516370a0823160e01b81526001600160a01b038a8116600483015291909116906370a0823190602401602060405180830381865afa1580156132d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132fd91906142a6565b905060006001856000015151613313919061445d565b905060005b85515160ff8216101561349d578551805160ff831690811061333c5761333c6142dc565b60200260200101516001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613381573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133a591906142a6565b848260ff16815181106133ba576133ba6142dc565b602002602001018181525050818160ff16146134685782848260ff16815181106133e6576133e66142dc565b602002602001015111156133fa5782613418565b838160ff168151811061340f5761340f6142dc565b60200260200101515b858260ff168151811061342d5761342d6142dc565b602002602001018181525050848160ff168151811061344e5761344e6142dc565b602002602001015183613461919061445d565b925061348b565b82858260ff168151811061347e5761347e6142dc565b6020026020010181815250505b8061349581614308565b915050613318565b50939650919450925050505b9193909250565b6000805b83515160ff8216101561351357826001600160a01b031684600001518260ff16815181106134e4576134e46142dc565b60200260200101516001600160a01b0316036135015790506105f2565b8061350b81614308565b9150506134b4565b50604051630993591960e41b81526001600160a01b038316600482015260240161061a565b600082600001828154811061354f5761354f6142dc565b9060005260206000200154905092915050565b60c95460ff16610aac5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161061a565b600054610100900460ff166135d25760405162461bcd60e51b815260040161061a90614503565b60366135de838261470e565b50603761116b828261470e565b600054610100900460ff166136125760405162461bcd60e51b815260040161061a90614503565b610aac336124b4565b600054610100900460ff166136425760405162461bcd60e51b815260040161061a90614503565b60c9805460ff19169055565b600054610100900460ff166114d75760405162461bcd60e51b815260040161061a90614503565b604080518082019091526060808252602082015260408051808201909152606080825260208201526000613709846001600160a01b03166359eb82246040518163ffffffff1660e01b8152600401602060405180830381865afa1580156136e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061370491906142a6565b613c15565b90508060ff1667ffffffffffffffff8111156137275761372761407b565b604051908082528060200260200182016040528015613750578160200160208202803683370190505b50825260ff811667ffffffffffffffff81111561376f5761376f61407b565b604051908082528060200260200182016040528015613798578160200160208202803683370190505b50602083015260005b8160ff168160ff161015613897576040516313612cb160e11b815260ff8216600482015260009081906001600160a01b038816906326c25962906024016040805180830381865afa1580156137fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061381e9190614670565b915091508185600001518460ff168151811061383c5761383c6142dc565b60200260200101906001600160a01b031690816001600160a01b0316815250508085602001518460ff1681518110613876576138766142dc565b6020026020010181815250505050808061388f90614308565b9150506137a1565b50909392505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa1580156138f0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061391491906142a6565b905081811015610ce7576139336001600160a01b038516846000613c7a565b610ce76001600160a01b03851684600019613c7a565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015613990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139b491906142a6565b604080516001600160a01b0385168152602081018390529192507f3498084e435368f22f5e58d4957c351579c10be5ab20874cc78c9d0e28fa0409910160405180910390a1600081118015613a125750613a1061012e836119de565b155b15610e7357613a2361012e83613d8f565b50602f613a3161012e6123c5565b1115610e7357604051633d816dad60e01b815260040160405180910390fd5b6000613aa5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613da49092919063ffffffff16565b80519091501561116b5780806020019051810190613ac39190614487565b61116b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161061a565b60008181526001830160205260408120548015613c0b576000613b4660018361445d565b8554909150600090613b5a9060019061445d565b9050818114613bbf576000866000018281548110613b7a57613b7a6142dc565b9060005260206000200154905080876000018481548110613b9d57613b9d6142dc565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613bd057613bd06147ce565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105f2565b60009150506105f2565b600060ff821115613c765760405162461bcd60e51b815260206004820152602560248201527f53616665436173743a2076616c756520646f65736e27742066697420696e2038604482015264206269747360d81b606482015260840161061a565b5090565b801580613cf45750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015613cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cf291906142a6565b155b613d5f5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161061a565b6040516001600160a01b03831660248201526044810182905261116b90849063095ea7b360e01b90606401612afb565b600061081f836001600160a01b038416613db3565b60606109488484600085613e02565b6000818152600183016020526040812054613dfa575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105f2565b5060006105f2565b606082471015613e635760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161061a565b6001600160a01b0385163b613eba5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061a565b600080866001600160a01b03168587604051613ed691906147e4565b60006040518083038185875af1925050503d8060008114613f13576040519150601f19603f3d011682016040523d82523d6000602084013e613f18565b606091505b5091509150613f28828286613f33565b979650505050505050565b60608315613f4257508161081f565b825115613f525782518084602001fd5b8160405162461bcd60e51b815260040161061a9190613f90565b60005b83811015613f87578181015183820152602001613f6f565b50506000910152565b6020815260008251806020840152613faf816040850160208701613f6c565b601f01601f19169190910160400192915050565b6001600160a01b0381168114610ab857600080fd5b60008060408385031215613feb57600080fd5b8235613ff681613fc3565b946020939093013593505050565b60006020828403121561401657600080fd5b813561081f81613fc3565b60008060006060848603121561403657600080fd5b833561404181613fc3565b9250602084013561405181613fc3565b929592945050506040919091013590565b60006020828403121561407457600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156140ba576140ba61407b565b604052919050565b600082601f8301126140d357600080fd5b813567ffffffffffffffff8111156140ed576140ed61407b565b614100601f8201601f1916602001614091565b81815284602083860101111561411557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121561414757600080fd5b833567ffffffffffffffff8082111561415f57600080fd5b61416b878388016140c2565b9450602086013591508082111561418157600080fd5b5061418e868287016140c2565b925050604084013561419f81613fc3565b809150509250925092565b602080825282518282018190526000919060409081850190868401855b828110156141f557815180516001600160a01b031685528601518685015292840192908501906001016141c7565b5091979650505050505050565b6000806040838503121561421557600080fd5b823561422081613fc3565b9150602083013561423081613fc3565b809150509250929050565b600181811c9082168061424f57607f821691505b60208210810361111757634e487b7160e01b600052602260045260246000fd5b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000602082840312156142b857600080fd5b5051919050565b6000602082840312156142d157600080fd5b815161081f81613fc3565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff810361431e5761431e6142f2565b60010192915050565b600181815b80851115614362578160001904821115614348576143486142f2565b8085161561435557918102915b93841c939080029061432c565b509250929050565b600082614379575060016105f2565b81614386575060006105f2565b816001811461439c57600281146143a6576143c2565b60019150506105f2565b60ff8411156143b7576143b76142f2565b50506001821b6105f2565b5060208310610133831016604e8410600b84101617156143e5575081810a6105f2565b6143ef8383614327565b8060001904821115614403576144036142f2565b029392505050565b600061081f60ff84168361436a565b808201808211156105f2576105f26142f2565b80820281158282048414176105f2576105f26142f2565b600060018201614456576144566142f2565b5060010190565b818103818111156105f2576105f26142f2565b60008161447f5761447f6142f2565b506000190190565b60006020828403121561449957600080fd5b8151801515811461081f57600080fd5b6020808252825182820181905260009190848201906040850190845b818110156144e1578351835292840192918401916001016144c5565b50909695505050505050565b634e487b7160e01b600052601260045260246000fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000602080838503121561456157600080fd5b825167ffffffffffffffff8082111561457957600080fd5b818501915085601f83011261458d57600080fd5b81518181111561459f5761459f61407b565b8060051b91506145b0848301614091565b81815291830184019184810190888411156145ca57600080fd5b938501935b838510156145f457845192506145e483613fc3565b82825293850193908501906145cf565b98975050505050505050565b600060a0828403121561461257600080fd5b60405160a0810181811067ffffffffffffffff821117156146355761463561407b565b806040525082518152602083015160208201526040830151604082015260608301516060820152608083015160808201528091505092915050565b6000806040838503121561468357600080fd5b825161468e81613fc3565b6020939093015192949293505050565b6000826146bb57634e487b7160e01b600052601260045260246000fd5b500690565b601f82111561116b57600081815260208120601f850160051c810160208610156146e75750805b601f850160051c820191505b81811015614706578281556001016146f3565b505050505050565b815167ffffffffffffffff8111156147285761472861407b565b61473c81614736845461423b565b846146c0565b602080601f83116001811461477157600084156147595750858301515b600019600386901b1c1916600185901b178555614706565b600085815260208120601f198616915b828110156147a057888601518255948401946001909101908401614781565b50858210156147be5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603160045260246000fd5b600082516147f6818460208701613f6c565b919091019291505056fea264697066735822122050aa6dce12bb5ea5cfcc979df3ceb4118e990f33983a2e451d1aa0f11cb961b164736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102695760003560e01c8063715018a6116101515780639db5dbe4116100c3578063bfa4c00c11610087578063bfa4c00c146104d7578063ce746024146104eb578063db006a75146104f3578063db81d9ef14610513578063dd62ed3e14610526578063f2fde38b1461053957600080fd5b80639db5dbe414610478578063a457c2d71461048b578063a9059cbb1461049e578063b6b55f25146104b1578063bf5d2214146104c457600080fd5b806379cc67901161011557806379cc6790146104345780638456cb5914610447578063846e7e9f1461044f5780638da5cb5b1461045757806395d89b411461046857806397b3fcaa1461047057600080fd5b8063715018a61461040157806372617687146104095780637375c5d61461041157806375d5179f14610424578063775c300c1461042c57600080fd5b806339697825116101ea5780635c975abb116101ae5780635c975abb1461038b57806362b232a4146103965780636c881178146103a95780636ee5741a146103b15780636f307dc3146103c457806370a08231146103d857600080fd5b806339697825146103335780633e0a26541461033b5780633f45e08f146103665780633f4ba83a1461037057806342966c681461037857600080fd5b80632ad537e3116102315780632ad537e3146102e95780632e0cb4af146102fc578063311705aa14610303578063313ce5671461030b578063395093511461032057600080fd5b806306fdde031461026e578063095ea7b31461028c5780630cd865ec146102af57806318160ddd146102c457806323b872dd146102d6575b600080fd5b61027661054c565b6040516102839190613f90565b60405180910390f35b61029f61029a366004613fd8565b6105de565b6040519015158152602001610283565b6102c26102bd366004614004565b6105f8565b005b6035545b604051908152602001610283565b61029f6102e4366004614021565b610800565b6102c86102f7366004614004565b610826565b60016102c8565b6102c8610a5d565b60125b60405160ff9091168152602001610283565b61029f61032e366004613fd8565b610a6c565b6102c8602f81565b61034e610349366004614062565b610a8e565b6040516001600160a01b039091168152602001610283565b6102c86101305481565b6102c2610a9c565b6102c2610386366004614062565b610aae565b60c95460ff1661029f565b61029f6103a4366004614004565b610abb565b6102c8610afe565b6102c26103bf366004614132565b610b10565b61012d5461034e906001600160a01b031681565b6102c86103e6366004614004565b6001600160a01b031660009081526033602052604090205490565b6102c2610ced565b6102c2610cff565b6102c861041f366004614004565b610d0f565b61030e600681565b6102c2610d51565b6102c2610442366004613fd8565b610e5e565b6102c2610e77565b6102c8610e87565b6097546001600160a01b031661034e565b610276610e9e565b6102c8610ead565b6102c2610486366004614021565b61111d565b61029f610499366004613fd8565b611170565b61029f6104ac366004613fd8565b6111f6565b6102c86104bf366004614062565b611204565b6102c26104d2366004614062565b6112b8565b6101315461034e906001600160a01b031681565b6102c26112c6565b610506610501366004614062565b6114de565b60405161028391906141aa565b61034e610521366004614062565b6117a0565b6102c8610534366004614202565b6117d3565b6102c2610547366004614004565b6117fe565b60606036805461055b9061423b565b80601f01602080910402602001604051908101604052809291908181526020018280546105879061423b565b80156105d45780601f106105a9576101008083540402835291602001916105d4565b820191906000526020600020905b8154815290600101906020018083116105b757829003601f168201915b5050505050905090565b6000336105ec818585611874565b60019150505b92915050565b600260fb54036106235760405162461bcd60e51b815260040161061a9061426f565b60405180910390fd5b600260fb55610630611998565b61063c61012e826119de565b6106645760405163392e11a960e11b81526001600160a01b038216600482015260240161061a565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156106ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d191906142a6565b9050600081116106eb576106e482611a00565b50506107f8565b6000826001600160a01b03166364c9ec6f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561072b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074f91906142bf565b90506000610765826001600160a01b0316611ad6565b1161078357610775818484611b55565b61077e83611a00565b6107de565b600061078e82611c76565b905060005b81515160ff821610156107db576107c982600001518260ff16815181106107bc576107bc6142dc565b6020026020010151611a00565b806107d381614308565b915050610793565b50505b61012d546107f4906001600160a01b0316611d2e565b5050505b50600160fb55565b60003361080e858285611de2565b610819858585611e56565b60019150505b9392505050565b61012d546000906001600160a01b03908116908316036108a9576040516370a0823160e01b81523060048201526001600160a01b038316906370a08231906024015b602060405180830381865afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f291906142a6565b6108b561012e836119de565b15610950576000806108cf846001600160a01b0316612024565b6040516370a0823160e01b81523060048201529193509150610948906001600160a01b038616906370a0823190602401602060405180830381865afa15801561091c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094091906142a6565b839083612110565b949350505050565b610131546001600160a01b0390811690831603610a55576101315460408051633c0799bb60e21b815290516105f2926001600160a01b03169163f01e66ec91600480830192602092919082900301816000875af11580156109b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d991906142a6565b6109e56008600a61440b565b6040516370a0823160e01b81523060048201526001600160a01b038616906370a08231906024015b602060405180830381865afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e91906142a6565b9190612110565b506000919050565b610a696006600a61440b565b81565b6000336105ec818585610a7f83836117d3565b610a89919061441a565b611874565b60006105f261012e836121bf565b610aa46121cb565b610aac612225565b565b610ab83382612277565b50565b61012d546000906001600160a01b0383811691161480610ae25750610ae261012e836119de565b806105f2575050610131546001600160a01b0390811691161490565b6000610b0b61012e6123c5565b905090565b600054610100900460ff1615808015610b305750600054600160ff909116105b80610b4a5750303b158015610b4a575060005460ff166001145b610bad5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161061a565b6000805460ff191660011790558015610bd0576000805461ff0019166101001790555b610bda84846123cf565b610be2612400565b610bea612427565b610bf2612456565b610bfa612485565b816001600160a01b031663d8dfeb456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5c91906142bf565b61012d80546001600160a01b0319166001600160a01b03929092169182179055610c8590611d2e565b61013180546001600160a01b0319166001600160a01b0384161790558015610ce7576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b610cf56121cb565b610aac60006124b4565b610d076112c6565b610aac610d51565b6000610d1a82610abb565b610d255760006105f2565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401610868565b600260fb5403610d735760405162461bcd60e51b815260040161061a9061426f565b600260fb55610d80611998565b600080610e0561013160009054906101000a90046001600160a01b03166001600160a01b0316638fb69c4b6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0091906142bf565b612506565b610131549193509150600090610e24906001600160a01b03168361269f565b90506101305483111580610e36575080155b15610e545760405163167bb86960e11b815260040160405180910390fd5b5050600160fb5550565b610e69823383611de2565b610e738282612277565b5050565b610e7f6121cb565b610aac612a92565b610e936006600a61440b565b610a6990606461442d565b60606037805461055b9061423b565b61012d546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610efb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1f91906142a6565b610f29908261441a565b905060005b610f3961012e6123c5565b81101561100d576000610f4e61012e836121bf565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fbc91906142a6565b90508015610ff857600080610fd9846001600160a01b0316612024565b9092509050610fe9828483612110565b610ff3908761441a565b955050505b5050808061100590614444565b915050610f2e565b50610131546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611058573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107c91906142a6565b90508015611117576101315460408051633c0799bb60e21b8152905161110a926001600160a01b03169163f01e66ec91600480830192602092919082900301816000875af11580156110d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f691906142a6565b6111026008600a61440b565b839190612110565b611114908361441a565b91505b50919050565b6111256121cb565b61112e83610abb565b15611157576040516397f05cc560e01b81526001600160a01b038416600482015260240161061a565b61116b6001600160a01b0384168383612acf565b505050565b6000338161117e82866117d3565b9050838110156111de5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161061a565b6111eb8286868403611874565b506001949350505050565b6000336105ec818585611e56565b6000600260fb54036112285760405162461bcd60e51b815260040161061a9061426f565b600260fb55611235611998565b600061124060355490565b9050600080821161125d57611258620f42408561442d565b611271565b61127184611269610ead565b849190612110565b905061128c3361012d546001600160a01b0316903087612b32565b61012d546112a2906001600160a01b0316611d2e565b6112ac3382612b6a565b600160fb559392505050565b6112c06121cb565b61013055565b600260fb54036112e85760405162461bcd60e51b815260040161061a9061426f565b600260fb556112f5611998565b600061130261012e6123c5565b90506000811161131257506114d7565b60005b8181101561148657600061132b61012e836121bf565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611375573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139991906142a6565b9050600081116113aa575050611474565b6000826001600160a01b03166364c9ec6f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e91906142bf565b90506000611424826001600160a01b0316611ad6565b1161143957611434818484611b55565b611470565b61144d6001600160a01b0382166000612c49565b6001600160a01b0316836001600160a01b0316036114705761146e81611c76565b505b5050505b8061147e81614444565b915050611315565b50805b80156114c0576114ae6114a96114a060018461445d565b61012e906121bf565b611a00565b806114b881614470565b915050611489565b5061012d546107f8906001600160a01b0316611d2e565b600160fb55565b6060600260fb54036115025760405162461bcd60e51b815260040161061a9061426f565b600260fb5561150f611998565b600061151a60355490565b9050600061152961012e6123c5565b9050600061153882600261441a565b905060008167ffffffffffffffff8111156115555761155561407b565b60405190808252806020026020018201604052801561159a57816020015b60408051808201909152600080825260208201528152602001906001900390816115735790505b5061012d5481519192506001600160a01b03169082906000906115bf576115bf6142dc565b60209081029190910101516001600160a01b03909116905260005b83811015611634576115ee61012e826121bf565b826115fa83600161441a565b8151811061160a5761160a6142dc565b60209081029190910101516001600160a01b0390911690528061162c81614444565b9150506115da565b50610131546001600160a01b03168161164e85600161441a565b8151811061165e5761165e6142dc565b60209081029190910101516001600160a01b0390911690526116866116803390565b87612277565b60005b82811015611791576116e187868484815181106116a8576116a86142dc565b6020908102919091010151516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401610a0d565b8282815181106116f3576116f36142dc565b602090810291909101810151015261175933838381518110611717576117176142dc565b602002602001015160200151848481518110611735576117356142dc565b6020026020010151600001516001600160a01b0316612acf9092919063ffffffff16565b61177f82828151811061176e5761176e6142dc565b602002602001015160000151611d2e565b8061178981614444565b915050611689565b50600160fb5595945050505050565b600081156117c157604051632d0483c560e21b815260040160405180910390fd5b5050610131546001600160a01b031690565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6118066121cb565b6001600160a01b03811661186b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161061a565b610ab8816124b4565b6001600160a01b0383166118d65760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161061a565b6001600160a01b0382166119375760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161061a565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60c95460ff1615610aac5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161061a565b6001600160a01b0381166000908152600183016020526040812054151561081f565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611a47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a6b91906142a6565b604080516001600160a01b0385168152602081018390529192507f3498084e435368f22f5e58d4957c351579c10be5ab20874cc78c9d0e28fa0409910160405180910390a180158015611ac55750611ac561012e836119de565b15610e735761116b61012e83612cbe565b600080826001600160a01b031663d59624b46040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3b91906142a6565b9050428111611b4b57600061081f565b61081f428261445d565b826001600160a01b031663ae4e7fdf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb79190614487565b611c0f57826001600160a01b03166387b652076040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611bf657600080fd5b505af1158015611c0a573d6000803e3d6000fd5b505050505b604051630cf4838d60e21b81526001600160a01b038381166004830152602482018390528416906333d20e3490604401600060405180830381600087803b158015611c5957600080fd5b505af1158015611c6d573d6000803e3d6000fd5b50505050505050565b60408051808201909152606080825260208201526060611c9f6001600160a01b03841630612cd3565b8092508193505050600081600081518110611cbc57611cbc6142dc565b6020026020010151111561111757604051637cd7d93560e11b81526001600160a01b0384169063f9afb26a90611cf69084906004016144a9565b600060405180830381600087803b158015611d1057600080fd5b505af1158015611d24573d6000803e3d6000fd5b5050505050919050565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611d75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9991906142a6565b604080516001600160a01b0385168152602081018390529192507f3498084e435368f22f5e58d4957c351579c10be5ab20874cc78c9d0e28fa0409910160405180910390a15050565b6000611dee84846117d3565b90506000198114610ce75781811015611e495760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161061a565b610ce78484848403611874565b6001600160a01b038316611eba5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161061a565b6001600160a01b038216611f1c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161061a565b6001600160a01b03831660009081526033602052604090205481811015611f945760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161061a565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290611fcb90849061441a565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161201791815260200190565b60405180910390a3610ce7565b6000806000836001600160a01b03166364c9ec6f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612067573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208b91906142bf565b90506120aa604051806040016040528060608152602001606081525090565b6060806120b684612f1d565b9194509250905060006120c984896134b0565b60ff1690508281815181106120e0576120e06142dc565b60200260200101518282815181106120fa576120fa6142dc565b6020026020010151965096505050505050915091565b600080806000198587098587029250828110838203039150508060000361214a57838281612140576121406144ed565b049250505061081f565b80841161215657600080fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b600061081f8383613538565b6097546001600160a01b03163314610aac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061a565b61222d613562565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b0382166122d75760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161061a565b6001600160a01b0382166000908152603360205260409020548181101561234b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161061a565b6001600160a01b038316600090815260336020526040812083830390556035805484929061237a90849061445d565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60006105f2825490565b600054610100900460ff166123f65760405162461bcd60e51b815260040161061a90614503565b610e7382826135ab565b600054610100900460ff16610aac5760405162461bcd60e51b815260040161061a90614503565b600054610100900460ff1661244e5760405162461bcd60e51b815260040161061a90614503565b610aac6135eb565b600054610100900460ff1661247d5760405162461bcd60e51b815260040161061a90614503565b610aac61361b565b600054610100900460ff166124ac5760405162461bcd60e51b815260040161061a90614503565b610aac61364e565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000612525604051806040016040528060608152602001606081525090565b6000612539846001600160a01b0316613675565b61012d546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015612588573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125ac91906142a6565b9050600081116125c25750600094909350915050565b61012d546125da906001600160a01b031686836138a0565b60405163b6b55f2560e01b8152600481018290526001600160a01b0386169063b6b55f2590602401600060405180830381600087803b15801561261c57600080fd5b505af1158015612630573d6000803e3d6000fd5b5050505060005b82515160ff8216101561267f5761266d83600001518260ff1681518110612660576126606142dc565b6020026020010151613949565b8061267781614308565b915050612637565b5061012d54612696906001600160a01b0316611d2e565b94909350915050565b600080836001600160a01b031663364d22fc6040518163ffffffff1660e01b81526004016000604051808303816000875af11580156126e2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261270a919081019061454e565b905060008060005b85515160ff83161080156127265750835181105b15612a6857600086600001518360ff1681518110612746576127466142dc565b602002602001015190506000858381518110612764576127646142dc565b602002602001015190506000806001600160a01b0316826001600160a01b031603612790576000612869565b816001600160a01b03166370a082318b6001600160a01b031663cd3293de6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127dd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061280191906142bf565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015612845573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061286991906142a6565b9050600081116128865761287c84614444565b9350505050612712565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa1580156128cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128f191906142a6565b90506000811161290f5761290486614308565b955050505050612712565b604051630546d26760e21b81526001600160a01b03858116600483015284811660248301526044820183905260648201849052600091908d169063151b499c9060840160a0604051808303816000875af1158015612971573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129959190614600565b80519091506129b3576129a787614308565b96505050505050612712565b6129be858d846138a0565b604051632bf8f1a560e01b81526001600160a01b0386811660048301528581166024830152604482018490528d1690632bf8f1a590606401600060405180830381600087803b158015612a1057600080fd5b505af1158015612a24573d6000803e3d6000fd5b50505050612a3185611a00565b61012d546001600160a01b03858116911614612a5057612a5084613949565b8051612a5c908961441a565b97505050505050612712565b61012d54612a7e906001600160a01b0316611d2e565b612a8787611d2e565b509095945050505050565b612a9a611998565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861225a3390565b6040516001600160a01b03831660248201526044810182905261116b90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613a50565b6040516001600160a01b0380851660248301528316604482015260648101829052610ce79085906323b872dd60e01b90608401612afb565b6001600160a01b038216612bc05760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161061a565b8060356000828254612bd2919061441a565b90915550506001600160a01b03821660009081526033602052604081208054839290612bff90849061441a565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6040516313612cb160e11b815260ff821660048201526000906001600160a01b038416906326c25962906024016040805180830381865afa158015612c92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cb69190614670565b509392505050565b600061081f836001600160a01b038416613b22565b604080518082019091526060808252602082015260606000612cf485613675565b9050600081600001515167ffffffffffffffff811115612d1657612d1661407b565b604051908082528060200260200182016040528015612d3f578160200160208202803683370190505b50905060001960005b83515160ff82161015612e9457600084600001518260ff1681518110612d7057612d706142dc565b60209081029190910101516040516370a0823160e01b81526001600160a01b038a81166004830152909116906370a0823190602401602060405180830381865afa158015612dc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612de691906142a6565b905084602001518260ff1681518110612e0157612e016142dc565b602002602001015181612e14919061469e565b612e1e908261445d565b90506000612e596103e887602001518560ff1681518110612e4157612e416142dc565b6020026020010151846121109092919063ffffffff16565b905083811015612e67578093505b83600003612e7f5750939550919350612f1692505050565b50508080612e8c90614308565b915050612d48565b5060005b83515160ff82161015612f0e57612edc826103e886602001518460ff1681518110612ec557612ec56142dc565b60200260200101516121109092919063ffffffff16565b838260ff1681518110612ef157612ef16142dc565b602090810291909101015280612f0681614308565b915050612e98565b509193509150505b9250929050565b60408051808201909152606080825260208201526060806000612f3f85613675565b9050600081600001515167ffffffffffffffff811115612f6157612f6161407b565b604051908082528060200260200182016040528015612f8a578160200160208202803683370190505b509050600082600001515167ffffffffffffffff811115612fad57612fad61407b565b604051908082528060200260200182016040528015612fd6578160200160208202803683370190505b509050866001600160a01b031663ae4e7fdf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613017573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061303b9190614487565b1561322d5760005b83515160ff82161015613220578351805160ff8316908110613067576130676142dc565b60200260200101516001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d091906142a6565b828260ff16815181106130e5576130e56142dc565b602002602001018181525050876001600160a01b031663b2016bd46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561312f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061315391906142bf565b6001600160a01b03166370a0823185600001518360ff168151811061317a5761317a6142dc565b60200260200101516040518263ffffffff1660e01b81526004016131ad91906001600160a01b0391909116815260200190565b602060405180830381865afa1580156131ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131ee91906142a6565b838260ff1681518110613203576132036142dc565b60209081029190910101528061321881614308565b915050613043565b50919450925090506134a9565b6000876001600160a01b031663b2016bd46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561326d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061329191906142bf565b6040516370a0823160e01b81526001600160a01b038a8116600483015291909116906370a0823190602401602060405180830381865afa1580156132d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132fd91906142a6565b905060006001856000015151613313919061445d565b905060005b85515160ff8216101561349d578551805160ff831690811061333c5761333c6142dc565b60200260200101516001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613381573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133a591906142a6565b848260ff16815181106133ba576133ba6142dc565b602002602001018181525050818160ff16146134685782848260ff16815181106133e6576133e66142dc565b602002602001015111156133fa5782613418565b838160ff168151811061340f5761340f6142dc565b60200260200101515b858260ff168151811061342d5761342d6142dc565b602002602001018181525050848160ff168151811061344e5761344e6142dc565b602002602001015183613461919061445d565b925061348b565b82858260ff168151811061347e5761347e6142dc565b6020026020010181815250505b8061349581614308565b915050613318565b50939650919450925050505b9193909250565b6000805b83515160ff8216101561351357826001600160a01b031684600001518260ff16815181106134e4576134e46142dc565b60200260200101516001600160a01b0316036135015790506105f2565b8061350b81614308565b9150506134b4565b50604051630993591960e41b81526001600160a01b038316600482015260240161061a565b600082600001828154811061354f5761354f6142dc565b9060005260206000200154905092915050565b60c95460ff16610aac5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161061a565b600054610100900460ff166135d25760405162461bcd60e51b815260040161061a90614503565b60366135de838261470e565b50603761116b828261470e565b600054610100900460ff166136125760405162461bcd60e51b815260040161061a90614503565b610aac336124b4565b600054610100900460ff166136425760405162461bcd60e51b815260040161061a90614503565b60c9805460ff19169055565b600054610100900460ff166114d75760405162461bcd60e51b815260040161061a90614503565b604080518082019091526060808252602082015260408051808201909152606080825260208201526000613709846001600160a01b03166359eb82246040518163ffffffff1660e01b8152600401602060405180830381865afa1580156136e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061370491906142a6565b613c15565b90508060ff1667ffffffffffffffff8111156137275761372761407b565b604051908082528060200260200182016040528015613750578160200160208202803683370190505b50825260ff811667ffffffffffffffff81111561376f5761376f61407b565b604051908082528060200260200182016040528015613798578160200160208202803683370190505b50602083015260005b8160ff168160ff161015613897576040516313612cb160e11b815260ff8216600482015260009081906001600160a01b038816906326c25962906024016040805180830381865afa1580156137fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061381e9190614670565b915091508185600001518460ff168151811061383c5761383c6142dc565b60200260200101906001600160a01b031690816001600160a01b0316815250508085602001518460ff1681518110613876576138766142dc565b6020026020010181815250505050808061388f90614308565b9150506137a1565b50909392505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa1580156138f0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061391491906142a6565b905081811015610ce7576139336001600160a01b038516846000613c7a565b610ce76001600160a01b03851684600019613c7a565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015613990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139b491906142a6565b604080516001600160a01b0385168152602081018390529192507f3498084e435368f22f5e58d4957c351579c10be5ab20874cc78c9d0e28fa0409910160405180910390a1600081118015613a125750613a1061012e836119de565b155b15610e7357613a2361012e83613d8f565b50602f613a3161012e6123c5565b1115610e7357604051633d816dad60e01b815260040160405180910390fd5b6000613aa5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613da49092919063ffffffff16565b80519091501561116b5780806020019051810190613ac39190614487565b61116b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161061a565b60008181526001830160205260408120548015613c0b576000613b4660018361445d565b8554909150600090613b5a9060019061445d565b9050818114613bbf576000866000018281548110613b7a57613b7a6142dc565b9060005260206000200154905080876000018481548110613b9d57613b9d6142dc565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613bd057613bd06147ce565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105f2565b60009150506105f2565b600060ff821115613c765760405162461bcd60e51b815260206004820152602560248201527f53616665436173743a2076616c756520646f65736e27742066697420696e2038604482015264206269747360d81b606482015260840161061a565b5090565b801580613cf45750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015613cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cf291906142a6565b155b613d5f5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161061a565b6040516001600160a01b03831660248201526044810182905261116b90849063095ea7b360e01b90606401612afb565b600061081f836001600160a01b038416613db3565b60606109488484600085613e02565b6000818152600183016020526040812054613dfa575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105f2565b5060006105f2565b606082471015613e635760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161061a565b6001600160a01b0385163b613eba5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061a565b600080866001600160a01b03168587604051613ed691906147e4565b60006040518083038185875af1925050503d8060008114613f13576040519150601f19603f3d011682016040523d82523d6000602084013e613f18565b606091505b5091509150613f28828286613f33565b979650505050505050565b60608315613f4257508161081f565b825115613f525782518084602001fd5b8160405162461bcd60e51b815260040161061a9190613f90565b60005b83811015613f87578181015183820152602001613f6f565b50506000910152565b6020815260008251806020840152613faf816040850160208701613f6c565b601f01601f19169190910160400192915050565b6001600160a01b0381168114610ab857600080fd5b60008060408385031215613feb57600080fd5b8235613ff681613fc3565b946020939093013593505050565b60006020828403121561401657600080fd5b813561081f81613fc3565b60008060006060848603121561403657600080fd5b833561404181613fc3565b9250602084013561405181613fc3565b929592945050506040919091013590565b60006020828403121561407457600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156140ba576140ba61407b565b604052919050565b600082601f8301126140d357600080fd5b813567ffffffffffffffff8111156140ed576140ed61407b565b614100601f8201601f1916602001614091565b81815284602083860101111561411557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121561414757600080fd5b833567ffffffffffffffff8082111561415f57600080fd5b61416b878388016140c2565b9450602086013591508082111561418157600080fd5b5061418e868287016140c2565b925050604084013561419f81613fc3565b809150509250925092565b602080825282518282018190526000919060409081850190868401855b828110156141f557815180516001600160a01b031685528601518685015292840192908501906001016141c7565b5091979650505050505050565b6000806040838503121561421557600080fd5b823561422081613fc3565b9150602083013561423081613fc3565b809150509250929050565b600181811c9082168061424f57607f821691505b60208210810361111757634e487b7160e01b600052602260045260246000fd5b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000602082840312156142b857600080fd5b5051919050565b6000602082840312156142d157600080fd5b815161081f81613fc3565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff810361431e5761431e6142f2565b60010192915050565b600181815b80851115614362578160001904821115614348576143486142f2565b8085161561435557918102915b93841c939080029061432c565b509250929050565b600082614379575060016105f2565b81614386575060006105f2565b816001811461439c57600281146143a6576143c2565b60019150506105f2565b60ff8411156143b7576143b76142f2565b50506001821b6105f2565b5060208310610133831016604e8410600b84101617156143e5575081810a6105f2565b6143ef8383614327565b8060001904821115614403576144036142f2565b029392505050565b600061081f60ff84168361436a565b808201808211156105f2576105f26142f2565b80820281158282048414176105f2576105f26142f2565b600060018201614456576144566142f2565b5060010190565b818103818111156105f2576105f26142f2565b60008161447f5761447f6142f2565b506000190190565b60006020828403121561449957600080fd5b8151801515811461081f57600080fd5b6020808252825182820181905260009190848201906040850190845b818110156144e1578351835292840192918401916001016144c5565b50909695505050505050565b634e487b7160e01b600052601260045260246000fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000602080838503121561456157600080fd5b825167ffffffffffffffff8082111561457957600080fd5b818501915085601f83011261458d57600080fd5b81518181111561459f5761459f61407b565b8060051b91506145b0848301614091565b81815291830184019184810190888411156145ca57600080fd5b938501935b838510156145f457845192506145e483613fc3565b82825293850193908501906145cf565b98975050505050505050565b600060a0828403121561461257600080fd5b60405160a0810181811067ffffffffffffffff821117156146355761463561407b565b806040525082518152602083015160208201526040830151604082015260608301516060820152608083015160808201528091505092915050565b6000806040838503121561468357600080fd5b825161468e81613fc3565b6020939093015192949293505050565b6000826146bb57634e487b7160e01b600052601260045260246000fd5b500690565b601f82111561116b57600081815260208120601f850160051c810160208610156146e75750805b601f850160051c820191505b81811015614706578281556001016146f3565b505050505050565b815167ffffffffffffffff8111156147285761472861407b565b61473c81614736845461423b565b846146c0565b602080601f83116001811461477157600084156147595750858301515b600019600386901b1c1916600185901b178555614706565b600085815260208120601f198616915b828110156147a057888601518255948401946001909101908401614781565b50858210156147be5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603160045260246000fd5b600082516147f6818460208701613f6c565b919091019291505056fea264697066735822122050aa6dce12bb5ea5cfcc979df3ceb4118e990f33983a2e451d1aa0f11cb961b164736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/spot-subgraph/README.md b/spot-subgraph/README.md index 23d3a7b2..087faa33 100644 --- a/spot-subgraph/README.md +++ b/spot-subgraph/README.md @@ -17,6 +17,8 @@ cd graph-node/docker # update docker-compose.yaml with alchemy rpc endpoint docker-compose up + +# NOTE: Ensure that the docker container is able to access the internet ``` Setup project: diff --git a/spot-subgraph/schema.graphql b/spot-subgraph/schema.graphql index 41afae68..ee9c3a76 100644 --- a/spot-subgraph/schema.graphql +++ b/spot-subgraph/schema.graphql @@ -229,4 +229,55 @@ type PerpetualTrancheReserveAsset @entity { " balance held by the reserve " balance: BigDecimal! +} + + +type RolloverVault @entity { + " vault token address " + id: ID! + + " reference to the ERC20 token attributes " + token: Token! + + " reference to the underlying collateral token" + underlying: Token! + + " reference to the perp on which rollovers are performed" + perp: PerpetualTranche! + + " address of the owner " + owner: String! + + " reference to assets held in by the vault " + assets: [RolloverVaultAsset!]! @derivedFrom(field: "vault") + + " the total fixed mc share of underlying tokens in the system " + totalUnderlyingScaledHeld: BigDecimal! + + " the total fixed mc share of underlying tokens deposited by each user " + scaledUnderlyingBalances: [ScaledUnderlyingVaultBalance!]! @derivedFrom(field: "vault") +} + +type ScaledUnderlyingVaultBalance @entity { + id: ID! + vault: RolloverVault! + account: Bytes! + value: BigDecimal! +} + +type RolloverVaultAsset @entity { + " Equals to: -" + id: ID! + + " reference to the vault " + vault: RolloverVault! + + " reference to the asset token " + token: Token! + + " reference to the underlying tranche " + tranche: Tranche + + " balance held by the vault " + balance: BigDecimal! } \ No newline at end of file diff --git a/spot-subgraph/src/data/perpetualTranche.ts b/spot-subgraph/src/data/perpetualTranche.ts index 87d80dbf..9cc1b866 100644 --- a/spot-subgraph/src/data/perpetualTranche.ts +++ b/spot-subgraph/src/data/perpetualTranche.ts @@ -90,6 +90,7 @@ export function fetchPerpetualTrancheReserveAsset( reserveToken.perp = perpId reserveToken.token = tokenId reserveToken.balance = BIGDECIMAL_ZERO + // if the reserve asset isn't the underlying collateral, we infer its a tranche if (tokenAddress != collateralAddress) { reserveToken.tranche = tokenId } diff --git a/spot-subgraph/src/data/rolloverVault.ts b/spot-subgraph/src/data/rolloverVault.ts new file mode 100644 index 00000000..0834b3f2 --- /dev/null +++ b/spot-subgraph/src/data/rolloverVault.ts @@ -0,0 +1,104 @@ +import { BigInt, Address, DataSourceContext } from '@graphprotocol/graph-ts' +import { + RolloverVault, + RolloverVaultAsset, + ScaledUnderlyingVaultBalance, +} from '../../generated/schema' +import { RolloverVault as RolloverVaultABI } from '../../generated/RolloverVault/RolloverVault' +import { ERC20 as ERC20ABI } from '../../generated/BondFactory/ERC20' +import { RebasingToken as RebasingTokenTemplate } from '../../generated/templates' +import { + ADDRESS_ZERO, + BIGDECIMAL_ZERO, + stringToAddress, + formatBalance, +} from '../utils' +import { fetchPerpetualTranche } from './perpetualTranche' +import { fetchToken } from './token' + +export function refreshRolloverVaultStore(vault: RolloverVault): void { + let address = stringToAddress(vault.id) + let vaultContract = RolloverVaultABI.bind(address) + let decimals = BigInt.fromI32(vaultContract.decimals()) + + let underlyingAddress = vaultContract.underlying() + let underlying = fetchToken(underlyingAddress) + vault.underlying = underlying.id + + let perpAddress = vaultContract.perp() + let perp = fetchPerpetualTranche(perpAddress) + vault.perp = perp.id + + vault.owner = vaultContract.owner().toHexString() + vault.save() + + let underlyingContract = ERC20ABI.bind(underlyingAddress) + let underlyingAsset = fetchRolloverVaultAsset(address, underlyingAddress) + underlyingAsset.balance = formatBalance( + underlyingContract.balanceOf(address), + decimals, + ) + underlyingAsset.save() +} + +export function fetchRolloverVault(address: Address): RolloverVault { + let id = address.toHexString() + let vault = RolloverVault.load(id) + if (vault == null) { + let vaultToken = fetchToken(address) + vault = new RolloverVault(id) + vault.token = vaultToken.id + vault.totalUnderlyingScaledHeld = BIGDECIMAL_ZERO + refreshRolloverVaultStore(vault as RolloverVault) + + let underlyingContext = new DataSourceContext() + underlyingContext.setString('vault', id) + RebasingTokenTemplate.createWithContext( + stringToAddress(vault.underlying), + underlyingContext, + ) + vault.save() + } + + return vault as RolloverVault +} + +export function fetchRolloverVaultAsset( + vaultAddress: Address, + tokenAddress: Address, +): RolloverVaultAsset { + let vaultId = vaultAddress.toHexString() + let tokenId = tokenAddress.toHexString() + let id = vaultId.concat('-').concat(tokenId) + let assetToken = RolloverVaultAsset.load(id) + if (assetToken === null) { + let vaultContract = RolloverVaultABI.bind(vaultAddress) + let underlyingAddress = vaultContract.underlying() + let perpAddress = vaultContract.perp() + assetToken = new RolloverVaultAsset(id) + assetToken.vault = vaultId + assetToken.token = tokenId + assetToken.balance = BIGDECIMAL_ZERO + // if the vault asset isn't perp or the underlying, we infer its a tranche + if (tokenAddress != underlyingAddress && tokenAddress != perpAddress) { + assetToken.tranche = tokenId + } + assetToken.save() + } + return assetToken as RolloverVaultAsset +} + +export function fetchScaledUnderlyingVaultBalance( + vault: RolloverVault, + account: Address, +): ScaledUnderlyingVaultBalance { + let id = vault.id.concat('|').concat(account.toHexString()) + let balance = ScaledUnderlyingVaultBalance.load(id) + if (balance == null) { + balance = new ScaledUnderlyingVaultBalance(id) + balance.vault = vault.id + balance.account = account + balance.value = BIGDECIMAL_ZERO + } + return balance as ScaledUnderlyingVaultBalance +} diff --git a/spot-subgraph/src/mappings/perpetualTranche.ts b/spot-subgraph/src/mappings/perpetualTranche.ts index c43ffbfc..4c30fba7 100644 --- a/spot-subgraph/src/mappings/perpetualTranche.ts +++ b/spot-subgraph/src/mappings/perpetualTranche.ts @@ -13,21 +13,31 @@ import { fetchBond } from '../data/buttonTranche' import { fetchToken } from '../data/token' import { formatBalance } from '../utils' -export function handleGenericStorageUpdate(event: ethereum.Event): void { +export function handleGenericStorageUpdateViaEvent( + event: ethereum.Event, +): void { log.debug('triggered handleGenericStorageUpdate', []) refreshPerpetualTrancheStore(fetchPerpetualTranche(event.address)) } +export function handleGenericStorageUpdateViaCall(call: ethereum.Call): void { + log.debug('triggered handleGenericStorageUpdate', []) + refreshPerpetualTrancheStore(fetchPerpetualTranche(call.to)) +} + export function handleReserveSynced(event: ReserveSynced): void { log.debug('triggered handleReserveSynced', []) let perp = fetchPerpetualTranche(event.address) - let perpToken = fetchToken(event.address) + let reserveToken = fetchToken(event.params.token) let reserveAsset = fetchPerpetualTrancheReserveAsset( event.address, event.params.token, ) - reserveAsset.balance = formatBalance(event.params.balance, perpToken.decimals) + reserveAsset.balance = formatBalance( + event.params.balance, + reserveToken.decimals, + ) reserveAsset.save() } diff --git a/spot-subgraph/src/mappings/rebasingToken.ts b/spot-subgraph/src/mappings/rebasingToken.ts index 6168b6e8..f55772cf 100644 --- a/spot-subgraph/src/mappings/rebasingToken.ts +++ b/spot-subgraph/src/mappings/rebasingToken.ts @@ -9,6 +9,10 @@ import { fetchPerpetualTranche, refreshPerpetualTrancheStore, } from '../data/perpetualTranche' +import { + fetchRolloverVault, + refreshRolloverVaultStore, +} from '../data/rolloverVault' import { stringToAddress } from '../utils' function _handleRebase(address: Address): void { @@ -29,6 +33,13 @@ function _handleRebase(address: Address): void { let perp = fetchPerpetualTranche(stringToAddress(perpId)) refreshPerpetualTrancheStore(perp) } + + if (context.get('vault') != null) { + let vaultId = context.getString('vault') + log.debug('vaultRefresh: {}', [vaultId]) + let vault = fetchRolloverVault(stringToAddress(vaultId)) + refreshRolloverVaultStore(vault) + } } export function handleRebase(event: Rebase): void { diff --git a/spot-subgraph/src/mappings/rolloverVault.ts b/spot-subgraph/src/mappings/rolloverVault.ts new file mode 100644 index 00000000..12a912cb --- /dev/null +++ b/spot-subgraph/src/mappings/rolloverVault.ts @@ -0,0 +1,77 @@ +import { log, ethereum } from '@graphprotocol/graph-ts' +import { + DepositCall, + RedeemCall, + AssetSynced, +} from '../../generated/RolloverVault/RolloverVault' +import { RebasingERC20 as RebasingERC20ABI } from '../../generated/templates/RebasingToken/RebasingERC20' +import { + fetchRolloverVault, + fetchScaledUnderlyingVaultBalance, + refreshRolloverVaultStore, + fetchRolloverVaultAsset, +} from '../data/rolloverVault' +import { fetchToken } from '../data/token' +import { formatBalance, stringToAddress } from '../utils' + +export function handleGenericStorageUpdateViaEvent( + event: ethereum.Event, +): void { + log.debug('triggered handleGenericStorageUpdate', []) + refreshRolloverVaultStore(fetchRolloverVault(event.address)) +} + +export function handleGenericStorageUpdateViaCall(call: ethereum.Call): void { + log.debug('triggered handleGenericStorageUpdate', []) + refreshRolloverVaultStore(fetchRolloverVault(call.to)) +} + +export function handleDeposit(call: DepositCall): void { + log.debug('triggered deposit', []) + let vault = fetchRolloverVault(call.to) + let underlyingToken = fetchToken(stringToAddress(vault.underlying)) + let tokenContract = RebasingERC20ABI.bind(stringToAddress(vault.underlying)) + let amountIn = formatBalance(call.inputs.amount, underlyingToken.decimals) + let scaledAmountIn = amountIn + .times(tokenContract.scaledTotalSupply().toBigDecimal()) + .div(tokenContract.totalSupply().toBigDecimal()) + vault.totalUnderlyingScaledHeld = vault.totalUnderlyingScaledHeld.plus( + scaledAmountIn, + ) + vault.save() + + let userBalance = fetchScaledUnderlyingVaultBalance(vault, call.from) + userBalance.value = userBalance.value.plus(scaledAmountIn) + userBalance.save() +} + +export function handleRedeem(call: RedeemCall): void { + log.debug('triggered redeem', []) + let vault = fetchRolloverVault(call.to) + let vaultToken = fetchToken(stringToAddress(vault.token)) + let tokenContract = RebasingERC20ABI.bind(stringToAddress(vault.underlying)) + let notesOut = formatBalance(call.inputs.notes, vaultToken.decimals) + let scaledAmountOut = vault.totalUnderlyingScaledHeld + .times(notesOut) + .div(vaultToken.totalSupply) + vault.totalUnderlyingScaledHeld = vault.totalUnderlyingScaledHeld.minus( + scaledAmountOut, + ) + vault.save() + + let userBalance = fetchScaledUnderlyingVaultBalance(vault, call.from) + userBalance.value = userBalance.value.minus(scaledAmountOut) + userBalance.save() +} + +export function handleAssetSynced(event: AssetSynced): void { + log.debug('triggered AssetSynced', []) + let vault = fetchRolloverVault(event.address) + let assetToken = fetchToken(event.params.token) + let reserveAsset = fetchRolloverVaultAsset(event.address, event.params.token) + reserveAsset.balance = formatBalance( + event.params.balance, + assetToken.decimals, + ) + reserveAsset.save() +} diff --git a/spot-subgraph/subgraph.template.yaml b/spot-subgraph/subgraph.template.yaml index a157a023..be7d7278 100644 --- a/spot-subgraph/subgraph.template.yaml +++ b/spot-subgraph/subgraph.template.yaml @@ -10,7 +10,6 @@ dataSources: network: {{ network }} source: abi: BondFactory - address: "{{ bondFactory }}" startBlock: {{ startBlock }} mapping: kind: ethereum/events @@ -35,7 +34,6 @@ dataSources: network: {{ network }} source: abi: BondIssuer - address: "{{ bondIssuer }}" startBlock: {{ startBlock }} mapping: kind: ethereum/events @@ -54,7 +52,7 @@ dataSources: file: ./src/mappings/bondIssuer.ts - kind: ethereum/contract - name: Spot + name: PerpetualTranche network: {{ network }} source: abi: PerpetualTranche @@ -87,29 +85,65 @@ dataSources: file: ../spot-contracts/external-artifacts/RebasingERC20ABI.json eventHandlers: - event: UpdatedKeeper(address,address) - handler: handleGenericStorageUpdate + handler: handleGenericStorageUpdateViaEvent - event: UpdatedBondIssuer(address) - handler: handleGenericStorageUpdate + handler: handleGenericStorageUpdateViaEvent - event: UpdatedFeeStrategy(address) - handler: handleGenericStorageUpdate + handler: handleGenericStorageUpdateViaEvent - event: UpdatedPricingStrategy(address) - handler: handleGenericStorageUpdate + handler: handleGenericStorageUpdateViaEvent - event: UpdatedDiscountStrategy(address) - handler: handleGenericStorageUpdate + handler: handleGenericStorageUpdateViaEvent - event: UpdatedTolerableTrancheMaturity(uint256,uint256) - handler: handleGenericStorageUpdate + handler: handleGenericStorageUpdateViaEvent - event: UpdatedMintingLimits(uint256,uint256) - handler: handleGenericStorageUpdate + handler: handleGenericStorageUpdateViaEvent - event: UpdatedMatureValueTargetPerc(uint256) - handler: handleGenericStorageUpdate + handler: handleGenericStorageUpdateViaEvent - event: ReserveSynced(address,uint256) handler: handleReserveSynced - event: UpdatedDepositBond(address) handler: handleUpdatedDepositBond - event: UpdatedMatureTrancheBalance(uint256) handler: handleUpdatedMatureTrancheBalance + callHandlers: + - function: init(string,string,address,address,address,address,address) + handler: handleGenericStorageUpdateViaCall file: ./src/mappings/perpetualTranche.ts + - kind: ethereum/contract + name: RolloverVault + network: {{ network }} + source: + abi: RolloverVault + address: "{{ rolloverVault }}" + startBlock: {{ startBlock }} + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + entities: + - AssetSynced + abis: + - name: RolloverVault + file: ../spot-contracts/exported-artifacts/RolloverVault.json + - name: ERC20 + file: ../spot-contracts/external-artifacts/ERC20ABI.json + - name: RebasingERC20 + file: ../spot-contracts/external-artifacts/RebasingERC20ABI.json + eventHandlers: + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleGenericStorageUpdateViaEvent + - event: AssetSynced(address,uint256) + handler: handleAssetSynced + callHandlers: + - function: init(string,string,address) + handler: handleGenericStorageUpdateViaCall + - function: deposit(uint256) + handler: handleDeposit + - function: redeem(uint256) + handler: handleRedeem + file: ./src/mappings/rolloverVault.ts templates: - kind: ethereum/contract name: BondController @@ -181,6 +215,8 @@ templates: abis: - name: PerpetualTranche file: ../spot-contracts/exported-artifacts/PerpetualTranche.json + - name: RolloverVault + file: ../spot-contracts/exported-artifacts/RolloverVault.json - name: BondController file: ../spot-contracts/external-artifacts/BondController.json - name: ERC20 From ff1766986e14c33e24f3837a97e9464786e1bc97 Mon Sep 17 00:00:00 2001 From: aalavandhann <6264334+aalavandhan@users.noreply.github.com> Date: Mon, 4 Sep 2023 20:22:02 -0400 Subject: [PATCH 3/3] fixed hold amt math --- spot-contracts/deployments/goerli.json | 3 --- spot-contracts/deployments/mainnet.json | 5 +---- spot-subgraph/README.md | 1 - spot-subgraph/package.json | 1 + spot-subgraph/scripts/deploy-local.sh | 2 +- spot-subgraph/scripts/deploy.sh | 2 +- spot-subgraph/src/mappings/rolloverVault.ts | 9 ++++++--- spot-subgraph/subgraph.template.yaml | 2 +- yarn.lock | 10 ++++++++++ 9 files changed, 21 insertions(+), 14 deletions(-) diff --git a/spot-contracts/deployments/goerli.json b/spot-contracts/deployments/goerli.json index 736c2464..91b889d4 100644 --- a/spot-contracts/deployments/goerli.json +++ b/spot-contracts/deployments/goerli.json @@ -10,6 +10,3 @@ "previousIssuers": ["0xAb7d17864463dEdA6c19060Ad6556e1B218c5Ba0"], "rolloverVault": "0xca36B64BEbdf141623911987b93767dcA4bF6F1f" } - - - \ No newline at end of file diff --git a/spot-contracts/deployments/mainnet.json b/spot-contracts/deployments/mainnet.json index 76e026b5..0926ff07 100644 --- a/spot-contracts/deployments/mainnet.json +++ b/spot-contracts/deployments/mainnet.json @@ -13,8 +13,5 @@ "0xD64FA63dc5E8fcB743457E47E4d522E11Ff1AD66", "0x2E2E49eDCd5ce08677Bab6d791C863f1361B52F2" ], - "previousBondFactories": [ - "0x2b135C839d61808E1eC6F84151CD9429B0920374", - "0x72799FFD1F4CCF92eA2b1eE0CADa16a5461c4d96" - ] + "previousBondFactories": ["0x2b135C839d61808E1eC6F84151CD9429B0920374", "0x72799FFD1F4CCF92eA2b1eE0CADa16a5461c4d96"] } diff --git a/spot-subgraph/README.md b/spot-subgraph/README.md index 087faa33..a5aa1ebf 100644 --- a/spot-subgraph/README.md +++ b/spot-subgraph/README.md @@ -23,7 +23,6 @@ docker-compose up Setup project: ``` -yarn global add mustache yarn ``` diff --git a/spot-subgraph/package.json b/spot-subgraph/package.json index ea2eb386..e6526b60 100644 --- a/spot-subgraph/package.json +++ b/spot-subgraph/package.json @@ -19,6 +19,7 @@ "@typescript-eslint/parser": "^2.0.0", "eslint": "^6.2.2", "eslint-config-prettier": "^6.1.0", + "mustache": "^4.2.0", "prettier": "^1.18.2", "typescript": "^3.5.2" } diff --git a/spot-subgraph/scripts/deploy-local.sh b/spot-subgraph/scripts/deploy-local.sh index 86709b29..80a72f27 100755 --- a/spot-subgraph/scripts/deploy-local.sh +++ b/spot-subgraph/scripts/deploy-local.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -mustache ../spot-contracts/deployments/$1.json subgraph.template.yaml > ./subgraph.yaml +yarn mustache ../spot-contracts/deployments/$1.json subgraph.template.yaml > ./subgraph.yaml yarn codegen diff --git a/spot-subgraph/scripts/deploy.sh b/spot-subgraph/scripts/deploy.sh index 4020278d..61b73a54 100755 --- a/spot-subgraph/scripts/deploy.sh +++ b/spot-subgraph/scripts/deploy.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -mustache ../spot-contracts/deployments/$1.json subgraph.template.yaml > ./subgraph.yaml +yarn mustache ../spot-contracts/deployments/$1.json subgraph.template.yaml > ./subgraph.yaml yarn auth $GRAPH_AUTH diff --git a/spot-subgraph/src/mappings/rolloverVault.ts b/spot-subgraph/src/mappings/rolloverVault.ts index 12a912cb..3d6f6b95 100644 --- a/spot-subgraph/src/mappings/rolloverVault.ts +++ b/spot-subgraph/src/mappings/rolloverVault.ts @@ -32,9 +32,12 @@ export function handleDeposit(call: DepositCall): void { let underlyingToken = fetchToken(stringToAddress(vault.underlying)) let tokenContract = RebasingERC20ABI.bind(stringToAddress(vault.underlying)) let amountIn = formatBalance(call.inputs.amount, underlyingToken.decimals) - let scaledAmountIn = amountIn - .times(tokenContract.scaledTotalSupply().toBigDecimal()) - .div(tokenContract.totalSupply().toBigDecimal()) + let totalSupply = formatBalance( + tokenContract.totalSupply(), + underlyingToken.decimals, + ) + let scaledTotalSupply = tokenContract.scaledTotalSupply().toBigDecimal() + let scaledAmountIn = amountIn.times(scaledTotalSupply).div(totalSupply) vault.totalUnderlyingScaledHeld = vault.totalUnderlyingScaledHeld.plus( scaledAmountIn, ) diff --git a/spot-subgraph/subgraph.template.yaml b/spot-subgraph/subgraph.template.yaml index be7d7278..0f6a76a2 100644 --- a/spot-subgraph/subgraph.template.yaml +++ b/spot-subgraph/subgraph.template.yaml @@ -1,6 +1,6 @@ specVersion: 0.0.2 description: Perpetual Tranche is a protocol to create fungible tranches -repository: https://github.com/buttonwood-protocol/subgraph +repository: http://github.com/ampleforth/spot schema: file: ./schema.graphql diff --git a/yarn.lock b/yarn.lock index 83bb2f38..3f9efdf2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -70,6 +70,7 @@ __metadata: "@typescript-eslint/parser": ^2.0.0 eslint: ^6.2.2 eslint-config-prettier: ^6.1.0 + mustache: ^4.2.0 prettier: ^1.18.2 typescript: ^3.5.2 languageName: unknown @@ -11294,6 +11295,15 @@ __metadata: languageName: node linkType: hard +"mustache@npm:^4.2.0": + version: 4.2.0 + resolution: "mustache@npm:4.2.0" + bin: + mustache: bin/mustache + checksum: 928fcb63e3aa44a562bfe9b59ba202cccbe40a46da50be6f0dd831b495be1dd7e38ca4657f0ecab2c1a89dc7bccba0885eab7ee7c1b215830da765758c7e0506 + languageName: node + linkType: hard + "mute-stream@npm:0.0.7": version: 0.0.7 resolution: "mute-stream@npm:0.0.7"