0 txs
1 call
constructor
constructor(address _gov, address _guardian, address _dola, address _pendleRouter, address _ale)
functions
ale
viewfunction ale() view returns (address)
DOLA
viewfunction DOLA() view returns (address)
gov
viewfunction gov() view returns (address)
guardian
viewfunction guardian() view returns (address)
markets
viewfunction markets(address) view returns (address pt, uint96 maturity, address yt)
MINT_PT
viewfunction MINT_PT() view returns (bytes4)
pendingGov
viewfunction pendingGov() view returns (address)
REDEEM_PT
viewfunction REDEEM_PT() view returns (bytes4)
router
viewfunction router() view returns (address)
SWAP_DOLA
viewfunction SWAP_DOLA() view returns (bytes4)
SWAP_PT
viewfunction SWAP_PT() view returns (bytes4)
claimPendingGov
nonpayablefunction claimPendingGov()
convertFromCollateral
nonpayablefunction convertFromCollateral(address user, uint256 amount, bytes data) returns (uint256 dolaAmount)
convertFromCollateral
nonpayablefunction convertFromCollateral(uint256 amount, address recipient, bytes data) returns (uint256 dolaAmount)
convertToCollateral
nonpayablefunction convertToCollateral(address user, uint256 amount, bytes data) returns (uint256 collateralAmount)
convertToCollateral
nonpayablefunction convertToCollateral(uint256 amount, bytes data) returns (uint256 collateralAmount)
convertToCollateralAndDeposit
nonpayablefunction convertToCollateralAndDeposit(uint256 assets, address recipient, bytes data) returns (uint256)
removeMarket
nonpayablefunction removeMarket(address market)
setGuardian
nonpayablefunction setGuardian(address _guardian)
setMarket
nonpayablefunction setMarket(address marketAddress, address ptAddress, address ytAddress)
setPendingGov
nonpayablefunction setPendingGov(address _pendingGov)
sweep
nonpayablefunction sweep(address token)
withdrawAndConvertFromCollateral
nonpayablefunction withdrawAndConvertFromCollateral(uint256 amount, address recipient, tuple permit, bytes data) returns (uint256 dolaAmount)
events
DolaOut
event DolaOut(uint256 ptIn, uint256 dolaOut, address indexed from, address indexed to)
MarketRemoved
event MarketRemoved(address indexed market)
MarketSet
event MarketSet(address indexed market, address indexed pt, address indexed yt, uint256 maturity)
NewGov
event NewGov(address gov)
NewGuardian
event NewGuardian(address guardian)
NewPendingGov
event NewPendingGov(address pendingGov)
PTOut
event PTOut(uint256 dolaIn, uint256 ptOut, address indexed from, address indexed to)
YTIn
event YTIn(uint256 amount, address indexed from)
YTOut
event YTOut(uint256 amount, address indexed from, address indexed to)
errors
AddressEmptyCode
error AddressEmptyCode(address target)
FailedCall
error FailedCall()
InsufficientBalance
error InsufficientBalance(uint256 balance, uint256 needed)
InsufficientDOLA
error InsufficientDOLA()
InsufficientPT
error InsufficientPT()
InsufficientYT
error InsufficientYT()
InvalidRecipient
error InvalidRecipient()
InvalidSelector
error InvalidSelector()
MarketNotSet
error MarketNotSet(address market)
NotALE
error NotALE()
NotGov
error NotGov()
NotGuardianOrGov
error NotGuardianOrGov()
NotPendingGov
error NotPendingGov()
PendleSwapFailed
error PendleSwapFailed()
SafeERC20FailedOperation
error SafeERC20FailedOperation(address token)
Slice_OutOfBounds
error Slice_OutOfBounds()
creation bytecode
0x60e060405234801562000010575f80fd5b506040516200273538038062002735833981016040819052620000339162000093565b5f80546001600160a01b03199081166001600160a01b03978816179091556002805490911694861694909417909355908316608052821660a0521660c052620000ff565b80516001600160a01b03811681146200008e575f80fd5b919050565b5f805f805f60a08688031215620000a8575f80fd5b620000b38662000077565b9450620000c36020870162000077565b9350620000d36040870162000077565b9250620000e36060870162000077565b9150620000f36080870162000077565b90509295509295909350565b60805160a05160c0516125b0620001855f395f81816102e30152818161070c0152610e5a01525f818161047701528181610b0b0152818161130d015281816116cc01528181611d5c0152611e2201525f81816103fc01528181610bc101528181610c71015281816113c1015281816114710152818161167401526116fb01526125b05ff3fe608060405234801561000f575f80fd5b5060043610610184575f3560e01c806367f03c65116100dd578063aa7845cb11610088578063efdf0bb011610063578063efdf0bb014610457578063f0c9e4651461046a578063f887ea4014610472575f80fd5b8063aa7845cb1461041e578063c87ae33414610431578063db91323614610444575f80fd5b80638a0dac4a116100b85780638a0dac4a146103535780638e8f294b1461036657806392c592d0146103f7575f80fd5b806367f03c65146102de5780636de03cca1461030557806375dc769a1461032c575f80fd5b80633f387a921161013d57806351f13c7f1161011857806351f13c7f1461024c578063532286471461025f5780636703ed6b146102b7575f80fd5b80633f387a9214610213578063452a932014610226578063476ff53814610239575f80fd5b8063252408101161016d57806325240810146101cc578063298c07f2146101df57806333525192146101f2575f80fd5b806301681a621461018857806312d43a511461019d575b5f80fd5b61019b610196366004612128565b610499565b005b5f546101af906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6001546101af906001600160a01b031681565b61019b6101ed366004612143565b61057a565b6102056102003660046121d0565b610700565b6040519081526020016101c3565b610205610221366004612228565b610779565b6002546101af906001600160a01b031681565b610205610247366004612268565b6108b9565b61020561025a366004612228565b610d78565b6102867fc81f847a0000000000000000000000000000000000000000000000000000000081565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101c3565b6102867f47f1de220000000000000000000000000000000000000000000000000000000081565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b6102867f594a88cc0000000000000000000000000000000000000000000000000000000081565b6102867fd0f423850000000000000000000000000000000000000000000000000000000081565b61019b610361366004612128565b610d86565b6103c0610374366004612128565b60036020525f9081526040902080546001909101546001600160a01b03808316927401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16911683565b604080516001600160a01b0394851681526bffffffffffffffffffffffff90931660208401529216918101919091526060016101c3565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b61020561042c3660046122fd565b610e36565b61020561043f3660046121d0565b610e4e565b61019b610452366004612128565b610ebe565b61019b610465366004612128565b610f86565b61019b61102f565b6101af7f000000000000000000000000000000000000000000000000000000000000000081565b5f546001600160a01b031633146104dc576040517fb577c1f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f546040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152610577916001600160a01b0390811691908416906370a0823190602401602060405180830381865afa158015610542573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105669190612345565b6001600160a01b03841691906110e8565b50565b5f546001600160a01b031633146105bd576040517fb577c1f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f826001600160a01b031663e184c9be6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105fa573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061061e9190612345565b604080516060810182526001600160a01b038681168083526bffffffffffffffffffffffff85811660208086018281528a86168789018181528e88165f818152600386528b9020995193519389167401000000000000000000000000000000000000000094909716939093029590951788559351600190970180547fffffffffffffffffffffffff00000000000000000000000000000000000000001697909616969096179094559451948552949550927fb2293e99ade43aa212a7a8677f285eb86d6fc5ca9bf2b4b3c329320681b93ba6910160405180910390a450505050565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610763576040517fef11a41000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107708585338686611161565b95945050505050565b5f8061078783850185612389565b505090505f6107993388308888611565565b6001600160a01b038381165f81815260036020526040908190205490517f095ea7b300000000000000000000000000000000000000000000000000000000815260048101929092526024820184905292935091169063095ea7b3906044016020604051808303815f875af1158015610813573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610837919061246d565b506040517f47e7ef240000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152602482018390528316906347e7ef24906044015f604051808303815f87803b158015610898575f80fd5b505af11580156108aa573d5f803e3d5ffd5b50929998505050505050505050565b5f8080806108c985870187612389565b9250925092506108d883611a27565b5f6108e582826004611a87565b6108ee9061248c565b90507fffffffff0000000000000000000000000000000000000000000000000000000081167f594a88cc000000000000000000000000000000000000000000000000000000001480159061098457507fffffffff0000000000000000000000000000000000000000000000000000000081167f47f1de220000000000000000000000000000000000000000000000000000000014155b156109bb576040517f7352d91c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fb80e21de000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601610a0f57610a0f84338c611c00565b6001600160a01b038416633525f591338c8b35610a3260408e0160208f016124db565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b1681526001600160a01b0390951660048601526024850193909352604484019190915260ff1660648301528b0135608482015260608b013560a482015260c4015f604051808303815f87803b158015610ab3575f80fd5b505af1158015610ac5573d5f803e3d5ffd5b505050506001600160a01b038481165f90815260036020526040908190205490517f095ea7b30000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000083166004820152602481018d9052911690819063095ea7b3906044016020604051808303815f875af1158015610b62573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b86919061246d565b506040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038b811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015610c08573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c2c9190612345565b9050610c3784611e1f565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038c8116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015610cb8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cdc9190612345565b610ce69190612528565b965084871015610d22576040517f44c6883000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518d8152602081018990526001600160a01b038d169133917ffc6fc897151cbcfef0cc39115ec79125e48fc6620bbace392ec138d93ecda44491015b60405180910390a350505050505095945050505050565b5f6107703386868686611161565b5f546001600160a01b03163314610dc9576040517fb577c1f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fb6182387b7ea948602a7e04e662a27ce251dc3dd014eacaed10dce36b41bf1a5906020015b60405180910390a150565b5f610e443385338686611565565b90505b9392505050565b5f336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610eb1576040517fef11a41000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107708585338686611565565b6002546001600160a01b03163314801590610ee357505f546001600160a01b03163314155b15610f1a576040517fe6000c8500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381165f8181526003602052604080822082815560010180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055517f59d7b1e52008dc342c9421dadfc773114b914a65682a4e4b53cf60a970df0d779190a250565b5f546001600160a01b03163314610fc9576040517fb577c1f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527ff74ae56780e3765c0c0897ef57fb50a10a237584f419631812daf040913e1c9f90602001610e2b565b6001546001600160a01b03163314611073576040517f7c04d72b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180545f80546001600160a01b0383167fffffffffffffffffffffffff000000000000000000000000000000000000000091821681179092559091169091556040519081527f639717155292ce2c3e699929a8b65d14a637640f75ab5b6d165a4e735d82a4559060200160405180910390a1565b6040516001600160a01b0383811660248301526044820183905261115c91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611ed5565b505050565b5f80808061117185870187612389565b92509250925061118083611a27565b5f61118d82826004611a87565b6111969061248c565b90507fffffffff0000000000000000000000000000000000000000000000000000000081167f594a88cc000000000000000000000000000000000000000000000000000000001480159061122c57507fffffffff0000000000000000000000000000000000000000000000000000000081167f47f1de220000000000000000000000000000000000000000000000000000000014155b15611263576040517f7352d91c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fb80e21de000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016112b7576112b7848b8b611c00565b6001600160a01b038085165f90815260036020526040902054166112dd8133308d611f4f565b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018c905282169063095ea7b3906044016020604051808303815f875af1158015611362573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611386919061246d565b506040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038a811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015611408573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061142c9190612345565b905061143784611e1f565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038b8116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156114b8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114dc9190612345565b6114e69190612528565b965084871015611522576040517f44c6883000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518c8152602081018990526001600160a01b038c169133917ffc6fc897151cbcfef0cc39115ec79125e48fc6620bbace392ec138d93ecda4449101610d61565b5f80808061157585870187612389565b92509250925061158483611a27565b5f61159182826004611a87565b61159a9061248c565b90507fffffffff0000000000000000000000000000000000000000000000000000000081167fc81f847a000000000000000000000000000000000000000000000000000000001480159061163057507fffffffff0000000000000000000000000000000000000000000000000000000081167fd0f423850000000000000000000000000000000000000000000000000000000014155b15611667576040517f7352d91c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61169c6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c611f4f565b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018b90527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906044016020604051808303815f875af1158015611741573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611765919061246d565b5061176f82611e1f565b6001600160a01b038481165f908152600360205260408082205490517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015292169182906370a0823190602401602060405180830381865afa1580156117dd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118019190612345565b90508481101561183d576040517f46711f9e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038a163014611861576118616001600160a01b0383168b836110e8565b604080518c8152602081018390526001600160a01b038c169133917f2e35da04afaf475d9a94f2fa2f9dbcaef35db18ef1c2e023b6fb95b6bcdc413d910160405180910390a37f2f0bdc7b000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000841601611a18576001600160a01b038681165f908152600360205260408082206001015490517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015292169182906370a0823190602401602060405180830381865afa158015611961573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119859190612345565b9050868110156119c1576040517fbe93493900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119d56001600160a01b0383168f836110e8565b6040518181526001600160a01b038f169033907fd43e426bfd1c116e433e4748fb5d367f98a8fb4fb75298174670deb9330ffb3b9060200160405180910390a350505b9b9a5050505050505050505050565b6001600160a01b038181165f9081526003602052604090205416610577576040517f31589d090000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024015b60405180910390fd5b606081611a9581601f61253b565b1015611afd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401611a7e565b611b07828461253b565b84511015611b71576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401611a7e565b606082158015611b8f5760405191505f825260208201604052611bf7565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015611bc8578051835260209283019201611bb0565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b6001600160a01b0383165f908152600360205260409020547401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1642101561115c576001600160a01b038381165f90815260036020526040908190206001015490517f70a082310000000000000000000000000000000000000000000000000000000081528483166004820152911690829082906370a0823190602401602060405180830381865afa158015611cbb573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611cdf9190612345565b1015611d17576040517fbe93493900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611d2c6001600160a01b038216843085611f4f565b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820184905282169063095ea7b3906044016020604051808303815f875af1158015611db1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dd5919061246d565b50826001600160a01b03167fb2156de976d9a5a3d29c4d8e10ebdd04d021086d629dfe04c1641050414b8db383604051611e1191815260200190565b60405180910390a250505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031682604051611e58919061254e565b5f604051808303815f865af19150503d805f8114611e91576040519150601f19603f3d011682016040523d82523d5f602084013e611e96565b606091505b5050905080611ed1576040517f0fe7fe8500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b5f611ee96001600160a01b03841683611f8e565b905080515f14158015611f0d575080806020019051810190611f0b919061246d565b155b1561115c576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401611a7e565b6040516001600160a01b038481166024830152838116604483015260648201839052611f889186918216906323b872dd90608401611115565b50505050565b6060611f9b83835f611fa4565b90505b92915050565b606081471015611fe9576040517fcf47918100000000000000000000000000000000000000000000000000000000815247600482015260248101839052604401611a7e565b5f80856001600160a01b03168486604051612004919061254e565b5f6040518083038185875af1925050503d805f811461203e576040519150601f19603f3d011682016040523d82523d5f602084013e612043565b606091505b509150915061205386838361205d565b9695505050505050565b6060826120725761206d826120d2565b610e47565b815115801561208957506001600160a01b0384163b155b156120cb576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401611a7e565b5080610e47565b8051156120e25780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381168114610577575f80fd5b5f60208284031215612138575f80fd5b8135610e4781612114565b5f805f60608486031215612155575f80fd5b833561216081612114565b9250602084013561217081612114565b9150604084013561218081612114565b809150509250925092565b5f8083601f84011261219b575f80fd5b50813567ffffffffffffffff8111156121b2575f80fd5b6020830191508360208285010111156121c9575f80fd5b9250929050565b5f805f80606085870312156121e3575f80fd5b84356121ee81612114565b935060208501359250604085013567ffffffffffffffff811115612210575f80fd5b61221c8782880161218b565b95989497509550505050565b5f805f806060858703121561223b575f80fd5b84359350602085013561224d81612114565b9250604085013567ffffffffffffffff811115612210575f80fd5b5f805f805f85870360e081121561227d575f80fd5b86359550602087013561228f81612114565b945060807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0820112156122c0575f80fd5b5060408601925060c086013567ffffffffffffffff8111156122e0575f80fd5b6122ec8882890161218b565b969995985093965092949392505050565b5f805f6040848603121561230f575f80fd5b83359250602084013567ffffffffffffffff81111561232c575f80fd5b6123388682870161218b565b9497909650939450505050565b5f60208284031215612355575f80fd5b5051919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f805f6060848603121561239b575f80fd5b83356123a681612114565b925060208401359150604084013567ffffffffffffffff808211156123c9575f80fd5b818601915086601f8301126123dc575f80fd5b8135818111156123ee576123ee61235c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156124345761243461235c565b8160405282815289602084870101111561244c575f80fd5b826020860160208301375f6020848301015280955050505050509250925092565b5f6020828403121561247d575f80fd5b81518015158114610e47575f80fd5b5f815160208301517fffffffff00000000000000000000000000000000000000000000000000000000808216935060048310156124d35780818460040360031b1b83161693505b505050919050565b5f602082840312156124eb575f80fd5b813560ff81168114610e47575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115611f9e57611f9e6124fb565b80820180821115611f9e57611f9e6124fb565b5f82515f5b8181101561256d5760208186018101518583015201612553565b505f92019182525091905056fea26469706673582212201f19c42be9f304cd7eca63a37f34f13c8ea2ee6a1398dee8cfc586287257029064736f6c63430008140033000000000000000000000000926df14a23be491164dcf93f4c468a50ef659d5b000000000000000000000000e3ed95e130ad9e15643f5a5f232a3dae980784cd000000000000000000000000865377367054516e17014ccded1e7d814edc9ce4000000000000000000000000888888888889758f76e7103c6cbf23abbf58f9460000000000000000000000006218d3d6c01f8077f06519d8f5d31f935f3c3c53