0 txs
55.3k calls
constructor
constructor(uint256 _minTrialPeriod, uint256 _maxTrialPeriod, uint256 _minPayPeriod, uint256 _maxPayPeriod, uint256 _minPriceChangeBuffer, address _addyRegistry)
functions
ADDY_REGISTRY
viewfunction ADDY_REGISTRY() view returns (address)
agentSubPriceData
viewfunction agentSubPriceData(address arg0) view returns (tuple)
ambassadorRatio
viewfunction ambassadorRatio() view returns (uint256)
canGovern
viewfunction canGovern(address _address) view returns (bool)
getAgentSubPriceData
viewfunction getAgentSubPriceData(address _agent) view returns (tuple)
getCombinedSubData
viewfunction getCombinedSubData(address _user, address _agent, uint256 _agentPaidThru, uint256 _protocolPaidThru, address _oracleRegistry) view returns (tuple, tuple)
getTransactionFeeData
viewfunction getTransactionFeeData(address _user, uint256 _action) view returns (uint256, address)
getTransactionFeeDataWithAmbassadorRatio
viewfunction getTransactionFeeDataWithAmbassadorRatio(address _user, uint256 _action) view returns (uint256, address, uint256)
govChangeDelay
viewfunction govChangeDelay() view returns (uint256)
governance
viewfunction governance() view returns (address)
hasPendingGovChange
viewfunction hasPendingGovChange() view returns (bool)
isActivated
viewfunction isActivated() view returns (bool)
isAgentSubPricingEnabled
viewfunction isAgentSubPricingEnabled() view returns (bool)
isValidSubPrice
viewfunction isValidSubPrice(address _asset, uint256 _usdValue, uint256 _trialPeriod, uint256 _payPeriod) view returns (bool)
isValidTxPriceSheet
viewfunction isValidTxPriceSheet(uint256 _yieldFee, uint256 _swapFee, uint256 _claimRewardsFee) view returns (bool)
MAX_GOV_CHANGE_DELAY
viewfunction MAX_GOV_CHANGE_DELAY() view returns (uint256)
MAX_PAY_PERIOD
viewfunction MAX_PAY_PERIOD() view returns (uint256)
MAX_TRIAL_PERIOD
viewfunction MAX_TRIAL_PERIOD() view returns (uint256)
MIN_GOV_CHANGE_DELAY
viewfunction MIN_GOV_CHANGE_DELAY() view returns (uint256)
MIN_PAY_PERIOD
viewfunction MIN_PAY_PERIOD() view returns (uint256)
MIN_PRICE_CHANGE_BUFFER
viewfunction MIN_PRICE_CHANGE_BUFFER() view returns (uint256)
MIN_TRIAL_PERIOD
viewfunction MIN_TRIAL_PERIOD() view returns (uint256)
pendingAgentSubPrices
viewfunction pendingAgentSubPrices(address arg0) view returns (tuple)
pendingGov
viewfunction pendingGov() view returns (tuple)
priceChangeDelay
viewfunction priceChangeDelay() view returns (uint256)
protocolRecipient
viewfunction protocolRecipient() view returns (address)
protocolSubPriceData
viewfunction protocolSubPriceData() view returns (tuple)
protocolTxPriceData
viewfunction protocolTxPriceData() view returns (tuple)
activate
nonpayablefunction activate(bool _shouldActivate)
cancelGovernanceChange
nonpayablefunction cancelGovernanceChange()
changeGovernance
nonpayablefunction changeGovernance(address _newGov)
confirmGovernanceChange
nonpayablefunction confirmGovernanceChange()
finalizePendingAgentSubPrice
nonpayablefunction finalizePendingAgentSubPrice(address _agent) returns (bool)
removeAgentSubPrice
nonpayablefunction removeAgentSubPrice(address _agent) returns (bool)
removeProtocolSubPrice
nonpayablefunction removeProtocolSubPrice() returns (bool)
removeProtocolTxPriceSheet
nonpayablefunction removeProtocolTxPriceSheet() returns (bool)
setAgentSubPrice
nonpayablefunction setAgentSubPrice(address _agent, address _asset, uint256 _usdValue, uint256 _trialPeriod, uint256 _payPeriod) returns (bool)
setAgentSubPricingEnabled
nonpayablefunction setAgentSubPricingEnabled(bool _isEnabled) returns (bool)
setAmbassadorRatio
nonpayablefunction setAmbassadorRatio(uint256 _ratio) returns (bool)
setGovernanceChangeDelay
nonpayablefunction setGovernanceChangeDelay(uint256 _numBlocks)
setPriceChangeDelay
nonpayablefunction setPriceChangeDelay(uint256 _delayBlocks) returns (bool)
setProtocolRecipient
nonpayablefunction setProtocolRecipient(address _recipient) returns (bool)
setProtocolSubPrice
nonpayablefunction setProtocolSubPrice(address _asset, uint256 _usdValue, uint256 _trialPeriod, uint256 _payPeriod) returns (bool)
setProtocolTxPriceSheet
nonpayablefunction setProtocolTxPriceSheet(uint256 _yieldFee, uint256 _swapFee, uint256 _claimRewardsFee) returns (bool)
events
AgentSubPriceRemoved
event AgentSubPriceRemoved(address indexed agent, address indexed asset, uint256 usdValue, uint256 trialPeriod, uint256 payPeriod)
AgentSubPriceSet
event AgentSubPriceSet(address indexed agent, address indexed asset, uint256 usdValue, uint256 trialPeriod, uint256 payPeriod)
AgentSubPricingEnabled
event AgentSubPricingEnabled(bool isEnabled)
AmbassadorRatioSet
event AmbassadorRatioSet(uint256 ratio)
GovChangeCancelled
event GovChangeCancelled(address indexed cancelledGov, uint256 initiatedBlock, uint256 confirmBlock)
GovChangeConfirmed
event GovChangeConfirmed(address indexed prevGov, address indexed newGov, uint256 initiatedBlock, uint256 confirmBlock)
GovChangeDelaySet
event GovChangeDelaySet(uint256 delayBlocks)
GovChangeInitiated
event GovChangeInitiated(address indexed prevGov, address indexed newGov, uint256 confirmBlock)
PendingAgentSubPriceSet
event PendingAgentSubPriceSet(address indexed agent, address indexed asset, uint256 usdValue, uint256 trialPeriod, uint256 payPeriod, uint256 effectiveBlock)
PriceChangeDelaySet
event PriceChangeDelaySet(uint256 delayBlocks)
PriceSheetsActivated
event PriceSheetsActivated(bool isActivated)
ProtocolRecipientSet
event ProtocolRecipientSet(address indexed recipient)
ProtocolSubPriceRemoved
event ProtocolSubPriceRemoved(address indexed asset, uint256 usdValue, uint256 trialPeriod, uint256 payPeriod)
ProtocolSubPriceSet
event ProtocolSubPriceSet(address indexed asset, uint256 usdValue, uint256 trialPeriod, uint256 payPeriod)
ProtocolTxPriceSheetRemoved
event ProtocolTxPriceSheetRemoved(uint256 yieldFee, uint256 swapFee, uint256 claimRewardsFee)
ProtocolTxPriceSheetSet
event ProtocolTxPriceSheetSet(uint256 yieldFee, uint256 swapFee, uint256 claimRewardsFee)
errors
No errors.
creation bytecode
0x6117e35150346101ee5760206119ce5f395f518060a01c6101ee576101405261014051156101ee5761014051635aa6e675610160526020610160600461017c845afa61004d573d5f5f3e3d5ffd5b3d602081183d60201002188061016001610180116101ee57610160518060a01c6101ee576101a052506101a090505160065560016013555f6040526101405160605260403660803761009d6100f8565b6101405161174352602061192e5f395f5161176352602061194e5f395f5161178352602061196e5f395f516117a352602061198e5f395f516117c35260206119ae5f395f516117e3526117036101f261000039611803610000f35b6040511561010757600161010d565b60605115155b156101ee5760405115610120576040515f555b6060511561012f576060516005555b6040608060c05e60c051610144576001610149565b60e051155b156101c357606051156101ee5760605163ed860576610100526020610100600461011c845afa61017b573d5f5f3e3d5ffd5b60203d106101ee5761010090505160c05260605163c55728b0610100526020610100600461011c845afa6101b1573d5f5f3e3d5ffd5b60203d106101ee5761010090505160e0525b60e05160c05110156101ee5760c0516117035260e05161172352606051156101ec5760c0516004555b565b5f80fd5f3560e01c60026027820660011b6116b501601e395f51565b6353aa43078118610056576024361034176116b1576004358060a01c6116b1576102605260206102605161016052610051610280611339565b610280f35b6399572d6f8118611265576024361034176116b1576004358060a01c6116b157610160526100856101e0611269565b6101e0805160208160051b0180836101805e505050335f6101e0525f61018051600281116116b15780156100da57905b8060051b6101a0015183186100cf5760016101e0526100da565b6001018181186100b5575b50506101e0519050156116b1576101605160016101e0525f61018051600281116116b157801561012a57905b8060051b6101a00151831861011f575f6101e05261012a565b600101818118610106575b50506101e0519050156116b157610160513b156116b15761014c6101e0611398565b6101e0511561015f5761016051156116b1575b436004548082018281106116b157905090506101e05261016051600155436002556101e051600355610160515f547fa8e5a115434955f3c91f53089861da9b575399fbfbc1fc8b345ae6a18b0f193e6101e051610200526020610200a3005b633f561eff81186101dc57346116b157600354151560405260206040f35b63bfc8511c811861126557346116b15760206117e360403960206040f35b636e4fd9c8811861126557346116b157600154604052600254606052600354608052604051156116b1576080511561023757608051431015610239565b5f5b156116b15760405133186116b1575f5460a0526040515f555f6001555f6002555f60035560405160a0517fb5dfe18540f75a87f8c7963e7f4942e9392be572b787d486d7868ac53a5bdf5b6040606060c05e604060c0a3005b63366836cc811861031b57346116b15733610160526102b2610260611339565b61026051156116b15760015461026052600254610280526003546102a0526102a051156116b1575f6001555f6002555f600355610260517f4301277e72c59c5071608882749a82a210817721ba94066744cea89211d3838060406102806102c05e60406102c0a2005b63c3037319811861126557346116b157602061178360403960206040f35b63a908dc8081186103d0576024361034176116b1576003546116b1573361016052610365610260611339565b61026051156116b15760206117035f395f516004351015610386575f610395565b60206117235f395f5160043511155b156116b1576004356004557fb8d7f2c6802e04bfd3abb436c2b7b52bd4b37872b53bd1150146816d66ac7de2600435610260526020610260a1005b63a56313ad811861043a576044361034176116b1576004358060a01c6116b15760c05260243580600b1c6116b15760e05260e05160405260075460605260085460805260095460a052610424610100611638565b6101005161012052600654610140526040610120f35b630f0eda988118611265576024361034176116b1576004358060a01c6116b15760405260106040516020525f5260405f2080546060526001810154608052600281015460a052600381015460c052600481015460e0525060a06060f35b635aa6e67581186104b257346116b1575f5460405260206040f35b63d58addfa8118611265576024361034176116b1576004358060011c6116b1576102605233610160526104e6610280611339565b61028051156116b157600e5461026051146116b15761026051600e557f31605a06f92362c867c35d293c76c2d5dba389766a43b0fc5d9e5214d2e5832861026051610280526020610280a16001610280526020610280f35b6325240810811861056657346116b15760015460405260025460605260035460805260606040f35b635057f1e88118611265576024361034176116b157336101605261058b610260611339565b61026051156116b1576004356105a25760016105b1565b60206117e35f395f5160043510155b156116b1576004356011557fc6f3cd295f2a92b987ccd3a241a4ef32a436dd2a5f73566ef8678abccdc15731600435610260526020610260a16001610260526020610260f35b63f40b1697811861061357346116b15760045460405260206040f35b6335ac8ace8118611265576064361034176116b15760206060600460403761063b60a061167f565b60a0f35b63ed860576811861065d57346116b157602061170360403960206040f35b6325bc9287811861126557346116b15760125460405260206040f35b63c55728b0811861069757346116b157602061172360403960206040f35b6394b51d37811861126557346116b157602061174360403960206040f35b63aae7c49b81186112655760a4361034176116b1576004358060a01c6116b157610220526024358060a01c6116b157610240526084358060a01c6116b15761026052606435604052600a54606052600b54608052600c5460a052600d5460c0526102605160e0526107276103406113a1565b61034060c0816102805e506102c0511561074357600654610280525b60c0366103403761024051156107b557604435604052600f610240516020525f5260405f2080546060526001810154608052600281015460a052600381015460c052506102605160e0526107986104006113a1565b61040060c0816104c05e5060c06104c06103405e61024051610340525b60c06102806104005e60c06103406104c05e610180610400f35b631b90b1de8118611265576024361034176116b1576004358060a01c6116b157604052600e546108085760803660603760806060610839565b600f6040516020525f5260405f2080546060526001810154608052600281015460a052600381015460c05250608060605bf35b635ed76d4d8118611265576084361034176116b1576004358060a01c6116b15760c052602060c0516040526060602460603761087760e06114a3565b60e0f35b630325e5ad81186112655760a4361034176116b1576004358060a01c6116b157610260526024358060a01c6116b15761028052610260516040526108c06102a0611526565b6102a051156116b1573361026051638da5cb5b6102c05260206102c060046102dc845afa6108f0573d5f5f3e3d5ffd5b3d602081183d6020100218806102c0016102e0116116b1576102c0518060a01c6116b1576103005250610300905051146102a0526102a05161094557336101605261093c6102c0611339565b6102c051610948565b60015b156116b1576102a0511561095f57601354156116b1575b61026051156116b15761028051604052606060446060376109816102c06114a3565b6102c051610998575f6102e05260206102e0610a7a565b610280516102c052606060446102e03760115461034052610340516109de576102605160405260806102c060605e6109ce6115d7565b6001610360526020610360610a7a565b43610340518082018281106116b15790509050610360526010610260516020525f5260405f206102c05181556102e05160018201556103005160028201556103205160038201556103605160048201555061028051610260517fdf183c871fe799c55c7b8f8b0ac88b4487c13c381c90194efb25423041acf5b36060604461038037610360516103e0526080610380a360016103805260206103805bf35b634e6255a78118610b4d576024361034176116b1576004358060a01c6116b15761014052601354156116b1576010610140516020525f5260405f2080546101605260018101546101805260028101546101a05260038101546101c05260048101546101e052506101e05115610af7576101e051431015610af9565b5f5b156116b1576010610140516020525f5260405f205f81555f60018201555f60028201555f60038201555f60048201555061014051604052608061016060605e610b406115d7565b6001610200526020610200f35b63c67c8e0f8118610b7b57346116b157600a54604052600b54606052600c54608052600d5460a05260806040f35b634a8c1fb4811861126557346116b15760135460405260206040f35b637184406c8118610cb4576024361034176116b1576004358060a01c6116b157610260523361016052610bcb610280611339565b61028051156116b15761026051604052610be6610280611526565b61028051156116b157600f610260516020525f5260405f2080546102805260018101546102a05260028101546102c05260038101546102e0525061028051610c2f576001610c35565b61026051155b15610c49575f610320526020610320610cb2565b600f610260516020525f5260405f205f81555f60018201555f60028201555f60038201555061028051610260517f2050e1bdd216362adb1f1aee4c94db2043d8502914bcf1dd8d2ecd54a865ccc160606102a06103005e6060610300a360016103005260206103005bf35b63941f5d25811861126557346116b15760065460405260206040f35b639d946c3d8118611265576084361034176116b1576004358060a01c6116b157610260523361016052610d04610280611339565b61028051156116b1576102605160405260606024606037610d266102806114a3565b61028051610d3d575f6102a05260206102a0610d95565b61026051600a55602435600b55604435600c55606435600d55610260517fab57ff9d09e2ff0eda5bd39950233ab77add65cd20927f9878e2e6a24a56b4a760606024610280376060610280a260016102805260206102805bf35b63da9f9ac3811861126557346116b1573361016052610db7610260611339565b61026051156116b157600a5461026052600b5461028052600c546102a052600d546102c05261026051610df3575f6102e05260206102e0610e43565b5f600a555f600b555f600c555f600d55610260517ff7460b11d7693833e02bc9ff9b56ce860d81d333e56e36dbb91b6639fa100c5d60606102806102e05e60606102e0a260016102e05260206102e05bf35b638714f7378118611265576044361034176116b1576004358060a01c6116b15760c05260243580600b1c6116b15760e05260e05160405260075460605260085460805260095460a052610e99610100611638565b610100516101205260065461014052601254610160526060610120f35b633aabaee08118611265576064361034176116b1573361016052610edb610260611339565b61026051156116b15760606004604037610ef661026061167f565b61026051610f0d575f610280526020610280610f5a565b6004356007556024356008556044356009557fed5b6e054f4b0393e7a69e82584f0c4da89aa2a370ab3d48246093373a41207260606004610260376060610260a160016102605260206102605bf35b63d81126e4811861126557346116b1573361016052610f7c610260611339565b61026051156116b15760075461026052600854610280526009546102a0525f6007555f6008555f6009557fb21b138b4d6021d532352934283bab14a61d524bce052aa9ebc229d11f55e30e60606102606102c05e60606102c0a160016102c05260206102c0f35b6307ba8a548118611067576024361034176116b1576004358060a01c6116b157610260523361016052611017610280611339565b61028051156116b15761026051156116b15761026051600655610260517ff31805ebffaffe9c515088f2d7445b69c9b286ee994725e81faf8d47683011b25f610280a26001610280526020610280f35b63ce5e84a38118611265576024361034176116b1576004358060011c6116b15761026052336101605261109b610280611339565b61028051156116b157610260516013557f5b01c5cc696ab966a1308a5889aca64e667b4e0dcd556c4add287da3fc58beaf61026051610280526020610280a1005b638a9bab908118611156576024361034176116b1573361016052611101610260611339565b61026051156116b157612710600435116116b1576004356012557f5bdad3783bdb13cf432d3c40fd0f92c7ec853949edf797626406da989ab6c880600435610260526020610260a16001610260526020610260f35b63cec4203c811861126557346116b15760115460405260206040f35b6358ea85e4811861126557346116b15760075460405260085460605260095460805260606040f35b632f05d42c811861126557346116b157600e5460405260206040f35b635bc55d40811861120b576024361034176116b1576004358060a01c6116b157604052600f6040516020525f5260405f2080546060526001810154608052600281015460a052600381015460c0525060806060f35b631d60c353811861126557346116b15760206117c360403960206040f35b63808e7852811861126557346116b157602061176360403960206040f35b63c927dbde811861126557346116b15760206117a360403960206040f35b5f5ffd5b5f6040525f5460a05260a0511561129957604051600181116116b15760a0518160051b6060015260018101604052505b60055460c05260c051156113255760c051635aa6e675610100526020610100600461011c845afa6112cc573d5f5f3e3d5ffd5b3d602081183d60201002188061010001610120116116b157610100518060a01c6116b157610140525061014090505160e05260e0511561132557604051600181116116b15760e0518160051b6060015260018101604052505b60405160208160051b01806040845e505050565b610160516113486101e0611269565b6101e05f610240525f8151600281116116b157801561138957905b8060051b602084010151841861137e57600161024052611389565b600101818118611363575b50506102405190509050815250565b60055415815250565b60c03661010037604051610180526040516113c05760805115156113c2565b5f5b6113ee57604051156113d757608051156113d9565b5f5b1561140b575f6101805260016101a05261140b565b4360a0518082018281106116b157905090506101805260016101a0525b610180511561141f57610180514311611421565b5f5b156114995760e051632c7ddded6101c052604060606101e05e60206101c060446101dc845afa611453573d5f5f3e3d5ffd5b60203d106116b1576101c0905051610140526101405115611499574360c0518082018281106116b1579050905061018052608051610160526060516101205260016101a0525b60c0610100825e50565b6040516114b3575f815250611524565b60206117a35f395f5160a051106114d65760206117c35f395f5160a051116114d9565b60015b156114e7575f815250611524565b60206117635f395f516080511061150a5760206117835f395f516080511161150d565b60015b1561151b575f815250611524565b60605115158152505b565b60206117435f395f516347be091a608052600160a052602060806024609c845afa611553573d5f5f3e3d5ffd5b3d602081183d60201002188060800160a0116116b1576080518060a01c6116b15760c0525060c0905051606052606051631ffbb06460805260405160a052602060806024609c845afa6115a8573d5f5f3e3d5ffd5b3d602081183d60201002188060800160a0116116b1576080518060011c6116b15760c0525060c0905051815250565b600f6040516020525f5260405f206060518155608051600182015560a051600282015560c0516003820155506060516040517fa6240bb3e3d5f5aca311e99ae7806d79c68aedf348769a850feb492f4fca0a106060608060e05e606060e0a3565b60026040511861164d5760605181525061167d565b6010604051186116625760805181525061167d565b610100604051186116785760a05181525061167d565b5f8152505b565b6107d06040511115611691575f6116ac565b6107d060605111156116a3575f6116ac565b6107d060805111155b815250565b5f80fd0339126505f7083b126511720497126512650cd011b610dc07cf122901be12470e450a7c12650fe312650eb6126512651265053e06b50d971265029201fa0f5c06790018087b063f0b971265119a8558202c61ab2e90f12b93edf021acfbd26d175de9165144f8e8b8c22dd1360b48d0e719170381184e190100a1657679706572830004010039000000000000000000000000000000000000000000000000000000000000a8c0000000000000000000000000000000000000000000000000000000000013c6800000000000000000000000000000000000000000000000000000000000049d4000000000000000000000000000000000000000000000000000000000003b8260000000000000000000000000000000000000000000000000000000000000a8c00000000000000000000000007bcd6d471d1a068012a79347c7a944d1df01a1ae