UNPKG

test-contracts-sovryn

Version:

Smart contracts for the Sovryn protocol and external integrations.

518 lines (517 loc) 17.7 kB
{ "_format": "hh-sol-artifact-1", "contractName": "AdvancedTokenStorage", "sourceName": "contracts/connectors/loantoken/AdvancedTokenStorage.sol", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "burner", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "tokenAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "assetAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "price", "type": "uint256" } ], "name": "Burn", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "borrower", "type": "address" }, { "indexed": false, "internalType": "address", "name": "target", "type": "address" }, { "indexed": false, "internalType": "address", "name": "loanToken", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "loanAmount", "type": "uint256" } ], "name": "FlashBorrow", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "minter", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "tokenAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "assetAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "price", "type": "uint256" } ], "name": "Mint", "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": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" }, { "internalType": "address", "name": "_spender", "type": "address" } ], "name": "allowance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "baseRate", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "checkpointSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "initialPrice", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "isOwner", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "kinkLevel", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "loanParamsIds", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "loanTokenAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "lowUtilBaseRate", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "lowUtilRateMultiplier", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "maxScaleRate", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "rateMultiplier", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "targetLevel", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "transactionLimit", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x60806040526001600090815561001c6001600160e01b0361006f16565b600180546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610073565b3390565b61067a806100826000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80637b7933b4116100b8578063ba0e43bf1161007c578063ba0e43bf146102b4578063d759dbeb146102bc578063dd62ed3e146102c4578063e41b07e3146102f2578063ef2b0b3914610318578063f2fde38b1461032057610137565b80637b7933b4146102785780637e37c08c146102805780638da5cb5b146102885780638f32d59b1461029057806395d89b41146102ac57610137565b80633291c11a116100ff5780633291c11a14610201578063330691ac1461021e57806356e07d701461022657806370a082311461022e578063797bf3851461025457610137565b806306fdde031461013c57806318160ddd146101b95780631d0806ae146101d35780631f68f20a146101db578063313ce567146101e3575b600080fd5b610144610348565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017e578181015183820152602001610166565b50505050905090810190601f1680156101ab5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c16103d3565b60408051918252519081900360200190f35b6101c16103d9565b6101c16103df565b6101eb6103e5565b6040805160ff9092168252519081900360200190f35b6101c16004803603602081101561021757600080fd5b50356103ee565b6101c1610400565b6101c1610406565b6101c16004803603602081101561024457600080fd5b50356001600160a01b031661040c565b61025c610427565b604080516001600160a01b039092168252519081900360200190f35b6101c161043b565b6101c1610441565b61025c610447565b610298610456565b604080519115158252519081900360200190f35b61014461047c565b6101c16104d7565b6101c16104dd565b6101c1600480360360408110156102da57600080fd5b506001600160a01b03813581169160200135166104e3565b6101c16004803603602081101561030857600080fd5b50356001600160a01b031661050e565b6101c1610520565b6103466004803603602081101561033657600080fd5b50356001600160a01b0316610526565b005b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156103cb5780601f106103a0576101008083540402835291602001916103cb565b820191906000526020600020905b8154815290600101906020018083116103ae57829003601f168201915b505050505081565b60155490565b600e5481565b60055481565b60045460ff1681565b60106020526000908152604090205481565b60065481565b600a5481565b6001600160a01b031660009081526013602052604090205490565b60045461010090046001600160a01b031681565b600d5481565b60085481565b6001546001600160a01b031690565b6001546000906001600160a01b031661046d61057a565b6001600160a01b031614905090565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103cb5780601f106103a0576101008083540402835291602001916103cb565b60095481565b60075481565b6001600160a01b03918216600090815260146020908152604080832093909416825291909152205490565b60126020526000908152604090205481565b600b5481565b61052e610456565b61056e576040805162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6105778161057e565b50565b3390565b6001600160a01b0381166105c35760405162461bcd60e51b81526004018080602001828103825260268152602001806106206026913960400191505060405180910390fd5b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a265627a7a7231582017f01183fb7048d57601ca496abff64bf20a1f453ed77f4467c603b11c89a91e64736f6c63430005110032", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101375760003560e01c80637b7933b4116100b8578063ba0e43bf1161007c578063ba0e43bf146102b4578063d759dbeb146102bc578063dd62ed3e146102c4578063e41b07e3146102f2578063ef2b0b3914610318578063f2fde38b1461032057610137565b80637b7933b4146102785780637e37c08c146102805780638da5cb5b146102885780638f32d59b1461029057806395d89b41146102ac57610137565b80633291c11a116100ff5780633291c11a14610201578063330691ac1461021e57806356e07d701461022657806370a082311461022e578063797bf3851461025457610137565b806306fdde031461013c57806318160ddd146101b95780631d0806ae146101d35780631f68f20a146101db578063313ce567146101e3575b600080fd5b610144610348565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017e578181015183820152602001610166565b50505050905090810190601f1680156101ab5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c16103d3565b60408051918252519081900360200190f35b6101c16103d9565b6101c16103df565b6101eb6103e5565b6040805160ff9092168252519081900360200190f35b6101c16004803603602081101561021757600080fd5b50356103ee565b6101c1610400565b6101c1610406565b6101c16004803603602081101561024457600080fd5b50356001600160a01b031661040c565b61025c610427565b604080516001600160a01b039092168252519081900360200190f35b6101c161043b565b6101c1610441565b61025c610447565b610298610456565b604080519115158252519081900360200190f35b61014461047c565b6101c16104d7565b6101c16104dd565b6101c1600480360360408110156102da57600080fd5b506001600160a01b03813581169160200135166104e3565b6101c16004803603602081101561030857600080fd5b50356001600160a01b031661050e565b6101c1610520565b6103466004803603602081101561033657600080fd5b50356001600160a01b0316610526565b005b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156103cb5780601f106103a0576101008083540402835291602001916103cb565b820191906000526020600020905b8154815290600101906020018083116103ae57829003601f168201915b505050505081565b60155490565b600e5481565b60055481565b60045460ff1681565b60106020526000908152604090205481565b60065481565b600a5481565b6001600160a01b031660009081526013602052604090205490565b60045461010090046001600160a01b031681565b600d5481565b60085481565b6001546001600160a01b031690565b6001546000906001600160a01b031661046d61057a565b6001600160a01b031614905090565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103cb5780601f106103a0576101008083540402835291602001916103cb565b60095481565b60075481565b6001600160a01b03918216600090815260146020908152604080832093909416825291909152205490565b60126020526000908152604090205481565b600b5481565b61052e610456565b61056e576040805162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6105778161057e565b50565b3390565b6001600160a01b0381166105c35760405162461bcd60e51b81526004018080602001828103825260268152602001806106206026913960400191505060405180910390fd5b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a265627a7a7231582017f01183fb7048d57601ca496abff64bf20a1f453ed77f4467c603b11c89a91e64736f6c63430005110032", "linkReferences": {}, "deployedLinkReferences": {} }