3 txs
855 calls
constructor
constructor(address baseToken_, address swapRouter_, address[] tokens)
functions
baseToken
viewfunction baseToken() view returns (address)
DEFAULT_ADMIN_ROLE
viewfunction DEFAULT_ADMIN_ROLE() view returns (bytes32)
getRoleAdmin
viewfunction getRoleAdmin(bytes32 role) view returns (bytes32)
hasRole
viewfunction hasRole(bytes32 role, address account) view returns (bool)
IMPLEMENTATION_NAME
viewfunction IMPLEMENTATION_NAME() view returns (string)
IMPLEMENTATION_VERSION
viewfunction IMPLEMENTATION_VERSION() view returns (string)
supportsInterface
viewfunction supportsInterface(bytes4 interfaceId) view returns (bool)
whitelistedTokens
viewfunction whitelistedTokens() view returns (address[])
grantRole
nonpayablefunction grantRole(bytes32 role, address account)
removeWhitelistedTokens
nonpayablefunction removeWhitelistedTokens(address[] whitelistedTokens_)
renounceRole
nonpayablefunction renounceRole(bytes32 role, address callerConfirmation)
revokeRole
nonpayablefunction revokeRole(bytes32 role, address account)
setWhitelistedTokens
nonpayablefunction setWhitelistedTokens(address[] whitelistedTokens_)
swapIn
nonpayablefunction swapIn(address inputToken, uint256 inputAmount, uint256 minBaseAmount, bytes path) returns (uint256)
swapOut
nonpayablefunction swapOut(address outputToken, uint256 baseAmount, uint256 minOutputAmount, bytes path) returns (uint256)
events
RoleAdminChanged
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)
RoleGranted
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)
RoleRevoked
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)
SwappedIn
event SwappedIn(address indexed inputToken, uint256 inputAmount, uint256 baseOutputAmount)
SwappedOut
event SwappedOut(address indexed outputToken, uint256 baseInputAmount, uint256 outputAmount)
errors
AccessControlBadConfirmation
error AccessControlBadConfirmation()
AccessControlUnauthorizedAccount
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole)
InvalidAmount
error InvalidAmount()
InvalidPath
error InvalidPath()
InvalidPathFormat
error InvalidPathFormat()
InvalidToken
error InvalidToken()
SafeERC20FailedOperation
error SafeERC20FailedOperation(address token)
creation bytecode
0x60c0604052346101745761159e803803806100198161018c565b92833981019060608183031261017457610032816101b1565b61003e602083016101b1565b604083015190926001600160401b03821161017457019280601f85011215610174578351936001600160401b038511610178578460051b9060208061008481850161018c565b80988152019282010192831161017457602001905b82821061015c575050506001600160a01b039081166080521660a0525f5b815181101561010e576001600160a01b036100d282846101c5565b5116156100ff576001906100f86001600160a01b036100f183866101c5565b5116610276565b50016100b7565b63c1ab6dc160e01b5f5260045ffd5b610117336101ed565b506040516112af90816102cf82396080518181816101bb01528181610398015281816104010152818161047f0152610650015260a05181818161016301526104ad0152f35b60208091610169846101b1565b815201910190610099565b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b6040519190601f01601f191682016001600160401b0381118382101761017857604052565b51906001600160a01b038216820361017457565b80518210156101d95760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b6001600160a01b0381165f9081525f51602061157e5f395f51905f52602052604090205460ff16610271576001600160a01b03165f8181525f51602061157e5f395f51905f5260205260408120805460ff191660011790553391907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505f90565b805f52600260205260405f2054155f1461027157600154680100000000000000008110156101785760018101806001558110156101d957819060015f5260205f200155600154905f52600260205260405f205560019056fe60806040526004361015610011575f80fd5b5f3560e01c8062a3fecd146109c157806301ffc9a71461096b578063248a9ca3146109395780632f2ff15d146108fc57806336568abe146108b85780635988f9a5146108585780635e1762a0146107b6578063754b377c1461076d57806391d1485414610725578063a217fddf1461070b578063bcec454f146106ab578063bd8bc59814610430578063c55dae63146103ec578063ccce8e28146101055763d547741f146100bd575f80fd5b34610101576040366003190112610101576100ff6004356100dc610aac565b906100fa6100f5825f525f602052600160405f20015490565b610d95565b610e55565b005b5f80fd5b346101015761011336610b5b565b9361011f929192610d26565b83156103dd576001600160a01b03165f81815260026020526040902054909290156103ce578415908115610357575b905f956020939261016187303389610fa6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692610197888589610ff1565b88146102a0575050604051610219926101af82610a4a565b85825260018060a01b037f000000000000000000000000000000000000000000000000000000000000000016858301526064604083015233606083015286608083015260a08201528660c08201526040519687809481936304e45aaf60e01b835260048301610c79565b03925af1928315610295575f93610254575b505f51602061125a5f395f51905f526040602094935b81519081528486820152a2604051908152f35b92506020833d60201161028d575b8161026f60209383610a66565b81010312610101579151915f51602061125a5f395f51905f5261022b565b3d9150610262565b6040513d5f823e3d90fd5b926102bc6102ea94604051936102b585610a1a565b3691610bef565b82523385830152866040830152606082015260405196878094819363b858183f60e01b835260048301610c35565b03925af1928315610295575f93610316575b505f51602061125a5f395f51905f52604060209493610241565b92506020833d60201161034f575b8161033160209383610a66565b81010312610101579151915f51602061125a5f395f51905f526102fc565b3d9150610324565b9190836103648785610ed5565b6001600160a01b0390911690911480159190610396575b5061038757909161014e565b6320db826760e01b5f5260045ffd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b039081169116141590508761037b565b63c1ab6dc160e01b5f5260045ffd5b63162908e360e11b5f5260045ffd5b34610101575f366003190112610101576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346101015761043e36610b5b565b93610447610d26565b83156103dd576001600160a01b03165f81815260026020526040902054909290156103ce578415908115610641575b905f95602093927f0000000000000000000000000000000000000000000000000000000000000000916104ab88303386610fa6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316936104e1898686610ff1565b89146105be57506105439350604051916104fa83610a4a565b60018060a01b0316825285858301526064604083015233606083015286608083015260a08201528660c08201526040519687809481936304e45aaf60e01b835260048301610c79565b03925af1928315610295575f9361057d575b505f51602061123a5f395f51905f5260406020949381519081528486820152a2604051908152f35b92506020833d6020116105b6575b8161059860209383610a66565b81010312610101579151915f51602061123a5f395f51905f52610555565b3d915061058b565b91506102bc6105d494604051936102b585610a1a565b03925af1928315610295575f93610600575b505f51602061123a5f395f51905f52604060209493610241565b92506020833d602011610639575b8161061b60209383610a66565b81010312610101579151915f51602061123a5f395f51905f526105e6565b3d915061060e565b91908361064e8784610ed5565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b039081169216919091148015929190610697575b5050610387579091610476565b6001600160a01b031614159050848861068a565b34610101576106b936610ac2565b6106c1610cd7565b5f5b81518110156100ff576001600160a01b036106de8284610bc7565b5116156103ce576001906107046001600160a01b036106fd8386610bc7565b5116611122565b50016106c3565b34610101575f3660031901126101015760206040515f8152f35b346101015760403660031901126101015761073e610aac565b6004355f525f60205260405f209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b34610101575f366003190112610101576107b260405161078e604082610a66565b60038152620312e360ec1b6020820152604051918291602083526020830190610a88565b0390f35b34610101575f366003190112610101576040518060206001549283815201809260015f5260205f20905f5b81811061084257505050816107f7910382610a66565b604051918291602083019060208452518091526040830191905f5b818110610820575050500390f35b82516001600160a01b0316845285945060209384019390920191600101610812565b82548452602090930192600192830192016107e1565b346101015761086636610ac2565b61086e610cd7565b5f5b81518110156100ff576001600160a01b0361088b8284610bc7565b5116156103ce576001906108b16001600160a01b036108aa8386610bc7565b51166110b7565b5001610870565b34610101576040366003190112610101576108d1610aac565b336001600160a01b038216036108ed576100ff90600435610e55565b63334bd91960e11b5f5260045ffd5b34610101576040366003190112610101576100ff60043561091b610aac565b906109346100f5825f525f602052600160405f20015490565b610dcd565b346101015760203660031901126101015760206109636004355f525f602052600160405f20015490565b604051908152f35b346101015760203660031901126101015760043563ffffffff60e01b811680910361010157602090637965db0b60e01b81149081156109b0575b506040519015158152f35b6301ffc9a760e01b149050826109a5565b34610101575f366003190112610101576107b26040516109e2604082610a66565b60178152762ab734b9bbb0b8102b199029bbb0b81020b230b83a32b960491b6020820152604051918291602083526020830190610a88565b6080810190811067ffffffffffffffff821117610a3657604052565b634e487b7160e01b5f52604160045260245ffd5b60e0810190811067ffffffffffffffff821117610a3657604052565b90601f8019910116810190811067ffffffffffffffff821117610a3657604052565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b602435906001600160a01b038216820361010157565b60206003198201126101015760043567ffffffffffffffff811161010157816023820112156101015780600401359167ffffffffffffffff8311610a36578260051b9160405193610b166020850186610a66565b84526024602085019382010191821161010157602401915b818310610b3b5750505090565b82356001600160a01b038116810361010157815260209283019201610b2e565b6080600319820112610101576004356001600160a01b03811681036101015791602435916044359160643567ffffffffffffffff811161010157826023820112156101015780600401359267ffffffffffffffff84116101015760248483010111610101576024019190565b8051821015610bdb5760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b92919267ffffffffffffffff8211610a365760405191610c19601f8201601f191660200184610a66565b829481845281830111610101578281602093845f960137010152565b6020815260806060610c52845183602086015260a0850190610a88565b60208501516001600160a01b03166040858101919091528501518285015293015191015290565b81516001600160a01b03908116825260208084015182169083015260408084015162ffffff16908301526060808401518216908301526080808401519083015260a0808401519083015260c092830151169181019190915260e00190565b335f9081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1615610d0f57565b63e2517d3f60e01b5f52336004525f60245260445ffd5b335f9081527fdc57f31f443db27194675c40fd69f02f80ad026cfa2020f254828e243e4df309602052604090205460ff1615610d5e57565b63e2517d3f60e01b5f52336004527fcd33863658f027235a71d5a353604cad1d9f4c447574c5e997484408e10fc82160245260445ffd5b5f8181526020818152604080832033845290915290205460ff1615610db75750565b63e2517d3f60e01b5f523360045260245260445ffd5b5f818152602081815260408083206001600160a01b038616845290915290205460ff16610e4f575f818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19166001179055339291907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b50505f90565b5f818152602081815260408083206001600160a01b038616845290915290205460ff1615610e4f575f818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19169055339291907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a4600190565b91905f92602b82108015610f8b575b610f7c5781601411610f7857803593601319830190838211610f645780610f5057506017900491601783029280840460171490151715610f3c5760148301808411610f3c571161010157606093841c93910135901c90565b634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b81526012600452602490fd5b634e487b7160e01b81526011600452602490fd5b8380fd5b63c3ab029b60e01b8452600484fd5b5060131982019350818411610f3c5760175f94061515610ee4565b6040516323b872dd60e01b60208201526001600160a01b039283166024820152929091166044830152606480830193909352918152610fef91610fea608483610a66565b6111e1565b565b60205f604051938285019063095ea7b360e01b825260018060a01b031695866024870152604486015260448552611029606486610a66565b84519082855af15f513d8261107d575b50501561104557505050565b610fea610fef936040519063095ea7b360e01b602083015260248201525f604482015260448152611077606482610a66565b826111e1565b90915061109a57506001600160a01b0381163b15155b5f80611039565b600114611093565b8054821015610bdb575f5260205f2001905f90565b805f52600260205260405f2054155f1461111d57600154600160401b811015610a36576111066110f082600185940160015560016110a2565b819391549060031b91821b915f19901b19161790565b9055600154905f52600260205260405f2055600190565b505f90565b5f818152600260205260409020548015610e4f575f198101818111610f3c576001545f19810191908211610f3c578181036111a9575b5050506001548015611195575f19016111728160016110a2565b8154905f199060031b1b191690556001555f5260026020525f6040812055600190565b634e487b7160e01b5f52603160045260245ffd5b6111cb6111ba6110f09360016110a2565b90549060031b1c92839260016110a2565b90555f52600260205260405f20555f8080611158565b905f602091828151910182855af115610295575f513d61123057506001600160a01b0381163b155b6112105750565b635274afe760e01b5f9081526001600160a01b0391909116600452602490fd5b6001141561120956fe5827c3e8def2eacec3e946260bf6bc1782b9a823f2b99f600f88e5f80b7cfb3fe166cae232ae4a1823a66ae352fe64900fcf92f4abd454ca894fdf235179b691a264697066735822122077f5cde048d6948fa61eab335461ac07d1355e8fedab563906eae9aaa8dddd9d64736f6c634300081d0033ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5000000000000000000000000437cc33344a0b27a429f795ff6b469c72698b29100000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc4500000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000002000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831000000000000000000000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9