Created
November 23, 2022 16:02
-
-
Save tster/85c67b8d051ba0ab9f76b35ae835c12d to your computer and use it in GitHub Desktop.
Artefacts
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"abi": [ | |
{ | |
"inputs": [], | |
"stateMutability": "nonpayable", | |
"type": "constructor" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": true, | |
"internalType": "address", | |
"name": "token0", | |
"type": "address" | |
}, | |
{ | |
"indexed": true, | |
"internalType": "address", | |
"name": "token1", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "bool", | |
"name": "stable", | |
"type": "bool" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "pair", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"name": "PairCreated", | |
"type": "event" | |
}, | |
{ | |
"inputs": [], | |
"name": "acceptPauser", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "admin", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"name": "allPairs", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "allPairsLength", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "tokenA", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "tokenB", | |
"type": "address" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "stable", | |
"type": "bool" | |
} | |
], | |
"name": "createPair", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "pair", | |
"type": "address" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "getInitializable", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"name": "getPair", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "isPair", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "isPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "pairCodeHash", | |
"outputs": [ | |
{ | |
"internalType": "bytes32", | |
"name": "", | |
"type": "bytes32" | |
} | |
], | |
"stateMutability": "pure", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "pauser", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "pendingPauser", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "admin_", | |
"type": "address" | |
} | |
], | |
"name": "setAdmin", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "bool", | |
"name": "_state", | |
"type": "bool" | |
} | |
], | |
"name": "setPause", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "_pauser", | |
"type": "address" | |
} | |
], | |
"name": "setPauser", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "newPeriod", | |
"type": "uint256" | |
} | |
], | |
"name": "setPeriodSize", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
], | |
"bytecode": { | |
"object": "0x6080604052610e1060035534801561001657600080fd5b50600080546001600160a81b03191633610100810260ff1916919091178255600280546001600160a01b0319169091179055614c2a90819061005890396000f3fe60806040523480156200001157600080fd5b5060043610620001155760003560e01c80639aab924811620000a3578063e5e31b13116200006e578063e5e31b13146200025c578063eb13c4cf1462000282578063ed12c5b414620002bb578063f851a44014620002d257600080fd5b80639aab924814620002035780639fd0506d146200020d578063b187bd261462000226578063bedb86fb146200024557600080fd5b80636801cc3011620000e45780636801cc301462000184578063704b6c0214620001c157806382dfdce414620001d85780639a7165e414620001ef57600080fd5b8063167a6f90146200011a5780631e3dd18b14620001265780632d88af4a146200015a578063574f2ba31462000171575b600080fd5b62000124620002e6565b005b6200013d62000137366004620007f4565b62000329565b6040516001600160a01b0390911681526020015b60405180910390f35b620001246200016b3660046200082b565b62000354565b6005545b60405190815260200162000151565b6200013d6200019536600462000861565b60046020908152600093845260408085208252928452828420905282529020546001600160a01b031681565b62000124620001d23660046200082b565b62000393565b6200013d620001e936600462000861565b620003cd565b6001546200013d906001600160a01b031681565b62000175620006bd565b6000546200013d9061010090046001600160a01b031681565b600054620002349060ff1681565b604051901515815260200162000151565b6200012462000256366004620008ab565b620006f1565b620002346200026d3660046200082b565b60066020526000908152604090205460ff1681565b600754600854604080516001600160a01b0393841681529282166020840152600160a01b90910460ff1615159082015260600162000151565b62000124620002cc366004620007f4565b62000721565b6002546200013d906001600160a01b031681565b6001546001600160a01b03163314620002fe57600080fd5b600154600080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600581815481106200033a57600080fd5b6000918252602090912001546001600160a01b0316905081565b60005461010090046001600160a01b031633146200037157600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b03163314620003ab57600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000826001600160a01b0316846001600160a01b031614156200041c5760405162461bcd60e51b8152602060048201526002602482015261494160f01b60448201526064015b60405180910390fd5b600080846001600160a01b0316866001600160a01b0316106200044157848662000444565b85855b90925090506001600160a01b038216620004865760405162461bcd60e51b81526020600482015260026024820152615a4160f01b604482015260640162000413565b6001600160a01b0382811660009081526004602090815260408083208585168452825280832088151584529091529020541615620004ec5760405162461bcd60e51b8152602060048201526002602482015261504560f01b604482015260640162000413565b6040516bffffffffffffffffffffffff19606084811b8216602084015283901b16603482015284151560f81b604882015260009060490160408051601f19818403018152908290528051602090910120600880546001600160a01b038087166001600160a01b03198b1515600160a01b0281166001600160a81b031990941693909317179092556007805492881692909116919091179055915081906200059390620007e6565b8190604051809103906000f5905080158015620005b4573d6000803e3d6000fd5b506001600160a01b0384811660008181526004602081815260408084208987168086529083528185208d15158087529084528286208054988a166001600160a01b0319998a16811790915582875294845282862087875284528286208187528452828620805489168617905560058054600181810183557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db09091018054909a1687179099558587526006855295839020805460ff1916909817909755935481519687529186019290925290840152929650907fc4805696c66d7cf352fc1d6bb633ad5ee82f6cb577c453024b6e0eb8306c6fc99060600160405180910390a35050509392505050565b600060405180602001620006d190620007e6565b6020820181038252601f19601f8201166040525080519060200120905090565b60005461010090046001600160a01b031633146200070e57600080fd5b6000805460ff1916911515919091179055565b6002546001600160a01b031633146200073957600080fd5b6003548111156200074957600080fd5b60005b600554811015620007e257600581815481106200076d576200076d620008c9565b600091825260209091200154604051633b44b16d60e21b8152600481018490526001600160a01b039091169063ed12c5b490602401600060405180830381600087803b158015620007bd57600080fd5b505af1158015620007d2573d6000803e3d6000fd5b505050508060010190506200074c565b5050565b61431580620008e083390190565b6000602082840312156200080757600080fd5b5035919050565b80356001600160a01b03811681146200082657600080fd5b919050565b6000602082840312156200083e57600080fd5b62000849826200080e565b9392505050565b803580151581146200082657600080fd5b6000806000606084860312156200087757600080fd5b62000882846200080e565b925062000892602085016200080e565b9150620008a26040850162000850565b90509250925092565b600060208284031215620008be57600080fd5b620008498262000850565b634e487b7160e01b600052603260045260246000fdfe610140604052600060025561070860075560016011553480156200002257600080fd5b50336001600160a01b031660e0816001600160a01b0316815250506000806000336001600160a01b031663eb13c4cf6040518163ffffffff1660e01b8152600401606060405180830381865afa15801562000081573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000a791906200078e565b801580156080526001600160a01b0380841660c052841660a0529295509093509150620002ec57826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156200010d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000137919081019062000829565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000176573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620001a0919081019062000829565b604051602001620001b3929190620008e1565b60405160208183030381529060405260009080519060200190620001d9929190620006cb565b50826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000219573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000243919081019062000829565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000282573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620002ac919081019062000829565b604051602001620002bf9291906200093c565b60405160208183030381529060405260019080519060200190620002e5929190620006cb565b5062000505565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156200032b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000355919081019062000829565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000394573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620003be919081019062000829565b604051602001620003d19291906200098d565b60405160208183030381529060405260009080519060200190620003f7929190620006cb565b50826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000437573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000461919081019062000829565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620004a0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620004ca919081019062000829565b604051602001620004dd929190620009ea565b6040516020818303038152906040526001908051906020019062000503929190620006cb565b505b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000544573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200056a919062000a0c565b6200057790600a62000b4d565b6101008181525050816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015620005be573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005e4919062000a0c565b620005f190600a62000b4d565b610120525050604080516080810182524281526000602082018181529282018181526060830182815260088054600181018255935292517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee360049093029283015592517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee482015591517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee5830155517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee6909101555062000b9b565b828054620006d99062000b5e565b90600052602060002090601f016020900481019282620006fd576000855562000748565b82601f106200071857805160ff191683800117855562000748565b8280016001018555821562000748579182015b82811115620007485782518255916020019190600101906200072b565b50620007569291506200075a565b5090565b5b808211156200075657600081556001016200075b565b80516001600160a01b03811681146200078957600080fd5b919050565b600080600060608486031215620007a457600080fd5b620007af8462000771565b9250620007bf6020850162000771565b915060408401518015158114620007d557600080fd5b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000813578181015183820152602001620007f9565b8381111562000823576000848401525b50505050565b6000602082840312156200083c57600080fd5b81516001600160401b03808211156200085457600080fd5b818401915084601f8301126200086957600080fd5b8151818111156200087e576200087e620007e0565b604051601f8201601f19908116603f01168101908382118183101715620008a957620008a9620007e0565b81604052828152876020848701011115620008c357600080fd5b620008d6836020830160208801620007f6565b979650505050505050565b6e029ba30b13632ab189020a6a690169608d1b8152600083516200090d81600f850160208801620007f6565b602f60f81b600f91840191820152835162000930816010840160208801620007f6565b01601001949350505050565b6473414d4d2d60d81b8152600083516200095e816005850160208801620007f6565b602f60f81b600591840191820152835162000981816006840160208801620007f6565b01600601949350505050565b7002b37b630ba34b632ab189020a6a690169607d1b815260008351620009bb816011850160208801620007f6565b602f60f81b6011918401918201528351620009de816012840160208801620007f6565b01601201949350505050565b6476414d4d2d60d81b8152600083516200095e816005850160208801620007f6565b60006020828403121562000a1f57600080fd5b815160ff8116811462000a3157600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000a8f57816000190482111562000a735762000a7362000a38565b8085161562000a8157918102915b93841c939080029062000a53565b509250929050565b60008262000aa85750600162000b47565b8162000ab75750600062000b47565b816001811462000ad0576002811462000adb5762000afb565b600191505062000b47565b60ff84111562000aef5762000aef62000a38565b50506001821b62000b47565b5060208310610133831016604e8410600b841016171562000b20575081810a62000b47565b62000b2c838362000a4e565b806000190482111562000b435762000b4362000a38565b0290505b92915050565b600062000a3160ff84168362000a97565b600181811c9082168062000b7357607f821691505b6020821081141562000b9557634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516101205161364a62000ccb6000396000818161047101528181611acc0152818161295801528181612a1a0152612b2501526000818161044e01528181611a8b0152818161291901528181612a5c0152612aff01526000818161081001526122020152600081816104fb015281816106770152818161071b0152818161094b01528181610c070152818161146d015281816116f801528181611c7c015261258401526000818161030f015281816104d3015281816106520152818161092a01528181610be5015281816113d7015281816116d601528181611c5a015281816124fc0152818161299a015281816129e101528181612ac60152612b690152600081816103c0015281816104a301528181611a6301526128e5015261364a6000f3fe608060405234801561001057600080fd5b506004361061028a5760003560e01c806389afcb441161015c578063c5700a02116100ce578063ebeb31db11610087578063ebeb31db14610797578063ed12c5b41461079f578063f140a35a146107b2578063f3f24eb1146107c5578063f99f51a6146107ce578063fff6cae9146107ef57600080fd5b8063c5700a021461070d578063d21220a714610716578063d505accf1461073d578063dd62ed3e14610750578063e4463eb21461077b578063eba6aef91461078457600080fd5b80639e8cc04b116101205780639e8cc04b146106a25780639f767c88146106b5578063a9059cbb146106d5578063bc25cf77146106e8578063bf944dbc146106fb578063c245febc1461070457600080fd5b806389afcb44146105db5780638a7b8cf2146105ee57806395d89b41146106295780639cf42614146106315780639d63848a1461064457600080fd5b806323b872dd116102005780635881c475116101b95780635881c475146105445780635a76f25e146105575780636a6278421461056057806370a08231146105735780637ecebe00146105935780638334278d146105b357600080fd5b806323b872dd146103e2578063252c09d7146103f5578063313ce56714610428578063392f37e914610442578063443cb4bc14610528578063517b3f821461053157600080fd5b806313345fe11161025257806313345fe11461034957806318160ddd146103695780631df8c717146103805780631ed4202e14610388578063205aabf11461039b57806322be3de1146103bb57600080fd5b8063022c0d9f1461028f57806306fdde03146102a45780630902f1ac146102c2578063095ea7b3146102e75780630dfe16811461030a575b600080fd5b6102a261029d366004613041565b6107f7565b005b6102ac610da4565b6040516102b99190613105565b60405180910390f35b600954600a54600b545b604080519384526020840192909252908201526060016102b9565b6102fa6102f5366004613138565b610e32565b60405190151581526020016102b9565b6103317f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102b9565b61035c610357366004613162565b610e9f565b6040516102b991906131d6565b61037260025481565b6040519081526020016102b9565b6102cc6110d0565b6103726103963660046131e9565b61113f565b6103726103a9366004613202565b60106020526000908152604090205481565b6102fa7f000000000000000000000000000000000000000000000000000000000000000081565b6102fa6103f036600461321d565b61119e565b6104086104033660046131e9565b611267565b6040805194855260208501939093529183015260608201526080016102b9565b610430601281565b60405160ff90911681526020016102b9565b600954600a54604080517f000000000000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060208201529081019290925260608201527f0000000000000000000000000000000000000000000000000000000000000000151560808201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660a08301527f00000000000000000000000000000000000000000000000000000000000000001660c082015260e0016102b9565b61037260095481565b61037261053f366004613138565b6112a1565b61035c610552366004613259565b611394565b610372600a5481565b61037261056e366004613202565b6113a3565b610372610581366004613202565b60046020526000908152604090205481565b6103726105a1366004613202565b60066020526000908152604090205481565b6105c66105c13660046131e9565b611600565b604080519283526020830191909152016102b9565b6105c66105e9366004613202565b6116a4565b6105f66119c1565b6040516102b991908151815260208083015190820152604080830151908201526060918201519181019190915260800190565b6102ac611a52565b61037261063f36600461328c565b611a5f565b604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f0000000000000000000000000000000000000000000000000000000000000000166020820152016102b9565b6103726106b0366004613259565b611bab565b6103726106c3366004613202565b600f6020526000908152604090205481565b6102fa6106e3366004613138565b611c18565b6102a26106f6366004613202565b611c2e565b610372600c5481565b610372600d5481565b610372600b5481565b6103317f000000000000000000000000000000000000000000000000000000000000000081565b6102a261074b3660046132ae565b611d4c565b61037261075e366004613321565b600360209081526000928352604080842090915290825290205481565b61037260075481565b61035c61079236600461328c565b612041565b600854610372565b6102a26107ad3660046131e9565b6121f7565b6103726107c0366004613354565b612231565b610372600e5481565b6107e16107dc36600461328c565b612250565b6040516102b9929190613377565b6102a26124cf565b60115460011461080657600080fd5b60026011819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b187bd266040518163ffffffff1660e01b8152600401602060405180830381865afa15801561086c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610890919061339c565b1561089a57600080fd5b60008511806108a95750600084115b6108e05760405162461bcd60e51b8152602060048201526003602482015262494f4160e81b60448201526064015b60405180910390fd5b600954600a5481871080156108f457508086105b6109255760405162461bcd60e51b8152602060048201526002602482015261125360f21b60448201526064016108d7565b6000807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03898116908316148015906109985750806001600160a01b0316896001600160a01b031614155b6109c95760405162461bcd60e51b8152602060048201526002602482015261125560f21b60448201526064016108d7565b8a156109da576109da828a8d612609565b89156109eb576109eb818a8c612609565b8615610a5857604051639a7bff7960e01b81526001600160a01b038a1690639a7bff7990610a259033908f908f908e908e906004016133be565b600060405180830381600087803b158015610a3f57600080fd5b505af1158015610a53573d6000803e3d6000fd5b505050505b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610a9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac0919061340a565b6040516370a0823160e01b81523060048201529094506001600160a01b038216906370a0823190602401602060405180830381865afa158015610b07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2b919061340a565b9250505060008985610b3d9190613439565b8311610b4a576000610b5e565b610b548a86613439565b610b5e9084613439565b90506000610b6c8a86613439565b8311610b79576000610b8d565b610b838a86613439565b610b8d9084613439565b90506000821180610b9e5750600081115b610bd05760405162461bcd60e51b815260206004820152600360248201526249494160e81b60448201526064016108d7565b6040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610c58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7c919061340a565b6040516370a0823160e01b81523060048201529096506001600160a01b038216906370a0823190602401602060405180830381865afa158015610cc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce7919061340a565b9450610cf38888611a5f565b610cfd8787611a5f565b1015610d2f5760405162461bcd60e51b81526020600482015260016024820152604b60f81b60448201526064016108d7565b5050610d3d848488886126f8565b60408051838152602081018390529081018c9052606081018b90526001600160a01b038a169033907fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229060800160405180910390a350506001601155505050505050505050565b60008054610db190613450565b80601f0160208091040260200160405190810160405280929190818152602001828054610ddd90613450565b8015610e2a5780601f10610dff57610100808354040283529160200191610e2a565b820191906000526020600020905b815481529060010190602001808311610e0d57829003601f168201915b505050505081565b3360008181526003602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610e8d9086815260200190565b60405180910390a35060015b92915050565b606060008367ffffffffffffffff811115610ebc57610ebc613485565b604051908082528060200260200182016040528015610ee5578160200160208202803683370190505b50600854909150600090610efb90600190613439565b9050610f07848661349b565b811015610f265760405162461bcd60e51b81526004016108d7906134ba565b6000610f32858761349b565b610f3c9083613439565b90506000805b838310156110c057610f5487846134f1565b9150600060088481548110610f6b57610f6b613509565b90600052602060002090600402016000015460088481548110610f9057610f90613509565b906000526020600020906004020160000154610fac9190613439565b905060008160088681548110610fc457610fc4613509565b90600052602060002090600402016001015460088681548110610fe957610fe9613509565b9060005260206000209060040201600101546110059190613439565b61100f919061351f565b90506000826008878154811061102757611027613509565b9060005260206000209060040201600201546008878154811061104c5761104c613509565b9060005260206000209060040201600201546110689190613439565b611072919061351f565b90506110808c8e84846128e1565b88858151811061109257611092613509565b60209081029190910101526110a88460016134f1565b935050505086836110b991906134f1565b9250610f42565b509293505050505b949350505050565b600c54600d5442600080806110ee600954600a54600b549192909190565b9250925092508381146111375760006111078286613439565b9050611113818561349b565b61111d90886134f1565b9650611129818461349b565b61113390876134f1565b9550505b505050909192565b60008061114d836001612041565b90506000805b82518110156111935782818151811061116e5761116e613509565b60200260200101518261118191906134f1565b915061118c81613541565b9050611153565b506110c8848261351f565b6001600160a01b0383166000818152600360209081526040808320338085529252822054919290919082148015906111d857506000198114155b1561124e5760006111e98583613439565b6001600160a01b038881166000818152600360209081526040808320948916808452948252918290208590559051848152939450919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505b611259868686612bd6565b6001925050505b9392505050565b6008818154811061127757600080fd5b60009182526020909120600490910201805460018201546002830154600390930154919350919084565b6000806112ac6119c1565b90506000806112b96110d0565b508451919350915042141561132c57600880546112d890600290613439565b815481106112e8576112e8613509565b906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505092505b825160009061133b9042613439565b90506000818560200151856113509190613439565b61135a919061351f565b905060008286604001518561136f9190613439565b611379919061351f565b9050611387888a84846128e1565b9998505050505050505050565b60606110c88484846001610e9f565b60006011546001146113b457600080fd5b6002601155600954600a546040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144a919061340a565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156114b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d8919061340a565b905060006114e68584613439565b905060006114f48584613439565b60025490915080611532576103e861151461150f848661349b565b612c84565b61151e9190613439565b975061152d60006103e8612cf4565b611567565b61156487611540838661349b565b61154a919061351f565b87611555848661349b565b61155f919061351f565b612d7e565b97505b6000881161159d5760405162461bcd60e51b8152602060048201526003602482015262494c4d60e81b60448201526064016108d7565b6115a78989612cf4565b6115b3858589896126f8565b604080518481526020810184905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a250506001601155509395945050505050565b600080600080611611856001612250565b9150915060008060005b84518110156116825784818151811061163657611636613509565b60200260200101518361164991906134f1565b925083818151811061165d5761165d613509565b60200260200101518261167091906134f1565b915061167b81613541565b905061161b565b5061168d878361351f565b611697888361351f565b9550955050505050915091565b6000806011546001146116b657600080fd5b6002601155600954600a546040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000907f0000000000000000000000000000000000000000000000000000000000000000906000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561174c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611770919061340a565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156117ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117de919061340a565b306000908152600460205260409020546002549192509080611800858461349b565b61180a919061351f565b995080611817848461349b565b611821919061351f565b985060008a1180156118335750600089115b6118655760405162461bcd60e51b815260206004820152600360248201526224a62160e91b60448201526064016108d7565b61186f3083612d94565b61187a868c8c612609565b611885858c8b612609565b6040516370a0823160e01b81523060048201526001600160a01b038716906370a0823190602401602060405180830381865afa1580156118c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ed919061340a565b6040516370a0823160e01b81523060048201529094506001600160a01b038616906370a0823190602401602060405180830381865afa158015611934573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611958919061340a565b925061196684848a8a6126f8565b604080518b8152602081018b90526001600160a01b038d169133917fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496910160405180910390a350505050505050506001601181905550915091565b6119ec6040518060800160405280600081526020016000815260200160008152602001600081525090565b600880546119fc90600190613439565b81548110611a0c57611a0c613509565b9060005260206000209060040201604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050905090565b60018054610db190613450565b60007f000000000000000000000000000000000000000000000000000000000000000015611b9a5760007f0000000000000000000000000000000000000000000000000000000000000000611abc85670de0b6b3a764000061349b565b611ac6919061351f565b905060007f0000000000000000000000000000000000000000000000000000000000000000611afd85670de0b6b3a764000061349b565b611b07919061351f565b90506000670de0b6b3a7640000611b1e838561349b565b611b28919061351f565b90506000670de0b6b3a7640000611b3f848061349b565b611b49919061351f565b670de0b6b3a7640000611b5c868061349b565b611b66919061351f565b611b7091906134f1565b9050670de0b6b3a7640000611b85828461349b565b611b8f919061351f565b945050505050610e99565b611ba4828461349b565b9050610e99565b600080611bbb8585856001610e9f565b90506000805b8251811015611c0357828181518110611bdc57611bdc613509565b602002602001015182611bef91906134f1565b915080611bfb81613541565b915050611bc1565b50611c0e848261351f565b9695505050505050565b6000611c25338484612bd6565b50600192915050565b601154600114611c3d57600080fd5b60026011556009546040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000917f000000000000000000000000000000000000000000000000000000000000000091611d0a9184918691906001600160a01b038416906370a08231906024015b602060405180830381865afa158015611cd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cfb919061340a565b611d059190613439565b612609565b600a546040516370a0823160e01b8152306004820152611d429183918691906001600160a01b038416906370a0823190602401611cba565b5050600160115550565b42841015611d8e5760405162461bcd60e51b815260206004820152600f60248201526e10985cd9558c4e8811561412549151608a1b60448201526064016108d7565b7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051611dbe919061355c565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051601f19818403018152918152815160209283012060058190556001600160a01b038a166000908152600690935290822080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b919087611e7483613541565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001611eed92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015611f58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590611f8e5750886001600160a01b0316816001600160a01b0316145b611fda5760405162461bcd60e51b815260206004820152601960248201527f4261736556313a20494e56414c49445f5349474e41545552450000000000000060448201526064016108d7565b6001600160a01b038981166000818152600360209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b606060008367ffffffffffffffff81111561205e5761205e613485565b604051908082528060200260200182016040528015612087578160200160208202803683370190505b5060085490915060009061209d90600190613439565b90506120a9848661349b565b8110156120c85760405162461bcd60e51b81526004016108d7906134ba565b60006120d4858761349b565b6120de9083613439565b905060008060005b848410156121ea576120f888856134f1565b92506008848154811061210d5761210d613509565b9060005260206000209060040201600001546008848154811061213257612132613509565b90600052602060002090600402016000015461214e9190613439565b9050806008858154811061216457612164613509565b9060005260206000209060040201600301546008858154811061218957612189613509565b9060005260206000209060040201600301546121a59190613439565b6121af919061351f565b8683815181106121c1576121c1613509565b60209081029190910101526121d78260016134f1565b91506121e388856134f1565b93506120e6565b5093979650505050505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461222c57600080fd5b600755565b600954600a5460009190612247858584846128e1565b95945050505050565b60608060008467ffffffffffffffff81111561226e5761226e613485565b604051908082528060200260200182016040528015612297578160200160208202803683370190505b50905060008567ffffffffffffffff8111156122b5576122b5613485565b6040519080825280602002602001820160405280156122de578160200160208202803683370190505b506008549091506000906122f490600190613439565b9050612300868861349b565b81101561231f5760405162461bcd60e51b81526004016108d7906134ba565b600061232b878961349b565b6123359083613439565b905060008060005b848410156124be5761234f8a856134f1565b92506008848154811061236457612364613509565b9060005260206000209060040201600001546008848154811061238957612389613509565b9060005260206000209060040201600001546123a59190613439565b905080600885815481106123bb576123bb613509565b906000526020600020906004020160010154600885815481106123e0576123e0613509565b9060005260206000209060040201600101546123fc9190613439565b612406919061351f565b87838151811061241857612418613509565b602002602001018181525050806008858154811061243857612438613509565b9060005260206000209060040201600201546008858154811061245d5761245d613509565b9060005260206000209060040201600201546124799190613439565b612483919061351f565b86838151811061249557612495613509565b60209081029190910101526124ab8260016134f1565b91506124b78a856134f1565b935061233d565b509499939850929650505050505050565b6011546001146124de57600080fd5b60026011556040516370a0823160e01b8152306004820152612602907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561254b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256f919061340a565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156125d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f7919061340a565b600954600a546126f8565b6001601155565b6000836001600160a01b03163b1161262057600080fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161267c91906135f8565b6000604051808303816000865af19150503d80600081146126b9576040519150601f19603f3d011682016040523d82523d6000602084013e6126be565b606091505b50915091508180156126e85750805115806126e85750808060200190518101906126e8919061339c565b6126f157600080fd5b5050505050565b600b54429060009061270a9083613439565b905060008111801561271b57508315155b801561272657508215155b1561279157612735818561349b565b600c600082825461274691906134f1565b909155506127569050818461349b565b600d600082825461276791906134f1565b909155505060025461277a90829061349b565b600e600082825461278b91906134f1565b90915550505b600061279b6119c1565b80519091506127aa9084613439565b91506007548211156128905760408051608081018252848152600c5460208201908152600d54928201928352600e54606083019081526008805460018101825560009190915292517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee360049094029384015590517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee483015591517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee582015590517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee6909101555b6009879055600a869055600b83905560408051888152602081018890527fcf2aa50876cdfbb541206f89af0ee78d44a2abf8d328e37fa4917f982149848a910160405180910390a150505050505050565b60007f000000000000000000000000000000000000000000000000000000000000000015612b645760006129158484611a5f565b90507f000000000000000000000000000000000000000000000000000000000000000061294a85670de0b6b3a764000061349b565b612954919061351f565b93507f000000000000000000000000000000000000000000000000000000000000000061298984670de0b6b3a764000061349b565b612993919061351f565b92506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b0316146129d85784866129db565b85855b915091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b031614612a5a577f0000000000000000000000000000000000000000000000000000000000000000612a4b89670de0b6b3a764000061349b565b612a55919061351f565b612a97565b7f0000000000000000000000000000000000000000000000000000000000000000612a8d89670de0b6b3a764000061349b565b612a97919061351f565b97506000612aaf612aa8848b6134f1565b8584612e16565b612ab99083613439565b9050670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316896001600160a01b031614612b23577f0000000000000000000000000000000000000000000000000000000000000000612b45565b7f00000000000000000000000000000000000000000000000000000000000000005b612b4f908361349b565b612b59919061351f565b9450505050506110c8565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316866001600160a01b031614612ba7578385612baa565b84845b9092509050612bb987836134f1565b612bc3828961349b565b612bcd919061351f565b925050506110c8565b6001600160a01b03831660009081526004602052604081208054839290612bfe908490613439565b90915550506001600160a01b03821660009081526004602052604081208054839290612c2b9084906134f1565b92505081905550816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612c7791815260200190565b60405180910390a3505050565b60006003821115612ce55750806000612c9e60028361351f565b612ca99060016134f1565b90505b81811015612cdf57905080600281612cc4818661351f565b612cce91906134f1565b612cd8919061351f565b9050612cac565b50919050565b8115612cef575060015b919050565b8060026000828254612d0691906134f1565b90915550506001600160a01b03821660009081526004602052604081208054839290612d339084906134f1565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b6000818310612d8d5781611260565b5090919050565b8060026000828254612da69190613439565b90915550506001600160a01b03821660009081526004602052604081208054839290612dd3908490613439565b90915550506040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001612d72565b6000805b60ff811015612f1c57826000612e308783612f25565b905085811015612e80576000612e468887612fc2565b612e508389613439565b612e6290670de0b6b3a764000061349b565b612e6c919061351f565b9050612e7881876134f1565b955050612ec2565b6000612e8c8887612fc2565b612e968884613439565b612ea890670de0b6b3a764000061349b565b612eb2919061351f565b9050612ebe8187613439565b9550505b81851115612eeb576001612ed68387613439565b11612ee657849350505050611260565b612f07565b6001612ef78684613439565b11612f0757849350505050611260565b50508080612f1490613541565b915050612e1a565b50909392505050565b6000670de0b6b3a764000082818581612f3e828061349b565b612f48919061351f565b612f52919061349b565b612f5c919061351f565b612f66919061349b565b612f70919061351f565b670de0b6b3a7640000808481612f86828061349b565b612f90919061351f565b612f9a919061349b565b612fa4919061351f565b612fae908661349b565b612fb8919061351f565b61126091906134f1565b6000670de0b6b3a76400008381612fd9828061349b565b612fe3919061351f565b612fed919061349b565b612ff7919061351f565b670de0b6b3a76400008061300b858061349b565b613015919061351f565b61302086600361349b565b612fae919061349b565b80356001600160a01b0381168114612cef57600080fd5b60008060008060006080868803121561305957600080fd5b85359450602086013593506130706040870161302a565b9250606086013567ffffffffffffffff8082111561308d57600080fd5b818801915088601f8301126130a157600080fd5b8135818111156130b057600080fd5b8960208285010111156130c257600080fd5b9699959850939650602001949392505050565b60005b838110156130f05781810151838201526020016130d8565b838111156130ff576000848401525b50505050565b60208152600082518060208401526131248160408501602087016130d5565b601f01601f19169190910160400192915050565b6000806040838503121561314b57600080fd5b6131548361302a565b946020939093013593505050565b6000806000806080858703121561317857600080fd5b6131818561302a565b966020860135965060408601359560600135945092505050565b600081518084526020808501945080840160005b838110156131cb578151875295820195908201906001016131af565b509495945050505050565b602081526000611260602083018461319b565b6000602082840312156131fb57600080fd5b5035919050565b60006020828403121561321457600080fd5b6112608261302a565b60008060006060848603121561323257600080fd5b61323b8461302a565b92506132496020850161302a565b9150604084013590509250925092565b60008060006060848603121561326e57600080fd5b6132778461302a565b95602085013595506040909401359392505050565b6000806040838503121561329f57600080fd5b50508035926020909101359150565b600080600080600080600060e0888a0312156132c957600080fd5b6132d28861302a565b96506132e06020890161302a565b95506040880135945060608801359350608088013560ff8116811461330457600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561333457600080fd5b61333d8361302a565b915061334b6020840161302a565b90509250929050565b6000806040838503121561336757600080fd5b8235915061334b6020840161302a565b60408152600061338a604083018561319b565b8281036020840152612247818561319b565b6000602082840312156133ae57600080fd5b8151801515811461126057600080fd5b60018060a01b038616815284602082015283604082015260806060820152816080820152818360a0830137600081830160a090810191909152601f909201601f19160101949350505050565b60006020828403121561341c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561344b5761344b613423565b500390565b600181811c9082168061346457607f821691505b60208210811415612cdf57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60008160001904831182151516156134b5576134b5613423565b500290565b6020808252601b908201527f504149523a3a4e4f5420524541445920464f522050524943494e470000000000604082015260600190565b6000821982111561350457613504613423565b500190565b634e487b7160e01b600052603260045260246000fd5b60008261353c57634e487b7160e01b600052601260045260246000fd5b500490565b600060001982141561355557613555613423565b5060010190565b600080835481600182811c91508083168061357857607f831692505b602080841082141561359857634e487b7160e01b86526022600452602486fd5b8180156135ac57600181146135bd576135ea565b60ff198616895284890196506135ea565b60008a81526020902060005b868110156135e25781548b8201529085019083016135c9565b505084890196505b509498975050505050505050565b6000825161360a8184602087016130d5565b919091019291505056fea26469706673582212204821d8e8821b11c85366edaadfce5a889446fd79c95a019c193175f24bd844e164736f6c634300080b0033a2646970667358221220bf3f6b861220109ff59d3be40090441370e8ee3e84837c056ac41b7ab0dbc8e864736f6c634300080b0033", | |
"sourceMap": "23395:2975:0:-:0;;;23561:4;23544:21;;24032:108;;;;;;;;;-1:-1:-1;24057:6:0;:19;;-1:-1:-1;;;;;;24087:16:0;24066:10;24057:19;;;-1:-1:-1;;24087:16:0;;;;;;;24114:5;:18;;-1:-1:-1;;;;;;24114:18:0;;;;;;23395:2975;;;;;;;;", | |
"linkReferences": {} | |
}, | |
"deployedBytecode": { | |
"object": "0x60806040523480156200001157600080fd5b5060043610620001155760003560e01c80639aab924811620000a3578063e5e31b13116200006e578063e5e31b13146200025c578063eb13c4cf1462000282578063ed12c5b414620002bb578063f851a44014620002d257600080fd5b80639aab924814620002035780639fd0506d146200020d578063b187bd261462000226578063bedb86fb146200024557600080fd5b80636801cc3011620000e45780636801cc301462000184578063704b6c0214620001c157806382dfdce414620001d85780639a7165e414620001ef57600080fd5b8063167a6f90146200011a5780631e3dd18b14620001265780632d88af4a146200015a578063574f2ba31462000171575b600080fd5b62000124620002e6565b005b6200013d62000137366004620007f4565b62000329565b6040516001600160a01b0390911681526020015b60405180910390f35b620001246200016b3660046200082b565b62000354565b6005545b60405190815260200162000151565b6200013d6200019536600462000861565b60046020908152600093845260408085208252928452828420905282529020546001600160a01b031681565b62000124620001d23660046200082b565b62000393565b6200013d620001e936600462000861565b620003cd565b6001546200013d906001600160a01b031681565b62000175620006bd565b6000546200013d9061010090046001600160a01b031681565b600054620002349060ff1681565b604051901515815260200162000151565b6200012462000256366004620008ab565b620006f1565b620002346200026d3660046200082b565b60066020526000908152604090205460ff1681565b600754600854604080516001600160a01b0393841681529282166020840152600160a01b90910460ff1615159082015260600162000151565b62000124620002cc366004620007f4565b62000721565b6002546200013d906001600160a01b031681565b6001546001600160a01b03163314620002fe57600080fd5b600154600080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600581815481106200033a57600080fd5b6000918252602090912001546001600160a01b0316905081565b60005461010090046001600160a01b031633146200037157600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b03163314620003ab57600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000826001600160a01b0316846001600160a01b031614156200041c5760405162461bcd60e51b8152602060048201526002602482015261494160f01b60448201526064015b60405180910390fd5b600080846001600160a01b0316866001600160a01b0316106200044157848662000444565b85855b90925090506001600160a01b038216620004865760405162461bcd60e51b81526020600482015260026024820152615a4160f01b604482015260640162000413565b6001600160a01b0382811660009081526004602090815260408083208585168452825280832088151584529091529020541615620004ec5760405162461bcd60e51b8152602060048201526002602482015261504560f01b604482015260640162000413565b6040516bffffffffffffffffffffffff19606084811b8216602084015283901b16603482015284151560f81b604882015260009060490160408051601f19818403018152908290528051602090910120600880546001600160a01b038087166001600160a01b03198b1515600160a01b0281166001600160a81b031990941693909317179092556007805492881692909116919091179055915081906200059390620007e6565b8190604051809103906000f5905080158015620005b4573d6000803e3d6000fd5b506001600160a01b0384811660008181526004602081815260408084208987168086529083528185208d15158087529084528286208054988a166001600160a01b0319998a16811790915582875294845282862087875284528286208187528452828620805489168617905560058054600181810183557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db09091018054909a1687179099558587526006855295839020805460ff1916909817909755935481519687529186019290925290840152929650907fc4805696c66d7cf352fc1d6bb633ad5ee82f6cb577c453024b6e0eb8306c6fc99060600160405180910390a35050509392505050565b600060405180602001620006d190620007e6565b6020820181038252601f19601f8201166040525080519060200120905090565b60005461010090046001600160a01b031633146200070e57600080fd5b6000805460ff1916911515919091179055565b6002546001600160a01b031633146200073957600080fd5b6003548111156200074957600080fd5b60005b600554811015620007e257600581815481106200076d576200076d620008c9565b600091825260209091200154604051633b44b16d60e21b8152600481018490526001600160a01b039091169063ed12c5b490602401600060405180830381600087803b158015620007bd57600080fd5b505af1158015620007d2573d6000803e3d6000fd5b505050508060010190506200074c565b5050565b61431580620008e083390190565b6000602082840312156200080757600080fd5b5035919050565b80356001600160a01b03811681146200082657600080fd5b919050565b6000602082840312156200083e57600080fd5b62000849826200080e565b9392505050565b803580151581146200082657600080fd5b6000806000606084860312156200087757600080fd5b62000882846200080e565b925062000892602085016200080e565b9150620008a26040850162000850565b90509250925092565b600060208284031215620008be57600080fd5b620008498262000850565b634e487b7160e01b600052603260045260246000fdfe610140604052600060025561070860075560016011553480156200002257600080fd5b50336001600160a01b031660e0816001600160a01b0316815250506000806000336001600160a01b031663eb13c4cf6040518163ffffffff1660e01b8152600401606060405180830381865afa15801562000081573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000a791906200078e565b801580156080526001600160a01b0380841660c052841660a0529295509093509150620002ec57826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156200010d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000137919081019062000829565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000176573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620001a0919081019062000829565b604051602001620001b3929190620008e1565b60405160208183030381529060405260009080519060200190620001d9929190620006cb565b50826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000219573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000243919081019062000829565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000282573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620002ac919081019062000829565b604051602001620002bf9291906200093c565b60405160208183030381529060405260019080519060200190620002e5929190620006cb565b5062000505565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156200032b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000355919081019062000829565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000394573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620003be919081019062000829565b604051602001620003d19291906200098d565b60405160208183030381529060405260009080519060200190620003f7929190620006cb565b50826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000437573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000461919081019062000829565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620004a0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620004ca919081019062000829565b604051602001620004dd929190620009ea565b6040516020818303038152906040526001908051906020019062000503929190620006cb565b505b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000544573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200056a919062000a0c565b6200057790600a62000b4d565b6101008181525050816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015620005be573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005e4919062000a0c565b620005f190600a62000b4d565b610120525050604080516080810182524281526000602082018181529282018181526060830182815260088054600181018255935292517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee360049093029283015592517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee482015591517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee5830155517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee6909101555062000b9b565b828054620006d99062000b5e565b90600052602060002090601f016020900481019282620006fd576000855562000748565b82601f106200071857805160ff191683800117855562000748565b8280016001018555821562000748579182015b82811115620007485782518255916020019190600101906200072b565b50620007569291506200075a565b5090565b5b808211156200075657600081556001016200075b565b80516001600160a01b03811681146200078957600080fd5b919050565b600080600060608486031215620007a457600080fd5b620007af8462000771565b9250620007bf6020850162000771565b915060408401518015158114620007d557600080fd5b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000813578181015183820152602001620007f9565b8381111562000823576000848401525b50505050565b6000602082840312156200083c57600080fd5b81516001600160401b03808211156200085457600080fd5b818401915084601f8301126200086957600080fd5b8151818111156200087e576200087e620007e0565b604051601f8201601f19908116603f01168101908382118183101715620008a957620008a9620007e0565b81604052828152876020848701011115620008c357600080fd5b620008d6836020830160208801620007f6565b979650505050505050565b6e029ba30b13632ab189020a6a690169608d1b8152600083516200090d81600f850160208801620007f6565b602f60f81b600f91840191820152835162000930816010840160208801620007f6565b01601001949350505050565b6473414d4d2d60d81b8152600083516200095e816005850160208801620007f6565b602f60f81b600591840191820152835162000981816006840160208801620007f6565b01600601949350505050565b7002b37b630ba34b632ab189020a6a690169607d1b815260008351620009bb816011850160208801620007f6565b602f60f81b6011918401918201528351620009de816012840160208801620007f6565b01601201949350505050565b6476414d4d2d60d81b8152600083516200095e816005850160208801620007f6565b60006020828403121562000a1f57600080fd5b815160ff8116811462000a3157600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000a8f57816000190482111562000a735762000a7362000a38565b8085161562000a8157918102915b93841c939080029062000a53565b509250929050565b60008262000aa85750600162000b47565b8162000ab75750600062000b47565b816001811462000ad0576002811462000adb5762000afb565b600191505062000b47565b60ff84111562000aef5762000aef62000a38565b50506001821b62000b47565b5060208310610133831016604e8410600b841016171562000b20575081810a62000b47565b62000b2c838362000a4e565b806000190482111562000b435762000b4362000a38565b0290505b92915050565b600062000a3160ff84168362000a97565b600181811c9082168062000b7357607f821691505b6020821081141562000b9557634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516101205161364a62000ccb6000396000818161047101528181611acc0152818161295801528181612a1a0152612b2501526000818161044e01528181611a8b0152818161291901528181612a5c0152612aff01526000818161081001526122020152600081816104fb015281816106770152818161071b0152818161094b01528181610c070152818161146d015281816116f801528181611c7c015261258401526000818161030f015281816104d3015281816106520152818161092a01528181610be5015281816113d7015281816116d601528181611c5a015281816124fc0152818161299a015281816129e101528181612ac60152612b690152600081816103c0015281816104a301528181611a6301526128e5015261364a6000f3fe608060405234801561001057600080fd5b506004361061028a5760003560e01c806389afcb441161015c578063c5700a02116100ce578063ebeb31db11610087578063ebeb31db14610797578063ed12c5b41461079f578063f140a35a146107b2578063f3f24eb1146107c5578063f99f51a6146107ce578063fff6cae9146107ef57600080fd5b8063c5700a021461070d578063d21220a714610716578063d505accf1461073d578063dd62ed3e14610750578063e4463eb21461077b578063eba6aef91461078457600080fd5b80639e8cc04b116101205780639e8cc04b146106a25780639f767c88146106b5578063a9059cbb146106d5578063bc25cf77146106e8578063bf944dbc146106fb578063c245febc1461070457600080fd5b806389afcb44146105db5780638a7b8cf2146105ee57806395d89b41146106295780639cf42614146106315780639d63848a1461064457600080fd5b806323b872dd116102005780635881c475116101b95780635881c475146105445780635a76f25e146105575780636a6278421461056057806370a08231146105735780637ecebe00146105935780638334278d146105b357600080fd5b806323b872dd146103e2578063252c09d7146103f5578063313ce56714610428578063392f37e914610442578063443cb4bc14610528578063517b3f821461053157600080fd5b806313345fe11161025257806313345fe11461034957806318160ddd146103695780631df8c717146103805780631ed4202e14610388578063205aabf11461039b57806322be3de1146103bb57600080fd5b8063022c0d9f1461028f57806306fdde03146102a45780630902f1ac146102c2578063095ea7b3146102e75780630dfe16811461030a575b600080fd5b6102a261029d366004613041565b6107f7565b005b6102ac610da4565b6040516102b99190613105565b60405180910390f35b600954600a54600b545b604080519384526020840192909252908201526060016102b9565b6102fa6102f5366004613138565b610e32565b60405190151581526020016102b9565b6103317f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102b9565b61035c610357366004613162565b610e9f565b6040516102b991906131d6565b61037260025481565b6040519081526020016102b9565b6102cc6110d0565b6103726103963660046131e9565b61113f565b6103726103a9366004613202565b60106020526000908152604090205481565b6102fa7f000000000000000000000000000000000000000000000000000000000000000081565b6102fa6103f036600461321d565b61119e565b6104086104033660046131e9565b611267565b6040805194855260208501939093529183015260608201526080016102b9565b610430601281565b60405160ff90911681526020016102b9565b600954600a54604080517f000000000000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060208201529081019290925260608201527f0000000000000000000000000000000000000000000000000000000000000000151560808201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660a08301527f00000000000000000000000000000000000000000000000000000000000000001660c082015260e0016102b9565b61037260095481565b61037261053f366004613138565b6112a1565b61035c610552366004613259565b611394565b610372600a5481565b61037261056e366004613202565b6113a3565b610372610581366004613202565b60046020526000908152604090205481565b6103726105a1366004613202565b60066020526000908152604090205481565b6105c66105c13660046131e9565b611600565b604080519283526020830191909152016102b9565b6105c66105e9366004613202565b6116a4565b6105f66119c1565b6040516102b991908151815260208083015190820152604080830151908201526060918201519181019190915260800190565b6102ac611a52565b61037261063f36600461328c565b611a5f565b604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f0000000000000000000000000000000000000000000000000000000000000000166020820152016102b9565b6103726106b0366004613259565b611bab565b6103726106c3366004613202565b600f6020526000908152604090205481565b6102fa6106e3366004613138565b611c18565b6102a26106f6366004613202565b611c2e565b610372600c5481565b610372600d5481565b610372600b5481565b6103317f000000000000000000000000000000000000000000000000000000000000000081565b6102a261074b3660046132ae565b611d4c565b61037261075e366004613321565b600360209081526000928352604080842090915290825290205481565b61037260075481565b61035c61079236600461328c565b612041565b600854610372565b6102a26107ad3660046131e9565b6121f7565b6103726107c0366004613354565b612231565b610372600e5481565b6107e16107dc36600461328c565b612250565b6040516102b9929190613377565b6102a26124cf565b60115460011461080657600080fd5b60026011819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b187bd266040518163ffffffff1660e01b8152600401602060405180830381865afa15801561086c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610890919061339c565b1561089a57600080fd5b60008511806108a95750600084115b6108e05760405162461bcd60e51b8152602060048201526003602482015262494f4160e81b60448201526064015b60405180910390fd5b600954600a5481871080156108f457508086105b6109255760405162461bcd60e51b8152602060048201526002602482015261125360f21b60448201526064016108d7565b6000807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03898116908316148015906109985750806001600160a01b0316896001600160a01b031614155b6109c95760405162461bcd60e51b8152602060048201526002602482015261125560f21b60448201526064016108d7565b8a156109da576109da828a8d612609565b89156109eb576109eb818a8c612609565b8615610a5857604051639a7bff7960e01b81526001600160a01b038a1690639a7bff7990610a259033908f908f908e908e906004016133be565b600060405180830381600087803b158015610a3f57600080fd5b505af1158015610a53573d6000803e3d6000fd5b505050505b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610a9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac0919061340a565b6040516370a0823160e01b81523060048201529094506001600160a01b038216906370a0823190602401602060405180830381865afa158015610b07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2b919061340a565b9250505060008985610b3d9190613439565b8311610b4a576000610b5e565b610b548a86613439565b610b5e9084613439565b90506000610b6c8a86613439565b8311610b79576000610b8d565b610b838a86613439565b610b8d9084613439565b90506000821180610b9e5750600081115b610bd05760405162461bcd60e51b815260206004820152600360248201526249494160e81b60448201526064016108d7565b6040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610c58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7c919061340a565b6040516370a0823160e01b81523060048201529096506001600160a01b038216906370a0823190602401602060405180830381865afa158015610cc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce7919061340a565b9450610cf38888611a5f565b610cfd8787611a5f565b1015610d2f5760405162461bcd60e51b81526020600482015260016024820152604b60f81b60448201526064016108d7565b5050610d3d848488886126f8565b60408051838152602081018390529081018c9052606081018b90526001600160a01b038a169033907fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229060800160405180910390a350506001601155505050505050505050565b60008054610db190613450565b80601f0160208091040260200160405190810160405280929190818152602001828054610ddd90613450565b8015610e2a5780601f10610dff57610100808354040283529160200191610e2a565b820191906000526020600020905b815481529060010190602001808311610e0d57829003601f168201915b505050505081565b3360008181526003602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610e8d9086815260200190565b60405180910390a35060015b92915050565b606060008367ffffffffffffffff811115610ebc57610ebc613485565b604051908082528060200260200182016040528015610ee5578160200160208202803683370190505b50600854909150600090610efb90600190613439565b9050610f07848661349b565b811015610f265760405162461bcd60e51b81526004016108d7906134ba565b6000610f32858761349b565b610f3c9083613439565b90506000805b838310156110c057610f5487846134f1565b9150600060088481548110610f6b57610f6b613509565b90600052602060002090600402016000015460088481548110610f9057610f90613509565b906000526020600020906004020160000154610fac9190613439565b905060008160088681548110610fc457610fc4613509565b90600052602060002090600402016001015460088681548110610fe957610fe9613509565b9060005260206000209060040201600101546110059190613439565b61100f919061351f565b90506000826008878154811061102757611027613509565b9060005260206000209060040201600201546008878154811061104c5761104c613509565b9060005260206000209060040201600201546110689190613439565b611072919061351f565b90506110808c8e84846128e1565b88858151811061109257611092613509565b60209081029190910101526110a88460016134f1565b935050505086836110b991906134f1565b9250610f42565b509293505050505b949350505050565b600c54600d5442600080806110ee600954600a54600b549192909190565b9250925092508381146111375760006111078286613439565b9050611113818561349b565b61111d90886134f1565b9650611129818461349b565b61113390876134f1565b9550505b505050909192565b60008061114d836001612041565b90506000805b82518110156111935782818151811061116e5761116e613509565b60200260200101518261118191906134f1565b915061118c81613541565b9050611153565b506110c8848261351f565b6001600160a01b0383166000818152600360209081526040808320338085529252822054919290919082148015906111d857506000198114155b1561124e5760006111e98583613439565b6001600160a01b038881166000818152600360209081526040808320948916808452948252918290208590559051848152939450919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505b611259868686612bd6565b6001925050505b9392505050565b6008818154811061127757600080fd5b60009182526020909120600490910201805460018201546002830154600390930154919350919084565b6000806112ac6119c1565b90506000806112b96110d0565b508451919350915042141561132c57600880546112d890600290613439565b815481106112e8576112e8613509565b906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505092505b825160009061133b9042613439565b90506000818560200151856113509190613439565b61135a919061351f565b905060008286604001518561136f9190613439565b611379919061351f565b9050611387888a84846128e1565b9998505050505050505050565b60606110c88484846001610e9f565b60006011546001146113b457600080fd5b6002601155600954600a546040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144a919061340a565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156114b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d8919061340a565b905060006114e68584613439565b905060006114f48584613439565b60025490915080611532576103e861151461150f848661349b565b612c84565b61151e9190613439565b975061152d60006103e8612cf4565b611567565b61156487611540838661349b565b61154a919061351f565b87611555848661349b565b61155f919061351f565b612d7e565b97505b6000881161159d5760405162461bcd60e51b8152602060048201526003602482015262494c4d60e81b60448201526064016108d7565b6115a78989612cf4565b6115b3858589896126f8565b604080518481526020810184905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a250506001601155509395945050505050565b600080600080611611856001612250565b9150915060008060005b84518110156116825784818151811061163657611636613509565b60200260200101518361164991906134f1565b925083818151811061165d5761165d613509565b60200260200101518261167091906134f1565b915061167b81613541565b905061161b565b5061168d878361351f565b611697888361351f565b9550955050505050915091565b6000806011546001146116b657600080fd5b6002601155600954600a546040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000907f0000000000000000000000000000000000000000000000000000000000000000906000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561174c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611770919061340a565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156117ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117de919061340a565b306000908152600460205260409020546002549192509080611800858461349b565b61180a919061351f565b995080611817848461349b565b611821919061351f565b985060008a1180156118335750600089115b6118655760405162461bcd60e51b815260206004820152600360248201526224a62160e91b60448201526064016108d7565b61186f3083612d94565b61187a868c8c612609565b611885858c8b612609565b6040516370a0823160e01b81523060048201526001600160a01b038716906370a0823190602401602060405180830381865afa1580156118c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ed919061340a565b6040516370a0823160e01b81523060048201529094506001600160a01b038616906370a0823190602401602060405180830381865afa158015611934573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611958919061340a565b925061196684848a8a6126f8565b604080518b8152602081018b90526001600160a01b038d169133917fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496910160405180910390a350505050505050506001601181905550915091565b6119ec6040518060800160405280600081526020016000815260200160008152602001600081525090565b600880546119fc90600190613439565b81548110611a0c57611a0c613509565b9060005260206000209060040201604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050905090565b60018054610db190613450565b60007f000000000000000000000000000000000000000000000000000000000000000015611b9a5760007f0000000000000000000000000000000000000000000000000000000000000000611abc85670de0b6b3a764000061349b565b611ac6919061351f565b905060007f0000000000000000000000000000000000000000000000000000000000000000611afd85670de0b6b3a764000061349b565b611b07919061351f565b90506000670de0b6b3a7640000611b1e838561349b565b611b28919061351f565b90506000670de0b6b3a7640000611b3f848061349b565b611b49919061351f565b670de0b6b3a7640000611b5c868061349b565b611b66919061351f565b611b7091906134f1565b9050670de0b6b3a7640000611b85828461349b565b611b8f919061351f565b945050505050610e99565b611ba4828461349b565b9050610e99565b600080611bbb8585856001610e9f565b90506000805b8251811015611c0357828181518110611bdc57611bdc613509565b602002602001015182611bef91906134f1565b915080611bfb81613541565b915050611bc1565b50611c0e848261351f565b9695505050505050565b6000611c25338484612bd6565b50600192915050565b601154600114611c3d57600080fd5b60026011556009546040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000917f000000000000000000000000000000000000000000000000000000000000000091611d0a9184918691906001600160a01b038416906370a08231906024015b602060405180830381865afa158015611cd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cfb919061340a565b611d059190613439565b612609565b600a546040516370a0823160e01b8152306004820152611d429183918691906001600160a01b038416906370a0823190602401611cba565b5050600160115550565b42841015611d8e5760405162461bcd60e51b815260206004820152600f60248201526e10985cd9558c4e8811561412549151608a1b60448201526064016108d7565b7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051611dbe919061355c565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051601f19818403018152918152815160209283012060058190556001600160a01b038a166000908152600690935290822080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b919087611e7483613541565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001611eed92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015611f58573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590611f8e5750886001600160a01b0316816001600160a01b0316145b611fda5760405162461bcd60e51b815260206004820152601960248201527f4261736556313a20494e56414c49445f5349474e41545552450000000000000060448201526064016108d7565b6001600160a01b038981166000818152600360209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b606060008367ffffffffffffffff81111561205e5761205e613485565b604051908082528060200260200182016040528015612087578160200160208202803683370190505b5060085490915060009061209d90600190613439565b90506120a9848661349b565b8110156120c85760405162461bcd60e51b81526004016108d7906134ba565b60006120d4858761349b565b6120de9083613439565b905060008060005b848410156121ea576120f888856134f1565b92506008848154811061210d5761210d613509565b9060005260206000209060040201600001546008848154811061213257612132613509565b90600052602060002090600402016000015461214e9190613439565b9050806008858154811061216457612164613509565b9060005260206000209060040201600301546008858154811061218957612189613509565b9060005260206000209060040201600301546121a59190613439565b6121af919061351f565b8683815181106121c1576121c1613509565b60209081029190910101526121d78260016134f1565b91506121e388856134f1565b93506120e6565b5093979650505050505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461222c57600080fd5b600755565b600954600a5460009190612247858584846128e1565b95945050505050565b60608060008467ffffffffffffffff81111561226e5761226e613485565b604051908082528060200260200182016040528015612297578160200160208202803683370190505b50905060008567ffffffffffffffff8111156122b5576122b5613485565b6040519080825280602002602001820160405280156122de578160200160208202803683370190505b506008549091506000906122f490600190613439565b9050612300868861349b565b81101561231f5760405162461bcd60e51b81526004016108d7906134ba565b600061232b878961349b565b6123359083613439565b905060008060005b848410156124be5761234f8a856134f1565b92506008848154811061236457612364613509565b9060005260206000209060040201600001546008848154811061238957612389613509565b9060005260206000209060040201600001546123a59190613439565b905080600885815481106123bb576123bb613509565b906000526020600020906004020160010154600885815481106123e0576123e0613509565b9060005260206000209060040201600101546123fc9190613439565b612406919061351f565b87838151811061241857612418613509565b602002602001018181525050806008858154811061243857612438613509565b9060005260206000209060040201600201546008858154811061245d5761245d613509565b9060005260206000209060040201600201546124799190613439565b612483919061351f565b86838151811061249557612495613509565b60209081029190910101526124ab8260016134f1565b91506124b78a856134f1565b935061233d565b509499939850929650505050505050565b6011546001146124de57600080fd5b60026011556040516370a0823160e01b8152306004820152612602907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561254b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256f919061340a565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156125d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f7919061340a565b600954600a546126f8565b6001601155565b6000836001600160a01b03163b1161262057600080fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161267c91906135f8565b6000604051808303816000865af19150503d80600081146126b9576040519150601f19603f3d011682016040523d82523d6000602084013e6126be565b606091505b50915091508180156126e85750805115806126e85750808060200190518101906126e8919061339c565b6126f157600080fd5b5050505050565b600b54429060009061270a9083613439565b905060008111801561271b57508315155b801561272657508215155b1561279157612735818561349b565b600c600082825461274691906134f1565b909155506127569050818461349b565b600d600082825461276791906134f1565b909155505060025461277a90829061349b565b600e600082825461278b91906134f1565b90915550505b600061279b6119c1565b80519091506127aa9084613439565b91506007548211156128905760408051608081018252848152600c5460208201908152600d54928201928352600e54606083019081526008805460018101825560009190915292517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee360049094029384015590517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee483015591517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee582015590517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee6909101555b6009879055600a869055600b83905560408051888152602081018890527fcf2aa50876cdfbb541206f89af0ee78d44a2abf8d328e37fa4917f982149848a910160405180910390a150505050505050565b60007f000000000000000000000000000000000000000000000000000000000000000015612b645760006129158484611a5f565b90507f000000000000000000000000000000000000000000000000000000000000000061294a85670de0b6b3a764000061349b565b612954919061351f565b93507f000000000000000000000000000000000000000000000000000000000000000061298984670de0b6b3a764000061349b565b612993919061351f565b92506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b0316146129d85784866129db565b85855b915091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b031614612a5a577f0000000000000000000000000000000000000000000000000000000000000000612a4b89670de0b6b3a764000061349b565b612a55919061351f565b612a97565b7f0000000000000000000000000000000000000000000000000000000000000000612a8d89670de0b6b3a764000061349b565b612a97919061351f565b97506000612aaf612aa8848b6134f1565b8584612e16565b612ab99083613439565b9050670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316896001600160a01b031614612b23577f0000000000000000000000000000000000000000000000000000000000000000612b45565b7f00000000000000000000000000000000000000000000000000000000000000005b612b4f908361349b565b612b59919061351f565b9450505050506110c8565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316866001600160a01b031614612ba7578385612baa565b84845b9092509050612bb987836134f1565b612bc3828961349b565b612bcd919061351f565b925050506110c8565b6001600160a01b03831660009081526004602052604081208054839290612bfe908490613439565b90915550506001600160a01b03821660009081526004602052604081208054839290612c2b9084906134f1565b92505081905550816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612c7791815260200190565b60405180910390a3505050565b60006003821115612ce55750806000612c9e60028361351f565b612ca99060016134f1565b90505b81811015612cdf57905080600281612cc4818661351f565b612cce91906134f1565b612cd8919061351f565b9050612cac565b50919050565b8115612cef575060015b919050565b8060026000828254612d0691906134f1565b90915550506001600160a01b03821660009081526004602052604081208054839290612d339084906134f1565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b6000818310612d8d5781611260565b5090919050565b8060026000828254612da69190613439565b90915550506001600160a01b03821660009081526004602052604081208054839290612dd3908490613439565b90915550506040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001612d72565b6000805b60ff811015612f1c57826000612e308783612f25565b905085811015612e80576000612e468887612fc2565b612e508389613439565b612e6290670de0b6b3a764000061349b565b612e6c919061351f565b9050612e7881876134f1565b955050612ec2565b6000612e8c8887612fc2565b612e968884613439565b612ea890670de0b6b3a764000061349b565b612eb2919061351f565b9050612ebe8187613439565b9550505b81851115612eeb576001612ed68387613439565b11612ee657849350505050611260565b612f07565b6001612ef78684613439565b11612f0757849350505050611260565b50508080612f1490613541565b915050612e1a565b50909392505050565b6000670de0b6b3a764000082818581612f3e828061349b565b612f48919061351f565b612f52919061349b565b612f5c919061351f565b612f66919061349b565b612f70919061351f565b670de0b6b3a7640000808481612f86828061349b565b612f90919061351f565b612f9a919061349b565b612fa4919061351f565b612fae908661349b565b612fb8919061351f565b61126091906134f1565b6000670de0b6b3a76400008381612fd9828061349b565b612fe3919061351f565b612fed919061349b565b612ff7919061351f565b670de0b6b3a76400008061300b858061349b565b613015919061351f565b61302086600361349b565b612fae919061349b565b80356001600160a01b0381168114612cef57600080fd5b60008060008060006080868803121561305957600080fd5b85359450602086013593506130706040870161302a565b9250606086013567ffffffffffffffff8082111561308d57600080fd5b818801915088601f8301126130a157600080fd5b8135818111156130b057600080fd5b8960208285010111156130c257600080fd5b9699959850939650602001949392505050565b60005b838110156130f05781810151838201526020016130d8565b838111156130ff576000848401525b50505050565b60208152600082518060208401526131248160408501602087016130d5565b601f01601f19169190910160400192915050565b6000806040838503121561314b57600080fd5b6131548361302a565b946020939093013593505050565b6000806000806080858703121561317857600080fd5b6131818561302a565b966020860135965060408601359560600135945092505050565b600081518084526020808501945080840160005b838110156131cb578151875295820195908201906001016131af565b509495945050505050565b602081526000611260602083018461319b565b6000602082840312156131fb57600080fd5b5035919050565b60006020828403121561321457600080fd5b6112608261302a565b60008060006060848603121561323257600080fd5b61323b8461302a565b92506132496020850161302a565b9150604084013590509250925092565b60008060006060848603121561326e57600080fd5b6132778461302a565b95602085013595506040909401359392505050565b6000806040838503121561329f57600080fd5b50508035926020909101359150565b600080600080600080600060e0888a0312156132c957600080fd5b6132d28861302a565b96506132e06020890161302a565b95506040880135945060608801359350608088013560ff8116811461330457600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561333457600080fd5b61333d8361302a565b915061334b6020840161302a565b90509250929050565b6000806040838503121561336757600080fd5b8235915061334b6020840161302a565b60408152600061338a604083018561319b565b8281036020840152612247818561319b565b6000602082840312156133ae57600080fd5b8151801515811461126057600080fd5b60018060a01b038616815284602082015283604082015260806060820152816080820152818360a0830137600081830160a090810191909152601f909201601f19160101949350505050565b60006020828403121561341c57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561344b5761344b613423565b500390565b600181811c9082168061346457607f821691505b60208210811415612cdf57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60008160001904831182151516156134b5576134b5613423565b500290565b6020808252601b908201527f504149523a3a4e4f5420524541445920464f522050524943494e470000000000604082015260600190565b6000821982111561350457613504613423565b500190565b634e487b7160e01b600052603260045260246000fd5b60008261353c57634e487b7160e01b600052601260045260246000fd5b500490565b600060001982141561355557613555613423565b5060010190565b600080835481600182811c91508083168061357857607f831692505b602080841082141561359857634e487b7160e01b86526022600452602486fd5b8180156135ac57600181146135bd576135ea565b60ff198616895284890196506135ea565b60008a81526020902060005b868110156135e25781548b8201529085019083016135c9565b505084890196505b509498975050505050505050565b6000825161360a8184602087016130d5565b919091019291505056fea26469706673582212204821d8e8821b11c85366edaadfce5a889446fd79c95a019c193175f24bd844e164736f6c634300080b0033a2646970667358221220bf3f6b861220109ff59d3be40090441370e8ee3e84837c056ac41b7ab0dbc8e864736f6c634300080b0033", | |
"sourceMap": "23395:2975:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24860:121;;;:::i;:::-;;23660:25;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;363:32:2;;;345:51;;333:2;318:18;23660:25:0;;;;;;;;24725:127;;;;;;:::i;:::-;;:::i;24621:96::-;24694:8;:15;24621:96;;;922:25:2;;;910:2;895:18;24621:96:0;776:177:2;23574:79:0;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;23574:79:0;;;24198:115;;;;;;:::i;:::-;;:::i;25375:992::-;;;;;;:::i;:::-;;:::i;23482:28::-;;;;;-1:-1:-1;;;;;23482:28:0;;;25113:122;;;:::i;23454:21::-;;;;;;;;-1:-1:-1;;;;;23454:21:0;;;23427:20;;;;;;;;;;;;1803:14:2;;1796:22;1778:41;;1766:2;1751:18;23427:20:0;1638:187:2;24989:116:0;;;;;;:::i;:::-;;:::i;23692:38::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;25243:124;25337:6;;25345;;25243:124;;;-1:-1:-1;;;;;25337:6:0;;;2249:34:2;;25345:6:0;;;2314:2:2;2299:18;;2292:43;-1:-1:-1;;;25353:5:0;;;;;2378:14:2;2371:22;2351:18;;;2344:50;2199:2;2184:18;25243:124:0;2015:385:2;24321:290:0;;;;;;:::i;:::-;;:::i;23517:20::-;;;;;-1:-1:-1;;;;;23517:20:0;;;24860:121;24926:13;;-1:-1:-1;;;;;24926:13:0;24912:10;:27;24904:36;;;;;;24960:13;;;24951:22;;-1:-1:-1;;;;;24960:13:0;;;;24951:22;-1:-1:-1;;;;;;24951:22:0;;;;;;;;;24860:121::o;23660:25::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;23660:25:0;;-1:-1:-1;23660:25:0;:::o;24725:127::-;24803:6;;;;;-1:-1:-1;;;;;24803:6:0;24789:10;:20;24781:29;;;;;;24821:13;:23;;-1:-1:-1;;;;;;24821:23:0;-1:-1:-1;;;;;24821:23:0;;;;;;;;;;24725:127::o;24198:115::-;24274:5;;-1:-1:-1;;;;;24274:5:0;24260:10;:19;24252:28;;;;;;24291:5;:14;;-1:-1:-1;;;;;;24291:14:0;-1:-1:-1;;;;;24291:14:0;;;;;;;;;;24198:115::o;25375:992::-;25458:12;25501:6;-1:-1:-1;;;;;25491:16:0;:6;-1:-1:-1;;;;;25491:16:0;;;25483:31;;;;-1:-1:-1;;;25483:31:0;;2607:2:2;25483:31:0;;;2589:21:2;2646:1;2626:18;;;2619:29;-1:-1:-1;;;2664:18:2;;;2657:32;2706:18;;25483:31:0;;;;;;;;;25557:14;25573;25600:6;-1:-1:-1;;;;;25591:15:0;:6;-1:-1:-1;;;;;25591:15:0;;:53;;25629:6;25637;25591:53;;;25610:6;25618;25591:53;25556:88;;-1:-1:-1;25556:88:0;-1:-1:-1;;;;;;25663:20:0;;25655:35;;;;-1:-1:-1;;;25655:35:0;;2937:2:2;25655:35:0;;;2919:21:2;2976:1;2956:18;;;2949:29;-1:-1:-1;;;2994:18:2;;;2987:32;3036:18;;25655:35:0;2735:325:2;25655:35:0;-1:-1:-1;;;;;25733:15:0;;;25776:1;25733:15;;;:7;:15;;;;;;;;:23;;;;;;;;;;:31;;;;;;;;;;;;:45;25725:60;;;;-1:-1:-1;;;25725:60:0;;3267:2:2;25725:60:0;;;3249:21:2;3306:1;3286:18;;;3279:29;-1:-1:-1;;;3324:18:2;;;3317:32;3366:18;;25725:60:0;3065:325:2;25725:60:0;25873:40;;-1:-1:-1;;3644:2:2;3640:15;;;3636:24;;25873:40:0;;;3624:37:2;3695:15;;;3691:24;3677:12;;;3670:46;3762:14;;3755:22;3750:3;3746:32;3732:12;;;3725:54;25848:12:0;;3795::2;;25873:40:0;;;-1:-1:-1;;25873:40:0;;;;;;;;;;25863:51;;25873:40;25863:51;;;;25987:6;25978:50;;-1:-1:-1;;;;;25978:50:0;;;-1:-1:-1;;;;;;25978:50:0;;;-1:-1:-1;;;25978:50:0;;;-1:-1:-1;;;;;;25978:50:0;;;;;;;;;;;25979:6;25978:50;;;;;;;;;;;;;;;25863:51;-1:-1:-1;25863:51:0;;26054:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;26093:15:0;;;;;;;:7;:15;;;;;;;;:23;;;;;;;;;;;;:31;;;;;;;;;;;;:38;;;;;-1:-1:-1;;;;;;26093:38:0;;;;;;;;26142:15;;;;;;;;;:23;;;;;;;;:31;;;;;;;;:38;;;;;;;;26236:8;:19;;-1:-1:-1;26236:19:0;;;;;;;;;;;;;;;;;;;26266:12;;;:6;:12;;;;;;:19;;-1:-1:-1;;26266:19:0;;;;;;;26343:15;;26301:58;;4014:41:2;;;4071:18;;;4064:60;;;;4140:18;;;4133:34;26093:38:0;;-1:-1:-1;26093:15:0;26301:58;;4002:2:2;3987:18;26301:58:0;;;;;;;25472:895;;;25375:992;;;;;:::o;25113:122::-;25160:7;25197:29;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;25187:40;;;;;;25180:47;;25113:122;:::o;24989:116::-;25062:6;;;;;-1:-1:-1;;;;;25062:6:0;25048:10;:20;25040:29;;;;;;25080:8;:17;;-1:-1:-1;;25080:17:0;;;;;;;;;;24989:116::o;24321:290::-;24402:5;;-1:-1:-1;;;;;24402:5:0;24388:10;:19;24380:28;;;;;;24440:9;;24427;:22;;24419:31;;;;;;24468:6;24463:141;24480:8;:15;24476:19;;24463:141;;;24525:8;24534:1;24525:11;;;;;;;;:::i;:::-;;;;;;;;;;;24514:48;;-1:-1:-1;;;24514:48:0;;;;;922:25:2;;;-1:-1:-1;;;;;24525:11:0;;;;24514:37;;895:18:2;;24514:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24588:3;;;;;24463:141;;;;24321:290;:::o;-1:-1:-1:-;;;;;;;;:::o;14:180:2:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:2;;14:180;-1:-1:-1;14:180:2:o;407:173::-;475:20;;-1:-1:-1;;;;;524:31:2;;514:42;;504:70;;570:1;567;560:12;504:70;407:173;;;:::o;585:186::-;644:6;697:2;685:9;676:7;672:23;668:32;665:52;;;713:1;710;703:12;665:52;736:29;755:9;736:29;:::i;:::-;726:39;585:186;-1:-1:-1;;;585:186:2:o;958:160::-;1023:20;;1079:13;;1072:21;1062:32;;1052:60;;1108:1;1105;1098:12;1123:328;1197:6;1205;1213;1266:2;1254:9;1245:7;1241:23;1237:32;1234:52;;;1282:1;1279;1272:12;1234:52;1305:29;1324:9;1305:29;:::i;:::-;1295:39;;1353:38;1387:2;1376:9;1372:18;1353:38;:::i;:::-;1343:48;;1410:35;1441:2;1430:9;1426:18;1410:35;:::i;:::-;1400:45;;1123:328;;;;;:::o;1830:180::-;1886:6;1939:2;1927:9;1918:7;1914:23;1910:32;1907:52;;;1955:1;1952;1945:12;1907:52;1978:26;1994:9;1978:26;:::i;4178:127::-;4239:10;4234:3;4230:20;4227:1;4220:31;4270:4;4267:1;4260:15;4294:4;4291:1;4284:15", | |
"linkReferences": {} | |
}, | |
"methodIdentifiers": { | |
"acceptPauser()": "167a6f90", | |
"admin()": "f851a440", | |
"allPairs(uint256)": "1e3dd18b", | |
"allPairsLength()": "574f2ba3", | |
"createPair(address,address,bool)": "82dfdce4", | |
"getInitializable()": "eb13c4cf", | |
"getPair(address,address,bool)": "6801cc30", | |
"isPair(address)": "e5e31b13", | |
"isPaused()": "b187bd26", | |
"pairCodeHash()": "9aab9248", | |
"pauser()": "9fd0506d", | |
"pendingPauser()": "9a7165e4", | |
"setAdmin(address)": "704b6c02", | |
"setPause(bool)": "bedb86fb", | |
"setPauser(address)": "2d88af4a", | |
"setPeriodSize(uint256)": "ed12c5b4" | |
}, | |
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.11+commit.d7f03943\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token0\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token1\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"stable\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"PairCreated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"allPairs\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allPairsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"stable\",\"type\":\"bool\"}],\"name\":\"createPair\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getInitializable\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"name\":\"getPair\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isPair\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pairCodeHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pauser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingPauser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_state\",\"type\":\"bool\"}],\"name\":\"setPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_pauser\",\"type\":\"address\"}],\"name\":\"setPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newPeriod\",\"type\":\"uint256\"}],\"name\":\"setPeriodSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/BaseV1-core.sol\":\"BaseV1Factory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"src/BaseV1-core.sol\":{\"keccak256\":\"0xa1fdca125920ee1ccde44963c093474650f9b8939a79aa76de9243c58e9dcef6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ed9a06aaa82b119905c6f6802d4d91bc2b91fb7ee0139755bf37c68e8eb2a6fe\",\"dweb:/ipfs/QmS2t2GZeGYBFKzGkM9QUE9w5JxHqGZCsDux9caQhinWUs\"]},\"src/BaseV1-libs.sol\":{\"keccak256\":\"0x85b323014d6ee76d81806c44787ff6e8aaeb1fd843b60ac44834c7e8bc1a1079\",\"urls\":[\"bzz-raw://4de2cd640e5b6b0f71a06c75594f063c7f95a5e2b1c899517908f705e0bdd7bc\",\"dweb:/ipfs/QmYbpB2jawP614FFdbzjnhAwh1Z3jVGF84utjZ4pb4SY2v\"]}},\"version\":1}", | |
"metadata": { | |
"compiler": { | |
"version": "0.8.11+commit.d7f03943" | |
}, | |
"language": "Solidity", | |
"output": { | |
"abi": [ | |
{ | |
"inputs": [], | |
"stateMutability": "nonpayable", | |
"type": "constructor" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "token0", | |
"type": "address", | |
"indexed": true | |
}, | |
{ | |
"internalType": "address", | |
"name": "token1", | |
"type": "address", | |
"indexed": true | |
}, | |
{ | |
"internalType": "bool", | |
"name": "stable", | |
"type": "bool", | |
"indexed": false | |
}, | |
{ | |
"internalType": "address", | |
"name": "pair", | |
"type": "address", | |
"indexed": false | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256", | |
"indexed": false | |
} | |
], | |
"type": "event", | |
"name": "PairCreated", | |
"anonymous": false | |
}, | |
{ | |
"inputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function", | |
"name": "acceptPauser" | |
}, | |
{ | |
"inputs": [], | |
"stateMutability": "view", | |
"type": "function", | |
"name": "admin", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
] | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function", | |
"name": "allPairs", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
] | |
}, | |
{ | |
"inputs": [], | |
"stateMutability": "view", | |
"type": "function", | |
"name": "allPairsLength", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
] | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "tokenA", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "tokenB", | |
"type": "address" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "stable", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function", | |
"name": "createPair", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "pair", | |
"type": "address" | |
} | |
] | |
}, | |
{ | |
"inputs": [], | |
"stateMutability": "view", | |
"type": "function", | |
"name": "getInitializable", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
] | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
}, | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function", | |
"name": "getPair", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
] | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function", | |
"name": "isPair", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
] | |
}, | |
{ | |
"inputs": [], | |
"stateMutability": "view", | |
"type": "function", | |
"name": "isPaused", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
] | |
}, | |
{ | |
"inputs": [], | |
"stateMutability": "pure", | |
"type": "function", | |
"name": "pairCodeHash", | |
"outputs": [ | |
{ | |
"internalType": "bytes32", | |
"name": "", | |
"type": "bytes32" | |
} | |
] | |
}, | |
{ | |
"inputs": [], | |
"stateMutability": "view", | |
"type": "function", | |
"name": "pauser", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
] | |
}, | |
{ | |
"inputs": [], | |
"stateMutability": "view", | |
"type": "function", | |
"name": "pendingPauser", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
] | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "admin_", | |
"type": "address" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function", | |
"name": "setAdmin" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "bool", | |
"name": "_state", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function", | |
"name": "setPause" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "_pauser", | |
"type": "address" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function", | |
"name": "setPauser" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "newPeriod", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function", | |
"name": "setPeriodSize" | |
} | |
], | |
"devdoc": { | |
"kind": "dev", | |
"methods": {}, | |
"version": 1 | |
}, | |
"userdoc": { | |
"kind": "user", | |
"methods": {}, | |
"version": 1 | |
} | |
}, | |
"settings": { | |
"remappings": [ | |
":ds-test/=lib/forge-std/lib/ds-test/src/", | |
":forge-std/=lib/forge-std/src/" | |
], | |
"optimizer": { | |
"enabled": true, | |
"runs": 200 | |
}, | |
"metadata": { | |
"bytecodeHash": "ipfs" | |
}, | |
"compilationTarget": { | |
"src/BaseV1-core.sol": "BaseV1Factory" | |
}, | |
"libraries": {} | |
}, | |
"sources": { | |
"src/BaseV1-core.sol": { | |
"keccak256": "0xa1fdca125920ee1ccde44963c093474650f9b8939a79aa76de9243c58e9dcef6", | |
"urls": [ | |
"bzz-raw://ed9a06aaa82b119905c6f6802d4d91bc2b91fb7ee0139755bf37c68e8eb2a6fe", | |
"dweb:/ipfs/QmS2t2GZeGYBFKzGkM9QUE9w5JxHqGZCsDux9caQhinWUs" | |
], | |
"license": "MIT" | |
}, | |
"src/BaseV1-libs.sol": { | |
"keccak256": "0x85b323014d6ee76d81806c44787ff6e8aaeb1fd843b60ac44834c7e8bc1a1079", | |
"urls": [ | |
"bzz-raw://4de2cd640e5b6b0f71a06c75594f063c7f95a5e2b1c899517908f705e0bdd7bc", | |
"dweb:/ipfs/QmYbpB2jawP614FFdbzjnhAwh1Z3jVGF84utjZ4pb4SY2v" | |
], | |
"license": null | |
} | |
}, | |
"version": 1 | |
}, | |
"ast": { | |
"absolutePath": "src/BaseV1-core.sol", | |
"id": 2926, | |
"exportedSymbols": { | |
"BaseV1Factory": [ | |
2925 | |
], | |
"BaseV1Pair": [ | |
2584 | |
], | |
"IBaseV1Callee": [ | |
14 | |
], | |
"Math": [ | |
3051 | |
], | |
"erc20": [ | |
2979 | |
] | |
}, | |
"nodeType": "SourceUnit", | |
"src": "33:26337:0", | |
"nodes": [ | |
{ | |
"id": 1, | |
"nodeType": "PragmaDirective", | |
"src": "33:23:0", | |
"nodes": [], | |
"literals": [ | |
"solidity", | |
"0.8", | |
".11" | |
] | |
}, | |
{ | |
"id": 2, | |
"nodeType": "ImportDirective", | |
"src": "60:27:0", | |
"nodes": [], | |
"absolutePath": "src/BaseV1-libs.sol", | |
"file": "./BaseV1-libs.sol", | |
"nameLocation": "-1:-1:-1", | |
"scope": 2926, | |
"sourceUnit": 3052, | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"id": 14, | |
"nodeType": "ContractDefinition", | |
"src": "91:122:0", | |
"nodes": [ | |
{ | |
"id": 13, | |
"nodeType": "FunctionDefinition", | |
"src": "122:88:0", | |
"nodes": [], | |
"functionSelector": "9a7bff79", | |
"implemented": false, | |
"kind": "function", | |
"modifiers": [], | |
"name": "hook", | |
"nameLocation": "131:4:0", | |
"parameters": { | |
"id": 11, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 4, | |
"mutability": "mutable", | |
"name": "sender", | |
"nameLocation": "144:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 13, | |
"src": "136:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 3, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "136:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 6, | |
"mutability": "mutable", | |
"name": "amount0", | |
"nameLocation": "157:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 13, | |
"src": "152:12:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 5, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "152:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 8, | |
"mutability": "mutable", | |
"name": "amount1", | |
"nameLocation": "171:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 13, | |
"src": "166:12:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 7, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "166:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 10, | |
"mutability": "mutable", | |
"name": "data", | |
"nameLocation": "195:4:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 13, | |
"src": "180:19:0", | |
"stateVariable": false, | |
"storageLocation": "calldata", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes_calldata_ptr", | |
"typeString": "bytes" | |
}, | |
"typeName": { | |
"id": 9, | |
"name": "bytes", | |
"nodeType": "ElementaryTypeName", | |
"src": "180:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes_storage_ptr", | |
"typeString": "bytes" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "135:65:0" | |
}, | |
"returnParameters": { | |
"id": 12, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "209:0:0" | |
}, | |
"scope": 14, | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "external" | |
} | |
], | |
"abstract": false, | |
"baseContracts": [], | |
"canonicalName": "IBaseV1Callee", | |
"contractDependencies": [], | |
"contractKind": "interface", | |
"fullyImplemented": false, | |
"linearizedBaseContracts": [ | |
14 | |
], | |
"name": "IBaseV1Callee", | |
"nameLocation": "101:13:0", | |
"scope": 2926, | |
"usedErrors": [] | |
}, | |
{ | |
"id": 2584, | |
"nodeType": "ContractDefinition", | |
"src": "271:23120:0", | |
"nodes": [ | |
{ | |
"id": 16, | |
"nodeType": "VariableDeclaration", | |
"src": "300:18:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "06fdde03", | |
"mutability": "mutable", | |
"name": "name", | |
"nameLocation": "314:4:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_storage", | |
"typeString": "string" | |
}, | |
"typeName": { | |
"id": 15, | |
"name": "string", | |
"nodeType": "ElementaryTypeName", | |
"src": "300:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_storage_ptr", | |
"typeString": "string" | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 18, | |
"nodeType": "VariableDeclaration", | |
"src": "325:20:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "95d89b41", | |
"mutability": "mutable", | |
"name": "symbol", | |
"nameLocation": "339:6:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_storage", | |
"typeString": "string" | |
}, | |
"typeName": { | |
"id": 17, | |
"name": "string", | |
"nodeType": "ElementaryTypeName", | |
"src": "325:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_storage_ptr", | |
"typeString": "string" | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 21, | |
"nodeType": "VariableDeclaration", | |
"src": "352:35:0", | |
"nodes": [], | |
"constant": true, | |
"functionSelector": "313ce567", | |
"mutability": "constant", | |
"name": "decimals", | |
"nameLocation": "374:8:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint8", | |
"typeString": "uint8" | |
}, | |
"typeName": { | |
"id": 19, | |
"name": "uint8", | |
"nodeType": "ElementaryTypeName", | |
"src": "352:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint8", | |
"typeString": "uint8" | |
} | |
}, | |
"value": { | |
"hexValue": "3138", | |
"id": 20, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "385:2:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_18_by_1", | |
"typeString": "int_const 18" | |
}, | |
"value": "18" | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 23, | |
"nodeType": "VariableDeclaration", | |
"src": "546:28:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "22be3de1", | |
"mutability": "immutable", | |
"name": "stable", | |
"nameLocation": "568:6:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"typeName": { | |
"id": 22, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "546:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 26, | |
"nodeType": "VariableDeclaration", | |
"src": "583:27:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "18160ddd", | |
"mutability": "mutable", | |
"name": "totalSupply", | |
"nameLocation": "595:11:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 24, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "583:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": { | |
"hexValue": "30", | |
"id": 25, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "609:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 32, | |
"nodeType": "VariableDeclaration", | |
"src": "619:62:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "dd62ed3e", | |
"mutability": "mutable", | |
"name": "allowance", | |
"nameLocation": "672:9:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", | |
"typeString": "mapping(address => mapping(address => uint256))" | |
}, | |
"typeName": { | |
"id": 31, | |
"keyType": { | |
"id": 27, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "627:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"nodeType": "Mapping", | |
"src": "619:45:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", | |
"typeString": "mapping(address => mapping(address => uint256))" | |
}, | |
"valueType": { | |
"id": 30, | |
"keyType": { | |
"id": 28, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "647:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"nodeType": "Mapping", | |
"src": "638:25:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
}, | |
"valueType": { | |
"id": 29, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "658:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 36, | |
"nodeType": "VariableDeclaration", | |
"src": "688:41:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "70a08231", | |
"mutability": "mutable", | |
"name": "balanceOf", | |
"nameLocation": "720:9:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
}, | |
"typeName": { | |
"id": 35, | |
"keyType": { | |
"id": 33, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "696:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"nodeType": "Mapping", | |
"src": "688:24:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
}, | |
"valueType": { | |
"id": 34, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "707:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 38, | |
"nodeType": "VariableDeclaration", | |
"src": "738:33:0", | |
"nodes": [], | |
"constant": false, | |
"mutability": "mutable", | |
"name": "DOMAIN_SEPARATOR", | |
"nameLocation": "755:16:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 37, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "738:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"id": 41, | |
"nodeType": "VariableDeclaration", | |
"src": "883:110:0", | |
"nodes": [], | |
"constant": true, | |
"mutability": "constant", | |
"name": "PERMIT_TYPEHASH", | |
"nameLocation": "909:15:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
}, | |
"typeName": { | |
"id": 39, | |
"name": "bytes32", | |
"nodeType": "ElementaryTypeName", | |
"src": "883:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes32", | |
"typeString": "bytes32" | |
} | |
}, | |
"value": { | |
"hexValue": "307836653731656461653132623162393766346431663630333730666566313031303566613266616165303132363131346131363963363438343564363132366339", | |
"id": 40, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "927:66:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_49955707469362902507454157297736832118868343942642399513960811609542965143241_by_1", | |
"typeString": "int_const 4995...(69 digits omitted)...3241" | |
}, | |
"value": "0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9" | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"id": 45, | |
"nodeType": "VariableDeclaration", | |
"src": "1000:38:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "7ecebe00", | |
"mutability": "mutable", | |
"name": "nonces", | |
"nameLocation": "1032:6:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
}, | |
"typeName": { | |
"id": 44, | |
"keyType": { | |
"id": 42, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "1008:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"nodeType": "Mapping", | |
"src": "1000:24:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
}, | |
"valueType": { | |
"id": 43, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1019:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 50, | |
"nodeType": "VariableDeclaration", | |
"src": "1047:48:0", | |
"nodes": [], | |
"constant": true, | |
"mutability": "constant", | |
"name": "MINIMUM_LIQUIDITY", | |
"nameLocation": "1070:17:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 46, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1047:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": { | |
"commonType": { | |
"typeIdentifier": "t_rational_1000_by_1", | |
"typeString": "int_const 1000" | |
}, | |
"id": 49, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"leftExpression": { | |
"hexValue": "3130", | |
"id": 47, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "1090:2:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_10_by_1", | |
"typeString": "int_const 10" | |
}, | |
"value": "10" | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "**", | |
"rightExpression": { | |
"hexValue": "33", | |
"id": 48, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "1094:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_3_by_1", | |
"typeString": "int_const 3" | |
}, | |
"value": "3" | |
}, | |
"src": "1090:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1000_by_1", | |
"typeString": "int_const 1000" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"id": 52, | |
"nodeType": "VariableDeclaration", | |
"src": "1104:31:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "0dfe1681", | |
"mutability": "immutable", | |
"name": "token0", | |
"nameLocation": "1129:6:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 51, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "1104:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 54, | |
"nodeType": "VariableDeclaration", | |
"src": "1142:31:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "d21220a7", | |
"mutability": "immutable", | |
"name": "token1", | |
"nameLocation": "1167:6:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 53, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "1142:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 56, | |
"nodeType": "VariableDeclaration", | |
"src": "1180:25:0", | |
"nodes": [], | |
"constant": false, | |
"mutability": "immutable", | |
"name": "factory", | |
"nameLocation": "1198:7:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 55, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "1180:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"id": 65, | |
"nodeType": "StructDefinition", | |
"src": "1308:157:0", | |
"nodes": [], | |
"canonicalName": "BaseV1Pair.Observation", | |
"members": [ | |
{ | |
"constant": false, | |
"id": 58, | |
"mutability": "mutable", | |
"name": "timestamp", | |
"nameLocation": "1343:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 65, | |
"src": "1338:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 57, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1338:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 60, | |
"mutability": "mutable", | |
"name": "reserve0Cumulative", | |
"nameLocation": "1368:18:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 65, | |
"src": "1363:23:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 59, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1363:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 62, | |
"mutability": "mutable", | |
"name": "reserve1Cumulative", | |
"nameLocation": "1402:18:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 65, | |
"src": "1397:23:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 61, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1397:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 64, | |
"mutability": "mutable", | |
"name": "totalSupplyCumulative", | |
"nameLocation": "1436:21:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 65, | |
"src": "1431:26:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 63, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1431:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"name": "Observation", | |
"nameLocation": "1315:11:0", | |
"scope": 2584, | |
"visibility": "public" | |
}, | |
{ | |
"id": 68, | |
"nodeType": "VariableDeclaration", | |
"src": "1521:29:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "e4463eb2", | |
"mutability": "mutable", | |
"name": "periodSize", | |
"nameLocation": "1533:10:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 66, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1521:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": { | |
"hexValue": "31383030", | |
"id": 67, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "1546:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1800_by_1", | |
"typeString": "int_const 1800" | |
}, | |
"value": "1800" | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 72, | |
"nodeType": "VariableDeclaration", | |
"src": "1559:33:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "252c09d7", | |
"mutability": "mutable", | |
"name": "observations", | |
"nameLocation": "1580:12:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 70, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 69, | |
"name": "Observation", | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 65, | |
"src": "1559:11:0" | |
}, | |
"referencedDeclaration": 65, | |
"src": "1559:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage_ptr", | |
"typeString": "struct BaseV1Pair.Observation" | |
} | |
}, | |
"id": 71, | |
"nodeType": "ArrayTypeName", | |
"src": "1559:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage_ptr", | |
"typeString": "struct BaseV1Pair.Observation[]" | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 74, | |
"nodeType": "VariableDeclaration", | |
"src": "1601:33:0", | |
"nodes": [], | |
"constant": false, | |
"mutability": "immutable", | |
"name": "decimals0", | |
"nameLocation": "1625:9:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 73, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1601:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"id": 76, | |
"nodeType": "VariableDeclaration", | |
"src": "1641:33:0", | |
"nodes": [], | |
"constant": false, | |
"mutability": "immutable", | |
"name": "decimals1", | |
"nameLocation": "1665:9:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 75, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1641:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"id": 78, | |
"nodeType": "VariableDeclaration", | |
"src": "1683:20:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "443cb4bc", | |
"mutability": "mutable", | |
"name": "reserve0", | |
"nameLocation": "1695:8:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 77, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1683:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 80, | |
"nodeType": "VariableDeclaration", | |
"src": "1710:20:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "5a76f25e", | |
"mutability": "mutable", | |
"name": "reserve1", | |
"nameLocation": "1722:8:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 79, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1710:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 82, | |
"nodeType": "VariableDeclaration", | |
"src": "1737:30:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "c5700a02", | |
"mutability": "mutable", | |
"name": "blockTimestampLast", | |
"nameLocation": "1749:18:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 81, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1737:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 84, | |
"nodeType": "VariableDeclaration", | |
"src": "1776:34:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "bf944dbc", | |
"mutability": "mutable", | |
"name": "reserve0CumulativeLast", | |
"nameLocation": "1788:22:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 83, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1776:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 86, | |
"nodeType": "VariableDeclaration", | |
"src": "1817:34:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "c245febc", | |
"mutability": "mutable", | |
"name": "reserve1CumulativeLast", | |
"nameLocation": "1829:22:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 85, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1817:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 88, | |
"nodeType": "VariableDeclaration", | |
"src": "1858:37:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "f3f24eb1", | |
"mutability": "mutable", | |
"name": "totalSupplyCumulativeLast", | |
"nameLocation": "1870:25:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 87, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "1858:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 92, | |
"nodeType": "VariableDeclaration", | |
"src": "2005:44:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "9f767c88", | |
"mutability": "mutable", | |
"name": "supplyIndex0", | |
"nameLocation": "2037:12:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
}, | |
"typeName": { | |
"id": 91, | |
"keyType": { | |
"id": 89, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2013:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"nodeType": "Mapping", | |
"src": "2005:24:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
}, | |
"valueType": { | |
"id": 90, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2024:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 96, | |
"nodeType": "VariableDeclaration", | |
"src": "2056:44:0", | |
"nodes": [], | |
"constant": false, | |
"functionSelector": "205aabf1", | |
"mutability": "mutable", | |
"name": "supplyIndex1", | |
"nameLocation": "2088:12:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
}, | |
"typeName": { | |
"id": 95, | |
"keyType": { | |
"id": 93, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2064:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"nodeType": "Mapping", | |
"src": "2056:24:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
}, | |
"valueType": { | |
"id": 94, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2075:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
}, | |
"visibility": "public" | |
}, | |
{ | |
"id": 104, | |
"nodeType": "EventDefinition", | |
"src": "2109:63:0", | |
"nodes": [], | |
"anonymous": false, | |
"name": "Mint", | |
"nameLocation": "2115:4:0", | |
"parameters": { | |
"id": 103, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 98, | |
"indexed": true, | |
"mutability": "mutable", | |
"name": "sender", | |
"nameLocation": "2136:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 104, | |
"src": "2120:22:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 97, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2120:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 100, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "amount0", | |
"nameLocation": "2149:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 104, | |
"src": "2144:12:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 99, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2144:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 102, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "amount1", | |
"nameLocation": "2163:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 104, | |
"src": "2158:12:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 101, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2158:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "2119:52:0" | |
} | |
}, | |
{ | |
"id": 114, | |
"nodeType": "EventDefinition", | |
"src": "2178:83:0", | |
"nodes": [], | |
"anonymous": false, | |
"name": "Burn", | |
"nameLocation": "2184:4:0", | |
"parameters": { | |
"id": 113, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 106, | |
"indexed": true, | |
"mutability": "mutable", | |
"name": "sender", | |
"nameLocation": "2205:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 114, | |
"src": "2189:22:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 105, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2189:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 108, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "amount0", | |
"nameLocation": "2218:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 114, | |
"src": "2213:12:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 107, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2213:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 110, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "amount1", | |
"nameLocation": "2232:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 114, | |
"src": "2227:12:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 109, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2227:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 112, | |
"indexed": true, | |
"mutability": "mutable", | |
"name": "to", | |
"nameLocation": "2257:2:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 114, | |
"src": "2241:18:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 111, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2241:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "2188:72:0" | |
} | |
}, | |
{ | |
"id": 128, | |
"nodeType": "EventDefinition", | |
"src": "2267:182:0", | |
"nodes": [], | |
"anonymous": false, | |
"name": "Swap", | |
"nameLocation": "2273:4:0", | |
"parameters": { | |
"id": 127, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 116, | |
"indexed": true, | |
"mutability": "mutable", | |
"name": "sender", | |
"nameLocation": "2304:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 128, | |
"src": "2288:22:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 115, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2288:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 118, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "amount0In", | |
"nameLocation": "2326:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 128, | |
"src": "2321:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 117, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2321:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 120, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "amount1In", | |
"nameLocation": "2351:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 128, | |
"src": "2346:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 119, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2346:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 122, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "amount0Out", | |
"nameLocation": "2376:10:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 128, | |
"src": "2371:15:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 121, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2371:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 124, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "amount1Out", | |
"nameLocation": "2402:10:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 128, | |
"src": "2397:15:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 123, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2397:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 126, | |
"indexed": true, | |
"mutability": "mutable", | |
"name": "to", | |
"nameLocation": "2439:2:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 128, | |
"src": "2423:18:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 125, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2423:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "2277:171:0" | |
} | |
}, | |
{ | |
"id": 134, | |
"nodeType": "EventDefinition", | |
"src": "2455:41:0", | |
"nodes": [], | |
"anonymous": false, | |
"name": "Sync", | |
"nameLocation": "2461:4:0", | |
"parameters": { | |
"id": 133, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 130, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "reserve0", | |
"nameLocation": "2471:8:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 134, | |
"src": "2466:13:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 129, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2466:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 132, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "reserve1", | |
"nameLocation": "2486:8:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 134, | |
"src": "2481:13:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 131, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2481:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "2465:30:0" | |
} | |
}, | |
{ | |
"id": 144, | |
"nodeType": "EventDefinition", | |
"src": "2502:91:0", | |
"nodes": [], | |
"anonymous": false, | |
"name": "Claim", | |
"nameLocation": "2508:5:0", | |
"parameters": { | |
"id": 143, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 136, | |
"indexed": true, | |
"mutability": "mutable", | |
"name": "sender", | |
"nameLocation": "2530:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 144, | |
"src": "2514:22:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 135, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2514:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 138, | |
"indexed": true, | |
"mutability": "mutable", | |
"name": "recipient", | |
"nameLocation": "2554:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 144, | |
"src": "2538:25:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 137, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2538:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 140, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "amount0", | |
"nameLocation": "2570:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 144, | |
"src": "2565:12:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 139, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2565:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 142, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "amount1", | |
"nameLocation": "2584:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 144, | |
"src": "2579:12:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 141, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2579:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "2513:79:0" | |
} | |
}, | |
{ | |
"id": 152, | |
"nodeType": "EventDefinition", | |
"src": "2601:70:0", | |
"nodes": [], | |
"anonymous": false, | |
"name": "Transfer", | |
"nameLocation": "2607:8:0", | |
"parameters": { | |
"id": 151, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 146, | |
"indexed": true, | |
"mutability": "mutable", | |
"name": "from", | |
"nameLocation": "2632:4:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 152, | |
"src": "2616:20:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 145, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2616:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 148, | |
"indexed": true, | |
"mutability": "mutable", | |
"name": "to", | |
"nameLocation": "2654:2:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 152, | |
"src": "2638:18:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 147, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2638:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 150, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "amount", | |
"nameLocation": "2663:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 152, | |
"src": "2658:11:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 149, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2658:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "2615:55:0" | |
} | |
}, | |
{ | |
"id": 160, | |
"nodeType": "EventDefinition", | |
"src": "2677:76:0", | |
"nodes": [], | |
"anonymous": false, | |
"name": "Approval", | |
"nameLocation": "2683:8:0", | |
"parameters": { | |
"id": 159, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 154, | |
"indexed": true, | |
"mutability": "mutable", | |
"name": "owner", | |
"nameLocation": "2708:5:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 160, | |
"src": "2692:21:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 153, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2692:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 156, | |
"indexed": true, | |
"mutability": "mutable", | |
"name": "spender", | |
"nameLocation": "2731:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 160, | |
"src": "2715:23:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 155, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2715:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 158, | |
"indexed": false, | |
"mutability": "mutable", | |
"name": "amount", | |
"nameLocation": "2745:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 160, | |
"src": "2740:11:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 157, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "2740:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "2691:61:0" | |
} | |
}, | |
{ | |
"id": 312, | |
"nodeType": "FunctionDefinition", | |
"src": "2761:917:0", | |
"nodes": [], | |
"body": { | |
"id": 311, | |
"nodeType": "Block", | |
"src": "2775:903:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"expression": { | |
"id": 166, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 163, | |
"name": "factory", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 56, | |
"src": "2786:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"expression": { | |
"id": 164, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "2796:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 165, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "2796:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"src": "2786:20:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"id": 167, | |
"nodeType": "ExpressionStatement", | |
"src": "2786:20:0" | |
}, | |
{ | |
"assignments": [ | |
169, | |
171, | |
173 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 169, | |
"mutability": "mutable", | |
"name": "_token0", | |
"nameLocation": "2826:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 311, | |
"src": "2818:15:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 168, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2818:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 171, | |
"mutability": "mutable", | |
"name": "_token1", | |
"nameLocation": "2843:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 311, | |
"src": "2835:15:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 170, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "2835:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 173, | |
"mutability": "mutable", | |
"name": "_stable", | |
"nameLocation": "2857:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 311, | |
"src": "2852:12:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"typeName": { | |
"id": 172, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "2852:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 180, | |
"initialValue": { | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 175, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "2882:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 176, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "2882:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 174, | |
"name": "BaseV1Factory", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2925, | |
"src": "2868:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_BaseV1Factory_$2925_$", | |
"typeString": "type(contract BaseV1Factory)" | |
} | |
}, | |
"id": 177, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "2868:25:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_BaseV1Factory_$2925", | |
"typeString": "contract BaseV1Factory" | |
} | |
}, | |
"id": 178, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "getInitializable", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2790, | |
"src": "2868:42:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$__$returns$_t_address_$_t_address_$_t_bool_$", | |
"typeString": "function () view external returns (address,address,bool)" | |
} | |
}, | |
"id": 179, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "2868:44:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_address_$_t_address_$_t_bool_$", | |
"typeString": "tuple(address,address,bool)" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "2817:95:0" | |
}, | |
{ | |
"expression": { | |
"id": 189, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"components": [ | |
{ | |
"id": 181, | |
"name": "token0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 52, | |
"src": "2924:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 182, | |
"name": "token1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 54, | |
"src": "2932:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 183, | |
"name": "stable", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 23, | |
"src": "2940:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
} | |
], | |
"id": 184, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "TupleExpression", | |
"src": "2923:24:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_address_$_t_address_$_t_bool_$", | |
"typeString": "tuple(address,address,bool)" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"components": [ | |
{ | |
"id": 185, | |
"name": "_token0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 169, | |
"src": "2951:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 186, | |
"name": "_token1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 171, | |
"src": "2960:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 187, | |
"name": "_stable", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 173, | |
"src": "2969:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
} | |
], | |
"id": 188, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "2950:27:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_address_$_t_address_$_t_bool_$", | |
"typeString": "tuple(address,address,bool)" | |
} | |
}, | |
"src": "2923:54:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 190, | |
"nodeType": "ExpressionStatement", | |
"src": "2923:54:0" | |
}, | |
{ | |
"condition": { | |
"id": 191, | |
"name": "_stable", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 173, | |
"src": "2992:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"falseBody": { | |
"id": 277, | |
"nodeType": "Block", | |
"src": "3251:246:0", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 254, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 235, | |
"name": "name", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16, | |
"src": "3266:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_storage", | |
"typeString": "string storage ref" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"hexValue": "566f6c6174696c65563120414d4d202d20", | |
"id": 240, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3297:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_5f4fbb879a6433a3674008591ad9917fa4218cc6e4579097bfd52e31312331fc", | |
"typeString": "literal_string \"VolatileV1 AMM - \"" | |
}, | |
"value": "VolatileV1 AMM - " | |
}, | |
{ | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 242, | |
"name": "_token0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 169, | |
"src": "3324:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 241, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "3318:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 243, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3318:14:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 244, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "symbol", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2951, | |
"src": "3318:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$__$returns$_t_string_memory_ptr_$", | |
"typeString": "function () view external returns (string memory)" | |
} | |
}, | |
"id": 245, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3318:23:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
}, | |
{ | |
"hexValue": "2f", | |
"id": 246, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3343:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_fba9715e477e68952d3f1df7a185b3708aadad50ec10cc793973864023868527", | |
"typeString": "literal_string \"/\"" | |
}, | |
"value": "/" | |
}, | |
{ | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 248, | |
"name": "_token1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 171, | |
"src": "3354:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 247, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "3348:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 249, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3348:14:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 250, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "symbol", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2951, | |
"src": "3348:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$__$returns$_t_string_memory_ptr_$", | |
"typeString": "function () view external returns (string memory)" | |
} | |
}, | |
"id": 251, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3348:23:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_stringliteral_5f4fbb879a6433a3674008591ad9917fa4218cc6e4579097bfd52e31312331fc", | |
"typeString": "literal_string \"VolatileV1 AMM - \"" | |
}, | |
{ | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_fba9715e477e68952d3f1df7a185b3708aadad50ec10cc793973864023868527", | |
"typeString": "literal_string \"/\"" | |
}, | |
{ | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
], | |
"expression": { | |
"id": 238, | |
"name": "abi", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -1, | |
"src": "3280:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_abi", | |
"typeString": "abi" | |
} | |
}, | |
"id": 239, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberName": "encodePacked", | |
"nodeType": "MemberAccess", | |
"src": "3280:16:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", | |
"typeString": "function () pure returns (bytes memory)" | |
} | |
}, | |
"id": 252, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3280:92:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes_memory_ptr", | |
"typeString": "bytes memory" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bytes_memory_ptr", | |
"typeString": "bytes memory" | |
} | |
], | |
"id": 237, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "3273:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_string_storage_ptr_$", | |
"typeString": "type(string storage pointer)" | |
}, | |
"typeName": { | |
"id": 236, | |
"name": "string", | |
"nodeType": "ElementaryTypeName", | |
"src": "3273:6:0", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 253, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3273:100:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
}, | |
"src": "3266:107:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_storage", | |
"typeString": "string storage ref" | |
} | |
}, | |
"id": 255, | |
"nodeType": "ExpressionStatement", | |
"src": "3266:107:0" | |
}, | |
{ | |
"expression": { | |
"id": 275, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 256, | |
"name": "symbol", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 18, | |
"src": "3388:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_storage", | |
"typeString": "string storage ref" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"hexValue": "76414d4d2d", | |
"id": 261, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3421:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_5099254d8c98be78fbc60944320ea956bdb575ce39e2458cece16dfbc43e522a", | |
"typeString": "literal_string \"vAMM-\"" | |
}, | |
"value": "vAMM-" | |
}, | |
{ | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 263, | |
"name": "_token0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 169, | |
"src": "3436:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 262, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "3430:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 264, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3430:14:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 265, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "symbol", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2951, | |
"src": "3430:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$__$returns$_t_string_memory_ptr_$", | |
"typeString": "function () view external returns (string memory)" | |
} | |
}, | |
"id": 266, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3430:23:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
}, | |
{ | |
"hexValue": "2f", | |
"id": 267, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3455:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_fba9715e477e68952d3f1df7a185b3708aadad50ec10cc793973864023868527", | |
"typeString": "literal_string \"/\"" | |
}, | |
"value": "/" | |
}, | |
{ | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 269, | |
"name": "_token1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 171, | |
"src": "3466:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 268, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "3460:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 270, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3460:14:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 271, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "symbol", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2951, | |
"src": "3460:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$__$returns$_t_string_memory_ptr_$", | |
"typeString": "function () view external returns (string memory)" | |
} | |
}, | |
"id": 272, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3460:23:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_stringliteral_5099254d8c98be78fbc60944320ea956bdb575ce39e2458cece16dfbc43e522a", | |
"typeString": "literal_string \"vAMM-\"" | |
}, | |
{ | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_fba9715e477e68952d3f1df7a185b3708aadad50ec10cc793973864023868527", | |
"typeString": "literal_string \"/\"" | |
}, | |
{ | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
], | |
"expression": { | |
"id": 259, | |
"name": "abi", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -1, | |
"src": "3404:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_abi", | |
"typeString": "abi" | |
} | |
}, | |
"id": 260, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberName": "encodePacked", | |
"nodeType": "MemberAccess", | |
"src": "3404:16:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", | |
"typeString": "function () pure returns (bytes memory)" | |
} | |
}, | |
"id": 273, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3404:80:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes_memory_ptr", | |
"typeString": "bytes memory" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bytes_memory_ptr", | |
"typeString": "bytes memory" | |
} | |
], | |
"id": 258, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "3397:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_string_storage_ptr_$", | |
"typeString": "type(string storage pointer)" | |
}, | |
"typeName": { | |
"id": 257, | |
"name": "string", | |
"nodeType": "ElementaryTypeName", | |
"src": "3397:6:0", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 274, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3397:88:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
}, | |
"src": "3388:97:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_storage", | |
"typeString": "string storage ref" | |
} | |
}, | |
"id": 276, | |
"nodeType": "ExpressionStatement", | |
"src": "3388:97:0" | |
} | |
] | |
}, | |
"id": 278, | |
"nodeType": "IfStatement", | |
"src": "2988:509:0", | |
"trueBody": { | |
"id": 234, | |
"nodeType": "Block", | |
"src": "3001:244:0", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 211, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 192, | |
"name": "name", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 16, | |
"src": "3016:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_storage", | |
"typeString": "string storage ref" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"hexValue": "537461626c65563120414d4d202d20", | |
"id": 197, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3047:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_184a73c5edf8b7106dbb306b067f8360f6b228113c53194905784e4170bd5bab", | |
"typeString": "literal_string \"StableV1 AMM - \"" | |
}, | |
"value": "StableV1 AMM - " | |
}, | |
{ | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 199, | |
"name": "_token0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 169, | |
"src": "3072:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 198, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "3066:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 200, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3066:14:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 201, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "symbol", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2951, | |
"src": "3066:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$__$returns$_t_string_memory_ptr_$", | |
"typeString": "function () view external returns (string memory)" | |
} | |
}, | |
"id": 202, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3066:23:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
}, | |
{ | |
"hexValue": "2f", | |
"id": 203, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3091:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_fba9715e477e68952d3f1df7a185b3708aadad50ec10cc793973864023868527", | |
"typeString": "literal_string \"/\"" | |
}, | |
"value": "/" | |
}, | |
{ | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 205, | |
"name": "_token1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 171, | |
"src": "3102:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 204, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "3096:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 206, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3096:14:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 207, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "symbol", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2951, | |
"src": "3096:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$__$returns$_t_string_memory_ptr_$", | |
"typeString": "function () view external returns (string memory)" | |
} | |
}, | |
"id": 208, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3096:23:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_stringliteral_184a73c5edf8b7106dbb306b067f8360f6b228113c53194905784e4170bd5bab", | |
"typeString": "literal_string \"StableV1 AMM - \"" | |
}, | |
{ | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_fba9715e477e68952d3f1df7a185b3708aadad50ec10cc793973864023868527", | |
"typeString": "literal_string \"/\"" | |
}, | |
{ | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
], | |
"expression": { | |
"id": 195, | |
"name": "abi", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -1, | |
"src": "3030:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_abi", | |
"typeString": "abi" | |
} | |
}, | |
"id": 196, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberName": "encodePacked", | |
"nodeType": "MemberAccess", | |
"src": "3030:16:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", | |
"typeString": "function () pure returns (bytes memory)" | |
} | |
}, | |
"id": 209, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3030:90:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes_memory_ptr", | |
"typeString": "bytes memory" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bytes_memory_ptr", | |
"typeString": "bytes memory" | |
} | |
], | |
"id": 194, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "3023:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_string_storage_ptr_$", | |
"typeString": "type(string storage pointer)" | |
}, | |
"typeName": { | |
"id": 193, | |
"name": "string", | |
"nodeType": "ElementaryTypeName", | |
"src": "3023:6:0", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 210, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3023:98:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
}, | |
"src": "3016:105:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_storage", | |
"typeString": "string storage ref" | |
} | |
}, | |
"id": 212, | |
"nodeType": "ExpressionStatement", | |
"src": "3016:105:0" | |
}, | |
{ | |
"expression": { | |
"id": 232, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 213, | |
"name": "symbol", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 18, | |
"src": "3136:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_storage", | |
"typeString": "string storage ref" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"hexValue": "73414d4d2d", | |
"id": 218, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3169:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_28282191a677559c70fe2bbe4e935dd15297ff226ebc7d4c880a2593e919e82e", | |
"typeString": "literal_string \"sAMM-\"" | |
}, | |
"value": "sAMM-" | |
}, | |
{ | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 220, | |
"name": "_token0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 169, | |
"src": "3184:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 219, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "3178:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 221, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3178:14:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 222, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "symbol", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2951, | |
"src": "3178:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$__$returns$_t_string_memory_ptr_$", | |
"typeString": "function () view external returns (string memory)" | |
} | |
}, | |
"id": 223, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3178:23:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
}, | |
{ | |
"hexValue": "2f", | |
"id": 224, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3203:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_fba9715e477e68952d3f1df7a185b3708aadad50ec10cc793973864023868527", | |
"typeString": "literal_string \"/\"" | |
}, | |
"value": "/" | |
}, | |
{ | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 226, | |
"name": "_token1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 171, | |
"src": "3214:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 225, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "3208:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 227, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3208:14:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 228, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "symbol", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2951, | |
"src": "3208:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$__$returns$_t_string_memory_ptr_$", | |
"typeString": "function () view external returns (string memory)" | |
} | |
}, | |
"id": 229, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3208:23:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_stringliteral_28282191a677559c70fe2bbe4e935dd15297ff226ebc7d4c880a2593e919e82e", | |
"typeString": "literal_string \"sAMM-\"" | |
}, | |
{ | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_fba9715e477e68952d3f1df7a185b3708aadad50ec10cc793973864023868527", | |
"typeString": "literal_string \"/\"" | |
}, | |
{ | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
], | |
"expression": { | |
"id": 216, | |
"name": "abi", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -1, | |
"src": "3152:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_abi", | |
"typeString": "abi" | |
} | |
}, | |
"id": 217, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"memberName": "encodePacked", | |
"nodeType": "MemberAccess", | |
"src": "3152:16:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", | |
"typeString": "function () pure returns (bytes memory)" | |
} | |
}, | |
"id": 230, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3152:80:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_bytes_memory_ptr", | |
"typeString": "bytes memory" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bytes_memory_ptr", | |
"typeString": "bytes memory" | |
} | |
], | |
"id": 215, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "3145:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_string_storage_ptr_$", | |
"typeString": "type(string storage pointer)" | |
}, | |
"typeName": { | |
"id": 214, | |
"name": "string", | |
"nodeType": "ElementaryTypeName", | |
"src": "3145:6:0", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 231, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3145:88:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_memory_ptr", | |
"typeString": "string memory" | |
} | |
}, | |
"src": "3136:97:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_string_storage", | |
"typeString": "string storage ref" | |
} | |
}, | |
"id": 233, | |
"nodeType": "ExpressionStatement", | |
"src": "3136:97:0" | |
} | |
] | |
} | |
}, | |
{ | |
"expression": { | |
"id": 287, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 279, | |
"name": "decimals0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 74, | |
"src": "3509:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 286, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"hexValue": "3130", | |
"id": 280, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3521:2:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_10_by_1", | |
"typeString": "int_const 10" | |
}, | |
"value": "10" | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "**", | |
"rightExpression": { | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 282, | |
"name": "_token0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 169, | |
"src": "3531:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 281, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "3525:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 283, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3525:14:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 284, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "decimals", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2946, | |
"src": "3525:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", | |
"typeString": "function () view external returns (uint8)" | |
} | |
}, | |
"id": 285, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3525:25:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint8", | |
"typeString": "uint8" | |
} | |
}, | |
"src": "3521:29:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "3509:41:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 288, | |
"nodeType": "ExpressionStatement", | |
"src": "3509:41:0" | |
}, | |
{ | |
"expression": { | |
"id": 297, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 289, | |
"name": "decimals1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 76, | |
"src": "3561:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 296, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"hexValue": "3130", | |
"id": 290, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3573:2:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_10_by_1", | |
"typeString": "int_const 10" | |
}, | |
"value": "10" | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "**", | |
"rightExpression": { | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 292, | |
"name": "_token1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 171, | |
"src": "3583:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 291, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "3577:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 293, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3577:14:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 294, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "decimals", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2946, | |
"src": "3577:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", | |
"typeString": "function () view external returns (uint8)" | |
} | |
}, | |
"id": 295, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3577:25:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint8", | |
"typeString": "uint8" | |
} | |
}, | |
"src": "3573:29:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "3561:41:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 298, | |
"nodeType": "ExpressionStatement", | |
"src": "3561:41:0" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 303, | |
"name": "block", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -4, | |
"src": "3645:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_block", | |
"typeString": "block" | |
} | |
}, | |
"id": 304, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "timestamp", | |
"nodeType": "MemberAccess", | |
"src": "3645:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"hexValue": "30", | |
"id": 305, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3662:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
{ | |
"hexValue": "30", | |
"id": 306, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3665:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
{ | |
"hexValue": "30", | |
"id": 307, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3667:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
{ | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
{ | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
} | |
], | |
"id": 302, | |
"name": "Observation", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 65, | |
"src": "3633:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_struct$_Observation_$65_storage_ptr_$", | |
"typeString": "type(struct BaseV1Pair.Observation storage pointer)" | |
} | |
}, | |
"id": 308, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "structConstructorCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3633:36:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation memory" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation memory" | |
} | |
], | |
"expression": { | |
"id": 299, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "3615:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 301, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "push", | |
"nodeType": "MemberAccess", | |
"src": "3615:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_Observation_$65_storage_$dyn_storage_ptr_$_t_struct$_Observation_$65_storage_$returns$__$bound_to$_t_array$_t_struct$_Observation_$65_storage_$dyn_storage_ptr_$", | |
"typeString": "function (struct BaseV1Pair.Observation storage ref[] storage pointer,struct BaseV1Pair.Observation storage ref)" | |
} | |
}, | |
"id": 309, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3615:55:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 310, | |
"nodeType": "ExpressionStatement", | |
"src": "3615:55:0" | |
} | |
] | |
}, | |
"implemented": true, | |
"kind": "constructor", | |
"modifiers": [], | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"parameters": { | |
"id": 161, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "2772:2:0" | |
}, | |
"returnParameters": { | |
"id": 162, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "2775:0:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "public" | |
}, | |
{ | |
"id": 329, | |
"nodeType": "FunctionDefinition", | |
"src": "3686:134:0", | |
"nodes": [], | |
"body": { | |
"id": 328, | |
"nodeType": "Block", | |
"src": "3736:84:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"id": 321, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"id": 318, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "3755:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 319, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "3755:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"id": 320, | |
"name": "factory", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 56, | |
"src": "3769:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"src": "3755:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
], | |
"id": 317, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "3747:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", | |
"typeString": "function (bool) pure" | |
} | |
}, | |
"id": 322, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3747:30:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 323, | |
"nodeType": "ExpressionStatement", | |
"src": "3747:30:0" | |
}, | |
{ | |
"expression": { | |
"id": 326, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 324, | |
"name": "periodSize", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 68, | |
"src": "3788:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"id": 325, | |
"name": "periodSize_", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 314, | |
"src": "3801:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "3788:24:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 327, | |
"nodeType": "ExpressionStatement", | |
"src": "3788:24:0" | |
} | |
] | |
}, | |
"functionSelector": "ed12c5b4", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "setPeriodSize", | |
"nameLocation": "3695:13:0", | |
"parameters": { | |
"id": 315, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 314, | |
"mutability": "mutable", | |
"name": "periodSize_", | |
"nameLocation": "3714:11:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 329, | |
"src": "3709:16:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 313, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "3709:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "3708:18:0" | |
}, | |
"returnParameters": { | |
"id": 316, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "3736:0:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"id": 332, | |
"nodeType": "VariableDeclaration", | |
"src": "3863:27:0", | |
"nodes": [], | |
"constant": false, | |
"mutability": "mutable", | |
"name": "_unlocked", | |
"nameLocation": "3877:9:0", | |
"scope": 2584, | |
"stateVariable": true, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 330, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "3863:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"value": { | |
"hexValue": "31", | |
"id": 331, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3889:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"id": 350, | |
"nodeType": "ModifierDefinition", | |
"src": "3897:118:0", | |
"nodes": [], | |
"body": { | |
"id": 349, | |
"nodeType": "Block", | |
"src": "3913:102:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 337, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 335, | |
"name": "_unlocked", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 332, | |
"src": "3932:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"hexValue": "31", | |
"id": 336, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3945:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"src": "3932:14:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
], | |
"id": 334, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "3924:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", | |
"typeString": "function (bool) pure" | |
} | |
}, | |
"id": 338, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "3924:23:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 339, | |
"nodeType": "ExpressionStatement", | |
"src": "3924:23:0" | |
}, | |
{ | |
"expression": { | |
"id": 342, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 340, | |
"name": "_unlocked", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 332, | |
"src": "3958:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"hexValue": "32", | |
"id": 341, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "3970:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_2_by_1", | |
"typeString": "int_const 2" | |
}, | |
"value": "2" | |
}, | |
"src": "3958:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 343, | |
"nodeType": "ExpressionStatement", | |
"src": "3958:13:0" | |
}, | |
{ | |
"id": 344, | |
"nodeType": "PlaceholderStatement", | |
"src": "3982:1:0" | |
}, | |
{ | |
"expression": { | |
"id": 347, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 345, | |
"name": "_unlocked", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 332, | |
"src": "3994:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"hexValue": "31", | |
"id": 346, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "4006:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"src": "3994:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 348, | |
"nodeType": "ExpressionStatement", | |
"src": "3994:13:0" | |
} | |
] | |
}, | |
"name": "lock", | |
"nameLocation": "3906:4:0", | |
"parameters": { | |
"id": 333, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "3910:2:0" | |
}, | |
"virtual": false, | |
"visibility": "internal" | |
}, | |
{ | |
"id": 359, | |
"nodeType": "FunctionDefinition", | |
"src": "4023:103:0", | |
"nodes": [], | |
"body": { | |
"id": 358, | |
"nodeType": "Block", | |
"src": "4081:45:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"expression": { | |
"expression": { | |
"id": 355, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "4099:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 356, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "4099:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 354, | |
"id": 357, | |
"nodeType": "Return", | |
"src": "4092:26:0" | |
} | |
] | |
}, | |
"functionSelector": "ebeb31db", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "observationLength", | |
"nameLocation": "4032:17:0", | |
"parameters": { | |
"id": 351, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "4049:2:0" | |
}, | |
"returnParameters": { | |
"id": 354, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 353, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 359, | |
"src": "4075:4:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 352, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "4075:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "4074:6:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"id": 373, | |
"nodeType": "FunctionDefinition", | |
"src": "4134:129:0", | |
"nodes": [], | |
"body": { | |
"id": 372, | |
"nodeType": "Block", | |
"src": "4202:61:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"expression": { | |
"baseExpression": { | |
"id": 365, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "4220:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 370, | |
"indexExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 369, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"id": 366, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "4233:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 367, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "4233:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"hexValue": "31", | |
"id": 368, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "4253:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"src": "4233:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "4220:35:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"functionReturnParameters": 364, | |
"id": 371, | |
"nodeType": "Return", | |
"src": "4213:42:0" | |
} | |
] | |
}, | |
"functionSelector": "8a7b8cf2", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "lastObservation", | |
"nameLocation": "4143:15:0", | |
"parameters": { | |
"id": 360, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "4158:2:0" | |
}, | |
"returnParameters": { | |
"id": 364, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 363, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 373, | |
"src": "4182:18:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation" | |
}, | |
"typeName": { | |
"id": 362, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 361, | |
"name": "Observation", | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 65, | |
"src": "4182:11:0" | |
}, | |
"referencedDeclaration": 65, | |
"src": "4182:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage_ptr", | |
"typeString": "struct BaseV1Pair.Observation" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "4181:20:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "public" | |
}, | |
{ | |
"id": 400, | |
"nodeType": "FunctionDefinition", | |
"src": "4271:208:0", | |
"nodes": [], | |
"body": { | |
"id": 399, | |
"nodeType": "Block", | |
"src": "4387:92:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"expression": { | |
"components": [ | |
{ | |
"id": 390, | |
"name": "decimals0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 74, | |
"src": "4406:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 391, | |
"name": "decimals1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 76, | |
"src": "4417:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 392, | |
"name": "reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 78, | |
"src": "4428:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 393, | |
"name": "reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 80, | |
"src": "4438:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 394, | |
"name": "stable", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 23, | |
"src": "4448:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"id": 395, | |
"name": "token0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 52, | |
"src": "4456:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 396, | |
"name": "token1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 54, | |
"src": "4464:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"id": 397, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "4405:66:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bool_$_t_address_$_t_address_$", | |
"typeString": "tuple(uint256,uint256,uint256,uint256,bool,address,address)" | |
} | |
}, | |
"functionReturnParameters": 389, | |
"id": 398, | |
"nodeType": "Return", | |
"src": "4398:73:0" | |
} | |
] | |
}, | |
"functionSelector": "392f37e9", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "metadata", | |
"nameLocation": "4280:8:0", | |
"parameters": { | |
"id": 374, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "4288:2:0" | |
}, | |
"returnParameters": { | |
"id": 389, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 376, | |
"mutability": "mutable", | |
"name": "dec0", | |
"nameLocation": "4319:4:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 400, | |
"src": "4314:9:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 375, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "4314:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 378, | |
"mutability": "mutable", | |
"name": "dec1", | |
"nameLocation": "4330:4:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 400, | |
"src": "4325:9:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 377, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "4325:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 380, | |
"mutability": "mutable", | |
"name": "r0", | |
"nameLocation": "4341:2:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 400, | |
"src": "4336:7:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 379, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "4336:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 382, | |
"mutability": "mutable", | |
"name": "r1", | |
"nameLocation": "4350:2:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 400, | |
"src": "4345:7:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 381, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "4345:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 384, | |
"mutability": "mutable", | |
"name": "st", | |
"nameLocation": "4359:2:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 400, | |
"src": "4354:7:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"typeName": { | |
"id": 383, | |
"name": "bool", | |
"nodeType": "ElementaryTypeName", | |
"src": "4354:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 386, | |
"mutability": "mutable", | |
"name": "t0", | |
"nameLocation": "4371:2:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 400, | |
"src": "4363:10:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 385, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "4363:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 388, | |
"mutability": "mutable", | |
"name": "t1", | |
"nameLocation": "4383:2:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 400, | |
"src": "4375:10:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 387, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "4375:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "4313:73:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"id": 412, | |
"nodeType": "FunctionDefinition", | |
"src": "4487:101:0", | |
"nodes": [], | |
"body": { | |
"id": 411, | |
"nodeType": "Block", | |
"src": "4546:42:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"expression": { | |
"components": [ | |
{ | |
"id": 407, | |
"name": "token0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 52, | |
"src": "4565:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 408, | |
"name": "token1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 54, | |
"src": "4573:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"id": 409, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "4564:16:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_address_$_t_address_$", | |
"typeString": "tuple(address,address)" | |
} | |
}, | |
"functionReturnParameters": 406, | |
"id": 410, | |
"nodeType": "Return", | |
"src": "4557:23:0" | |
} | |
] | |
}, | |
"functionSelector": "9d63848a", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "tokens", | |
"nameLocation": "4496:6:0", | |
"parameters": { | |
"id": 401, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "4502:2:0" | |
}, | |
"returnParameters": { | |
"id": 406, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 403, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 412, | |
"src": "4528:7:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 402, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "4528:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 405, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 412, | |
"src": "4537:7:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 404, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "4537:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "4527:18:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"id": 434, | |
"nodeType": "FunctionDefinition", | |
"src": "4596:223:0", | |
"nodes": [], | |
"body": { | |
"id": 433, | |
"nodeType": "Block", | |
"src": "4698:121:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"expression": { | |
"id": 423, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 421, | |
"name": "_reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 415, | |
"src": "4709:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"id": 422, | |
"name": "reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 78, | |
"src": "4721:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "4709:20:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 424, | |
"nodeType": "ExpressionStatement", | |
"src": "4709:20:0" | |
}, | |
{ | |
"expression": { | |
"id": 427, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 425, | |
"name": "_reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 417, | |
"src": "4740:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"id": 426, | |
"name": "reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 80, | |
"src": "4752:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "4740:20:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 428, | |
"nodeType": "ExpressionStatement", | |
"src": "4740:20:0" | |
}, | |
{ | |
"expression": { | |
"id": 431, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 429, | |
"name": "_blockTimestampLast", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 419, | |
"src": "4771:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"id": 430, | |
"name": "blockTimestampLast", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 82, | |
"src": "4793:18:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "4771:40:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 432, | |
"nodeType": "ExpressionStatement", | |
"src": "4771:40:0" | |
} | |
] | |
}, | |
"functionSelector": "0902f1ac", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "getReserves", | |
"nameLocation": "4605:11:0", | |
"parameters": { | |
"id": 413, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "4616:2:0" | |
}, | |
"returnParameters": { | |
"id": 420, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 415, | |
"mutability": "mutable", | |
"name": "_reserve0", | |
"nameLocation": "4645:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 434, | |
"src": "4640:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 414, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "4640:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 417, | |
"mutability": "mutable", | |
"name": "_reserve1", | |
"nameLocation": "4661:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 434, | |
"src": "4656:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 416, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "4656:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 419, | |
"mutability": "mutable", | |
"name": "_blockTimestampLast", | |
"nameLocation": "4677:19:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 434, | |
"src": "4672:24:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 418, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "4672:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "4639:58:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "public" | |
}, | |
{ | |
"id": 534, | |
"nodeType": "FunctionDefinition", | |
"src": "4904:1097:0", | |
"nodes": [], | |
"body": { | |
"id": 533, | |
"nodeType": "Block", | |
"src": "4992:1009:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"assignments": [ | |
446 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 446, | |
"mutability": "mutable", | |
"name": "blockTimestamp", | |
"nameLocation": "5008:14:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 533, | |
"src": "5003:19:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 445, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "5003:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 449, | |
"initialValue": { | |
"expression": { | |
"id": 447, | |
"name": "block", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -4, | |
"src": "5025:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_block", | |
"typeString": "block" | |
} | |
}, | |
"id": 448, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "timestamp", | |
"nodeType": "MemberAccess", | |
"src": "5025:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "5003:37:0" | |
}, | |
{ | |
"assignments": [ | |
451 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 451, | |
"mutability": "mutable", | |
"name": "timeElapsed", | |
"nameLocation": "5056:11:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 533, | |
"src": "5051:16:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 450, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "5051:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 455, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 454, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 452, | |
"name": "blockTimestamp", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 446, | |
"src": "5070:14:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"id": 453, | |
"name": "blockTimestampLast", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 82, | |
"src": "5087:18:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5070:35:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "5051:54:0" | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"id": 466, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"commonType": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"id": 462, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 458, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 456, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 451, | |
"src": "5120:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": ">", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 457, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "5134:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "5120:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "&&", | |
"rightExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 461, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 459, | |
"name": "_reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 440, | |
"src": "5139:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 460, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "5152:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "5139:14:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"src": "5120:33:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "&&", | |
"rightExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 465, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 463, | |
"name": "_reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 442, | |
"src": "5157:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 464, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "5170:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "5157:14:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"src": "5120:51:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 486, | |
"nodeType": "IfStatement", | |
"src": "5116:325:0", | |
"trueBody": { | |
"id": 485, | |
"nodeType": "Block", | |
"src": "5173:268:0", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 471, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 467, | |
"name": "reserve0CumulativeLast", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 84, | |
"src": "5188:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "+=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 470, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 468, | |
"name": "_reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 440, | |
"src": "5214:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 469, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 451, | |
"src": "5226:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5214:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5188:49:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 472, | |
"nodeType": "ExpressionStatement", | |
"src": "5188:49:0" | |
}, | |
{ | |
"expression": { | |
"id": 477, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 473, | |
"name": "reserve1CumulativeLast", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 86, | |
"src": "5252:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "+=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 476, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 474, | |
"name": "_reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 442, | |
"src": "5278:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 475, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 451, | |
"src": "5290:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5278:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5252:49:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 478, | |
"nodeType": "ExpressionStatement", | |
"src": "5252:49:0" | |
}, | |
{ | |
"expression": { | |
"id": 483, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 479, | |
"name": "totalSupplyCumulativeLast", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 88, | |
"src": "5316:25:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "+=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 482, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 480, | |
"name": "totalSupply", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 26, | |
"src": "5345:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 481, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 451, | |
"src": "5359:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5345:25:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5316:54:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 484, | |
"nodeType": "ExpressionStatement", | |
"src": "5316:54:0" | |
} | |
] | |
} | |
}, | |
{ | |
"assignments": [ | |
489 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 489, | |
"mutability": "mutable", | |
"name": "_point", | |
"nameLocation": "5472:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 533, | |
"src": "5453:25:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation" | |
}, | |
"typeName": { | |
"id": 488, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 487, | |
"name": "Observation", | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 65, | |
"src": "5453:11:0" | |
}, | |
"referencedDeclaration": 65, | |
"src": "5453:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage_ptr", | |
"typeString": "struct BaseV1Pair.Observation" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 492, | |
"initialValue": { | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"id": 490, | |
"name": "lastObservation", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 373, | |
"src": "5481:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Observation_$65_memory_ptr_$", | |
"typeString": "function () view returns (struct BaseV1Pair.Observation memory)" | |
} | |
}, | |
"id": 491, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "5481:17:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation memory" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "5453:45:0" | |
}, | |
{ | |
"expression": { | |
"id": 498, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 493, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 451, | |
"src": "5509:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 497, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 494, | |
"name": "blockTimestamp", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 446, | |
"src": "5523:14:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"expression": { | |
"id": 495, | |
"name": "_point", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 489, | |
"src": "5540:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation memory" | |
} | |
}, | |
"id": 496, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "timestamp", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 58, | |
"src": "5540:16:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5523:33:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5509:47:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 499, | |
"nodeType": "ExpressionStatement", | |
"src": "5509:47:0" | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 502, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 500, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 451, | |
"src": "5674:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": ">", | |
"rightExpression": { | |
"id": 501, | |
"name": "periodSize", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 68, | |
"src": "5688:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5674:24:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 515, | |
"nodeType": "IfStatement", | |
"src": "5670:178:0", | |
"trueBody": { | |
"id": 514, | |
"nodeType": "Block", | |
"src": "5700:148:0", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"id": 507, | |
"name": "blockTimestamp", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 446, | |
"src": "5745:14:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 508, | |
"name": "reserve0CumulativeLast", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 84, | |
"src": "5761:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 509, | |
"name": "reserve1CumulativeLast", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 86, | |
"src": "5785:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 510, | |
"name": "totalSupplyCumulativeLast", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 88, | |
"src": "5809:25:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 506, | |
"name": "Observation", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 65, | |
"src": "5733:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_struct$_Observation_$65_storage_ptr_$", | |
"typeString": "type(struct BaseV1Pair.Observation storage pointer)" | |
} | |
}, | |
"id": 511, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "structConstructorCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "5733:102:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation memory" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation memory" | |
} | |
], | |
"expression": { | |
"id": 503, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "5715:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 505, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "push", | |
"nodeType": "MemberAccess", | |
"src": "5715:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_Observation_$65_storage_$dyn_storage_ptr_$_t_struct$_Observation_$65_storage_$returns$__$bound_to$_t_array$_t_struct$_Observation_$65_storage_$dyn_storage_ptr_$", | |
"typeString": "function (struct BaseV1Pair.Observation storage ref[] storage pointer,struct BaseV1Pair.Observation storage ref)" | |
} | |
}, | |
"id": 512, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "5715:121:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 513, | |
"nodeType": "ExpressionStatement", | |
"src": "5715:121:0" | |
} | |
] | |
} | |
}, | |
{ | |
"expression": { | |
"id": 518, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 516, | |
"name": "reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 78, | |
"src": "5858:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"id": 517, | |
"name": "balance0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 436, | |
"src": "5869:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5858:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 519, | |
"nodeType": "ExpressionStatement", | |
"src": "5858:19:0" | |
}, | |
{ | |
"expression": { | |
"id": 522, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 520, | |
"name": "reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 80, | |
"src": "5888:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"id": 521, | |
"name": "balance1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 438, | |
"src": "5899:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5888:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 523, | |
"nodeType": "ExpressionStatement", | |
"src": "5888:19:0" | |
}, | |
{ | |
"expression": { | |
"id": 526, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 524, | |
"name": "blockTimestampLast", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 82, | |
"src": "5918:18:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"id": 525, | |
"name": "blockTimestamp", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 446, | |
"src": "5939:14:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "5918:35:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 527, | |
"nodeType": "ExpressionStatement", | |
"src": "5918:35:0" | |
}, | |
{ | |
"eventCall": { | |
"arguments": [ | |
{ | |
"id": 529, | |
"name": "reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 78, | |
"src": "5974:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 530, | |
"name": "reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 80, | |
"src": "5984:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 528, | |
"name": "Sync", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 134, | |
"src": "5969:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", | |
"typeString": "function (uint256,uint256)" | |
} | |
}, | |
"id": 531, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "5969:24:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 532, | |
"nodeType": "EmitStatement", | |
"src": "5964:29:0" | |
} | |
] | |
}, | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "_update", | |
"nameLocation": "4913:7:0", | |
"parameters": { | |
"id": 443, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 436, | |
"mutability": "mutable", | |
"name": "balance0", | |
"nameLocation": "4926:8:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 534, | |
"src": "4921:13:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 435, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "4921:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 438, | |
"mutability": "mutable", | |
"name": "balance1", | |
"nameLocation": "4941:8:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 534, | |
"src": "4936:13:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 437, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "4936:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 440, | |
"mutability": "mutable", | |
"name": "_reserve0", | |
"nameLocation": "4956:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 534, | |
"src": "4951:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 439, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "4951:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 442, | |
"mutability": "mutable", | |
"name": "_reserve1", | |
"nameLocation": "4972:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 534, | |
"src": "4967:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 441, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "4967:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "4920:62:0" | |
}, | |
"returnParameters": { | |
"id": 444, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "4992:0:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "internal" | |
}, | |
{ | |
"id": 589, | |
"nodeType": "FunctionDefinition", | |
"src": "6107:729:0", | |
"nodes": [], | |
"body": { | |
"id": 588, | |
"nodeType": "Block", | |
"src": "6234:602:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"expression": { | |
"id": 546, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 543, | |
"name": "blockTimestamp", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 541, | |
"src": "6245:14:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"expression": { | |
"id": 544, | |
"name": "block", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -4, | |
"src": "6262:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_block", | |
"typeString": "block" | |
} | |
}, | |
"id": 545, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "timestamp", | |
"nodeType": "MemberAccess", | |
"src": "6262:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "6245:32:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 547, | |
"nodeType": "ExpressionStatement", | |
"src": "6245:32:0" | |
}, | |
{ | |
"expression": { | |
"id": 550, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 548, | |
"name": "reserve0Cumulative", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 537, | |
"src": "6288:18:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"id": 549, | |
"name": "reserve0CumulativeLast", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 84, | |
"src": "6309:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "6288:43:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 551, | |
"nodeType": "ExpressionStatement", | |
"src": "6288:43:0" | |
}, | |
{ | |
"expression": { | |
"id": 554, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 552, | |
"name": "reserve1Cumulative", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 539, | |
"src": "6342:18:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"id": 553, | |
"name": "reserve1CumulativeLast", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 86, | |
"src": "6363:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "6342:43:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 555, | |
"nodeType": "ExpressionStatement", | |
"src": "6342:43:0" | |
}, | |
{ | |
"assignments": [ | |
557, | |
559, | |
561 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 557, | |
"mutability": "mutable", | |
"name": "_reserve0", | |
"nameLocation": "6505:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 588, | |
"src": "6500:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 556, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "6500:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 559, | |
"mutability": "mutable", | |
"name": "_reserve1", | |
"nameLocation": "6521:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 588, | |
"src": "6516:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 558, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "6516:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 561, | |
"mutability": "mutable", | |
"name": "_blockTimestampLast", | |
"nameLocation": "6537:19:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 588, | |
"src": "6532:24:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 560, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "6532:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 564, | |
"initialValue": { | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"id": 562, | |
"name": "getReserves", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 434, | |
"src": "6560:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$_t_uint256_$", | |
"typeString": "function () view returns (uint256,uint256,uint256)" | |
} | |
}, | |
"id": 563, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "6560:13:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", | |
"typeString": "tuple(uint256,uint256,uint256)" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "6499:74:0" | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 567, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 565, | |
"name": "_blockTimestampLast", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 561, | |
"src": "6588:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "!=", | |
"rightExpression": { | |
"id": 566, | |
"name": "blockTimestamp", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 541, | |
"src": "6611:14:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "6588:37:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 587, | |
"nodeType": "IfStatement", | |
"src": "6584:245:0", | |
"trueBody": { | |
"id": 586, | |
"nodeType": "Block", | |
"src": "6627:202:0", | |
"statements": [ | |
{ | |
"assignments": [ | |
569 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 569, | |
"mutability": "mutable", | |
"name": "timeElapsed", | |
"nameLocation": "6647:11:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 586, | |
"src": "6642:16:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 568, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "6642:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 573, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 572, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 570, | |
"name": "blockTimestamp", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 541, | |
"src": "6661:14:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"id": 571, | |
"name": "_blockTimestampLast", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 561, | |
"src": "6678:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "6661:36:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "6642:55:0" | |
}, | |
{ | |
"expression": { | |
"id": 578, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 574, | |
"name": "reserve0Cumulative", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 537, | |
"src": "6712:18:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "+=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 577, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 575, | |
"name": "_reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 557, | |
"src": "6734:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 576, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 569, | |
"src": "6746:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "6734:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "6712:45:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 579, | |
"nodeType": "ExpressionStatement", | |
"src": "6712:45:0" | |
}, | |
{ | |
"expression": { | |
"id": 584, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 580, | |
"name": "reserve1Cumulative", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 539, | |
"src": "6772:18:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "+=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 583, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 581, | |
"name": "_reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 559, | |
"src": "6794:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 582, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 569, | |
"src": "6806:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "6794:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "6772:45:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 585, | |
"nodeType": "ExpressionStatement", | |
"src": "6772:45:0" | |
} | |
] | |
} | |
} | |
] | |
}, | |
"functionSelector": "1df8c717", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "currentCumulativePrices", | |
"nameLocation": "6116:23:0", | |
"parameters": { | |
"id": 535, | |
"nodeType": "ParameterList", | |
"parameters": [], | |
"src": "6139:2:0" | |
}, | |
"returnParameters": { | |
"id": 542, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 537, | |
"mutability": "mutable", | |
"name": "reserve0Cumulative", | |
"nameLocation": "6168:18:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 589, | |
"src": "6163:23:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 536, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "6163:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 539, | |
"mutability": "mutable", | |
"name": "reserve1Cumulative", | |
"nameLocation": "6193:18:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 589, | |
"src": "6188:23:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 538, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "6188:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 541, | |
"mutability": "mutable", | |
"name": "blockTimestamp", | |
"nameLocation": "6218:14:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 589, | |
"src": "6213:19:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 540, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "6213:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "6162:71:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "public" | |
}, | |
{ | |
"id": 665, | |
"nodeType": "FunctionDefinition", | |
"src": "6930:723:0", | |
"nodes": [], | |
"body": { | |
"id": 664, | |
"nodeType": "Block", | |
"src": "7018:635:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"assignments": [ | |
600 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 600, | |
"mutability": "mutable", | |
"name": "_observation", | |
"nameLocation": "7048:12:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 664, | |
"src": "7029:31:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation" | |
}, | |
"typeName": { | |
"id": 599, | |
"nodeType": "UserDefinedTypeName", | |
"pathNode": { | |
"id": 598, | |
"name": "Observation", | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 65, | |
"src": "7029:11:0" | |
}, | |
"referencedDeclaration": 65, | |
"src": "7029:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage_ptr", | |
"typeString": "struct BaseV1Pair.Observation" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 603, | |
"initialValue": { | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"id": 601, | |
"name": "lastObservation", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 373, | |
"src": "7063:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Observation_$65_memory_ptr_$", | |
"typeString": "function () view returns (struct BaseV1Pair.Observation memory)" | |
} | |
}, | |
"id": 602, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "7063:17:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation memory" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "7029:51:0" | |
}, | |
{ | |
"assignments": [ | |
605, | |
607, | |
null | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 605, | |
"mutability": "mutable", | |
"name": "reserve0Cumulative", | |
"nameLocation": "7097:18:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 664, | |
"src": "7092:23:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 604, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7092:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 607, | |
"mutability": "mutable", | |
"name": "reserve1Cumulative", | |
"nameLocation": "7122:18:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 664, | |
"src": "7117:23:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 606, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7117:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
null | |
], | |
"id": 610, | |
"initialValue": { | |
"arguments": [], | |
"expression": { | |
"argumentTypes": [], | |
"id": 608, | |
"name": "currentCumulativePrices", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 589, | |
"src": "7145:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$_t_uint256_$", | |
"typeString": "function () view returns (uint256,uint256,uint256)" | |
} | |
}, | |
"id": 609, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "7145:25:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", | |
"typeString": "tuple(uint256,uint256,uint256)" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "7091:79:0" | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 615, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"id": 611, | |
"name": "block", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -4, | |
"src": "7185:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_block", | |
"typeString": "block" | |
} | |
}, | |
"id": 612, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "timestamp", | |
"nodeType": "MemberAccess", | |
"src": "7185:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"expression": { | |
"id": 613, | |
"name": "_observation", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 600, | |
"src": "7204:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation memory" | |
} | |
}, | |
"id": 614, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "timestamp", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 58, | |
"src": "7204:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "7185:41:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 626, | |
"nodeType": "IfStatement", | |
"src": "7181:124:0", | |
"trueBody": { | |
"id": 625, | |
"nodeType": "Block", | |
"src": "7228:77:0", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 623, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 616, | |
"name": "_observation", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 600, | |
"src": "7243:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation memory" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"baseExpression": { | |
"id": 617, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "7258:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 622, | |
"indexExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 621, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"id": 618, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "7271:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 619, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "7271:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"hexValue": "32", | |
"id": 620, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "7291:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_2_by_1", | |
"typeString": "int_const 2" | |
}, | |
"value": "2" | |
}, | |
"src": "7271:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "7258:35:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"src": "7243:50:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation memory" | |
} | |
}, | |
"id": 624, | |
"nodeType": "ExpressionStatement", | |
"src": "7243:50:0" | |
} | |
] | |
} | |
}, | |
{ | |
"assignments": [ | |
628 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 628, | |
"mutability": "mutable", | |
"name": "timeElapsed", | |
"nameLocation": "7322:11:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 664, | |
"src": "7317:16:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 627, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7317:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 634, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 633, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"id": 629, | |
"name": "block", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -4, | |
"src": "7336:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_block", | |
"typeString": "block" | |
} | |
}, | |
"id": 630, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "timestamp", | |
"nodeType": "MemberAccess", | |
"src": "7336:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"expression": { | |
"id": 631, | |
"name": "_observation", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 600, | |
"src": "7354:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation memory" | |
} | |
}, | |
"id": 632, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "timestamp", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 58, | |
"src": "7354:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "7336:40:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "7317:59:0" | |
}, | |
{ | |
"assignments": [ | |
636 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 636, | |
"mutability": "mutable", | |
"name": "_reserve0", | |
"nameLocation": "7392:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 664, | |
"src": "7387:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 635, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7387:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 644, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 643, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"components": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 640, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 637, | |
"name": "reserve0Cumulative", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 605, | |
"src": "7405:18:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"expression": { | |
"id": 638, | |
"name": "_observation", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 600, | |
"src": "7426:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation memory" | |
} | |
}, | |
"id": 639, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "reserve0Cumulative", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 60, | |
"src": "7426:31:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "7405:52:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 641, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "7404:54:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 642, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 628, | |
"src": "7461:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "7404:68:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "7387:85:0" | |
}, | |
{ | |
"assignments": [ | |
646 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 646, | |
"mutability": "mutable", | |
"name": "_reserve1", | |
"nameLocation": "7488:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 664, | |
"src": "7483:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 645, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7483:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 654, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 653, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"components": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 650, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 647, | |
"name": "reserve1Cumulative", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 607, | |
"src": "7501:18:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"expression": { | |
"id": 648, | |
"name": "_observation", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 600, | |
"src": "7522:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_memory_ptr", | |
"typeString": "struct BaseV1Pair.Observation memory" | |
} | |
}, | |
"id": 649, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "reserve1Cumulative", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 62, | |
"src": "7522:31:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "7501:52:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 651, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "7500:54:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 652, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 628, | |
"src": "7557:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "7500:68:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "7483:85:0" | |
}, | |
{ | |
"expression": { | |
"id": 662, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 655, | |
"name": "amountOut", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 596, | |
"src": "7579:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"id": 657, | |
"name": "amountIn", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 593, | |
"src": "7605:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 658, | |
"name": "tokenIn", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 591, | |
"src": "7615:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 659, | |
"name": "_reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 636, | |
"src": "7624:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 660, | |
"name": "_reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 646, | |
"src": "7635:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 656, | |
"name": "_getAmountOut", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2157, | |
"src": "7591:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", | |
"typeString": "function (uint256,address,uint256,uint256) view returns (uint256)" | |
} | |
}, | |
"id": 661, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "7591:54:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "7579:66:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 663, | |
"nodeType": "ExpressionStatement", | |
"src": "7579:66:0" | |
} | |
] | |
}, | |
"functionSelector": "517b3f82", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "current", | |
"nameLocation": "6939:7:0", | |
"parameters": { | |
"id": 594, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 591, | |
"mutability": "mutable", | |
"name": "tokenIn", | |
"nameLocation": "6955:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 665, | |
"src": "6947:15:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 590, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "6947:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 593, | |
"mutability": "mutable", | |
"name": "amountIn", | |
"nameLocation": "6969:8:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 665, | |
"src": "6964:13:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 592, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "6964:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "6946:32:0" | |
}, | |
"returnParameters": { | |
"id": 597, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 596, | |
"mutability": "mutable", | |
"name": "amountOut", | |
"nameLocation": "7007:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 665, | |
"src": "7002:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 595, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7002:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "7001:16:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"id": 715, | |
"nodeType": "FunctionDefinition", | |
"src": "7758:396:0", | |
"nodes": [], | |
"body": { | |
"id": 714, | |
"nodeType": "Block", | |
"src": "7862:292:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"assignments": [ | |
680 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 680, | |
"mutability": "mutable", | |
"name": "_prices", | |
"nameLocation": "7888:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 714, | |
"src": "7873:22:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 678, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7873:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 679, | |
"nodeType": "ArrayTypeName", | |
"src": "7873:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 687, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 682, | |
"name": "tokenIn", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 667, | |
"src": "7905:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 683, | |
"name": "amountIn", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 669, | |
"src": "7914:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 684, | |
"name": "granularity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 671, | |
"src": "7924:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"hexValue": "31", | |
"id": 685, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "7937:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
} | |
], | |
"id": 681, | |
"name": "sample", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 870, | |
"src": "7898:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", | |
"typeString": "function (address,uint256,uint256,uint256) view returns (uint256[] memory)" | |
} | |
}, | |
"id": 686, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "7898:41:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "7873:66:0" | |
}, | |
{ | |
"assignments": [ | |
689 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 689, | |
"mutability": "mutable", | |
"name": "priceAverageCumulative", | |
"nameLocation": "7955:22:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 714, | |
"src": "7950:27:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 688, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7950:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 690, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "7950:27:0" | |
}, | |
{ | |
"body": { | |
"id": 708, | |
"nodeType": "Block", | |
"src": "8030:63:0", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 706, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 702, | |
"name": "priceAverageCumulative", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 689, | |
"src": "8045:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "+=", | |
"rightHandSide": { | |
"baseExpression": { | |
"id": 703, | |
"name": "_prices", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 680, | |
"src": "8071:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 705, | |
"indexExpression": { | |
"id": 704, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 692, | |
"src": "8079:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "8071:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "8045:36:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 707, | |
"nodeType": "ExpressionStatement", | |
"src": "8045:36:0" | |
} | |
] | |
}, | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 698, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 695, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 692, | |
"src": "8005:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<", | |
"rightExpression": { | |
"expression": { | |
"id": 696, | |
"name": "_prices", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 680, | |
"src": "8009:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 697, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "8009:14:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "8005:18:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 709, | |
"initializationExpression": { | |
"assignments": [ | |
692 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 692, | |
"mutability": "mutable", | |
"name": "i", | |
"nameLocation": "7998:1:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 709, | |
"src": "7993:6:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 691, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7993:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 694, | |
"initialValue": { | |
"hexValue": "30", | |
"id": 693, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "8002:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "7993:10:0" | |
}, | |
"loopExpression": { | |
"expression": { | |
"id": 700, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "++", | |
"prefix": false, | |
"src": "8025:3:0", | |
"subExpression": { | |
"id": 699, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 692, | |
"src": "8025:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 701, | |
"nodeType": "ExpressionStatement", | |
"src": "8025:3:0" | |
}, | |
"nodeType": "ForStatement", | |
"src": "7988:105:0" | |
}, | |
{ | |
"expression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 712, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 710, | |
"name": "priceAverageCumulative", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 689, | |
"src": "8110:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 711, | |
"name": "granularity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 671, | |
"src": "8135:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "8110:36:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 675, | |
"id": 713, | |
"nodeType": "Return", | |
"src": "8103:43:0" | |
} | |
] | |
}, | |
"functionSelector": "9e8cc04b", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "quote", | |
"nameLocation": "7767:5:0", | |
"parameters": { | |
"id": 672, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 667, | |
"mutability": "mutable", | |
"name": "tokenIn", | |
"nameLocation": "7781:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 715, | |
"src": "7773:15:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 666, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "7773:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 669, | |
"mutability": "mutable", | |
"name": "amountIn", | |
"nameLocation": "7795:8:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 715, | |
"src": "7790:13:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 668, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7790:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 671, | |
"mutability": "mutable", | |
"name": "granularity", | |
"nameLocation": "7810:11:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 715, | |
"src": "7805:16:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 670, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7805:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "7772:50:0" | |
}, | |
"returnParameters": { | |
"id": 675, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 674, | |
"mutability": "mutable", | |
"name": "amountOut", | |
"nameLocation": "7851:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 715, | |
"src": "7846:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 673, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "7846:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "7845:16:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"id": 735, | |
"nodeType": "FunctionDefinition", | |
"src": "8206:161:0", | |
"nodes": [], | |
"body": { | |
"id": 734, | |
"nodeType": "Block", | |
"src": "8305:62:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 728, | |
"name": "tokenIn", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 717, | |
"src": "8330:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 729, | |
"name": "amountIn", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 719, | |
"src": "8339:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 730, | |
"name": "points", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 721, | |
"src": "8349:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"hexValue": "31", | |
"id": 731, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "8357:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
} | |
], | |
"id": 727, | |
"name": "sample", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 870, | |
"src": "8323:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", | |
"typeString": "function (address,uint256,uint256,uint256) view returns (uint256[] memory)" | |
} | |
}, | |
"id": 732, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "8323:36:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"functionReturnParameters": 726, | |
"id": 733, | |
"nodeType": "Return", | |
"src": "8316:43:0" | |
} | |
] | |
}, | |
"functionSelector": "5881c475", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "prices", | |
"nameLocation": "8215:6:0", | |
"parameters": { | |
"id": 722, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 717, | |
"mutability": "mutable", | |
"name": "tokenIn", | |
"nameLocation": "8230:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 735, | |
"src": "8222:15:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 716, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "8222:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 719, | |
"mutability": "mutable", | |
"name": "amountIn", | |
"nameLocation": "8244:8:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 735, | |
"src": "8239:13:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 718, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8239:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 721, | |
"mutability": "mutable", | |
"name": "points", | |
"nameLocation": "8259:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 735, | |
"src": "8254:11:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 720, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8254:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "8221:45:0" | |
}, | |
"returnParameters": { | |
"id": 726, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 725, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 735, | |
"src": "8290:13:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 723, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8290:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 724, | |
"nodeType": "ArrayTypeName", | |
"src": "8290:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "8289:15:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"id": 870, | |
"nodeType": "FunctionDefinition", | |
"src": "8375:1122:0", | |
"nodes": [], | |
"body": { | |
"id": 869, | |
"nodeType": "Block", | |
"src": "8485:1012:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"assignments": [ | |
753 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 753, | |
"mutability": "mutable", | |
"name": "_prices", | |
"nameLocation": "8510:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 869, | |
"src": "8496:21:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 751, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8496:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 752, | |
"nodeType": "ArrayTypeName", | |
"src": "8496:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 759, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 757, | |
"name": "points", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 741, | |
"src": "8531:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 756, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "NewExpression", | |
"src": "8520:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", | |
"typeString": "function (uint256) pure returns (uint256[] memory)" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 754, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8524:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 755, | |
"nodeType": "ArrayTypeName", | |
"src": "8524:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
} | |
}, | |
"id": 758, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "8520:18:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "8496:42:0" | |
}, | |
{ | |
"assignments": [ | |
761 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 761, | |
"mutability": "mutable", | |
"name": "lastIndex", | |
"nameLocation": "8556:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 869, | |
"src": "8551:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 760, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8551:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 766, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 765, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"id": 762, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "8568:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 763, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "8568:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"hexValue": "31", | |
"id": 764, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "8588:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"src": "8568:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "8551:38:0" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 772, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 768, | |
"name": "lastIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 761, | |
"src": "8618:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": ">=", | |
"rightExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 771, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 769, | |
"name": "points", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 741, | |
"src": "8631:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 770, | |
"name": "window", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 743, | |
"src": "8640:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "8631:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "8618:28:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "504149523a3a4e4f5420524541445920464f522050524943494e47", | |
"id": 773, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "8648:29:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_94bad2632bba5ee1c2a3ff0aae2f40a7b82afd652085b9dc662aefc740599738", | |
"typeString": "literal_string \"PAIR::NOT READY FOR PRICING\"" | |
}, | |
"value": "PAIR::NOT READY FOR PRICING" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_94bad2632bba5ee1c2a3ff0aae2f40a7b82afd652085b9dc662aefc740599738", | |
"typeString": "literal_string \"PAIR::NOT READY FOR PRICING\"" | |
} | |
], | |
"id": 767, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "8610:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 774, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "8610:68:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 775, | |
"nodeType": "ExpressionStatement", | |
"src": "8610:68:0" | |
}, | |
{ | |
"assignments": [ | |
777 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 777, | |
"mutability": "mutable", | |
"name": "i", | |
"nameLocation": "8774:1:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 869, | |
"src": "8769:6:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 776, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8769:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 784, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 783, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 778, | |
"name": "lastIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 761, | |
"src": "8778:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"components": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 781, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 779, | |
"name": "points", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 741, | |
"src": "8791:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 780, | |
"name": "window", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 743, | |
"src": "8800:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "8791:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 782, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "8790:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "8778:29:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "8769:38:0" | |
}, | |
{ | |
"assignments": [ | |
786 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 786, | |
"mutability": "mutable", | |
"name": "nextIndex", | |
"nameLocation": "8863:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 869, | |
"src": "8858:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 785, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8858:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 788, | |
"initialValue": { | |
"hexValue": "30", | |
"id": 787, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "8875:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "8858:18:0" | |
}, | |
{ | |
"assignments": [ | |
790 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 790, | |
"mutability": "mutable", | |
"name": "index", | |
"nameLocation": "8892:5:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 869, | |
"src": "8887:10:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 789, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8887:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 792, | |
"initialValue": { | |
"hexValue": "30", | |
"id": 791, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "8900:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "8887:14:0" | |
}, | |
{ | |
"body": { | |
"id": 865, | |
"nodeType": "Block", | |
"src": "8947:516:0", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 804, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 800, | |
"name": "nextIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 786, | |
"src": "8962:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 803, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 801, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 777, | |
"src": "8974:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "+", | |
"rightExpression": { | |
"id": 802, | |
"name": "window", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 743, | |
"src": "8978:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "8974:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "8962:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 805, | |
"nodeType": "ExpressionStatement", | |
"src": "8962:22:0" | |
}, | |
{ | |
"assignments": [ | |
807 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 807, | |
"mutability": "mutable", | |
"name": "timeElapsed", | |
"nameLocation": "9004:11:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 865, | |
"src": "8999:16:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 806, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8999:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 817, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 816, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 808, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "9018:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 810, | |
"indexExpression": { | |
"id": 809, | |
"name": "nextIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 786, | |
"src": "9031:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "9018:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 811, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "timestamp", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 58, | |
"src": "9018:33:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 812, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "9054:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 814, | |
"indexExpression": { | |
"id": 813, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 777, | |
"src": "9067:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "9054:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 815, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "timestamp", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 58, | |
"src": "9054:25:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "9018:61:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "8999:80:0" | |
}, | |
{ | |
"assignments": [ | |
819 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 819, | |
"mutability": "mutable", | |
"name": "_reserve0", | |
"nameLocation": "9099:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 865, | |
"src": "9094:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 818, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "9094:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 832, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 831, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"components": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 828, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 820, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "9112:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 822, | |
"indexExpression": { | |
"id": 821, | |
"name": "nextIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 786, | |
"src": "9125:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "9112:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 823, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "reserve0Cumulative", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 60, | |
"src": "9112:42:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 824, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "9157:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 826, | |
"indexExpression": { | |
"id": 825, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 777, | |
"src": "9170:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "9157:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 827, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "reserve0Cumulative", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 60, | |
"src": "9157:34:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "9112:79:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 829, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "9111:81:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 830, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 807, | |
"src": "9195:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "9111:95:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "9094:112:0" | |
}, | |
{ | |
"assignments": [ | |
834 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 834, | |
"mutability": "mutable", | |
"name": "_reserve1", | |
"nameLocation": "9226:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 865, | |
"src": "9221:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 833, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "9221:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 847, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 846, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"components": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 843, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 835, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "9239:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 837, | |
"indexExpression": { | |
"id": 836, | |
"name": "nextIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 786, | |
"src": "9252:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "9239:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 838, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "reserve1Cumulative", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 62, | |
"src": "9239:42:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 839, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "9284:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 841, | |
"indexExpression": { | |
"id": 840, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 777, | |
"src": "9297:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "9284:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 842, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "reserve1Cumulative", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 62, | |
"src": "9284:34:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "9239:79:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 844, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "9238:81:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 845, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 807, | |
"src": "9322:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "9238:95:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "9221:112:0" | |
}, | |
{ | |
"expression": { | |
"id": 857, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"id": 848, | |
"name": "_prices", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 753, | |
"src": "9348:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 850, | |
"indexExpression": { | |
"id": 849, | |
"name": "index", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 790, | |
"src": "9356:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "9348:14:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"id": 852, | |
"name": "amountIn", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 739, | |
"src": "9379:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 853, | |
"name": "tokenIn", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 737, | |
"src": "9389:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 854, | |
"name": "_reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 819, | |
"src": "9398:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 855, | |
"name": "_reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 834, | |
"src": "9409:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 851, | |
"name": "_getAmountOut", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2157, | |
"src": "9365:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", | |
"typeString": "function (uint256,address,uint256,uint256) view returns (uint256)" | |
} | |
}, | |
"id": 856, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "9365:54:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "9348:71:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 858, | |
"nodeType": "ExpressionStatement", | |
"src": "9348:71:0" | |
}, | |
{ | |
"expression": { | |
"id": 863, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 859, | |
"name": "index", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 790, | |
"src": "9434:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 862, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 860, | |
"name": "index", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 790, | |
"src": "9442:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "+", | |
"rightExpression": { | |
"hexValue": "31", | |
"id": 861, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "9450:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"src": "9442:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "9434:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 864, | |
"nodeType": "ExpressionStatement", | |
"src": "9434:17:0" | |
} | |
] | |
}, | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 795, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 793, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 777, | |
"src": "8921:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<", | |
"rightExpression": { | |
"id": 794, | |
"name": "lastIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 761, | |
"src": "8925:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "8921:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 866, | |
"loopExpression": { | |
"expression": { | |
"id": 798, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 796, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 777, | |
"src": "8936:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "+=", | |
"rightHandSide": { | |
"id": 797, | |
"name": "window", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 743, | |
"src": "8939:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "8936:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 799, | |
"nodeType": "ExpressionStatement", | |
"src": "8936:9:0" | |
}, | |
"nodeType": "ForStatement", | |
"src": "8914:549:0" | |
}, | |
{ | |
"expression": { | |
"id": 867, | |
"name": "_prices", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 753, | |
"src": "9482:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"functionReturnParameters": 748, | |
"id": 868, | |
"nodeType": "Return", | |
"src": "9475:14:0" | |
} | |
] | |
}, | |
"functionSelector": "13345fe1", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "sample", | |
"nameLocation": "8384:6:0", | |
"parameters": { | |
"id": 744, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 737, | |
"mutability": "mutable", | |
"name": "tokenIn", | |
"nameLocation": "8399:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 870, | |
"src": "8391:15:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 736, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "8391:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 739, | |
"mutability": "mutable", | |
"name": "amountIn", | |
"nameLocation": "8413:8:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 870, | |
"src": "8408:13:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 738, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8408:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 741, | |
"mutability": "mutable", | |
"name": "points", | |
"nameLocation": "8428:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 870, | |
"src": "8423:11:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 740, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8423:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 743, | |
"mutability": "mutable", | |
"name": "window", | |
"nameLocation": "8441:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 870, | |
"src": "8436:11:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 742, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8436:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "8390:58:0" | |
}, | |
"returnParameters": { | |
"id": 748, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 747, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 870, | |
"src": "8470:13:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 745, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "8470:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 746, | |
"nodeType": "ArrayTypeName", | |
"src": "8470:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "8469:15:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "public" | |
}, | |
{ | |
"id": 932, | |
"nodeType": "FunctionDefinition", | |
"src": "9505:597:0", | |
"nodes": [], | |
"body": { | |
"id": 931, | |
"nodeType": "Block", | |
"src": "9575:527:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"assignments": [ | |
883, | |
886 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 883, | |
"mutability": "mutable", | |
"name": "_reserves0", | |
"nameLocation": "9601:10:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 931, | |
"src": "9587:24:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 881, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "9587:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 882, | |
"nodeType": "ArrayTypeName", | |
"src": "9587:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 886, | |
"mutability": "mutable", | |
"name": "_reserves1", | |
"nameLocation": "9627:10:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 931, | |
"src": "9613:24:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 884, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "9613:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 885, | |
"nodeType": "ArrayTypeName", | |
"src": "9613:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 891, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 888, | |
"name": "granularity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 872, | |
"src": "9655:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"hexValue": "31", | |
"id": 889, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "9668:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
} | |
], | |
"id": 887, | |
"name": "sampleReserves", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1075, | |
"src": "9640:14:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$", | |
"typeString": "function (uint256,uint256) view returns (uint256[] memory,uint256[] memory)" | |
} | |
}, | |
"id": 890, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "9640:30:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$", | |
"typeString": "tuple(uint256[] memory,uint256[] memory)" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "9586:84:0" | |
}, | |
{ | |
"assignments": [ | |
893 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 893, | |
"mutability": "mutable", | |
"name": "reserveAverageCumulative0", | |
"nameLocation": "9686:25:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 931, | |
"src": "9681:30:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 892, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "9681:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 894, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "9681:30:0" | |
}, | |
{ | |
"assignments": [ | |
896 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 896, | |
"mutability": "mutable", | |
"name": "reserveAverageCumulative1", | |
"nameLocation": "9727:25:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 931, | |
"src": "9722:30:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 895, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "9722:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 897, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "9722:30:0" | |
}, | |
{ | |
"body": { | |
"id": 921, | |
"nodeType": "Block", | |
"src": "9810:183:0", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 913, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 909, | |
"name": "reserveAverageCumulative0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 893, | |
"src": "9825:25:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "+=", | |
"rightHandSide": { | |
"baseExpression": { | |
"id": 910, | |
"name": "_reserves0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 883, | |
"src": "9854:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 912, | |
"indexExpression": { | |
"id": 911, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 899, | |
"src": "9865:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "9854:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "9825:42:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 914, | |
"nodeType": "ExpressionStatement", | |
"src": "9825:42:0" | |
}, | |
{ | |
"expression": { | |
"id": 919, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 915, | |
"name": "reserveAverageCumulative1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 896, | |
"src": "9936:25:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "+=", | |
"rightHandSide": { | |
"baseExpression": { | |
"id": 916, | |
"name": "_reserves1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 886, | |
"src": "9965:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 918, | |
"indexExpression": { | |
"id": 917, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 899, | |
"src": "9976:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "9965:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "9936:42:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 920, | |
"nodeType": "ExpressionStatement", | |
"src": "9936:42:0" | |
} | |
] | |
}, | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 905, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 902, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 899, | |
"src": "9782:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<", | |
"rightExpression": { | |
"expression": { | |
"id": 903, | |
"name": "_reserves0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 883, | |
"src": "9786:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 904, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "9786:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "9782:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 922, | |
"initializationExpression": { | |
"assignments": [ | |
899 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 899, | |
"mutability": "mutable", | |
"name": "i", | |
"nameLocation": "9775:1:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 922, | |
"src": "9770:6:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 898, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "9770:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 901, | |
"initialValue": { | |
"hexValue": "30", | |
"id": 900, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "9779:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "9770:10:0" | |
}, | |
"loopExpression": { | |
"expression": { | |
"id": 907, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "++", | |
"prefix": true, | |
"src": "9805:3:0", | |
"subExpression": { | |
"id": 906, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 899, | |
"src": "9807:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 908, | |
"nodeType": "ExpressionStatement", | |
"src": "9805:3:0" | |
}, | |
"nodeType": "ForStatement", | |
"src": "9765:228:0" | |
}, | |
{ | |
"expression": { | |
"components": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 925, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 923, | |
"name": "reserveAverageCumulative0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 893, | |
"src": "10013:25:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 924, | |
"name": "granularity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 872, | |
"src": "10041:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10013:39:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 928, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 926, | |
"name": "reserveAverageCumulative1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 896, | |
"src": "10054:25:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 927, | |
"name": "granularity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 872, | |
"src": "10082:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10054:39:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 929, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "10012:82:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", | |
"typeString": "tuple(uint256,uint256)" | |
} | |
}, | |
"functionReturnParameters": 878, | |
"id": 930, | |
"nodeType": "Return", | |
"src": "10005:89:0" | |
} | |
] | |
}, | |
"functionSelector": "8334278d", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "reserves", | |
"nameLocation": "9514:8:0", | |
"parameters": { | |
"id": 873, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 872, | |
"mutability": "mutable", | |
"name": "granularity", | |
"nameLocation": "9528:11:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 932, | |
"src": "9523:16:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 871, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "9523:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "9522:18:0" | |
}, | |
"returnParameters": { | |
"id": 878, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 875, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 932, | |
"src": "9563:4:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 874, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "9563:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 877, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 932, | |
"src": "9569:4:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 876, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "9569:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "9562:12:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"id": 1075, | |
"nodeType": "FunctionDefinition", | |
"src": "10110:1062:0", | |
"nodes": [], | |
"body": { | |
"id": 1074, | |
"nodeType": "Block", | |
"src": "10211:961:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"assignments": [ | |
949 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 949, | |
"mutability": "mutable", | |
"name": "_reserves0", | |
"nameLocation": "10236:10:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1074, | |
"src": "10222:24:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 947, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10222:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 948, | |
"nodeType": "ArrayTypeName", | |
"src": "10222:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 955, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 953, | |
"name": "points", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 934, | |
"src": "10260:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 952, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "NewExpression", | |
"src": "10249:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", | |
"typeString": "function (uint256) pure returns (uint256[] memory)" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 950, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10253:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 951, | |
"nodeType": "ArrayTypeName", | |
"src": "10253:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
} | |
}, | |
"id": 954, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "10249:18:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "10222:45:0" | |
}, | |
{ | |
"assignments": [ | |
960 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 960, | |
"mutability": "mutable", | |
"name": "_reserves1", | |
"nameLocation": "10292:10:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1074, | |
"src": "10278:24:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 958, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10278:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 959, | |
"nodeType": "ArrayTypeName", | |
"src": "10278:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 966, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 964, | |
"name": "points", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 934, | |
"src": "10316:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 963, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "NewExpression", | |
"src": "10305:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", | |
"typeString": "function (uint256) pure returns (uint256[] memory)" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 961, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10309:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 962, | |
"nodeType": "ArrayTypeName", | |
"src": "10309:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
} | |
}, | |
"id": 965, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "10305:18:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "10278:45:0" | |
}, | |
{ | |
"assignments": [ | |
968 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 968, | |
"mutability": "mutable", | |
"name": "lastIndex", | |
"nameLocation": "10349:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1074, | |
"src": "10344:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 967, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10344:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 973, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 972, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"id": 969, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "10361:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 970, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "10361:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"hexValue": "31", | |
"id": 971, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "10381:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"src": "10361:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "10344:38:0" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 979, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 975, | |
"name": "lastIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 968, | |
"src": "10401:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": ">=", | |
"rightExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 978, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 976, | |
"name": "points", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 934, | |
"src": "10414:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 977, | |
"name": "window", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 936, | |
"src": "10423:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10414:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10401:28:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "504149523a3a4e4f5420524541445920464f522050524943494e47", | |
"id": 980, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "10431:29:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_94bad2632bba5ee1c2a3ff0aae2f40a7b82afd652085b9dc662aefc740599738", | |
"typeString": "literal_string \"PAIR::NOT READY FOR PRICING\"" | |
}, | |
"value": "PAIR::NOT READY FOR PRICING" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_94bad2632bba5ee1c2a3ff0aae2f40a7b82afd652085b9dc662aefc740599738", | |
"typeString": "literal_string \"PAIR::NOT READY FOR PRICING\"" | |
} | |
], | |
"id": 974, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "10393:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 981, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "10393:68:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 982, | |
"nodeType": "ExpressionStatement", | |
"src": "10393:68:0" | |
}, | |
{ | |
"assignments": [ | |
984 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 984, | |
"mutability": "mutable", | |
"name": "i", | |
"nameLocation": "10477:1:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1074, | |
"src": "10472:6:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 983, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10472:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 991, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 990, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 985, | |
"name": "lastIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 968, | |
"src": "10481:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"components": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 988, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 986, | |
"name": "points", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 934, | |
"src": "10494:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 987, | |
"name": "window", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 936, | |
"src": "10503:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10494:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 989, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "10493:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10481:29:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "10472:38:0" | |
}, | |
{ | |
"assignments": [ | |
993 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 993, | |
"mutability": "mutable", | |
"name": "nextIndex", | |
"nameLocation": "10566:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1074, | |
"src": "10561:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 992, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10561:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 995, | |
"initialValue": { | |
"hexValue": "30", | |
"id": 994, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "10578:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "10561:18:0" | |
}, | |
{ | |
"assignments": [ | |
997 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 997, | |
"mutability": "mutable", | |
"name": "index", | |
"nameLocation": "10595:5:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1074, | |
"src": "10590:10:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 996, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10590:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 999, | |
"initialValue": { | |
"hexValue": "30", | |
"id": 998, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "10603:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "10590:14:0" | |
}, | |
{ | |
"assignments": [ | |
1001 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1001, | |
"mutability": "mutable", | |
"name": "timeElapsed", | |
"nameLocation": "10620:11:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1074, | |
"src": "10615:16:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1000, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10615:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1002, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "10615:16:0" | |
}, | |
{ | |
"body": { | |
"id": 1068, | |
"nodeType": "Block", | |
"src": "10676:445:0", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 1014, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 1010, | |
"name": "nextIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 993, | |
"src": "10691:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1013, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1011, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 984, | |
"src": "10703:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "+", | |
"rightExpression": { | |
"id": 1012, | |
"name": "window", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 936, | |
"src": "10707:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10703:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10691:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1015, | |
"nodeType": "ExpressionStatement", | |
"src": "10691:22:0" | |
}, | |
{ | |
"expression": { | |
"id": 1026, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 1016, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1001, | |
"src": "10728:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1025, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 1017, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "10742:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 1019, | |
"indexExpression": { | |
"id": 1018, | |
"name": "nextIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 993, | |
"src": "10755:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "10742:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 1020, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "timestamp", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 58, | |
"src": "10742:33:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 1021, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "10778:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 1023, | |
"indexExpression": { | |
"id": 1022, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 984, | |
"src": "10791:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "10778:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 1024, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "timestamp", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 58, | |
"src": "10778:25:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10742:61:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10728:75:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1027, | |
"nodeType": "ExpressionStatement", | |
"src": "10728:75:0" | |
}, | |
{ | |
"expression": { | |
"id": 1043, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"id": 1028, | |
"name": "_reserves0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 949, | |
"src": "10818:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 1030, | |
"indexExpression": { | |
"id": 1029, | |
"name": "index", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 997, | |
"src": "10829:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "10818:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1042, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"components": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1039, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 1031, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "10839:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 1033, | |
"indexExpression": { | |
"id": 1032, | |
"name": "nextIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 993, | |
"src": "10852:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "10839:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 1034, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "reserve0Cumulative", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 60, | |
"src": "10839:42:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 1035, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "10884:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 1037, | |
"indexExpression": { | |
"id": 1036, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 984, | |
"src": "10897:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "10884:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 1038, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "reserve0Cumulative", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 60, | |
"src": "10884:34:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10839:79:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 1040, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "10838:81:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 1041, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1001, | |
"src": "10922:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10838:95:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10818:115:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1044, | |
"nodeType": "ExpressionStatement", | |
"src": "10818:115:0" | |
}, | |
{ | |
"expression": { | |
"id": 1060, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"id": 1045, | |
"name": "_reserves1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 960, | |
"src": "10948:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 1047, | |
"indexExpression": { | |
"id": 1046, | |
"name": "index", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 997, | |
"src": "10959:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "10948:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1059, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"components": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1056, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 1048, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "10969:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 1050, | |
"indexExpression": { | |
"id": 1049, | |
"name": "nextIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 993, | |
"src": "10982:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "10969:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 1051, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "reserve1Cumulative", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 62, | |
"src": "10969:42:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 1052, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "11014:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 1054, | |
"indexExpression": { | |
"id": 1053, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 984, | |
"src": "11027:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "11014:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 1055, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "reserve1Cumulative", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 62, | |
"src": "11014:34:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10969:79:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 1057, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "10968:81:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 1058, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1001, | |
"src": "11052:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10968:95:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10948:115:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1061, | |
"nodeType": "ExpressionStatement", | |
"src": "10948:115:0" | |
}, | |
{ | |
"expression": { | |
"id": 1066, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 1062, | |
"name": "index", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 997, | |
"src": "11092:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1065, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1063, | |
"name": "index", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 997, | |
"src": "11100:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "+", | |
"rightExpression": { | |
"hexValue": "31", | |
"id": 1064, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "11108:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"src": "11100:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "11092:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1067, | |
"nodeType": "ExpressionStatement", | |
"src": "11092:17:0" | |
} | |
] | |
}, | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1005, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1003, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 984, | |
"src": "10650:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<", | |
"rightExpression": { | |
"id": 1004, | |
"name": "lastIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 968, | |
"src": "10654:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10650:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 1069, | |
"loopExpression": { | |
"expression": { | |
"id": 1008, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 1006, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 984, | |
"src": "10665:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "+=", | |
"rightHandSide": { | |
"id": 1007, | |
"name": "window", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 936, | |
"src": "10668:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "10665:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1009, | |
"nodeType": "ExpressionStatement", | |
"src": "10665:9:0" | |
}, | |
"nodeType": "ForStatement", | |
"src": "10644:477:0" | |
}, | |
{ | |
"expression": { | |
"components": [ | |
{ | |
"id": 1070, | |
"name": "_reserves0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 949, | |
"src": "11141:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
{ | |
"id": 1071, | |
"name": "_reserves1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 960, | |
"src": "11153:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
} | |
], | |
"id": 1072, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "11140:24:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$", | |
"typeString": "tuple(uint256[] memory,uint256[] memory)" | |
} | |
}, | |
"functionReturnParameters": 944, | |
"id": 1073, | |
"nodeType": "Return", | |
"src": "11133:31:0" | |
} | |
] | |
}, | |
"functionSelector": "f99f51a6", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "sampleReserves", | |
"nameLocation": "10119:14:0", | |
"parameters": { | |
"id": 937, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 934, | |
"mutability": "mutable", | |
"name": "points", | |
"nameLocation": "10139:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1075, | |
"src": "10134:11:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 933, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10134:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 936, | |
"mutability": "mutable", | |
"name": "window", | |
"nameLocation": "10152:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1075, | |
"src": "10147:11:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 935, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10147:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "10133:26:0" | |
}, | |
"returnParameters": { | |
"id": 944, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 940, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 1075, | |
"src": "10181:13:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 938, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10181:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 939, | |
"nodeType": "ArrayTypeName", | |
"src": "10181:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 943, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 1075, | |
"src": "10196:13:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 941, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "10196:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 942, | |
"nodeType": "ArrayTypeName", | |
"src": "10196:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "10180:30:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "public" | |
}, | |
{ | |
"id": 1120, | |
"nodeType": "FunctionDefinition", | |
"src": "11180:428:0", | |
"nodes": [], | |
"body": { | |
"id": 1119, | |
"nodeType": "Block", | |
"src": "11250:358:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"assignments": [ | |
1086 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1086, | |
"mutability": "mutable", | |
"name": "_totalSupplyAvg", | |
"nameLocation": "11275:15:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1119, | |
"src": "11261:29:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 1084, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11261:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1085, | |
"nodeType": "ArrayTypeName", | |
"src": "11261:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1091, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 1088, | |
"name": "granularity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1077, | |
"src": "11306:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"hexValue": "31", | |
"id": 1089, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "11319:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
} | |
], | |
"id": 1087, | |
"name": "sampleSupply", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1230, | |
"src": "11293:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", | |
"typeString": "function (uint256,uint256) view returns (uint256[] memory)" | |
} | |
}, | |
"id": 1090, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "11293:28:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "11261:60:0" | |
}, | |
{ | |
"assignments": [ | |
1093 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1093, | |
"mutability": "mutable", | |
"name": "totalSupplyCumulativeAvg", | |
"nameLocation": "11337:24:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1119, | |
"src": "11332:29:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1092, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11332:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1094, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "11332:29:0" | |
}, | |
{ | |
"body": { | |
"id": 1112, | |
"nodeType": "Block", | |
"src": "11424:117:0", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 1110, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 1106, | |
"name": "totalSupplyCumulativeAvg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1093, | |
"src": "11439:24:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "+=", | |
"rightHandSide": { | |
"baseExpression": { | |
"id": 1107, | |
"name": "_totalSupplyAvg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1086, | |
"src": "11467:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 1109, | |
"indexExpression": { | |
"id": 1108, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1096, | |
"src": "11483:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "11467:18:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "11439:46:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1111, | |
"nodeType": "ExpressionStatement", | |
"src": "11439:46:0" | |
} | |
] | |
}, | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1102, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1099, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1096, | |
"src": "11391:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<", | |
"rightExpression": { | |
"expression": { | |
"id": 1100, | |
"name": "_totalSupplyAvg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1086, | |
"src": "11395:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 1101, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "11395:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "11391:26:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 1113, | |
"initializationExpression": { | |
"assignments": [ | |
1096 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1096, | |
"mutability": "mutable", | |
"name": "i", | |
"nameLocation": "11384:1:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1113, | |
"src": "11379:6:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1095, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11379:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1098, | |
"initialValue": { | |
"hexValue": "30", | |
"id": 1097, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "11388:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "11379:10:0" | |
}, | |
"loopExpression": { | |
"expression": { | |
"id": 1104, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "UnaryOperation", | |
"operator": "++", | |
"prefix": true, | |
"src": "11419:3:0", | |
"subExpression": { | |
"id": 1103, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1096, | |
"src": "11421:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1105, | |
"nodeType": "ExpressionStatement", | |
"src": "11419:3:0" | |
}, | |
"nodeType": "ForStatement", | |
"src": "11374:167:0" | |
}, | |
{ | |
"expression": { | |
"components": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1116, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1114, | |
"name": "totalSupplyCumulativeAvg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1093, | |
"src": "11561:24:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 1115, | |
"name": "granularity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1077, | |
"src": "11588:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "11561:38:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 1117, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "11560:40:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"functionReturnParameters": 1081, | |
"id": 1118, | |
"nodeType": "Return", | |
"src": "11553:47:0" | |
} | |
] | |
}, | |
"functionSelector": "1ed4202e", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "totalSupplyAvg", | |
"nameLocation": "11189:14:0", | |
"parameters": { | |
"id": 1078, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 1077, | |
"mutability": "mutable", | |
"name": "granularity", | |
"nameLocation": "11209:11:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1120, | |
"src": "11204:16:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1076, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11204:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "11203:18:0" | |
}, | |
"returnParameters": { | |
"id": 1081, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 1080, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 1120, | |
"src": "11244:4:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1079, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11244:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "11243:6:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"id": 1230, | |
"nodeType": "FunctionDefinition", | |
"src": "11616:843:0", | |
"nodes": [], | |
"body": { | |
"id": 1229, | |
"nodeType": "Block", | |
"src": "11700:759:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"assignments": [ | |
1134 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1134, | |
"mutability": "mutable", | |
"name": "_totalSupply", | |
"nameLocation": "11725:12:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1229, | |
"src": "11711:26:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 1132, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11711:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1133, | |
"nodeType": "ArrayTypeName", | |
"src": "11711:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1140, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"id": 1138, | |
"name": "points", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1122, | |
"src": "11751:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 1137, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "NewExpression", | |
"src": "11740:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", | |
"typeString": "function (uint256) pure returns (uint256[] memory)" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 1135, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11744:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1136, | |
"nodeType": "ArrayTypeName", | |
"src": "11744:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
} | |
}, | |
"id": 1139, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "11740:18:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "11711:47:0" | |
}, | |
{ | |
"assignments": [ | |
1142 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1142, | |
"mutability": "mutable", | |
"name": "lastIndex", | |
"nameLocation": "11784:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1229, | |
"src": "11779:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1141, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11779:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1147, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1146, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"id": 1143, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "11796:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 1144, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "length", | |
"nodeType": "MemberAccess", | |
"src": "11796:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"hexValue": "31", | |
"id": 1145, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "11816:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"src": "11796:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "11779:38:0" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1153, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1149, | |
"name": "lastIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1142, | |
"src": "11836:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": ">=", | |
"rightExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1152, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1150, | |
"name": "points", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1122, | |
"src": "11849:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 1151, | |
"name": "window", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1124, | |
"src": "11858:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "11849:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "11836:28:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "504149523a3a4e4f5420524541445920464f522050524943494e47", | |
"id": 1154, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "11866:29:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_94bad2632bba5ee1c2a3ff0aae2f40a7b82afd652085b9dc662aefc740599738", | |
"typeString": "literal_string \"PAIR::NOT READY FOR PRICING\"" | |
}, | |
"value": "PAIR::NOT READY FOR PRICING" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_94bad2632bba5ee1c2a3ff0aae2f40a7b82afd652085b9dc662aefc740599738", | |
"typeString": "literal_string \"PAIR::NOT READY FOR PRICING\"" | |
} | |
], | |
"id": 1148, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "11828:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 1155, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "11828:68:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 1156, | |
"nodeType": "ExpressionStatement", | |
"src": "11828:68:0" | |
}, | |
{ | |
"assignments": [ | |
1158 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1158, | |
"mutability": "mutable", | |
"name": "i", | |
"nameLocation": "11912:1:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1229, | |
"src": "11907:6:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1157, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11907:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1165, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1164, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1159, | |
"name": "lastIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1142, | |
"src": "11916:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"components": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1162, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1160, | |
"name": "points", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1122, | |
"src": "11929:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 1161, | |
"name": "window", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1124, | |
"src": "11938:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "11929:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 1163, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "11928:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "11916:29:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "11907:38:0" | |
}, | |
{ | |
"assignments": [ | |
1167 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1167, | |
"mutability": "mutable", | |
"name": "nextIndex", | |
"nameLocation": "12001:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1229, | |
"src": "11996:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1166, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11996:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1169, | |
"initialValue": { | |
"hexValue": "30", | |
"id": 1168, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "12013:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "11996:18:0" | |
}, | |
{ | |
"assignments": [ | |
1171 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1171, | |
"mutability": "mutable", | |
"name": "index", | |
"nameLocation": "12030:5:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1229, | |
"src": "12025:10:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1170, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12025:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1173, | |
"initialValue": { | |
"hexValue": "30", | |
"id": 1172, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "12038:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "12025:14:0" | |
}, | |
{ | |
"assignments": [ | |
1175 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1175, | |
"mutability": "mutable", | |
"name": "timeElapsed", | |
"nameLocation": "12055:11:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1229, | |
"src": "12050:16:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1174, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12050:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1176, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "12050:16:0" | |
}, | |
{ | |
"body": { | |
"id": 1225, | |
"nodeType": "Block", | |
"src": "12111:309:0", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 1188, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 1184, | |
"name": "nextIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1167, | |
"src": "12126:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1187, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1185, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1158, | |
"src": "12138:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "+", | |
"rightExpression": { | |
"id": 1186, | |
"name": "window", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1124, | |
"src": "12142:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "12138:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "12126:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1189, | |
"nodeType": "ExpressionStatement", | |
"src": "12126:22:0" | |
}, | |
{ | |
"expression": { | |
"id": 1200, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 1190, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1175, | |
"src": "12163:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1199, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 1191, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "12177:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 1193, | |
"indexExpression": { | |
"id": 1192, | |
"name": "nextIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1167, | |
"src": "12190:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "12177:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 1194, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "timestamp", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 58, | |
"src": "12177:33:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 1195, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "12213:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 1197, | |
"indexExpression": { | |
"id": 1196, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1158, | |
"src": "12226:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "12213:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 1198, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "timestamp", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 58, | |
"src": "12213:25:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "12177:61:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "12163:75:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1201, | |
"nodeType": "ExpressionStatement", | |
"src": "12163:75:0" | |
}, | |
{ | |
"expression": { | |
"id": 1217, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"baseExpression": { | |
"id": 1202, | |
"name": "_totalSupply", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1134, | |
"src": "12253:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"id": 1204, | |
"indexExpression": { | |
"id": 1203, | |
"name": "index", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1171, | |
"src": "12266:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": true, | |
"nodeType": "IndexAccess", | |
"src": "12253:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1216, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"components": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1213, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 1205, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "12276:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 1207, | |
"indexExpression": { | |
"id": 1206, | |
"name": "nextIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1167, | |
"src": "12289:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "12276:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 1208, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "totalSupplyCumulative", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 64, | |
"src": "12276:45:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"expression": { | |
"baseExpression": { | |
"id": 1209, | |
"name": "observations", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 72, | |
"src": "12324:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_struct$_Observation_$65_storage_$dyn_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref[] storage ref" | |
} | |
}, | |
"id": 1211, | |
"indexExpression": { | |
"id": 1210, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1158, | |
"src": "12337:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "12324:15:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_struct$_Observation_$65_storage", | |
"typeString": "struct BaseV1Pair.Observation storage ref" | |
} | |
}, | |
"id": 1212, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "totalSupplyCumulative", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 64, | |
"src": "12324:37:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "12276:85:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 1214, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "12275:87:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 1215, | |
"name": "timeElapsed", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1175, | |
"src": "12365:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "12275:101:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "12253:123:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1218, | |
"nodeType": "ExpressionStatement", | |
"src": "12253:123:0" | |
}, | |
{ | |
"expression": { | |
"id": 1223, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 1219, | |
"name": "index", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1171, | |
"src": "12391:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1222, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1220, | |
"name": "index", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1171, | |
"src": "12399:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "+", | |
"rightExpression": { | |
"hexValue": "31", | |
"id": 1221, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "12407:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_1_by_1", | |
"typeString": "int_const 1" | |
}, | |
"value": "1" | |
}, | |
"src": "12399:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "12391:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1224, | |
"nodeType": "ExpressionStatement", | |
"src": "12391:17:0" | |
} | |
] | |
}, | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1179, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1177, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1158, | |
"src": "12085:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "<", | |
"rightExpression": { | |
"id": 1178, | |
"name": "lastIndex", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1142, | |
"src": "12089:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "12085:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"id": 1226, | |
"loopExpression": { | |
"expression": { | |
"id": 1182, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 1180, | |
"name": "i", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1158, | |
"src": "12100:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "+=", | |
"rightHandSide": { | |
"id": 1181, | |
"name": "window", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1124, | |
"src": "12103:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "12100:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1183, | |
"nodeType": "ExpressionStatement", | |
"src": "12100:9:0" | |
}, | |
"nodeType": "ForStatement", | |
"src": "12079:341:0" | |
}, | |
{ | |
"expression": { | |
"id": 1227, | |
"name": "_totalSupply", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1134, | |
"src": "12439:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[] memory" | |
} | |
}, | |
"functionReturnParameters": 1129, | |
"id": 1228, | |
"nodeType": "Return", | |
"src": "12432:19:0" | |
} | |
] | |
}, | |
"functionSelector": "eba6aef9", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [], | |
"name": "sampleSupply", | |
"nameLocation": "11625:12:0", | |
"parameters": { | |
"id": 1125, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 1122, | |
"mutability": "mutable", | |
"name": "points", | |
"nameLocation": "11643:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1230, | |
"src": "11638:11:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1121, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11638:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 1124, | |
"mutability": "mutable", | |
"name": "window", | |
"nameLocation": "11656:6:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1230, | |
"src": "11651:11:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1123, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11651:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "11637:26:0" | |
}, | |
"returnParameters": { | |
"id": 1129, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 1128, | |
"mutability": "mutable", | |
"name": "", | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "VariableDeclaration", | |
"scope": 1230, | |
"src": "11685:13:0", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 1126, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "11685:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1127, | |
"nodeType": "ArrayTypeName", | |
"src": "11685:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "11684:15:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "public" | |
}, | |
{ | |
"id": 1355, | |
"nodeType": "FunctionDefinition", | |
"src": "12616:1084:0", | |
"nodes": [], | |
"body": { | |
"id": 1354, | |
"nodeType": "Block", | |
"src": "12681:1019:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"assignments": [ | |
1240, | |
1242 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1240, | |
"mutability": "mutable", | |
"name": "_reserve0", | |
"nameLocation": "12698:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1354, | |
"src": "12693:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1239, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12693:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 1242, | |
"mutability": "mutable", | |
"name": "_reserve1", | |
"nameLocation": "12714:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1354, | |
"src": "12709:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1241, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12709:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1246, | |
"initialValue": { | |
"components": [ | |
{ | |
"id": 1243, | |
"name": "reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 78, | |
"src": "12728:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 1244, | |
"name": "reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 80, | |
"src": "12738:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 1245, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "12727:20:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", | |
"typeString": "tuple(uint256,uint256)" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "12692:55:0" | |
}, | |
{ | |
"assignments": [ | |
1248 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1248, | |
"mutability": "mutable", | |
"name": "_balance0", | |
"nameLocation": "12763:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1354, | |
"src": "12758:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1247, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12758:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1258, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"id": 1255, | |
"name": "this", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -28, | |
"src": "12807:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_BaseV1Pair_$2584", | |
"typeString": "contract BaseV1Pair" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_BaseV1Pair_$2584", | |
"typeString": "contract BaseV1Pair" | |
} | |
], | |
"id": 1254, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "12799:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": { | |
"id": 1253, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "12799:7:0", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 1256, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12799:13:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 1250, | |
"name": "token0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 52, | |
"src": "12781:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 1249, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "12775:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 1251, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12775:13:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 1252, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "balanceOf", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2958, | |
"src": "12775:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", | |
"typeString": "function (address) view external returns (uint256)" | |
} | |
}, | |
"id": 1257, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12775:38:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "12758:55:0" | |
}, | |
{ | |
"assignments": [ | |
1260 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1260, | |
"mutability": "mutable", | |
"name": "_balance1", | |
"nameLocation": "12829:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1354, | |
"src": "12824:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1259, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12824:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1270, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"id": 1267, | |
"name": "this", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -28, | |
"src": "12873:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_BaseV1Pair_$2584", | |
"typeString": "contract BaseV1Pair" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_BaseV1Pair_$2584", | |
"typeString": "contract BaseV1Pair" | |
} | |
], | |
"id": 1266, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "12865:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": { | |
"id": 1265, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "12865:7:0", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 1268, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12865:13:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 1262, | |
"name": "token1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 54, | |
"src": "12847:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 1261, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "12841:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 1263, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12841:13:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 1264, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "balanceOf", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2958, | |
"src": "12841:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", | |
"typeString": "function (address) view external returns (uint256)" | |
} | |
}, | |
"id": 1269, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "12841:38:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "12824:55:0" | |
}, | |
{ | |
"assignments": [ | |
1272 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1272, | |
"mutability": "mutable", | |
"name": "_amount0", | |
"nameLocation": "12895:8:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1354, | |
"src": "12890:13:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1271, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12890:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1276, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1275, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1273, | |
"name": "_balance0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1248, | |
"src": "12906:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"id": 1274, | |
"name": "_reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1240, | |
"src": "12918:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "12906:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "12890:37:0" | |
}, | |
{ | |
"assignments": [ | |
1278 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1278, | |
"mutability": "mutable", | |
"name": "_amount1", | |
"nameLocation": "12943:8:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1354, | |
"src": "12938:13:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1277, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12938:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1282, | |
"initialValue": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1281, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1279, | |
"name": "_balance1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1260, | |
"src": "12954:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"id": 1280, | |
"name": "_reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1242, | |
"src": "12966:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "12954:21:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "12938:37:0" | |
}, | |
{ | |
"assignments": [ | |
1284 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1284, | |
"mutability": "mutable", | |
"name": "_totalSupply", | |
"nameLocation": "12993:12:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1354, | |
"src": "12988:17:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1283, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12988:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1286, | |
"initialValue": { | |
"id": 1285, | |
"name": "totalSupply", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 26, | |
"src": "13008:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "12988:31:0" | |
}, | |
{ | |
"condition": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1289, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1287, | |
"name": "_totalSupply", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1284, | |
"src": "13122:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "==", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 1288, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "13138:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "13122:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"falseBody": { | |
"id": 1326, | |
"nodeType": "Block", | |
"src": "13342:121:0", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 1324, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 1310, | |
"name": "liquidity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1237, | |
"src": "13357:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1317, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1315, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1313, | |
"name": "_amount0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1272, | |
"src": "13378:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 1314, | |
"name": "_totalSupply", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1284, | |
"src": "13389:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "13378:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 1316, | |
"name": "_reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1240, | |
"src": "13404:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "13378:35:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1322, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1320, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1318, | |
"name": "_amount1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1278, | |
"src": "13415:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 1319, | |
"name": "_totalSupply", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1284, | |
"src": "13426:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "13415:23:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 1321, | |
"name": "_reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1242, | |
"src": "13441:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "13415:35:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"expression": { | |
"id": 1311, | |
"name": "Math", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 3051, | |
"src": "13369:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_Math_$3051_$", | |
"typeString": "type(library Math)" | |
} | |
}, | |
"id": 1312, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "min", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2996, | |
"src": "13369:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", | |
"typeString": "function (uint256,uint256) pure returns (uint256)" | |
} | |
}, | |
"id": 1323, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13369:82:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "13357:94:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1325, | |
"nodeType": "ExpressionStatement", | |
"src": "13357:94:0" | |
} | |
] | |
}, | |
"id": 1327, | |
"nodeType": "IfStatement", | |
"src": "13118:345:0", | |
"trueBody": { | |
"id": 1309, | |
"nodeType": "Block", | |
"src": "13141:195:0", | |
"statements": [ | |
{ | |
"expression": { | |
"id": 1299, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 1290, | |
"name": "liquidity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1237, | |
"src": "13156:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1298, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1295, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1293, | |
"name": "_amount0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1272, | |
"src": "13178:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 1294, | |
"name": "_amount1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1278, | |
"src": "13189:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "13178:19:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"expression": { | |
"id": 1291, | |
"name": "Math", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 3051, | |
"src": "13168:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_Math_$3051_$", | |
"typeString": "type(library Math)" | |
} | |
}, | |
"id": 1292, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sqrt", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 3050, | |
"src": "13168:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", | |
"typeString": "function (uint256) pure returns (uint256)" | |
} | |
}, | |
"id": 1296, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13168:30:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "-", | |
"rightExpression": { | |
"id": 1297, | |
"name": "MINIMUM_LIQUIDITY", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 50, | |
"src": "13201:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "13168:50:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "13156:62:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1300, | |
"nodeType": "ExpressionStatement", | |
"src": "13156:62:0" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"hexValue": "30", | |
"id": 1304, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "13247:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
} | |
], | |
"id": 1303, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "13239:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": { | |
"id": 1302, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "13239:7:0", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 1305, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13239:10:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 1306, | |
"name": "MINIMUM_LIQUIDITY", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 50, | |
"src": "13251:17:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 1301, | |
"name": "_mint", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2250, | |
"src": "13233:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", | |
"typeString": "function (address,uint256)" | |
} | |
}, | |
"id": 1307, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13233:36:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 1308, | |
"nodeType": "ExpressionStatement", | |
"src": "13233:36:0" | |
} | |
] | |
} | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1331, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1329, | |
"name": "liquidity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1237, | |
"src": "13483:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": ">", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 1330, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "13495:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "13483:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "494c4d", | |
"id": 1332, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "13498:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_f3a107f0c41a5b985cdc2e6742b9c6c0c50b1093f940414932b61e68093855b7", | |
"typeString": "literal_string \"ILM\"" | |
}, | |
"value": "ILM" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_f3a107f0c41a5b985cdc2e6742b9c6c0c50b1093f940414932b61e68093855b7", | |
"typeString": "literal_string \"ILM\"" | |
} | |
], | |
"id": 1328, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "13475:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 1333, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13475:29:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 1334, | |
"nodeType": "ExpressionStatement", | |
"src": "13475:29:0" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 1336, | |
"name": "to", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1232, | |
"src": "13562:2:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 1337, | |
"name": "liquidity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1237, | |
"src": "13566:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 1335, | |
"name": "_mint", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2250, | |
"src": "13556:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", | |
"typeString": "function (address,uint256)" | |
} | |
}, | |
"id": 1338, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13556:20:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 1339, | |
"nodeType": "ExpressionStatement", | |
"src": "13556:20:0" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 1341, | |
"name": "_balance0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1248, | |
"src": "13597:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 1342, | |
"name": "_balance1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1260, | |
"src": "13608:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 1343, | |
"name": "_reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1240, | |
"src": "13619:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 1344, | |
"name": "_reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1242, | |
"src": "13630:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 1340, | |
"name": "_update", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 534, | |
"src": "13589:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", | |
"typeString": "function (uint256,uint256,uint256,uint256)" | |
} | |
}, | |
"id": 1345, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13589:51:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 1346, | |
"nodeType": "ExpressionStatement", | |
"src": "13589:51:0" | |
}, | |
{ | |
"eventCall": { | |
"arguments": [ | |
{ | |
"expression": { | |
"id": 1348, | |
"name": "msg", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -15, | |
"src": "13661:3:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_magic_message", | |
"typeString": "msg" | |
} | |
}, | |
"id": 1349, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "sender", | |
"nodeType": "MemberAccess", | |
"src": "13661:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 1350, | |
"name": "_amount0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1272, | |
"src": "13673:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 1351, | |
"name": "_amount1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1278, | |
"src": "13683:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 1347, | |
"name": "Mint", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 104, | |
"src": "13656:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", | |
"typeString": "function (address,uint256,uint256)" | |
} | |
}, | |
"id": 1352, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "13656:36:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 1353, | |
"nodeType": "EmitStatement", | |
"src": "13651:41:0" | |
} | |
] | |
}, | |
"functionSelector": "6a627842", | |
"implemented": true, | |
"kind": "function", | |
"modifiers": [ | |
{ | |
"id": 1235, | |
"kind": "modifierInvocation", | |
"modifierName": { | |
"id": 1234, | |
"name": "lock", | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 350, | |
"src": "12651:4:0" | |
}, | |
"nodeType": "ModifierInvocation", | |
"src": "12651:4:0" | |
} | |
], | |
"name": "mint", | |
"nameLocation": "12625:4:0", | |
"parameters": { | |
"id": 1233, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 1232, | |
"mutability": "mutable", | |
"name": "to", | |
"nameLocation": "12638:2:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1355, | |
"src": "12630:10:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 1231, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "12630:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "12629:12:0" | |
}, | |
"returnParameters": { | |
"id": 1238, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 1237, | |
"mutability": "mutable", | |
"name": "liquidity", | |
"nameLocation": "12670:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1355, | |
"src": "12665:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1236, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "12665:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "12664:16:0" | |
}, | |
"scope": 2584, | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"id": 1506, | |
"nodeType": "FunctionDefinition", | |
"src": "13855:1207:0", | |
"nodes": [], | |
"body": { | |
"id": 1505, | |
"nodeType": "Block", | |
"src": "13932:1130:0", | |
"nodes": [], | |
"statements": [ | |
{ | |
"assignments": [ | |
1367, | |
1369 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1367, | |
"mutability": "mutable", | |
"name": "_reserve0", | |
"nameLocation": "13949:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1505, | |
"src": "13944:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1366, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "13944:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 1369, | |
"mutability": "mutable", | |
"name": "_reserve1", | |
"nameLocation": "13965:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1505, | |
"src": "13960:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1368, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "13960:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1373, | |
"initialValue": { | |
"components": [ | |
{ | |
"id": 1370, | |
"name": "reserve0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 78, | |
"src": "13979:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
{ | |
"id": 1371, | |
"name": "reserve1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 80, | |
"src": "13989:8:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"id": 1372, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "13978:20:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", | |
"typeString": "tuple(uint256,uint256)" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "13943:55:0" | |
}, | |
{ | |
"assignments": [ | |
1375, | |
1377 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1375, | |
"mutability": "mutable", | |
"name": "_token0", | |
"nameLocation": "14018:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1505, | |
"src": "14010:15:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 1374, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "14010:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 1377, | |
"mutability": "mutable", | |
"name": "_token1", | |
"nameLocation": "14035:7:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1505, | |
"src": "14027:15:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 1376, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "14027:7:0", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1381, | |
"initialValue": { | |
"components": [ | |
{ | |
"id": 1378, | |
"name": "token0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 52, | |
"src": "14047:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 1379, | |
"name": "token1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 54, | |
"src": "14055:6:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"id": 1380, | |
"isConstant": false, | |
"isInlineArray": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "TupleExpression", | |
"src": "14046:16:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$_t_address_$_t_address_$", | |
"typeString": "tuple(address,address)" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "14009:53:0" | |
}, | |
{ | |
"assignments": [ | |
1383 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1383, | |
"mutability": "mutable", | |
"name": "_balance0", | |
"nameLocation": "14078:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1505, | |
"src": "14073:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1382, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "14073:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1393, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"id": 1390, | |
"name": "this", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -28, | |
"src": "14123:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_BaseV1Pair_$2584", | |
"typeString": "contract BaseV1Pair" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_BaseV1Pair_$2584", | |
"typeString": "contract BaseV1Pair" | |
} | |
], | |
"id": 1389, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "14115:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": { | |
"id": 1388, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "14115:7:0", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 1391, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14115:13:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 1385, | |
"name": "_token0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1375, | |
"src": "14096:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 1384, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "14090:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 1386, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14090:14:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 1387, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "balanceOf", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2958, | |
"src": "14090:24:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", | |
"typeString": "function (address) view external returns (uint256)" | |
} | |
}, | |
"id": 1392, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14090:39:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "14073:56:0" | |
}, | |
{ | |
"assignments": [ | |
1395 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1395, | |
"mutability": "mutable", | |
"name": "_balance1", | |
"nameLocation": "14145:9:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1505, | |
"src": "14140:14:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1394, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "14140:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1405, | |
"initialValue": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"id": 1402, | |
"name": "this", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -28, | |
"src": "14190:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_BaseV1Pair_$2584", | |
"typeString": "contract BaseV1Pair" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_BaseV1Pair_$2584", | |
"typeString": "contract BaseV1Pair" | |
} | |
], | |
"id": 1401, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "14182:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": { | |
"id": 1400, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "14182:7:0", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 1403, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14182:13:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 1397, | |
"name": "_token1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1377, | |
"src": "14163:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 1396, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "14157:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 1398, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14157:14:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 1399, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "balanceOf", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2958, | |
"src": "14157:24:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", | |
"typeString": "function (address) view external returns (uint256)" | |
} | |
}, | |
"id": 1404, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14157:39:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "14140:56:0" | |
}, | |
{ | |
"assignments": [ | |
1407 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1407, | |
"mutability": "mutable", | |
"name": "_liquidity", | |
"nameLocation": "14212:10:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1505, | |
"src": "14207:15:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1406, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "14207:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1414, | |
"initialValue": { | |
"baseExpression": { | |
"id": 1408, | |
"name": "balanceOf", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 36, | |
"src": "14225:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", | |
"typeString": "mapping(address => uint256)" | |
} | |
}, | |
"id": 1413, | |
"indexExpression": { | |
"arguments": [ | |
{ | |
"id": 1411, | |
"name": "this", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -28, | |
"src": "14243:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_BaseV1Pair_$2584", | |
"typeString": "contract BaseV1Pair" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_BaseV1Pair_$2584", | |
"typeString": "contract BaseV1Pair" | |
} | |
], | |
"id": 1410, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "14235:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": { | |
"id": 1409, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "14235:7:0", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 1412, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14235:13:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"isConstant": false, | |
"isLValue": true, | |
"isPure": false, | |
"lValueRequested": false, | |
"nodeType": "IndexAccess", | |
"src": "14225:24:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "14207:42:0" | |
}, | |
{ | |
"assignments": [ | |
1416 | |
], | |
"declarations": [ | |
{ | |
"constant": false, | |
"id": 1416, | |
"mutability": "mutable", | |
"name": "_totalSupply", | |
"nameLocation": "14267:12:0", | |
"nodeType": "VariableDeclaration", | |
"scope": 1505, | |
"src": "14262:17:0", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 1415, | |
"name": "uint", | |
"nodeType": "ElementaryTypeName", | |
"src": "14262:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"id": 1418, | |
"initialValue": { | |
"id": 1417, | |
"name": "totalSupply", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 26, | |
"src": "14282:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "VariableDeclarationStatement", | |
"src": "14262:31:0" | |
}, | |
{ | |
"expression": { | |
"id": 1425, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 1419, | |
"name": "amount0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1362, | |
"src": "14382:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1424, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1422, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1420, | |
"name": "_liquidity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1407, | |
"src": "14392:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 1421, | |
"name": "_balance0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1383, | |
"src": "14405:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "14392:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 1423, | |
"name": "_totalSupply", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1416, | |
"src": "14417:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "14392:37:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "14382:47:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1426, | |
"nodeType": "ExpressionStatement", | |
"src": "14382:47:0" | |
}, | |
{ | |
"expression": { | |
"id": 1433, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 1427, | |
"name": "amount1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1364, | |
"src": "14488:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1432, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1430, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1428, | |
"name": "_liquidity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1407, | |
"src": "14498:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "*", | |
"rightExpression": { | |
"id": 1429, | |
"name": "_balance1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1395, | |
"src": "14511:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "14498:22:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "/", | |
"rightExpression": { | |
"id": 1431, | |
"name": "_totalSupply", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1416, | |
"src": "14523:12:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "14498:37:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"src": "14488:47:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 1434, | |
"nodeType": "ExpressionStatement", | |
"src": "14488:47:0" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"commonType": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
"id": 1442, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1438, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1436, | |
"name": "amount0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1362, | |
"src": "14602:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": ">", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 1437, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "14612:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "14602:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": "&&", | |
"rightExpression": { | |
"commonType": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"id": 1441, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftExpression": { | |
"id": 1439, | |
"name": "amount1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1364, | |
"src": "14617:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "BinaryOperation", | |
"operator": ">", | |
"rightExpression": { | |
"hexValue": "30", | |
"id": 1440, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "number", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "14627:1:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_rational_0_by_1", | |
"typeString": "int_const 0" | |
}, | |
"value": "0" | |
}, | |
"src": "14617:11:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
"src": "14602:26:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
} | |
}, | |
{ | |
"hexValue": "494c42", | |
"id": 1443, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"kind": "string", | |
"lValueRequested": false, | |
"nodeType": "Literal", | |
"src": "14630:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_stringliteral_70c1f98868020b887c16f2b7cd3372b212fa01d06c180285a490d6217c057692", | |
"typeString": "literal_string \"ILB\"" | |
}, | |
"value": "ILB" | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_bool", | |
"typeString": "bool" | |
}, | |
{ | |
"typeIdentifier": "t_stringliteral_70c1f98868020b887c16f2b7cd3372b212fa01d06c180285a490d6217c057692", | |
"typeString": "literal_string \"ILB\"" | |
} | |
], | |
"id": 1435, | |
"name": "require", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [ | |
-18, | |
-18 | |
], | |
"referencedDeclaration": -18, | |
"src": "14594:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", | |
"typeString": "function (bool,string memory) pure" | |
} | |
}, | |
"id": 1444, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14594:42:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 1445, | |
"nodeType": "ExpressionStatement", | |
"src": "14594:42:0" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"id": 1449, | |
"name": "this", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -28, | |
"src": "14702:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_BaseV1Pair_$2584", | |
"typeString": "contract BaseV1Pair" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_BaseV1Pair_$2584", | |
"typeString": "contract BaseV1Pair" | |
} | |
], | |
"id": 1448, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "14694:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": { | |
"id": 1447, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "14694:7:0", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 1450, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14694:13:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 1451, | |
"name": "_liquidity", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1407, | |
"src": "14709:10:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 1446, | |
"name": "_burn", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2277, | |
"src": "14688:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", | |
"typeString": "function (address,uint256)" | |
} | |
}, | |
"id": 1452, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14688:32:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 1453, | |
"nodeType": "ExpressionStatement", | |
"src": "14688:32:0" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 1455, | |
"name": "_token0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1375, | |
"src": "14745:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 1456, | |
"name": "to", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1357, | |
"src": "14754:2:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 1457, | |
"name": "amount0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1362, | |
"src": "14758:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 1454, | |
"name": "_safeTransfer", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2583, | |
"src": "14731:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", | |
"typeString": "function (address,address,uint256)" | |
} | |
}, | |
"id": 1458, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14731:35:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 1459, | |
"nodeType": "ExpressionStatement", | |
"src": "14731:35:0" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 1461, | |
"name": "_token1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1377, | |
"src": "14791:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 1462, | |
"name": "to", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1357, | |
"src": "14800:2:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
{ | |
"id": 1463, | |
"name": "amount1", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1364, | |
"src": "14804:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
{ | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
], | |
"id": 1460, | |
"name": "_safeTransfer", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2583, | |
"src": "14777:13:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", | |
"typeString": "function (address,address,uint256)" | |
} | |
}, | |
"id": 1464, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "functionCall", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14777:35:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_tuple$__$", | |
"typeString": "tuple()" | |
} | |
}, | |
"id": 1465, | |
"nodeType": "ExpressionStatement", | |
"src": "14777:35:0" | |
}, | |
{ | |
"expression": { | |
"id": 1476, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"leftHandSide": { | |
"id": 1466, | |
"name": "_balance0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1383, | |
"src": "14823:9:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"nodeType": "Assignment", | |
"operator": "=", | |
"rightHandSide": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"id": 1473, | |
"name": "this", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": -28, | |
"src": "14868:4:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_BaseV1Pair_$2584", | |
"typeString": "contract BaseV1Pair" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_contract$_BaseV1Pair_$2584", | |
"typeString": "contract BaseV1Pair" | |
} | |
], | |
"id": 1472, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": true, | |
"lValueRequested": false, | |
"nodeType": "ElementaryTypeNameExpression", | |
"src": "14860:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_address_$", | |
"typeString": "type(address)" | |
}, | |
"typeName": { | |
"id": 1471, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "14860:7:0", | |
"typeDescriptions": {} | |
} | |
}, | |
"id": 1474, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14860:13:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"expression": { | |
"arguments": [ | |
{ | |
"id": 1468, | |
"name": "_token0", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 1375, | |
"src": "14841:7:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
} | |
], | |
"expression": { | |
"argumentTypes": [ | |
{ | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
], | |
"id": 1467, | |
"name": "erc20", | |
"nodeType": "Identifier", | |
"overloadedDeclarations": [], | |
"referencedDeclaration": 2979, | |
"src": "14835:5:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_type$_t_contract$_erc20_$2979_$", | |
"typeString": "type(contract erc20)" | |
} | |
}, | |
"id": 1469, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"kind": "typeConversion", | |
"lValueRequested": false, | |
"names": [], | |
"nodeType": "FunctionCall", | |
"src": "14835:14:0", | |
"tryCall": false, | |
"typeDescriptions": { | |
"typeIdentifier": "t_contract$_erc20_$2979", | |
"typeString": "contract erc20" | |
} | |
}, | |
"id": 1470, | |
"isConstant": false, | |
"isLValue": false, | |
"isPure": false, | |
"lValueRequested": false, | |
"memberName": "balanceOf", | |
"nodeType": "MemberAccess", | |
"referencedDeclaration": 2958, | |
"src": "14835:24:0", | |
"typeDescriptions": { | |
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", | |
"typeString": "function (address) view external returns (uint256)" | |
} | |
}, | |
"id": 1475, | |
"isConstant": false, | |
"isLValue": false, | |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment