From 6cf1274783db4ef95e8dfe781cfe7da3581839ca Mon Sep 17 00:00:00 2001 From: cwsnt Date: Wed, 18 Dec 2024 20:58:55 +0700 Subject: [PATCH] add mynt sip --- .../rskMainnet/BasketManagerV3.json | 983 ++++++++++++++++ .../BasketManagerV3_Implementation.json | 1001 +++++++++++++++++ .../rskMainnet/BasketManagerV3_Proxy.json | 257 +++++ hardhat/tasks/sips/args/sipArgs.js | 22 +- tests-onchain/sip0085.test.js | 11 +- 5 files changed, 2268 insertions(+), 6 deletions(-) create mode 100644 external/deployments/rskMainnet/BasketManagerV3.json create mode 100644 external/deployments/rskMainnet/BasketManagerV3_Implementation.json create mode 100644 external/deployments/rskMainnet/BasketManagerV3_Proxy.json diff --git a/external/deployments/rskMainnet/BasketManagerV3.json b/external/deployments/rskMainnet/BasketManagerV3.json new file mode 100644 index 000000000..e854dc2d0 --- /dev/null +++ b/external/deployments/rskMainnet/BasketManagerV3.json @@ -0,0 +1,983 @@ +{ + "address": "0x68510C9A93e8Fff4b5d9E307bd415E1Dc3b7759A", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "basset", + "type": "address" + } + ], + "name": "BassetAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "basset", + "type": "address" + } + ], + "name": "BassetRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "basset", + "type": "address" + }, + { + "indexed": false, + "internalType": "int256", + "name": "factor", + "type": "int256" + } + ], + "name": "FactorChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "basset", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "paused", + "type": "bool" + } + ], + "name": "PausedChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "basset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "RangeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "int256", + "name": "_factor", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "_min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_max", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_paused", + "type": "bool" + } + ], + "name": "addBasset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_bassets", + "type": "address[]" + }, + { + "internalType": "int256[]", + "name": "_factors", + "type": "int256[]" + }, + { + "internalType": "uint256[]", + "name": "_mins", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_maxs", + "type": "uint256[]" + }, + { + "internalType": "bool[]", + "name": "_pausedFlags", + "type": "bool[]" + } + ], + "name": "addBassets", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_bassetQuantity", + "type": "uint256" + } + ], + "name": "checkBasketBalanceForDeposit", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_bassetQuantity", + "type": "uint256" + } + ], + "name": "checkBasketBalanceForWithdrawal", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_bassetQuantity", + "type": "uint256" + } + ], + "name": "convertBassetToMassetQuantity", + "outputs": [ + { + "internalType": "uint256", + "name": "massetQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "bassetQuantity", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_massetQuantity", + "type": "uint256" + } + ], + "name": "convertMassetToBassetQuantity", + "outputs": [ + { + "internalType": "uint256", + "name": "bassetQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "massetQuantity", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + } + ], + "name": "getBassetBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBassets", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + } + ], + "name": "getFactor", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + } + ], + "name": "getPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getProxyImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + } + ], + "name": "getRange", + "outputs": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalMassetBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "total", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVersion", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_massetManager", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "x", + "type": "int256" + } + ], + "name": "isPowerOfTen", + "outputs": [ + { + "internalType": "bool", + "name": "result", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + } + ], + "name": "isValidBasset", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + } + ], + "name": "removeBasset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "int256", + "name": "_factor", + "type": "int256" + } + ], + "name": "setFactor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "bool", + "name": "_flag", + "type": "bool" + } + ], + "name": "setPaused", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_max", + "type": "uint256" + } + ], + "name": "setRange", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "numDeployments": 2, + "bytecode": "0x608060405234801561001057600080fd5b50611c80806100206000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c80638da5cb5b116100c3578063c4d66de81161007c578063c4d66de8146102f1578063c7bbc86514610304578063d80f5a8714610317578063eb72ccd514610342578063f2fde38b1461034a578063f5bffc351461035d57600080fd5b80638da5cb5b146102785780638ee8ffd11461029d57806390e4b720146102b05780639bf761b7146102b8578063a9f02efe146102cb578063b55d9904146102de57600080fd5b80635ac99461116101155780635ac99461146101f3578063620611c314610206578063623a564b14610229578063689418691461023c578063715018a61461025d57806389eba0d21461026557600080fd5b806309f2a9831461015d5780630d8e6e2c146101725780631af327bd146101905780631d3ce398146101b857806329820c5b146101cd5780635521c653146101e0575b600080fd5b61017061016b3660046115d1565b610370565b005b61017a610547565b60405161018791906115ec565b60405180910390f35b6101a361019e36600461163a565b6105d9565b60408051928352602083019190915201610187565b6101c0610647565b6040516101879190611664565b6101706101db36600461185b565b6106a8565b6101a36101ee3660046115d1565b6107c8565b6101a361020136600461163a565b610800565b61021961021436600461192d565b610877565b6040519015158152602001610187565b610170610237366004611946565b6108c8565b61024f61024a3660046115d1565b610a0d565b604051908152602001610187565b610170610a3b565b610170610273366004611979565b610a4f565b6033546001600160a01b03165b6040516001600160a01b039091168152602001610187565b6101706102ab3660046119ac565b610abd565b610285610c60565b6101706102c636600461163a565b610c98565b6102196102d936600461163a565b610d99565b6102196102ec3660046115d1565b610ea9565b6101706102ff3660046115d1565b610ed5565b61021961031236600461163a565b611075565b6102196103253660046115d1565b6001600160a01b03166000908152609a6020526040902054151590565b61024f6111e6565b6101706103583660046115d1565b6112bb565b61024f61036b3660046115d1565b611334565b8061037a816113aa565b610382611402565b61038b82611334565b156103d05760405162461bcd60e51b815260206004820152601060248201526f62616c616e6365206e6f74207a65726f60801b60448201526064015b60405180910390fd5b6001600160a01b0382166000908152609a60205260408120819055805b6099546103fc90600190611a12565b81101561045457836001600160a01b03166099828154811061042057610420611a25565b6000918252602090912001546001600160a01b03160361044257809150610454565b8061044c81611a3b565b9150506103ed565b506099805461046590600190611a12565b8154811061047557610475611a25565b600091825260209091200154609980546001600160a01b0390921691839081106104a1576104a1611a25565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060998054806104e0576104e0611a54565b6000828152602090819020600019908301810180546001600160a01b03191690559091019091556040516001600160a01b03851681527f1e5281bbecf5c15104f9e35265dbe738c1cd2597613cbf4a0a51713448bc13b991015b60405180910390a1505050565b60606097805461055690611a6a565b80601f016020809104026020016040519081016040528092919081815260200182805461058290611a6a565b80156105cf5780601f106105a4576101008083540402835291602001916105cf565b820191906000526020600020905b8154815290600101906020018083116105b257829003601f168201915b5050505050905090565b600080836105e6816113aa565b6001600160a01b0385166000908152609a60205260408120549081131561062557610611858261145c565b935061061d848261146f565b92505061063f565b61063861063182611a9e565b869061146f565b9350849250505b509250929050565b606060998054806020026020016040519081016040528092919081815260200182805480156105cf57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610681575050505050905090565b6106b0611402565b84518451811480156106c25750808451145b80156106ce5750808351145b80156106da5750808251145b6107185760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206c656e6774687360881b60448201526064016103c7565b60005b818110156107bf576107ad87828151811061073857610738611a25565b602002602001015187838151811061075257610752611a25565b602002602001015187848151811061076c5761076c611a25565b602002602001015187858151811061078657610786611a25565b60200260200101518786815181106107a0576107a0611a25565b6020026020010151610abd565b806107b781611a3b565b91505061071b565b50505050505050565b600080826107d5816113aa565b5050506001600160a01b03166000908152609c6020908152604080832054609d909252909120549091565b6000808361080d816113aa565b6001600160a01b0385166000908152609a60205260408120549081131561084457610838858261146f565b935084925061063f9050565b61085761085082611a9e565b869061145c565b935061086c61086582611a9e565b859061146f565b925050509250929050565b60008060008312156108935761088c83611a9e565b9050610896565b50815b600a81101580156108af57506108ad600a82611ad0565b155b156108bf5761088c600a82611ae4565b60011492915050565b826108d2816113aa565b6108da611402565b6103e883111561091e5760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206d696e696d756d60881b60448201526064016103c7565b6103e88211156109625760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206d6178696d756d60881b60448201526064016103c7565b828210156109a25760405162461bcd60e51b815260206004820152600d60248201526c696e76616c69642072616e676560981b60448201526064016103c7565b6001600160a01b0384166000818152609c60209081526040808320879055609d8252918290208590558151928352820185905281018390527fe3b935f735d8a72a31934e03fd96d995c5b3096c7362bc7e8796ab9e1ffe668c9060600160405180910390a150505050565b600081610a19816113aa565b6001600160a01b0383166000908152609a602052604090205491505b50919050565b610a43611402565b610a4d600061147b565b565b81610a59816113aa565b610a61611402565b6001600160a01b0383166000818152609e6020908152604091829020805460ff19168615159081179091558251938452908301527f6567e54649bc4d1136cad0f12cfc472ef5c8255ad12c3e46ecf4ef245f06c6cc910161053a565b610ac5611402565b6001600160a01b038516610b145760405162461bcd60e51b8152602060048201526016602482015275696e76616c696420626173736574206164647265737360501b60448201526064016103c7565b6001600160a01b0385166000908152609a602052604090205415610b725760405162461bcd60e51b815260206004820152601560248201527462617373657420616c72656164792065786973747360581b60448201526064016103c7565b83600003610bb35760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b2103330b1ba37b960911b60448201526064016103c7565b609980546001810182556000919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000180546001600160a01b0319166001600160a01b038716179055610c088585610c98565b610c138584846108c8565b610c1d8582610a4f565b6040516001600160a01b03861681527fa83f9302fa4684335dd26b1bdd925929618565fa0f22bd9e91ab01753d8bf13c9060200160405180910390a15050505050565b6000610c937f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b610ca0611402565b80600003610ce15760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b2103330b1ba37b960911b60448201526064016103c7565b8060011480610cf45750610cf481610877565b610d405760405162461bcd60e51b815260206004820152601a60248201527f666163746f72206d75737420626520706f776572206f6620313000000000000060448201526064016103c7565b6001600160a01b0382166000818152609a6020908152604091829020849055815192835282018390527fbd9d78e6bf6327f299e2cc40ef087c54546ef9ac6bea857cdc90b57270bbb58991015b60405180910390a15050565b600082610da5816113aa565b83610daf816114cd565b6000610dbb86866105d9565b506098546040516370a0823160e01b81526001600160a01b039182166004820152919250600091908816906370a0823190602401602060405180830381865afa158015610e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e309190611af8565b90506000610e3e88836105d9565b5090506000610e4d8285611529565b90506000610e6385610e5d6111e6565b90611529565b90506000610e7d82610e77856103e861146f565b9061145c565b6001600160a01b038c166000908152609d6020526040902054101598505050505050505b505092915050565b600081610eb5816113aa565b50506001600160a01b03166000908152609e602052604090205460ff1690565b600054610100900460ff1615808015610ef55750600054600160ff909116105b80610f0f5750303b158015610f0f575060005460ff166001145b610f725760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103c7565b6000805460ff191660011790558015610f95576000805461ff0019166101001790555b6098546001600160a01b031615610fe45760405162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064016103c7565b609880546001600160a01b0319166001600160a01b0384161790556040805180820190915260038152620332e360ec1b60208201526097906110269082611b60565b5061102f611535565b8015611071576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610d8d565b5050565b600082611081816113aa565b8361108b816114cd565b600061109786866105d9565b506098546040516370a0823160e01b81526001600160a01b039182166004820152919250600091908816906370a0823190602401602060405180830381865afa1580156110e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110c9190611af8565b9050600061111a88836105d9565b5090508281101561116d5760405162461bcd60e51b815260206004820181905260248201527f6261737365742062616c616e6365206973206e6f742073756666696369656e7460448201526064016103c7565b600061117982856115a9565b9050600061118f856111896111e6565b906115a9565b6001600160a01b038b166000908152609c60205260408120549192508290036111c057159750610ea1945050505050565b60006111d283610e77866103e861146f565b91909110159b9a5050505050505050505050565b6000805b6099548110156112b75760006099828154811061120957611209611a25565b60009182526020822001546098546040516370a0823160e01b81526001600160a01b0391821660048201529116925082906370a0823190602401602060405180830381865afa158015611260573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112849190611af8565b9050600061129283836105d9565b50905061129f8186611c20565b945050505080806112af90611a3b565b9150506111ea565b5090565b6112c3611402565b6001600160a01b0381166113285760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c7565b6113318161147b565b50565b6098546040516370a0823160e01b81526001600160a01b0391821660048201526000918316906370a0823190602401602060405180830381865afa158015611380573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a49190611af8565b92915050565b6001600160a01b0381166000908152609a602052604081205490036113315760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a590818985cdcd95d60921b60448201526064016103c7565b6033546001600160a01b03163314610a4d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b60006114688284611ae4565b9392505050565b60006114688284611c33565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0381166000908152609e602052604090205460ff16156113315760405162461bcd60e51b815260206004820152601060248201526f18985cdcd95d081a5cc81c185d5cd95960821b60448201526064016103c7565b60006114688284611c20565b600054610100900460ff166115a05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016103c7565b610a4d3361147b565b60006114688284611a12565b80356001600160a01b03811681146115cc57600080fd5b919050565b6000602082840312156115e357600080fd5b611468826115b5565b600060208083528351808285015260005b81811015611619578581018301518582016040015282016115fd565b506000604082860101526040601f19601f8301168501019250505092915050565b6000806040838503121561164d57600080fd5b611656836115b5565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b818110156116a55783516001600160a01b031683529284019291840191600101611680565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156116f0576116f06116b1565b604052919050565b600067ffffffffffffffff821115611712576117126116b1565b5060051b60200190565b600082601f83011261172d57600080fd5b8135602061174261173d836116f8565b6116c7565b82815260059290921b8401810191818101908684111561176157600080fd5b8286015b8481101561178357611776816115b5565b8352918301918301611765565b509695505050505050565b600082601f83011261179f57600080fd5b813560206117af61173d836116f8565b82815260059290921b840181019181810190868411156117ce57600080fd5b8286015b8481101561178357803583529183019183016117d2565b803580151581146115cc57600080fd5b600082601f83011261180a57600080fd5b8135602061181a61173d836116f8565b82815260059290921b8401810191818101908684111561183957600080fd5b8286015b848110156117835761184e816117e9565b835291830191830161183d565b600080600080600060a0868803121561187357600080fd5b853567ffffffffffffffff8082111561188b57600080fd5b61189789838a0161171c565b965060208801359150808211156118ad57600080fd5b6118b989838a0161178e565b955060408801359150808211156118cf57600080fd5b6118db89838a0161178e565b945060608801359150808211156118f157600080fd5b6118fd89838a0161178e565b9350608088013591508082111561191357600080fd5b50611920888289016117f9565b9150509295509295909350565b60006020828403121561193f57600080fd5b5035919050565b60008060006060848603121561195b57600080fd5b611964846115b5565b95602085013595506040909401359392505050565b6000806040838503121561198c57600080fd5b611995836115b5565b91506119a3602084016117e9565b90509250929050565b600080600080600060a086880312156119c457600080fd5b6119cd866115b5565b94506020860135935060408601359250606086013591506119f0608087016117e9565b90509295509295909350565b634e487b7160e01b600052601160045260246000fd5b818103818111156113a4576113a46119fc565b634e487b7160e01b600052603260045260246000fd5b600060018201611a4d57611a4d6119fc565b5060010190565b634e487b7160e01b600052603160045260246000fd5b600181811c90821680611a7e57607f821691505b602082108103610a3557634e487b7160e01b600052602260045260246000fd5b6000600160ff1b8201611ab357611ab36119fc565b5060000390565b634e487b7160e01b600052601260045260246000fd5b600082611adf57611adf611aba565b500690565b600082611af357611af3611aba565b500490565b600060208284031215611b0a57600080fd5b5051919050565b601f821115611b5b57600081815260208120601f850160051c81016020861015611b385750805b601f850160051c820191505b81811015611b5757828155600101611b44565b5050505b505050565b815167ffffffffffffffff811115611b7a57611b7a6116b1565b611b8e81611b888454611a6a565b84611b11565b602080601f831160018114611bc35760008415611bab5750858301515b600019600386901b1c1916600185901b178555611b57565b600085815260208120601f198616915b82811015611bf257888601518255948401946001909101908401611bd3565b5085821015611c105787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808201808211156113a4576113a46119fc565b80820281158282048414176113a4576113a46119fc56fea264697066735822122038216095c972cc2b0ebf9eb14138453af02c60f1a2ca422c1f4b8a9cb2cff53764736f6c63430008110033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101585760003560e01c80638da5cb5b116100c3578063c4d66de81161007c578063c4d66de8146102f1578063c7bbc86514610304578063d80f5a8714610317578063eb72ccd514610342578063f2fde38b1461034a578063f5bffc351461035d57600080fd5b80638da5cb5b146102785780638ee8ffd11461029d57806390e4b720146102b05780639bf761b7146102b8578063a9f02efe146102cb578063b55d9904146102de57600080fd5b80635ac99461116101155780635ac99461146101f3578063620611c314610206578063623a564b14610229578063689418691461023c578063715018a61461025d57806389eba0d21461026557600080fd5b806309f2a9831461015d5780630d8e6e2c146101725780631af327bd146101905780631d3ce398146101b857806329820c5b146101cd5780635521c653146101e0575b600080fd5b61017061016b3660046115d1565b610370565b005b61017a610547565b60405161018791906115ec565b60405180910390f35b6101a361019e36600461163a565b6105d9565b60408051928352602083019190915201610187565b6101c0610647565b6040516101879190611664565b6101706101db36600461185b565b6106a8565b6101a36101ee3660046115d1565b6107c8565b6101a361020136600461163a565b610800565b61021961021436600461192d565b610877565b6040519015158152602001610187565b610170610237366004611946565b6108c8565b61024f61024a3660046115d1565b610a0d565b604051908152602001610187565b610170610a3b565b610170610273366004611979565b610a4f565b6033546001600160a01b03165b6040516001600160a01b039091168152602001610187565b6101706102ab3660046119ac565b610abd565b610285610c60565b6101706102c636600461163a565b610c98565b6102196102d936600461163a565b610d99565b6102196102ec3660046115d1565b610ea9565b6101706102ff3660046115d1565b610ed5565b61021961031236600461163a565b611075565b6102196103253660046115d1565b6001600160a01b03166000908152609a6020526040902054151590565b61024f6111e6565b6101706103583660046115d1565b6112bb565b61024f61036b3660046115d1565b611334565b8061037a816113aa565b610382611402565b61038b82611334565b156103d05760405162461bcd60e51b815260206004820152601060248201526f62616c616e6365206e6f74207a65726f60801b60448201526064015b60405180910390fd5b6001600160a01b0382166000908152609a60205260408120819055805b6099546103fc90600190611a12565b81101561045457836001600160a01b03166099828154811061042057610420611a25565b6000918252602090912001546001600160a01b03160361044257809150610454565b8061044c81611a3b565b9150506103ed565b506099805461046590600190611a12565b8154811061047557610475611a25565b600091825260209091200154609980546001600160a01b0390921691839081106104a1576104a1611a25565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060998054806104e0576104e0611a54565b6000828152602090819020600019908301810180546001600160a01b03191690559091019091556040516001600160a01b03851681527f1e5281bbecf5c15104f9e35265dbe738c1cd2597613cbf4a0a51713448bc13b991015b60405180910390a1505050565b60606097805461055690611a6a565b80601f016020809104026020016040519081016040528092919081815260200182805461058290611a6a565b80156105cf5780601f106105a4576101008083540402835291602001916105cf565b820191906000526020600020905b8154815290600101906020018083116105b257829003601f168201915b5050505050905090565b600080836105e6816113aa565b6001600160a01b0385166000908152609a60205260408120549081131561062557610611858261145c565b935061061d848261146f565b92505061063f565b61063861063182611a9e565b869061146f565b9350849250505b509250929050565b606060998054806020026020016040519081016040528092919081815260200182805480156105cf57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610681575050505050905090565b6106b0611402565b84518451811480156106c25750808451145b80156106ce5750808351145b80156106da5750808251145b6107185760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206c656e6774687360881b60448201526064016103c7565b60005b818110156107bf576107ad87828151811061073857610738611a25565b602002602001015187838151811061075257610752611a25565b602002602001015187848151811061076c5761076c611a25565b602002602001015187858151811061078657610786611a25565b60200260200101518786815181106107a0576107a0611a25565b6020026020010151610abd565b806107b781611a3b565b91505061071b565b50505050505050565b600080826107d5816113aa565b5050506001600160a01b03166000908152609c6020908152604080832054609d909252909120549091565b6000808361080d816113aa565b6001600160a01b0385166000908152609a60205260408120549081131561084457610838858261146f565b935084925061063f9050565b61085761085082611a9e565b869061145c565b935061086c61086582611a9e565b859061146f565b925050509250929050565b60008060008312156108935761088c83611a9e565b9050610896565b50815b600a81101580156108af57506108ad600a82611ad0565b155b156108bf5761088c600a82611ae4565b60011492915050565b826108d2816113aa565b6108da611402565b6103e883111561091e5760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206d696e696d756d60881b60448201526064016103c7565b6103e88211156109625760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206d6178696d756d60881b60448201526064016103c7565b828210156109a25760405162461bcd60e51b815260206004820152600d60248201526c696e76616c69642072616e676560981b60448201526064016103c7565b6001600160a01b0384166000818152609c60209081526040808320879055609d8252918290208590558151928352820185905281018390527fe3b935f735d8a72a31934e03fd96d995c5b3096c7362bc7e8796ab9e1ffe668c9060600160405180910390a150505050565b600081610a19816113aa565b6001600160a01b0383166000908152609a602052604090205491505b50919050565b610a43611402565b610a4d600061147b565b565b81610a59816113aa565b610a61611402565b6001600160a01b0383166000818152609e6020908152604091829020805460ff19168615159081179091558251938452908301527f6567e54649bc4d1136cad0f12cfc472ef5c8255ad12c3e46ecf4ef245f06c6cc910161053a565b610ac5611402565b6001600160a01b038516610b145760405162461bcd60e51b8152602060048201526016602482015275696e76616c696420626173736574206164647265737360501b60448201526064016103c7565b6001600160a01b0385166000908152609a602052604090205415610b725760405162461bcd60e51b815260206004820152601560248201527462617373657420616c72656164792065786973747360581b60448201526064016103c7565b83600003610bb35760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b2103330b1ba37b960911b60448201526064016103c7565b609980546001810182556000919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000180546001600160a01b0319166001600160a01b038716179055610c088585610c98565b610c138584846108c8565b610c1d8582610a4f565b6040516001600160a01b03861681527fa83f9302fa4684335dd26b1bdd925929618565fa0f22bd9e91ab01753d8bf13c9060200160405180910390a15050505050565b6000610c937f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b610ca0611402565b80600003610ce15760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b2103330b1ba37b960911b60448201526064016103c7565b8060011480610cf45750610cf481610877565b610d405760405162461bcd60e51b815260206004820152601a60248201527f666163746f72206d75737420626520706f776572206f6620313000000000000060448201526064016103c7565b6001600160a01b0382166000818152609a6020908152604091829020849055815192835282018390527fbd9d78e6bf6327f299e2cc40ef087c54546ef9ac6bea857cdc90b57270bbb58991015b60405180910390a15050565b600082610da5816113aa565b83610daf816114cd565b6000610dbb86866105d9565b506098546040516370a0823160e01b81526001600160a01b039182166004820152919250600091908816906370a0823190602401602060405180830381865afa158015610e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e309190611af8565b90506000610e3e88836105d9565b5090506000610e4d8285611529565b90506000610e6385610e5d6111e6565b90611529565b90506000610e7d82610e77856103e861146f565b9061145c565b6001600160a01b038c166000908152609d6020526040902054101598505050505050505b505092915050565b600081610eb5816113aa565b50506001600160a01b03166000908152609e602052604090205460ff1690565b600054610100900460ff1615808015610ef55750600054600160ff909116105b80610f0f5750303b158015610f0f575060005460ff166001145b610f725760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103c7565b6000805460ff191660011790558015610f95576000805461ff0019166101001790555b6098546001600160a01b031615610fe45760405162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064016103c7565b609880546001600160a01b0319166001600160a01b0384161790556040805180820190915260038152620332e360ec1b60208201526097906110269082611b60565b5061102f611535565b8015611071576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610d8d565b5050565b600082611081816113aa565b8361108b816114cd565b600061109786866105d9565b506098546040516370a0823160e01b81526001600160a01b039182166004820152919250600091908816906370a0823190602401602060405180830381865afa1580156110e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110c9190611af8565b9050600061111a88836105d9565b5090508281101561116d5760405162461bcd60e51b815260206004820181905260248201527f6261737365742062616c616e6365206973206e6f742073756666696369656e7460448201526064016103c7565b600061117982856115a9565b9050600061118f856111896111e6565b906115a9565b6001600160a01b038b166000908152609c60205260408120549192508290036111c057159750610ea1945050505050565b60006111d283610e77866103e861146f565b91909110159b9a5050505050505050505050565b6000805b6099548110156112b75760006099828154811061120957611209611a25565b60009182526020822001546098546040516370a0823160e01b81526001600160a01b0391821660048201529116925082906370a0823190602401602060405180830381865afa158015611260573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112849190611af8565b9050600061129283836105d9565b50905061129f8186611c20565b945050505080806112af90611a3b565b9150506111ea565b5090565b6112c3611402565b6001600160a01b0381166113285760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c7565b6113318161147b565b50565b6098546040516370a0823160e01b81526001600160a01b0391821660048201526000918316906370a0823190602401602060405180830381865afa158015611380573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a49190611af8565b92915050565b6001600160a01b0381166000908152609a602052604081205490036113315760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a590818985cdcd95d60921b60448201526064016103c7565b6033546001600160a01b03163314610a4d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b60006114688284611ae4565b9392505050565b60006114688284611c33565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0381166000908152609e602052604090205460ff16156113315760405162461bcd60e51b815260206004820152601060248201526f18985cdcd95d081a5cc81c185d5cd95960821b60448201526064016103c7565b60006114688284611c20565b600054610100900460ff166115a05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016103c7565b610a4d3361147b565b60006114688284611a12565b80356001600160a01b03811681146115cc57600080fd5b919050565b6000602082840312156115e357600080fd5b611468826115b5565b600060208083528351808285015260005b81811015611619578581018301518582016040015282016115fd565b506000604082860101526040601f19601f8301168501019250505092915050565b6000806040838503121561164d57600080fd5b611656836115b5565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b818110156116a55783516001600160a01b031683529284019291840191600101611680565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156116f0576116f06116b1565b604052919050565b600067ffffffffffffffff821115611712576117126116b1565b5060051b60200190565b600082601f83011261172d57600080fd5b8135602061174261173d836116f8565b6116c7565b82815260059290921b8401810191818101908684111561176157600080fd5b8286015b8481101561178357611776816115b5565b8352918301918301611765565b509695505050505050565b600082601f83011261179f57600080fd5b813560206117af61173d836116f8565b82815260059290921b840181019181810190868411156117ce57600080fd5b8286015b8481101561178357803583529183019183016117d2565b803580151581146115cc57600080fd5b600082601f83011261180a57600080fd5b8135602061181a61173d836116f8565b82815260059290921b8401810191818101908684111561183957600080fd5b8286015b848110156117835761184e816117e9565b835291830191830161183d565b600080600080600060a0868803121561187357600080fd5b853567ffffffffffffffff8082111561188b57600080fd5b61189789838a0161171c565b965060208801359150808211156118ad57600080fd5b6118b989838a0161178e565b955060408801359150808211156118cf57600080fd5b6118db89838a0161178e565b945060608801359150808211156118f157600080fd5b6118fd89838a0161178e565b9350608088013591508082111561191357600080fd5b50611920888289016117f9565b9150509295509295909350565b60006020828403121561193f57600080fd5b5035919050565b60008060006060848603121561195b57600080fd5b611964846115b5565b95602085013595506040909401359392505050565b6000806040838503121561198c57600080fd5b611995836115b5565b91506119a3602084016117e9565b90509250929050565b600080600080600060a086880312156119c457600080fd5b6119cd866115b5565b94506020860135935060408601359250606086013591506119f0608087016117e9565b90509295509295909350565b634e487b7160e01b600052601160045260246000fd5b818103818111156113a4576113a46119fc565b634e487b7160e01b600052603260045260246000fd5b600060018201611a4d57611a4d6119fc565b5060010190565b634e487b7160e01b600052603160045260246000fd5b600181811c90821680611a7e57607f821691505b602082108103610a3557634e487b7160e01b600052602260045260246000fd5b6000600160ff1b8201611ab357611ab36119fc565b5060000390565b634e487b7160e01b600052601260045260246000fd5b600082611adf57611adf611aba565b500690565b600082611af357611af3611aba565b500490565b600060208284031215611b0a57600080fd5b5051919050565b601f821115611b5b57600081815260208120601f850160051c81016020861015611b385750805b601f850160051c820191505b81811015611b5757828155600101611b44565b5050505b505050565b815167ffffffffffffffff811115611b7a57611b7a6116b1565b611b8e81611b888454611a6a565b84611b11565b602080601f831160018114611bc35760008415611bab5750858301515b600019600386901b1c1916600185901b178555611b57565b600085815260208120601f198616915b82811015611bf257888601518255948401946001909101908401611bd3565b5085821015611c105787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808201808211156113a4576113a46119fc565b80820281158282048414176113a4576113a46119fc56fea264697066735822122038216095c972cc2b0ebf9eb14138453af02c60f1a2ca422c1f4b8a9cb2cff53764736f6c63430008110033", + "implementation": "0x4Ec09f11E667dd39E8751A07a74a2F90712Ef322", + "devdoc": { + "details": "Contract is responsible for mAsset and bAsset exchange process and managing basket with bAsset tokens. Allows to add and/or remove bAsset, calculate balances, converts tokens quantity to adjust precisions or set/get parameters: factor, range and paused.", + "events": { + "BassetAdded(address)": { + "details": "Event emitted when basset is added.", + "params": { + "basset": "Address of the bAsset contract." + } + }, + "BassetRemoved(address)": { + "details": "Event emitted when basset is removed.", + "params": { + "basset": "Address of the bAsset contract." + } + }, + "FactorChanged(address,int256)": { + "details": "Event emitted when factor is changed.", + "params": { + "basset": "Address of the bAsset contract.", + "factor": "Factor of fees." + } + }, + "PausedChanged(address,bool)": { + "details": "Event emitted when paused is changed.", + "params": { + "basset": "Address of the bAsset contract.", + "paused": "Determine if paused or not." + } + }, + "RangeChanged(address,uint256,uint256)": { + "details": "Event emitted when range is changed.", + "params": { + "basset": "Address of the bAsset contract.", + "max": "Maximal value of range.", + "min": "Minimal value of range." + } + } + }, + "kind": "dev", + "methods": { + "addBasset(address,int256,uint256,uint256,bool)": { + "details": "Adds a new bAsset.", + "params": { + "_basset": "Address of bAsset.", + "_factor": "Factor amount.", + "_max": "Maximum ratio in basket.", + "_min": "Minimum ratio in basket.", + "_paused": "Flag to determine if basset should be paused." + } + }, + "addBassets(address[],int256[],uint256[],uint256[],bool[])": { + "details": "Adds multiple bAssets." + }, + "checkBasketBalanceForDeposit(address,uint256)": { + "details": "Checks if ratio of bAssets in basket is within limits to make a deposit of specific asset.", + "params": { + "_basset": "Address of bAsset to deposit.", + "_bassetQuantity": "Amount of bAssets to deposit." + }, + "returns": { + "_0": "Flag indicating whether a deposit can be made." + } + }, + "checkBasketBalanceForWithdrawal(address,uint256)": { + "details": "Checks if ratio of bAssets in basket is within limits to make a withdrawal of specific asset.", + "params": { + "_basset": "Address of bAsset to redeem.", + "_bassetQuantity": "Amount of bAssets to redeem." + }, + "returns": { + "_0": "Flag indicating whether a withdrawal can be made." + } + }, + "convertBassetToMassetQuantity(address,uint256)": { + "details": "Converts bAsset to mAsset quantity. This is used to adjust precision. Despite bAssets and mAssets having 1:1 ratio, they may have diffrent decimal factors. Since the ratio may cause fractions, the bAsset is adjusted to match nearest non fraction amount and returned.", + "params": { + "_basset": "Address of bAsset.", + "_bassetQuantity": "Amount of bAssets to check." + }, + "returns": { + "bassetQuantity": "Calculated amount of Adjusted amount of bAssets.", + "massetQuantity": "Calculated amount of mAssets." + } + }, + "convertMassetToBassetQuantity(address,uint256)": { + "details": "Converts mAsset to bAsset quantity. This is used to adjust precisions. Despite bAssets and mAssets having 1:1 ratio, they may have diffrent decimal factors. Since the ratio may cause fractions, the mAsset is adjusted to match nearest non fraction amount and returned.", + "params": { + "_basset": "Address of bAsset.", + "_massetQuantity": "Amount of mAssets to check." + }, + "returns": { + "bassetQuantity": "Calculated amount of Adjusted amount of bAssets.", + "massetQuantity": "Calculated amount of mAssets." + } + }, + "getProxyImplementation()": { + "details": "get the implementation logic address referring to ERC1967 standard.", + "returns": { + "_0": "logic implementation address." + } + }, + "getTotalMassetBalance()": { + "details": "Calculates total mAsset balance.", + "returns": { + "total": "Calculated total balance." + } + }, + "initialize(address)": { + "details": "Contract initializer.", + "params": { + "_massetManager": "Address of the MassetManager contract." + } + }, + "isPowerOfTen(int256)": { + "details": "Returns true if the number is power of ten.", + "params": { + "x": "Number to be checked." + }, + "returns": { + "result": "Is the number power of ten." + } + }, + "isValidBasset(address)": { + "details": "Checks if bAasset is valid by checking its presence in the bAssets factors list." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "removeBasset(address)": { + "details": "Removes bAsset", + "params": { + "_basset": "Address of bAsset to remove." + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "title": "BasketManagerV3", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addBassets(address[],int256[],uint256[],uint256[],bool[])": { + "notice": "All parameters must be arrays with proper order and equal length." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 534, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 537, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1094, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 10, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 130, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 516, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 6354, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "version", + "offset": 0, + "slot": "151", + "type": "t_string_storage" + }, + { + "astId": 6356, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "massetManager", + "offset": 0, + "slot": "152", + "type": "t_address" + }, + { + "astId": 6359, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "bassetsArray", + "offset": 0, + "slot": "153", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 6363, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "factorMap", + "offset": 0, + "slot": "154", + "type": "t_mapping(t_address,t_int256)" + }, + { + "astId": 6367, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "DEPRECATED_bridgeMap", + "offset": 0, + "slot": "155", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 6371, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "minMap", + "offset": 0, + "slot": "156", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 6375, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "maxMap", + "offset": 0, + "slot": "157", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 6379, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "pausedMap", + "offset": 0, + "slot": "158", + "type": "t_mapping(t_address,t_bool)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_int256": { + "encoding": "inplace", + "label": "int256", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_int256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => int256)", + "numberOfBytes": "32", + "value": "t_int256" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} diff --git a/external/deployments/rskMainnet/BasketManagerV3_Implementation.json b/external/deployments/rskMainnet/BasketManagerV3_Implementation.json new file mode 100644 index 000000000..21ac8bcfb --- /dev/null +++ b/external/deployments/rskMainnet/BasketManagerV3_Implementation.json @@ -0,0 +1,1001 @@ +{ + "address": "0x4Ec09f11E667dd39E8751A07a74a2F90712Ef322", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "basset", + "type": "address" + } + ], + "name": "BassetAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "basset", + "type": "address" + } + ], + "name": "BassetRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "basset", + "type": "address" + }, + { + "indexed": false, + "internalType": "int256", + "name": "factor", + "type": "int256" + } + ], + "name": "FactorChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "basset", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "paused", + "type": "bool" + } + ], + "name": "PausedChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "basset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "RangeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "int256", + "name": "_factor", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "_min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_max", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_paused", + "type": "bool" + } + ], + "name": "addBasset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_bassets", + "type": "address[]" + }, + { + "internalType": "int256[]", + "name": "_factors", + "type": "int256[]" + }, + { + "internalType": "uint256[]", + "name": "_mins", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_maxs", + "type": "uint256[]" + }, + { + "internalType": "bool[]", + "name": "_pausedFlags", + "type": "bool[]" + } + ], + "name": "addBassets", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_bassetQuantity", + "type": "uint256" + } + ], + "name": "checkBasketBalanceForDeposit", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_bassetQuantity", + "type": "uint256" + } + ], + "name": "checkBasketBalanceForWithdrawal", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_bassetQuantity", + "type": "uint256" + } + ], + "name": "convertBassetToMassetQuantity", + "outputs": [ + { + "internalType": "uint256", + "name": "massetQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "bassetQuantity", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_massetQuantity", + "type": "uint256" + } + ], + "name": "convertMassetToBassetQuantity", + "outputs": [ + { + "internalType": "uint256", + "name": "bassetQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "massetQuantity", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + } + ], + "name": "getBassetBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBassets", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + } + ], + "name": "getFactor", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + } + ], + "name": "getPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getProxyImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + } + ], + "name": "getRange", + "outputs": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalMassetBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "total", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVersion", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_massetManager", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "x", + "type": "int256" + } + ], + "name": "isPowerOfTen", + "outputs": [ + { + "internalType": "bool", + "name": "result", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + } + ], + "name": "isValidBasset", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + } + ], + "name": "removeBasset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "int256", + "name": "_factor", + "type": "int256" + } + ], + "name": "setFactor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "bool", + "name": "_flag", + "type": "bool" + } + ], + "name": "setPaused", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_basset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_max", + "type": "uint256" + } + ], + "name": "setRange", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x62215f42b8aec1e0a4697f729bdb3f8b6fc98f0beddc48abcbf32ebfcd5ecc52", + "receipt": { + "to": null, + "from": "0xFEe171A152C02F336021fb9E79b4fAc2304a9E7E", + "contractAddress": "0x4Ec09f11E667dd39E8751A07a74a2F90712Ef322", + "transactionIndex": 0, + "gasUsed": "2000888", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xbfbf0fd2d9c5a369687f851b23f717ac247f22f8a2af66ea25f664eddd3c60c1", + "transactionHash": "0x62215f42b8aec1e0a4697f729bdb3f8b6fc98f0beddc48abcbf32ebfcd5ecc52", + "logs": [], + "blockNumber": 5385674, + "cumulativeGasUsed": "2000888", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 2, + "solcInputHash": "5727992a5ffb924489d49e5c632b187c", + "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"basset\",\"type\":\"address\"}],\"name\":\"BassetAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"basset\",\"type\":\"address\"}],\"name\":\"BassetRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"basset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"factor\",\"type\":\"int256\"}],\"name\":\"FactorChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"basset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"basset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"RangeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_basset\",\"type\":\"address\"},{\"internalType\":\"int256\",\"name\":\"_factor\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"_min\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_max\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_paused\",\"type\":\"bool\"}],\"name\":\"addBasset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_bassets\",\"type\":\"address[]\"},{\"internalType\":\"int256[]\",\"name\":\"_factors\",\"type\":\"int256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_mins\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_maxs\",\"type\":\"uint256[]\"},{\"internalType\":\"bool[]\",\"name\":\"_pausedFlags\",\"type\":\"bool[]\"}],\"name\":\"addBassets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_basset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_bassetQuantity\",\"type\":\"uint256\"}],\"name\":\"checkBasketBalanceForDeposit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_basset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_bassetQuantity\",\"type\":\"uint256\"}],\"name\":\"checkBasketBalanceForWithdrawal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_basset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_bassetQuantity\",\"type\":\"uint256\"}],\"name\":\"convertBassetToMassetQuantity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"massetQuantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bassetQuantity\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_basset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_massetQuantity\",\"type\":\"uint256\"}],\"name\":\"convertMassetToBassetQuantity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"bassetQuantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"massetQuantity\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_basset\",\"type\":\"address\"}],\"name\":\"getBassetBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBassets\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_basset\",\"type\":\"address\"}],\"name\":\"getFactor\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_basset\",\"type\":\"address\"}],\"name\":\"getPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProxyImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_basset\",\"type\":\"address\"}],\"name\":\"getRange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalMassetBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_massetManager\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"x\",\"type\":\"int256\"}],\"name\":\"isPowerOfTen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"result\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_basset\",\"type\":\"address\"}],\"name\":\"isValidBasset\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_basset\",\"type\":\"address\"}],\"name\":\"removeBasset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_basset\",\"type\":\"address\"},{\"internalType\":\"int256\",\"name\":\"_factor\",\"type\":\"int256\"}],\"name\":\"setFactor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_basset\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_flag\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_basset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_min\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_max\",\"type\":\"uint256\"}],\"name\":\"setRange\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract is responsible for mAsset and bAsset exchange process and managing basket with bAsset tokens. Allows to add and/or remove bAsset, calculate balances, converts tokens quantity to adjust precisions or set/get parameters: factor, range and paused.\",\"events\":{\"BassetAdded(address)\":{\"details\":\"Event emitted when basset is added.\",\"params\":{\"basset\":\"Address of the bAsset contract.\"}},\"BassetRemoved(address)\":{\"details\":\"Event emitted when basset is removed.\",\"params\":{\"basset\":\"Address of the bAsset contract.\"}},\"FactorChanged(address,int256)\":{\"details\":\"Event emitted when factor is changed.\",\"params\":{\"basset\":\"Address of the bAsset contract.\",\"factor\":\"Factor of fees.\"}},\"PausedChanged(address,bool)\":{\"details\":\"Event emitted when paused is changed.\",\"params\":{\"basset\":\"Address of the bAsset contract.\",\"paused\":\"Determine if paused or not.\"}},\"RangeChanged(address,uint256,uint256)\":{\"details\":\"Event emitted when range is changed.\",\"params\":{\"basset\":\"Address of the bAsset contract.\",\"max\":\"Maximal value of range.\",\"min\":\"Minimal value of range.\"}}},\"kind\":\"dev\",\"methods\":{\"addBasset(address,int256,uint256,uint256,bool)\":{\"details\":\"Adds a new bAsset.\",\"params\":{\"_basset\":\"Address of bAsset.\",\"_factor\":\"Factor amount.\",\"_max\":\"Maximum ratio in basket.\",\"_min\":\"Minimum ratio in basket.\",\"_paused\":\"Flag to determine if basset should be paused.\"}},\"addBassets(address[],int256[],uint256[],uint256[],bool[])\":{\"details\":\"Adds multiple bAssets.\"},\"checkBasketBalanceForDeposit(address,uint256)\":{\"details\":\"Checks if ratio of bAssets in basket is within limits to make a deposit of specific asset.\",\"params\":{\"_basset\":\"Address of bAsset to deposit.\",\"_bassetQuantity\":\"Amount of bAssets to deposit.\"},\"returns\":{\"_0\":\"Flag indicating whether a deposit can be made.\"}},\"checkBasketBalanceForWithdrawal(address,uint256)\":{\"details\":\"Checks if ratio of bAssets in basket is within limits to make a withdrawal of specific asset.\",\"params\":{\"_basset\":\"Address of bAsset to redeem.\",\"_bassetQuantity\":\"Amount of bAssets to redeem.\"},\"returns\":{\"_0\":\"Flag indicating whether a withdrawal can be made.\"}},\"convertBassetToMassetQuantity(address,uint256)\":{\"details\":\"Converts bAsset to mAsset quantity. This is used to adjust precision. Despite bAssets and mAssets having 1:1 ratio, they may have diffrent decimal factors. Since the ratio may cause fractions, the bAsset is adjusted to match nearest non fraction amount and returned.\",\"params\":{\"_basset\":\"Address of bAsset.\",\"_bassetQuantity\":\"Amount of bAssets to check.\"},\"returns\":{\"bassetQuantity\":\"Calculated amount of Adjusted amount of bAssets.\",\"massetQuantity\":\"Calculated amount of mAssets.\"}},\"convertMassetToBassetQuantity(address,uint256)\":{\"details\":\"Converts mAsset to bAsset quantity. This is used to adjust precisions. Despite bAssets and mAssets having 1:1 ratio, they may have diffrent decimal factors. Since the ratio may cause fractions, the mAsset is adjusted to match nearest non fraction amount and returned.\",\"params\":{\"_basset\":\"Address of bAsset.\",\"_massetQuantity\":\"Amount of mAssets to check.\"},\"returns\":{\"bassetQuantity\":\"Calculated amount of Adjusted amount of bAssets.\",\"massetQuantity\":\"Calculated amount of mAssets.\"}},\"getProxyImplementation()\":{\"details\":\"get the implementation logic address referring to ERC1967 standard.\",\"returns\":{\"_0\":\"logic implementation address.\"}},\"getTotalMassetBalance()\":{\"details\":\"Calculates total mAsset balance.\",\"returns\":{\"total\":\"Calculated total balance.\"}},\"initialize(address)\":{\"details\":\"Contract initializer.\",\"params\":{\"_massetManager\":\"Address of the MassetManager contract.\"}},\"isPowerOfTen(int256)\":{\"details\":\"Returns true if the number is power of ten.\",\"params\":{\"x\":\"Number to be checked.\"},\"returns\":{\"result\":\"Is the number power of ten.\"}},\"isValidBasset(address)\":{\"details\":\"Checks if bAasset is valid by checking its presence in the bAssets factors list.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeBasset(address)\":{\"details\":\"Removes bAsset\",\"params\":{\"_basset\":\"Address of bAsset to remove.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"BasketManagerV3\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addBassets(address[],int256[],uint256[],uint256[],bool[])\":{\"notice\":\"All parameters must be arrays with proper order and equal length.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/masset/BasketManagerV3.sol\":\"BasketManagerV3\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.3) (interfaces/IERC1967.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\\n *\\n * _Available since v4.9._\\n */\\ninterface IERC1967Upgradeable {\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Emitted when the beacon is changed.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n}\\n\",\"keccak256\":\"0xb8d68221343ed784c7b76edb6a686cb65e49c476d9e22bb89a5c0c3947ff14db\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822ProxiableUpgradeable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/IERC1967Upgradeable.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {\\n function __ERC1967Upgrade_init() internal onlyInitializing {\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\\n }\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x1599637b52d20dc3954cea44914b2a4a9a8a5caade58d9da947e0b6c9acc07ba\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x037c334add4b033ad3493038c25be1682d78c00992e1acb0e2795caff3925271\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlotUpgradeable {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x09864aea84f01e39313375b5610c73a3c1c68abbdc51e5ccdd25ff977fdadf9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0f633a0223d9a1dcccfcf38a64c9de0874dfcbfac0c6941ccf074d63a2ce0e1e\",\"license\":\"MIT\"},\"contracts/masset/BasketManagerV3.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport { SafeMath } from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\n\\n/**\\n * @title BasketManagerV3\\n * @dev Contract is responsible for mAsset and bAsset exchange process and\\n * managing basket with bAsset tokens.\\n * Allows to add and/or remove bAsset, calculate balances, converts tokens quantity\\n * to adjust precisions or set/get parameters: factor, range and paused.\\n */\\n\\ncontract BasketManagerV3 is OwnableUpgradeable, ERC1967UpgradeUpgradeable {\\n using SafeMath for uint256;\\n\\n // Events\\n\\n /**\\n * @dev Event emitted when basset is added.\\n * @param basset Address of the bAsset contract.\\n */\\n event BassetAdded(address basset);\\n\\n /**\\n * @dev Event emitted when basset is removed.\\n * @param basset Address of the bAsset contract.\\n */\\n event BassetRemoved(address basset);\\n\\n /**\\n * @dev Event emitted when factor is changed.\\n * @param basset Address of the bAsset contract.\\n * @param factor Factor of fees.\\n */\\n event FactorChanged(address basset, int256 factor);\\n\\n /**\\n * @dev Event emitted when range is changed.\\n * @param basset Address of the bAsset contract.\\n * @param min Minimal value of range.\\n * @param max Maximal value of range.\\n */\\n event RangeChanged(address basset, uint256 min, uint256 max);\\n\\n /**\\n * @dev Event emitted when paused is changed.\\n * @param basset Address of the bAsset contract.\\n * @param paused Determine if paused or not.\\n */\\n event PausedChanged(address basset, bool paused);\\n\\n uint256 constant MAX_VALUE = 1000;\\n\\n // state\\n string version;\\n address massetManager;\\n address[] private bassetsArray;\\n mapping(address => int256) private factorMap;\\n mapping(address => address) private DEPRECATED_bridgeMap;\\n mapping(address => uint256) private minMap;\\n mapping(address => uint256) private maxMap;\\n mapping(address => bool) private pausedMap;\\n\\n // Modifiers\\n\\n /**\\n * @dev Prevents a contract from making actions on paused bAssets.\\n */\\n modifier notPaused(address _basset) {\\n _notPaused(_basset);\\n _;\\n }\\n\\n /**\\n * @dev Prevents a contract from making actions on invalid bAssets.\\n */\\n modifier validBasset(address _basset) {\\n _validBasset(_basset);\\n _;\\n }\\n\\n /**\\n * @dev Prevents a contract from making actions on paused bAssets.\\n * This method is called and separated from modifier to optimize bytecode and save gas.\\n */\\n function _notPaused(address _basset) internal view {\\n require(!pausedMap[_basset], \\\"basset is paused\\\");\\n }\\n\\n /**\\n * @dev Prevents a contract from making actions on invalid bAssets.\\n * This method is called and separated from modifier to optimize bytecode and save gas.\\n */\\n function _validBasset(address _basset) internal view {\\n require(factorMap[_basset] != 0, \\\"invalid basset\\\");\\n }\\n\\n // Initializer\\n\\n /**\\n * @dev Contract initializer.\\n * @param _massetManager Address of the MassetManager contract.\\n */\\n function initialize(address _massetManager) external initializer {\\n require(massetManager == address(0), \\\"already initialized\\\");\\n massetManager = _massetManager;\\n version = \\\"3.0\\\";\\n\\n __Ownable_init_unchained();\\n }\\n\\n // Methods for MassetManager logic\\n\\n /**\\n * @dev Checks if bAasset is valid by checking its presence in the bAssets factors list.\\n */\\n function isValidBasset(address _basset) public view returns (bool) {\\n return (factorMap[_basset] != 0);\\n }\\n\\n /**\\n * @dev Checks if ratio of bAssets in basket is within limits to make a deposit of specific asset.\\n * @param _basset Address of bAsset to deposit.\\n * @param _bassetQuantity Amount of bAssets to deposit.\\n * @return Flag indicating whether a deposit can be made.\\n */\\n function checkBasketBalanceForDeposit(\\n address _basset,\\n uint256 _bassetQuantity\\n ) public view validBasset(_basset) notPaused(_basset) returns (bool) {\\n (uint256 massetQuantity, ) = convertBassetToMassetQuantity(_basset, _bassetQuantity);\\n uint256 bassetBalance = IERC20(_basset).balanceOf(massetManager);\\n\\n (uint256 totalBassetBalanceInMasset, ) = convertBassetToMassetQuantity(\\n _basset,\\n bassetBalance\\n );\\n\\n uint256 balance = totalBassetBalanceInMasset.add(massetQuantity);\\n uint256 total = getTotalMassetBalance().add(massetQuantity);\\n uint256 ratio = balance.mul(MAX_VALUE).div(total);\\n uint256 max = maxMap[_basset];\\n return ratio <= max;\\n }\\n\\n /**\\n * @dev Checks if ratio of bAssets in basket is within limits to make a withdrawal of specific asset.\\n * @param _basset Address of bAsset to redeem.\\n * @param _bassetQuantity Amount of bAssets to redeem.\\n * @return Flag indicating whether a withdrawal can be made.\\n */\\n function checkBasketBalanceForWithdrawal(\\n address _basset,\\n uint256 _bassetQuantity\\n ) public view validBasset(_basset) notPaused(_basset) returns (bool) {\\n (uint256 massetQuantity, ) = convertBassetToMassetQuantity(_basset, _bassetQuantity);\\n uint256 bassetBalance = IERC20(_basset).balanceOf(massetManager);\\n (uint256 totalBassetBalanceInMasset, ) = convertBassetToMassetQuantity(\\n _basset,\\n bassetBalance\\n );\\n\\n require(totalBassetBalanceInMasset >= massetQuantity, \\\"basset balance is not sufficient\\\");\\n\\n uint256 balance = totalBassetBalanceInMasset.sub(massetQuantity);\\n uint256 total = getTotalMassetBalance().sub(massetQuantity);\\n uint256 min = minMap[_basset];\\n if (total == 0) return min == 0;\\n\\n uint256 ratio = balance.mul(MAX_VALUE).div(total);\\n return ratio >= min;\\n }\\n\\n /**\\n * @dev Converts bAsset to mAsset quantity. This is used to adjust precision.\\n * Despite bAssets and mAssets having 1:1 ratio, they may have diffrent decimal factors.\\n * Since the ratio may cause fractions, the bAsset is adjusted to match nearest non fraction amount and returned.\\n * @param _basset Address of bAsset.\\n * @param _bassetQuantity Amount of bAssets to check.\\n * @return massetQuantity Calculated amount of mAssets.\\n * @return bassetQuantity Calculated amount of Adjusted amount of bAssets.\\n */\\n function convertBassetToMassetQuantity(\\n address _basset,\\n uint256 _bassetQuantity\\n ) public view validBasset(_basset) returns (uint256 massetQuantity, uint256 bassetQuantity) {\\n int256 factor = factorMap[_basset];\\n if (factor > 0) {\\n massetQuantity = _bassetQuantity.div(uint256(factor));\\n bassetQuantity = massetQuantity.mul(uint256(factor));\\n return (massetQuantity, bassetQuantity);\\n }\\n massetQuantity = _bassetQuantity.mul(uint256(-factor));\\n return (massetQuantity, _bassetQuantity);\\n }\\n\\n /**\\n * @dev Converts mAsset to bAsset quantity. This is used to adjust precisions.\\n * Despite bAssets and mAssets having 1:1 ratio, they may have diffrent decimal factors.\\n * Since the ratio may cause fractions, the mAsset is adjusted to match nearest non fraction amount and returned.\\n * @param _basset Address of bAsset.\\n * @param _massetQuantity Amount of mAssets to check.\\n * @return bassetQuantity Calculated amount of Adjusted amount of bAssets.\\n * @return massetQuantity Calculated amount of mAssets.\\n */\\n function convertMassetToBassetQuantity(\\n address _basset,\\n uint256 _massetQuantity\\n ) public view validBasset(_basset) returns (uint256 bassetQuantity, uint256 massetQuantity) {\\n int256 factor = factorMap[_basset];\\n if (factor > 0) {\\n bassetQuantity = _massetQuantity.mul(uint256(factor));\\n return (bassetQuantity, _massetQuantity);\\n }\\n bassetQuantity = _massetQuantity.div(uint256(-factor));\\n massetQuantity = bassetQuantity.mul(uint256(-factor));\\n return (bassetQuantity, massetQuantity);\\n }\\n\\n // Getters\\n\\n /**\\n * @dev Calculates total mAsset balance.\\n * @return total Calculated total balance.\\n */\\n function getTotalMassetBalance() public view returns (uint256 total) {\\n for (uint256 i = 0; i < bassetsArray.length; i++) {\\n address basset = bassetsArray[i];\\n uint256 balance = IERC20(basset).balanceOf(massetManager);\\n (uint256 massetQuantity, ) = convertBassetToMassetQuantity(basset, balance);\\n total += massetQuantity;\\n }\\n }\\n\\n function getBassetBalance(address _basset) public view returns (uint256) {\\n return IERC20(_basset).balanceOf(massetManager);\\n }\\n\\n function getVersion() external view returns (string memory) {\\n return version;\\n }\\n\\n function getBassets() public view returns (address[] memory) {\\n return bassetsArray;\\n }\\n\\n function getFactor(address _basset) public view validBasset(_basset) returns (int256) {\\n return factorMap[_basset];\\n }\\n\\n function getRange(\\n address _basset\\n ) public view validBasset(_basset) returns (uint256 min, uint256 max) {\\n min = minMap[_basset];\\n max = maxMap[_basset];\\n }\\n\\n function getPaused(address _basset) public view validBasset(_basset) returns (bool) {\\n return pausedMap[_basset];\\n }\\n\\n // Admin methods\\n\\n /**\\n * @dev Adds a new bAsset.\\n * @param _basset Address of bAsset.\\n * @param _factor Factor amount.\\n * @param _min Minimum ratio in basket.\\n * @param _max Maximum ratio in basket.\\n * @param _paused Flag to determine if basset should be paused.\\n */\\n function addBasset(\\n address _basset,\\n int256 _factor,\\n uint256 _min,\\n uint256 _max,\\n bool _paused\\n ) public onlyOwner {\\n require(_basset != address(0), \\\"invalid basset address\\\");\\n require(factorMap[_basset] == 0, \\\"basset already exists\\\");\\n require(_factor != 0, \\\"invalid factor\\\");\\n\\n bassetsArray.push(_basset);\\n\\n setFactor(_basset, _factor);\\n setRange(_basset, _min, _max);\\n setPaused(_basset, _paused);\\n\\n emit BassetAdded(_basset);\\n }\\n\\n /**\\n * @dev Adds multiple bAssets.\\n * @notice All parameters must be arrays with proper order and equal length.\\n */\\n function addBassets(\\n address[] memory _bassets,\\n int256[] memory _factors,\\n uint256[] memory _mins,\\n uint256[] memory _maxs,\\n bool[] memory _pausedFlags\\n ) public onlyOwner {\\n uint256 length = _bassets.length;\\n require(\\n _factors.length == length &&\\n _mins.length == length &&\\n _maxs.length == length &&\\n _pausedFlags.length == length,\\n \\\"invalid lengths\\\"\\n );\\n\\n for (uint256 i = 0; i < length; i++) {\\n addBasset(_bassets[i], _factors[i], _mins[i], _maxs[i], _pausedFlags[i]);\\n }\\n }\\n\\n function setRange(\\n address _basset,\\n uint256 _min,\\n uint256 _max\\n ) public validBasset(_basset) onlyOwner {\\n require(_min <= MAX_VALUE, \\\"invalid minimum\\\");\\n require(_max <= MAX_VALUE, \\\"invalid maximum\\\");\\n require(_max >= _min, \\\"invalid range\\\");\\n minMap[_basset] = _min;\\n maxMap[_basset] = _max;\\n\\n emit RangeChanged(_basset, _min, _max);\\n }\\n\\n /**\\n * @dev Returns true if the number is power of ten.\\n * @param x Number to be checked.\\n * @return result Is the number power of ten.\\n */\\n function isPowerOfTen(int256 x) public pure returns (bool result) {\\n uint256 number;\\n\\n if (x < 0) number = uint256(-x);\\n else number = uint256(x);\\n\\n while (number >= 10 && number % 10 == 0) {\\n number /= 10;\\n }\\n\\n result = number == 1;\\n }\\n\\n function setFactor(address _basset, int256 _factor) public onlyOwner {\\n require(_factor != 0, \\\"invalid factor\\\");\\n require(_factor == 1 || isPowerOfTen(_factor), \\\"factor must be power of 10\\\");\\n factorMap[_basset] = _factor;\\n\\n emit FactorChanged(_basset, _factor);\\n }\\n\\n function setPaused(address _basset, bool _flag) public validBasset(_basset) onlyOwner {\\n pausedMap[_basset] = _flag;\\n\\n emit PausedChanged(_basset, _flag);\\n }\\n\\n /**\\n * @dev Removes bAsset\\n * @param _basset Address of bAsset to remove.\\n */\\n function removeBasset(address _basset) public validBasset(_basset) onlyOwner {\\n require(getBassetBalance(_basset) == 0, \\\"balance not zero\\\");\\n factorMap[_basset] = 0;\\n\\n uint256 index;\\n for (uint256 i = 0; i < bassetsArray.length - 1; i++) {\\n if (bassetsArray[i] == _basset) {\\n index = i;\\n break;\\n }\\n }\\n\\n bassetsArray[index] = bassetsArray[bassetsArray.length - 1];\\n bassetsArray.pop();\\n\\n emit BassetRemoved(_basset);\\n }\\n\\n /**\\n * @dev get the implementation logic address referring to ERC1967 standard.\\n *\\n * @return logic implementation address.\\n */\\n function getProxyImplementation() external view returns (address) {\\n return ERC1967UpgradeUpgradeable._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xe805c8e808f46d3569adbbd416356f530102612cc7d0cbad82231a0cdbca05fa\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611c80806100206000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c80638da5cb5b116100c3578063c4d66de81161007c578063c4d66de8146102f1578063c7bbc86514610304578063d80f5a8714610317578063eb72ccd514610342578063f2fde38b1461034a578063f5bffc351461035d57600080fd5b80638da5cb5b146102785780638ee8ffd11461029d57806390e4b720146102b05780639bf761b7146102b8578063a9f02efe146102cb578063b55d9904146102de57600080fd5b80635ac99461116101155780635ac99461146101f3578063620611c314610206578063623a564b14610229578063689418691461023c578063715018a61461025d57806389eba0d21461026557600080fd5b806309f2a9831461015d5780630d8e6e2c146101725780631af327bd146101905780631d3ce398146101b857806329820c5b146101cd5780635521c653146101e0575b600080fd5b61017061016b3660046115d1565b610370565b005b61017a610547565b60405161018791906115ec565b60405180910390f35b6101a361019e36600461163a565b6105d9565b60408051928352602083019190915201610187565b6101c0610647565b6040516101879190611664565b6101706101db36600461185b565b6106a8565b6101a36101ee3660046115d1565b6107c8565b6101a361020136600461163a565b610800565b61021961021436600461192d565b610877565b6040519015158152602001610187565b610170610237366004611946565b6108c8565b61024f61024a3660046115d1565b610a0d565b604051908152602001610187565b610170610a3b565b610170610273366004611979565b610a4f565b6033546001600160a01b03165b6040516001600160a01b039091168152602001610187565b6101706102ab3660046119ac565b610abd565b610285610c60565b6101706102c636600461163a565b610c98565b6102196102d936600461163a565b610d99565b6102196102ec3660046115d1565b610ea9565b6101706102ff3660046115d1565b610ed5565b61021961031236600461163a565b611075565b6102196103253660046115d1565b6001600160a01b03166000908152609a6020526040902054151590565b61024f6111e6565b6101706103583660046115d1565b6112bb565b61024f61036b3660046115d1565b611334565b8061037a816113aa565b610382611402565b61038b82611334565b156103d05760405162461bcd60e51b815260206004820152601060248201526f62616c616e6365206e6f74207a65726f60801b60448201526064015b60405180910390fd5b6001600160a01b0382166000908152609a60205260408120819055805b6099546103fc90600190611a12565b81101561045457836001600160a01b03166099828154811061042057610420611a25565b6000918252602090912001546001600160a01b03160361044257809150610454565b8061044c81611a3b565b9150506103ed565b506099805461046590600190611a12565b8154811061047557610475611a25565b600091825260209091200154609980546001600160a01b0390921691839081106104a1576104a1611a25565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060998054806104e0576104e0611a54565b6000828152602090819020600019908301810180546001600160a01b03191690559091019091556040516001600160a01b03851681527f1e5281bbecf5c15104f9e35265dbe738c1cd2597613cbf4a0a51713448bc13b991015b60405180910390a1505050565b60606097805461055690611a6a565b80601f016020809104026020016040519081016040528092919081815260200182805461058290611a6a565b80156105cf5780601f106105a4576101008083540402835291602001916105cf565b820191906000526020600020905b8154815290600101906020018083116105b257829003601f168201915b5050505050905090565b600080836105e6816113aa565b6001600160a01b0385166000908152609a60205260408120549081131561062557610611858261145c565b935061061d848261146f565b92505061063f565b61063861063182611a9e565b869061146f565b9350849250505b509250929050565b606060998054806020026020016040519081016040528092919081815260200182805480156105cf57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610681575050505050905090565b6106b0611402565b84518451811480156106c25750808451145b80156106ce5750808351145b80156106da5750808251145b6107185760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206c656e6774687360881b60448201526064016103c7565b60005b818110156107bf576107ad87828151811061073857610738611a25565b602002602001015187838151811061075257610752611a25565b602002602001015187848151811061076c5761076c611a25565b602002602001015187858151811061078657610786611a25565b60200260200101518786815181106107a0576107a0611a25565b6020026020010151610abd565b806107b781611a3b565b91505061071b565b50505050505050565b600080826107d5816113aa565b5050506001600160a01b03166000908152609c6020908152604080832054609d909252909120549091565b6000808361080d816113aa565b6001600160a01b0385166000908152609a60205260408120549081131561084457610838858261146f565b935084925061063f9050565b61085761085082611a9e565b869061145c565b935061086c61086582611a9e565b859061146f565b925050509250929050565b60008060008312156108935761088c83611a9e565b9050610896565b50815b600a81101580156108af57506108ad600a82611ad0565b155b156108bf5761088c600a82611ae4565b60011492915050565b826108d2816113aa565b6108da611402565b6103e883111561091e5760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206d696e696d756d60881b60448201526064016103c7565b6103e88211156109625760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206d6178696d756d60881b60448201526064016103c7565b828210156109a25760405162461bcd60e51b815260206004820152600d60248201526c696e76616c69642072616e676560981b60448201526064016103c7565b6001600160a01b0384166000818152609c60209081526040808320879055609d8252918290208590558151928352820185905281018390527fe3b935f735d8a72a31934e03fd96d995c5b3096c7362bc7e8796ab9e1ffe668c9060600160405180910390a150505050565b600081610a19816113aa565b6001600160a01b0383166000908152609a602052604090205491505b50919050565b610a43611402565b610a4d600061147b565b565b81610a59816113aa565b610a61611402565b6001600160a01b0383166000818152609e6020908152604091829020805460ff19168615159081179091558251938452908301527f6567e54649bc4d1136cad0f12cfc472ef5c8255ad12c3e46ecf4ef245f06c6cc910161053a565b610ac5611402565b6001600160a01b038516610b145760405162461bcd60e51b8152602060048201526016602482015275696e76616c696420626173736574206164647265737360501b60448201526064016103c7565b6001600160a01b0385166000908152609a602052604090205415610b725760405162461bcd60e51b815260206004820152601560248201527462617373657420616c72656164792065786973747360581b60448201526064016103c7565b83600003610bb35760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b2103330b1ba37b960911b60448201526064016103c7565b609980546001810182556000919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000180546001600160a01b0319166001600160a01b038716179055610c088585610c98565b610c138584846108c8565b610c1d8582610a4f565b6040516001600160a01b03861681527fa83f9302fa4684335dd26b1bdd925929618565fa0f22bd9e91ab01753d8bf13c9060200160405180910390a15050505050565b6000610c937f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b610ca0611402565b80600003610ce15760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b2103330b1ba37b960911b60448201526064016103c7565b8060011480610cf45750610cf481610877565b610d405760405162461bcd60e51b815260206004820152601a60248201527f666163746f72206d75737420626520706f776572206f6620313000000000000060448201526064016103c7565b6001600160a01b0382166000818152609a6020908152604091829020849055815192835282018390527fbd9d78e6bf6327f299e2cc40ef087c54546ef9ac6bea857cdc90b57270bbb58991015b60405180910390a15050565b600082610da5816113aa565b83610daf816114cd565b6000610dbb86866105d9565b506098546040516370a0823160e01b81526001600160a01b039182166004820152919250600091908816906370a0823190602401602060405180830381865afa158015610e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e309190611af8565b90506000610e3e88836105d9565b5090506000610e4d8285611529565b90506000610e6385610e5d6111e6565b90611529565b90506000610e7d82610e77856103e861146f565b9061145c565b6001600160a01b038c166000908152609d6020526040902054101598505050505050505b505092915050565b600081610eb5816113aa565b50506001600160a01b03166000908152609e602052604090205460ff1690565b600054610100900460ff1615808015610ef55750600054600160ff909116105b80610f0f5750303b158015610f0f575060005460ff166001145b610f725760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103c7565b6000805460ff191660011790558015610f95576000805461ff0019166101001790555b6098546001600160a01b031615610fe45760405162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064016103c7565b609880546001600160a01b0319166001600160a01b0384161790556040805180820190915260038152620332e360ec1b60208201526097906110269082611b60565b5061102f611535565b8015611071576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610d8d565b5050565b600082611081816113aa565b8361108b816114cd565b600061109786866105d9565b506098546040516370a0823160e01b81526001600160a01b039182166004820152919250600091908816906370a0823190602401602060405180830381865afa1580156110e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110c9190611af8565b9050600061111a88836105d9565b5090508281101561116d5760405162461bcd60e51b815260206004820181905260248201527f6261737365742062616c616e6365206973206e6f742073756666696369656e7460448201526064016103c7565b600061117982856115a9565b9050600061118f856111896111e6565b906115a9565b6001600160a01b038b166000908152609c60205260408120549192508290036111c057159750610ea1945050505050565b60006111d283610e77866103e861146f565b91909110159b9a5050505050505050505050565b6000805b6099548110156112b75760006099828154811061120957611209611a25565b60009182526020822001546098546040516370a0823160e01b81526001600160a01b0391821660048201529116925082906370a0823190602401602060405180830381865afa158015611260573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112849190611af8565b9050600061129283836105d9565b50905061129f8186611c20565b945050505080806112af90611a3b565b9150506111ea565b5090565b6112c3611402565b6001600160a01b0381166113285760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c7565b6113318161147b565b50565b6098546040516370a0823160e01b81526001600160a01b0391821660048201526000918316906370a0823190602401602060405180830381865afa158015611380573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a49190611af8565b92915050565b6001600160a01b0381166000908152609a602052604081205490036113315760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a590818985cdcd95d60921b60448201526064016103c7565b6033546001600160a01b03163314610a4d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b60006114688284611ae4565b9392505050565b60006114688284611c33565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0381166000908152609e602052604090205460ff16156113315760405162461bcd60e51b815260206004820152601060248201526f18985cdcd95d081a5cc81c185d5cd95960821b60448201526064016103c7565b60006114688284611c20565b600054610100900460ff166115a05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016103c7565b610a4d3361147b565b60006114688284611a12565b80356001600160a01b03811681146115cc57600080fd5b919050565b6000602082840312156115e357600080fd5b611468826115b5565b600060208083528351808285015260005b81811015611619578581018301518582016040015282016115fd565b506000604082860101526040601f19601f8301168501019250505092915050565b6000806040838503121561164d57600080fd5b611656836115b5565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b818110156116a55783516001600160a01b031683529284019291840191600101611680565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156116f0576116f06116b1565b604052919050565b600067ffffffffffffffff821115611712576117126116b1565b5060051b60200190565b600082601f83011261172d57600080fd5b8135602061174261173d836116f8565b6116c7565b82815260059290921b8401810191818101908684111561176157600080fd5b8286015b8481101561178357611776816115b5565b8352918301918301611765565b509695505050505050565b600082601f83011261179f57600080fd5b813560206117af61173d836116f8565b82815260059290921b840181019181810190868411156117ce57600080fd5b8286015b8481101561178357803583529183019183016117d2565b803580151581146115cc57600080fd5b600082601f83011261180a57600080fd5b8135602061181a61173d836116f8565b82815260059290921b8401810191818101908684111561183957600080fd5b8286015b848110156117835761184e816117e9565b835291830191830161183d565b600080600080600060a0868803121561187357600080fd5b853567ffffffffffffffff8082111561188b57600080fd5b61189789838a0161171c565b965060208801359150808211156118ad57600080fd5b6118b989838a0161178e565b955060408801359150808211156118cf57600080fd5b6118db89838a0161178e565b945060608801359150808211156118f157600080fd5b6118fd89838a0161178e565b9350608088013591508082111561191357600080fd5b50611920888289016117f9565b9150509295509295909350565b60006020828403121561193f57600080fd5b5035919050565b60008060006060848603121561195b57600080fd5b611964846115b5565b95602085013595506040909401359392505050565b6000806040838503121561198c57600080fd5b611995836115b5565b91506119a3602084016117e9565b90509250929050565b600080600080600060a086880312156119c457600080fd5b6119cd866115b5565b94506020860135935060408601359250606086013591506119f0608087016117e9565b90509295509295909350565b634e487b7160e01b600052601160045260246000fd5b818103818111156113a4576113a46119fc565b634e487b7160e01b600052603260045260246000fd5b600060018201611a4d57611a4d6119fc565b5060010190565b634e487b7160e01b600052603160045260246000fd5b600181811c90821680611a7e57607f821691505b602082108103610a3557634e487b7160e01b600052602260045260246000fd5b6000600160ff1b8201611ab357611ab36119fc565b5060000390565b634e487b7160e01b600052601260045260246000fd5b600082611adf57611adf611aba565b500690565b600082611af357611af3611aba565b500490565b600060208284031215611b0a57600080fd5b5051919050565b601f821115611b5b57600081815260208120601f850160051c81016020861015611b385750805b601f850160051c820191505b81811015611b5757828155600101611b44565b5050505b505050565b815167ffffffffffffffff811115611b7a57611b7a6116b1565b611b8e81611b888454611a6a565b84611b11565b602080601f831160018114611bc35760008415611bab5750858301515b600019600386901b1c1916600185901b178555611b57565b600085815260208120601f198616915b82811015611bf257888601518255948401946001909101908401611bd3565b5085821015611c105787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808201808211156113a4576113a46119fc565b80820281158282048414176113a4576113a46119fc56fea264697066735822122038216095c972cc2b0ebf9eb14138453af02c60f1a2ca422c1f4b8a9cb2cff53764736f6c63430008110033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101585760003560e01c80638da5cb5b116100c3578063c4d66de81161007c578063c4d66de8146102f1578063c7bbc86514610304578063d80f5a8714610317578063eb72ccd514610342578063f2fde38b1461034a578063f5bffc351461035d57600080fd5b80638da5cb5b146102785780638ee8ffd11461029d57806390e4b720146102b05780639bf761b7146102b8578063a9f02efe146102cb578063b55d9904146102de57600080fd5b80635ac99461116101155780635ac99461146101f3578063620611c314610206578063623a564b14610229578063689418691461023c578063715018a61461025d57806389eba0d21461026557600080fd5b806309f2a9831461015d5780630d8e6e2c146101725780631af327bd146101905780631d3ce398146101b857806329820c5b146101cd5780635521c653146101e0575b600080fd5b61017061016b3660046115d1565b610370565b005b61017a610547565b60405161018791906115ec565b60405180910390f35b6101a361019e36600461163a565b6105d9565b60408051928352602083019190915201610187565b6101c0610647565b6040516101879190611664565b6101706101db36600461185b565b6106a8565b6101a36101ee3660046115d1565b6107c8565b6101a361020136600461163a565b610800565b61021961021436600461192d565b610877565b6040519015158152602001610187565b610170610237366004611946565b6108c8565b61024f61024a3660046115d1565b610a0d565b604051908152602001610187565b610170610a3b565b610170610273366004611979565b610a4f565b6033546001600160a01b03165b6040516001600160a01b039091168152602001610187565b6101706102ab3660046119ac565b610abd565b610285610c60565b6101706102c636600461163a565b610c98565b6102196102d936600461163a565b610d99565b6102196102ec3660046115d1565b610ea9565b6101706102ff3660046115d1565b610ed5565b61021961031236600461163a565b611075565b6102196103253660046115d1565b6001600160a01b03166000908152609a6020526040902054151590565b61024f6111e6565b6101706103583660046115d1565b6112bb565b61024f61036b3660046115d1565b611334565b8061037a816113aa565b610382611402565b61038b82611334565b156103d05760405162461bcd60e51b815260206004820152601060248201526f62616c616e6365206e6f74207a65726f60801b60448201526064015b60405180910390fd5b6001600160a01b0382166000908152609a60205260408120819055805b6099546103fc90600190611a12565b81101561045457836001600160a01b03166099828154811061042057610420611a25565b6000918252602090912001546001600160a01b03160361044257809150610454565b8061044c81611a3b565b9150506103ed565b506099805461046590600190611a12565b8154811061047557610475611a25565b600091825260209091200154609980546001600160a01b0390921691839081106104a1576104a1611a25565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060998054806104e0576104e0611a54565b6000828152602090819020600019908301810180546001600160a01b03191690559091019091556040516001600160a01b03851681527f1e5281bbecf5c15104f9e35265dbe738c1cd2597613cbf4a0a51713448bc13b991015b60405180910390a1505050565b60606097805461055690611a6a565b80601f016020809104026020016040519081016040528092919081815260200182805461058290611a6a565b80156105cf5780601f106105a4576101008083540402835291602001916105cf565b820191906000526020600020905b8154815290600101906020018083116105b257829003601f168201915b5050505050905090565b600080836105e6816113aa565b6001600160a01b0385166000908152609a60205260408120549081131561062557610611858261145c565b935061061d848261146f565b92505061063f565b61063861063182611a9e565b869061146f565b9350849250505b509250929050565b606060998054806020026020016040519081016040528092919081815260200182805480156105cf57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610681575050505050905090565b6106b0611402565b84518451811480156106c25750808451145b80156106ce5750808351145b80156106da5750808251145b6107185760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206c656e6774687360881b60448201526064016103c7565b60005b818110156107bf576107ad87828151811061073857610738611a25565b602002602001015187838151811061075257610752611a25565b602002602001015187848151811061076c5761076c611a25565b602002602001015187858151811061078657610786611a25565b60200260200101518786815181106107a0576107a0611a25565b6020026020010151610abd565b806107b781611a3b565b91505061071b565b50505050505050565b600080826107d5816113aa565b5050506001600160a01b03166000908152609c6020908152604080832054609d909252909120549091565b6000808361080d816113aa565b6001600160a01b0385166000908152609a60205260408120549081131561084457610838858261146f565b935084925061063f9050565b61085761085082611a9e565b869061145c565b935061086c61086582611a9e565b859061146f565b925050509250929050565b60008060008312156108935761088c83611a9e565b9050610896565b50815b600a81101580156108af57506108ad600a82611ad0565b155b156108bf5761088c600a82611ae4565b60011492915050565b826108d2816113aa565b6108da611402565b6103e883111561091e5760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206d696e696d756d60881b60448201526064016103c7565b6103e88211156109625760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206d6178696d756d60881b60448201526064016103c7565b828210156109a25760405162461bcd60e51b815260206004820152600d60248201526c696e76616c69642072616e676560981b60448201526064016103c7565b6001600160a01b0384166000818152609c60209081526040808320879055609d8252918290208590558151928352820185905281018390527fe3b935f735d8a72a31934e03fd96d995c5b3096c7362bc7e8796ab9e1ffe668c9060600160405180910390a150505050565b600081610a19816113aa565b6001600160a01b0383166000908152609a602052604090205491505b50919050565b610a43611402565b610a4d600061147b565b565b81610a59816113aa565b610a61611402565b6001600160a01b0383166000818152609e6020908152604091829020805460ff19168615159081179091558251938452908301527f6567e54649bc4d1136cad0f12cfc472ef5c8255ad12c3e46ecf4ef245f06c6cc910161053a565b610ac5611402565b6001600160a01b038516610b145760405162461bcd60e51b8152602060048201526016602482015275696e76616c696420626173736574206164647265737360501b60448201526064016103c7565b6001600160a01b0385166000908152609a602052604090205415610b725760405162461bcd60e51b815260206004820152601560248201527462617373657420616c72656164792065786973747360581b60448201526064016103c7565b83600003610bb35760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b2103330b1ba37b960911b60448201526064016103c7565b609980546001810182556000919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000180546001600160a01b0319166001600160a01b038716179055610c088585610c98565b610c138584846108c8565b610c1d8582610a4f565b6040516001600160a01b03861681527fa83f9302fa4684335dd26b1bdd925929618565fa0f22bd9e91ab01753d8bf13c9060200160405180910390a15050505050565b6000610c937f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b610ca0611402565b80600003610ce15760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b2103330b1ba37b960911b60448201526064016103c7565b8060011480610cf45750610cf481610877565b610d405760405162461bcd60e51b815260206004820152601a60248201527f666163746f72206d75737420626520706f776572206f6620313000000000000060448201526064016103c7565b6001600160a01b0382166000818152609a6020908152604091829020849055815192835282018390527fbd9d78e6bf6327f299e2cc40ef087c54546ef9ac6bea857cdc90b57270bbb58991015b60405180910390a15050565b600082610da5816113aa565b83610daf816114cd565b6000610dbb86866105d9565b506098546040516370a0823160e01b81526001600160a01b039182166004820152919250600091908816906370a0823190602401602060405180830381865afa158015610e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e309190611af8565b90506000610e3e88836105d9565b5090506000610e4d8285611529565b90506000610e6385610e5d6111e6565b90611529565b90506000610e7d82610e77856103e861146f565b9061145c565b6001600160a01b038c166000908152609d6020526040902054101598505050505050505b505092915050565b600081610eb5816113aa565b50506001600160a01b03166000908152609e602052604090205460ff1690565b600054610100900460ff1615808015610ef55750600054600160ff909116105b80610f0f5750303b158015610f0f575060005460ff166001145b610f725760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103c7565b6000805460ff191660011790558015610f95576000805461ff0019166101001790555b6098546001600160a01b031615610fe45760405162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064016103c7565b609880546001600160a01b0319166001600160a01b0384161790556040805180820190915260038152620332e360ec1b60208201526097906110269082611b60565b5061102f611535565b8015611071576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610d8d565b5050565b600082611081816113aa565b8361108b816114cd565b600061109786866105d9565b506098546040516370a0823160e01b81526001600160a01b039182166004820152919250600091908816906370a0823190602401602060405180830381865afa1580156110e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110c9190611af8565b9050600061111a88836105d9565b5090508281101561116d5760405162461bcd60e51b815260206004820181905260248201527f6261737365742062616c616e6365206973206e6f742073756666696369656e7460448201526064016103c7565b600061117982856115a9565b9050600061118f856111896111e6565b906115a9565b6001600160a01b038b166000908152609c60205260408120549192508290036111c057159750610ea1945050505050565b60006111d283610e77866103e861146f565b91909110159b9a5050505050505050505050565b6000805b6099548110156112b75760006099828154811061120957611209611a25565b60009182526020822001546098546040516370a0823160e01b81526001600160a01b0391821660048201529116925082906370a0823190602401602060405180830381865afa158015611260573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112849190611af8565b9050600061129283836105d9565b50905061129f8186611c20565b945050505080806112af90611a3b565b9150506111ea565b5090565b6112c3611402565b6001600160a01b0381166113285760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c7565b6113318161147b565b50565b6098546040516370a0823160e01b81526001600160a01b0391821660048201526000918316906370a0823190602401602060405180830381865afa158015611380573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a49190611af8565b92915050565b6001600160a01b0381166000908152609a602052604081205490036113315760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a590818985cdcd95d60921b60448201526064016103c7565b6033546001600160a01b03163314610a4d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c7565b60006114688284611ae4565b9392505050565b60006114688284611c33565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0381166000908152609e602052604090205460ff16156113315760405162461bcd60e51b815260206004820152601060248201526f18985cdcd95d081a5cc81c185d5cd95960821b60448201526064016103c7565b60006114688284611c20565b600054610100900460ff166115a05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016103c7565b610a4d3361147b565b60006114688284611a12565b80356001600160a01b03811681146115cc57600080fd5b919050565b6000602082840312156115e357600080fd5b611468826115b5565b600060208083528351808285015260005b81811015611619578581018301518582016040015282016115fd565b506000604082860101526040601f19601f8301168501019250505092915050565b6000806040838503121561164d57600080fd5b611656836115b5565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b818110156116a55783516001600160a01b031683529284019291840191600101611680565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156116f0576116f06116b1565b604052919050565b600067ffffffffffffffff821115611712576117126116b1565b5060051b60200190565b600082601f83011261172d57600080fd5b8135602061174261173d836116f8565b6116c7565b82815260059290921b8401810191818101908684111561176157600080fd5b8286015b8481101561178357611776816115b5565b8352918301918301611765565b509695505050505050565b600082601f83011261179f57600080fd5b813560206117af61173d836116f8565b82815260059290921b840181019181810190868411156117ce57600080fd5b8286015b8481101561178357803583529183019183016117d2565b803580151581146115cc57600080fd5b600082601f83011261180a57600080fd5b8135602061181a61173d836116f8565b82815260059290921b8401810191818101908684111561183957600080fd5b8286015b848110156117835761184e816117e9565b835291830191830161183d565b600080600080600060a0868803121561187357600080fd5b853567ffffffffffffffff8082111561188b57600080fd5b61189789838a0161171c565b965060208801359150808211156118ad57600080fd5b6118b989838a0161178e565b955060408801359150808211156118cf57600080fd5b6118db89838a0161178e565b945060608801359150808211156118f157600080fd5b6118fd89838a0161178e565b9350608088013591508082111561191357600080fd5b50611920888289016117f9565b9150509295509295909350565b60006020828403121561193f57600080fd5b5035919050565b60008060006060848603121561195b57600080fd5b611964846115b5565b95602085013595506040909401359392505050565b6000806040838503121561198c57600080fd5b611995836115b5565b91506119a3602084016117e9565b90509250929050565b600080600080600060a086880312156119c457600080fd5b6119cd866115b5565b94506020860135935060408601359250606086013591506119f0608087016117e9565b90509295509295909350565b634e487b7160e01b600052601160045260246000fd5b818103818111156113a4576113a46119fc565b634e487b7160e01b600052603260045260246000fd5b600060018201611a4d57611a4d6119fc565b5060010190565b634e487b7160e01b600052603160045260246000fd5b600181811c90821680611a7e57607f821691505b602082108103610a3557634e487b7160e01b600052602260045260246000fd5b6000600160ff1b8201611ab357611ab36119fc565b5060000390565b634e487b7160e01b600052601260045260246000fd5b600082611adf57611adf611aba565b500690565b600082611af357611af3611aba565b500490565b600060208284031215611b0a57600080fd5b5051919050565b601f821115611b5b57600081815260208120601f850160051c81016020861015611b385750805b601f850160051c820191505b81811015611b5757828155600101611b44565b5050505b505050565b815167ffffffffffffffff811115611b7a57611b7a6116b1565b611b8e81611b888454611a6a565b84611b11565b602080601f831160018114611bc35760008415611bab5750858301515b600019600386901b1c1916600185901b178555611b57565b600085815260208120601f198616915b82811015611bf257888601518255948401946001909101908401611bd3565b5085821015611c105787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808201808211156113a4576113a46119fc565b80820281158282048414176113a4576113a46119fc56fea264697066735822122038216095c972cc2b0ebf9eb14138453af02c60f1a2ca422c1f4b8a9cb2cff53764736f6c63430008110033", + "devdoc": { + "details": "Contract is responsible for mAsset and bAsset exchange process and managing basket with bAsset tokens. Allows to add and/or remove bAsset, calculate balances, converts tokens quantity to adjust precisions or set/get parameters: factor, range and paused.", + "events": { + "BassetAdded(address)": { + "details": "Event emitted when basset is added.", + "params": { + "basset": "Address of the bAsset contract." + } + }, + "BassetRemoved(address)": { + "details": "Event emitted when basset is removed.", + "params": { + "basset": "Address of the bAsset contract." + } + }, + "FactorChanged(address,int256)": { + "details": "Event emitted when factor is changed.", + "params": { + "basset": "Address of the bAsset contract.", + "factor": "Factor of fees." + } + }, + "PausedChanged(address,bool)": { + "details": "Event emitted when paused is changed.", + "params": { + "basset": "Address of the bAsset contract.", + "paused": "Determine if paused or not." + } + }, + "RangeChanged(address,uint256,uint256)": { + "details": "Event emitted when range is changed.", + "params": { + "basset": "Address of the bAsset contract.", + "max": "Maximal value of range.", + "min": "Minimal value of range." + } + } + }, + "kind": "dev", + "methods": { + "addBasset(address,int256,uint256,uint256,bool)": { + "details": "Adds a new bAsset.", + "params": { + "_basset": "Address of bAsset.", + "_factor": "Factor amount.", + "_max": "Maximum ratio in basket.", + "_min": "Minimum ratio in basket.", + "_paused": "Flag to determine if basset should be paused." + } + }, + "addBassets(address[],int256[],uint256[],uint256[],bool[])": { + "details": "Adds multiple bAssets." + }, + "checkBasketBalanceForDeposit(address,uint256)": { + "details": "Checks if ratio of bAssets in basket is within limits to make a deposit of specific asset.", + "params": { + "_basset": "Address of bAsset to deposit.", + "_bassetQuantity": "Amount of bAssets to deposit." + }, + "returns": { + "_0": "Flag indicating whether a deposit can be made." + } + }, + "checkBasketBalanceForWithdrawal(address,uint256)": { + "details": "Checks if ratio of bAssets in basket is within limits to make a withdrawal of specific asset.", + "params": { + "_basset": "Address of bAsset to redeem.", + "_bassetQuantity": "Amount of bAssets to redeem." + }, + "returns": { + "_0": "Flag indicating whether a withdrawal can be made." + } + }, + "convertBassetToMassetQuantity(address,uint256)": { + "details": "Converts bAsset to mAsset quantity. This is used to adjust precision. Despite bAssets and mAssets having 1:1 ratio, they may have diffrent decimal factors. Since the ratio may cause fractions, the bAsset is adjusted to match nearest non fraction amount and returned.", + "params": { + "_basset": "Address of bAsset.", + "_bassetQuantity": "Amount of bAssets to check." + }, + "returns": { + "bassetQuantity": "Calculated amount of Adjusted amount of bAssets.", + "massetQuantity": "Calculated amount of mAssets." + } + }, + "convertMassetToBassetQuantity(address,uint256)": { + "details": "Converts mAsset to bAsset quantity. This is used to adjust precisions. Despite bAssets and mAssets having 1:1 ratio, they may have diffrent decimal factors. Since the ratio may cause fractions, the mAsset is adjusted to match nearest non fraction amount and returned.", + "params": { + "_basset": "Address of bAsset.", + "_massetQuantity": "Amount of mAssets to check." + }, + "returns": { + "bassetQuantity": "Calculated amount of Adjusted amount of bAssets.", + "massetQuantity": "Calculated amount of mAssets." + } + }, + "getProxyImplementation()": { + "details": "get the implementation logic address referring to ERC1967 standard.", + "returns": { + "_0": "logic implementation address." + } + }, + "getTotalMassetBalance()": { + "details": "Calculates total mAsset balance.", + "returns": { + "total": "Calculated total balance." + } + }, + "initialize(address)": { + "details": "Contract initializer.", + "params": { + "_massetManager": "Address of the MassetManager contract." + } + }, + "isPowerOfTen(int256)": { + "details": "Returns true if the number is power of ten.", + "params": { + "x": "Number to be checked." + }, + "returns": { + "result": "Is the number power of ten." + } + }, + "isValidBasset(address)": { + "details": "Checks if bAasset is valid by checking its presence in the bAssets factors list." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "removeBasset(address)": { + "details": "Removes bAsset", + "params": { + "_basset": "Address of bAsset to remove." + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "title": "BasketManagerV3", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addBassets(address[],int256[],uint256[],uint256[],bool[])": { + "notice": "All parameters must be arrays with proper order and equal length." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 534, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 537, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1094, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 10, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 130, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 516, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 6354, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "version", + "offset": 0, + "slot": "151", + "type": "t_string_storage" + }, + { + "astId": 6356, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "massetManager", + "offset": 0, + "slot": "152", + "type": "t_address" + }, + { + "astId": 6359, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "bassetsArray", + "offset": 0, + "slot": "153", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 6363, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "factorMap", + "offset": 0, + "slot": "154", + "type": "t_mapping(t_address,t_int256)" + }, + { + "astId": 6367, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "DEPRECATED_bridgeMap", + "offset": 0, + "slot": "155", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 6371, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "minMap", + "offset": 0, + "slot": "156", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 6375, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "maxMap", + "offset": 0, + "slot": "157", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 6379, + "contract": "contracts/masset/BasketManagerV3.sol:BasketManagerV3", + "label": "pausedMap", + "offset": 0, + "slot": "158", + "type": "t_mapping(t_address,t_bool)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_int256": { + "encoding": "inplace", + "label": "int256", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_int256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => int256)", + "numberOfBytes": "32", + "value": "t_int256" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} diff --git a/external/deployments/rskMainnet/BasketManagerV3_Proxy.json b/external/deployments/rskMainnet/BasketManagerV3_Proxy.json new file mode 100644 index 000000000..a3500c3c0 --- /dev/null +++ b/external/deployments/rskMainnet/BasketManagerV3_Proxy.json @@ -0,0 +1,257 @@ +{ + "address": "0x68510C9A93e8Fff4b5d9E307bd415E1Dc3b7759A", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xbf80a9375bf74569d9db471ab0710688d1fc6e1ffce2cee52e35b84b2d98054f", + "receipt": { + "to": null, + "from": "0xFEe171A152C02F336021fb9E79b4fAc2304a9E7E", + "contractAddress": "0x68510C9A93e8Fff4b5d9E307bd415E1Dc3b7759A", + "transactionIndex": 0, + "gasUsed": "1028357", + "logsBloom": "0x00200000000000002000000000000000400000000000000000800000000000020000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000002000003000080000000000000000000000000000000020000000000000000000800000000800000000004000000000000400000000000000000000000000000000000000000000080000000000000800000000200000000001000000000000400000000000000000000000000000000000000000020000000000000000000040000000000000400000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe0fa4f2e5ab8a990bbfb17b55e2bc26e2f15fab8be89a01ec7c2a198b1b3826e", + "transactionHash": "0xbf80a9375bf74569d9db471ab0710688d1fc6e1ffce2cee52e35b84b2d98054f", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 5072698, + "transactionHash": "0xbf80a9375bf74569d9db471ab0710688d1fc6e1ffce2cee52e35b84b2d98054f", + "address": "0x68510C9A93e8Fff4b5d9E307bd415E1Dc3b7759A", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000b61ff601e0b4531e39d9683c5ab48873ccfd352b" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xe0fa4f2e5ab8a990bbfb17b55e2bc26e2f15fab8be89a01ec7c2a198b1b3826e" + }, + { + "transactionIndex": 0, + "blockNumber": 5072698, + "transactionHash": "0xbf80a9375bf74569d9db471ab0710688d1fc6e1ffce2cee52e35b84b2d98054f", + "address": "0x68510C9A93e8Fff4b5d9E307bd415E1Dc3b7759A", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000fee171a152c02f336021fb9e79b4fac2304a9e7e" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xe0fa4f2e5ab8a990bbfb17b55e2bc26e2f15fab8be89a01ec7c2a198b1b3826e" + }, + { + "transactionIndex": 0, + "blockNumber": 5072698, + "transactionHash": "0xbf80a9375bf74569d9db471ab0710688d1fc6e1ffce2cee52e35b84b2d98054f", + "address": "0x68510C9A93e8Fff4b5d9E307bd415E1Dc3b7759A", + "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 2, + "blockHash": "0xe0fa4f2e5ab8a990bbfb17b55e2bc26e2f15fab8be89a01ec7c2a198b1b3826e" + }, + { + "transactionIndex": 0, + "blockNumber": 5072698, + "transactionHash": "0xbf80a9375bf74569d9db471ab0710688d1fc6e1ffce2cee52e35b84b2d98054f", + "address": "0x68510C9A93e8Fff4b5d9E307bd415E1Dc3b7759A", + "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000466e023ddd08b53385b4763b883ab63820c123df", + "logIndex": 3, + "blockHash": "0xe0fa4f2e5ab8a990bbfb17b55e2bc26e2f15fab8be89a01ec7c2a198b1b3826e" + } + ], + "blockNumber": 5072698, + "cumulativeGasUsed": "1028357", + "status": 1, + "byzantium": true + }, + "args": [ + "0xb61Ff601E0b4531e39d9683c5Ab48873ccFd352B", + "0x466e023ddd08b53385b4763b883ab63820c123df", + "0xc4d66de80000000000000000000000005f777270259e32f79589fe82269db6209f7b7582" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x140055a64cf579d622e04f5a198595832bf2cb193cd0005f4f2d4d61ca906253\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052604051620011b2380380620011b2833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b6000805160206200116b833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b6000805160206200114b83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002ff1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e983836040518060600160405280602781526020016200118b6027913962000381565b9392505050565b60006200021a6000805160206200114b83398151915260001b6200046760201b620002731760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd6000805160206200114b83398151915260001b6200046760201b620002731760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200032b1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd6000805160206200116b83398151915260001b6200046760201b620002731760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b610ab380620006986000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/hardhat/tasks/sips/args/sipArgs.js b/hardhat/tasks/sips/args/sipArgs.js index 085ed3e3e..108efb5aa 100644 --- a/hardhat/tasks/sips/args/sipArgs.js +++ b/hardhat/tasks/sips/args/sipArgs.js @@ -1189,14 +1189,26 @@ const getArgsSIP0085 = async (hre) => { const newBorrowerOperationsImplementation = await get("BorrowerOperations_Implementation"); const borrowerOperationsProxy = await get("BorrowerOperations_Proxy"); + /** SOV3564 Mynt */ + const myntAdminProxy = await get("MyntAdminProxy"); + + const basketManagerProxy = await get("BasketManagerV3_Proxy"); + const newBasketManagerImpl = await get("BasketManagerV3_Implementation"); + const args = { - targets: [borrowerOperationsProxy.address], - values: [0], - signatures: ["setImplementation(address)"], - data: [abiCoder.encode(["address"], [newBorrowerOperationsImplementation.address])], + targets: [borrowerOperationsProxy.address, myntAdminProxy.address], + values: [0, 0], + signatures: ["setImplementation(address)", "upgrade(address,address)"], + data: [ + abiCoder.encode(["address"], [newBorrowerOperationsImplementation.address]), + abiCoder.encode( + ["address", "address"], + [basketManagerProxy.address, newBasketManagerImpl.address] + ), + ], // @todo update sip description description: - "SIP-0085: Zero Smart Contracts Upgrade (Apply Reentrancy Guard), Details: https://github.com/DistributedCollective/SIPS/blob/a86ac0e/SIP-0085.md, sha256: ", + "SIP-0085: Zero Smart Contracts Upgrade (Apply Reentrancy Guard) & Mynt BasketManager Upgrade, Details: https://github.com/DistributedCollective/SIPS/blob/a86ac0e/SIP-0085.md, sha256: ", }; return { args, governor: "GovernorOwner" }; }; diff --git a/tests-onchain/sip0085.test.js b/tests-onchain/sip0085.test.js index 5ee65f736..eeb0c7a40 100644 --- a/tests-onchain/sip0085.test.js +++ b/tests-onchain/sip0085.test.js @@ -159,13 +159,22 @@ describe("SIP-0085 test onchain", () => { // VERIFY execution expect((await governorAdmin.proposals(proposalId)).executed).to.be.true; - // Validate zero contracs upgrade + // Validate zero contracts upgrade const borrowerOperationsProxy = await ethers.getContract("BorrowerOperations_Proxy"); const borrowerOperationsImpl = await get("BorrowerOperations_Implementation"); expect(await borrowerOperationsProxy.getImplementation()).to.equal( borrowerOperationsImpl.address ); + + // Validate mynt contracts upgrade + const basketManagerProxy = await get("BasketManagerV3_Proxy"); // MocIntegration + const basketManagerImpl = await get("BasketManagerV3_Implementation"); + const myntAdminProxy = await ethers.getContract("MyntAdminProxy"); + + expect( + await myntAdminProxy.getProxyImplementation(basketManagerProxy.address) + ).to.equal(basketManagerImpl.implementation); }); }); });