6 txs
7 calls
constructor
constructor(address _tcRouterAddress, address _feeAsset, address _treasuryWallet, address _thorToken, address _uThorToken, address _vThorToken, address _yThorToken)
functions
communityPreciseBps
viewfunction communityPreciseBps() view returns (uint32)
executors
viewfunction executors(address) view returns (bool)
feeAsset
viewfunction feeAsset() view returns (address)
getPendingDistribution
viewfunction getPendingDistribution() view returns (tuple)
isReadyForDistribution
viewfunction isReadyForDistribution() view returns (bool ready, string reason)
MAX_PENDING_DURATION
viewfunction MAX_PENDING_DURATION() view returns (uint256)
owners
viewfunction owners(address) view returns (bool)
pendingDistribution
viewfunction pendingDistribution() view returns (bool isActive, uint256 snapshotTimestamp, uint256 totalAmount, uint256 treasuryAmount, uint256 uThorAmount, uint256 yThorAmount, uint256 vThorAmount, uint256 thorPoolAmount, uint32 snapshotUThorBps, uint32 snapshotYThorBps, uint32 snapshotVThorBps, uint32 snapshotThorPoolBps)
rewardAmountThreshold
viewfunction rewardAmountThreshold() view returns (uint256)
tcRouter
viewfunction tcRouter() view returns (address)
thorPoolPreciseBps
viewfunction thorPoolPreciseBps() view returns (uint32)
thorToken
viewfunction thorToken() view returns (address)
treasuryPreciseBps
viewfunction treasuryPreciseBps() view returns (uint32)
treasuryWallet
viewfunction treasuryWallet() view returns (address)
uThorPreciseBps
viewfunction uThorPreciseBps() view returns (uint32)
uThorToken
viewfunction uThorToken() view returns (address)
vThorPreciseBps
viewfunction vThorPreciseBps() view returns (uint32)
vThorToken
viewfunction vThorToken() view returns (address)
yThorPreciseBps
viewfunction yThorPreciseBps() view returns (uint32)
yThorToken
viewfunction yThorToken() view returns (address)
cancelPendingDistribution
nonpayablefunction cancelPendingDistribution()
distribute
nonpayablefunction distribute(string runeDonationMemo)
emergencyRecoverToken
nonpayablefunction emergencyRecoverToken(address token, uint256 amount)
setExecutor
nonpayablefunction setExecutor(address owner, bool active)
setOwner
nonpayablefunction setOwner(address owner, bool active)
setShares
nonpayablefunction setShares(uint32 _treasuryPreciseBps, uint32 _communityPreciseBps)
setTCRouter
nonpayablefunction setTCRouter(address _tcRouterAddress)
setThreshold
nonpayablefunction setThreshold(uint256 amount)
setTreasuryWallet
nonpayablefunction setTreasuryWallet(address _treasuryWallet)
swapToRune
nonpayablefunction swapToRune(address inboundAddress, string thorBuybackMemo, string runeMemo)
events
Distribution
event Distribution(uint256 totalAmount, uint256 treasuryAmount, uint256 uThorAmount, uint256 yThorAmount, uint256 vThorAmount, uint256 thorPoolAmount)
ExecutorSet
event ExecutorSet(address indexed executor, bool active)
OwnerSet
event OwnerSet(address indexed owner, bool active)
PendingDistributionCancelled
event PendingDistributionCancelled(uint256 timestamp)
SwapToRuneInitiated
event SwapToRuneInitiated(uint256 totalAmount, uint256 runeSwapAmount, uint256 thorSwapAmount, uint32 uThorBps, uint32 yThorBps, uint32 vThorBps, uint32 thorPoolBps)
errors
No errors.
creation bytecode
0x6080604081815234620002fa5760e082620021eb8038038091620000248285620002ff565b833981010312620002fa576200003a8262000339565b6020906200004a82850162000339565b6200005784860162000339565b91620000666060870162000339565b92620000756080880162000339565b936200009260c06200008a60a08b0162000339565b990162000339565b60018060a01b03808095169181808060018060a01b031999868b600254161760025516998a8a600354161760035581600497168a885416178755169b8c896005541617600555168760075416176007551680866006541617600655660393870001312d60a51b600160a01b600160e01b0319600854161760085588519963095ea7b360e01b92838c52848c01526000199a8b602482015289816044816000809d5af18015620002f05760448c938c938f93620002ce575b508b8a60035416955195869485938a85528b85015260248401525af18015620002c457620002a2575b50878a60448760035416938a8d5195869485938985528a85015260248401525af1801562000298579160449189949362000276575b50878684541687600754169c8c519d8e968795865285015260248401525af19687156200026c57869796959662000238575b506404a817c8006009551690600854161760085533815280835220600160ff198254161790557ff74826f11048fa8ecf33e91132bf280f6582ed97548a84e426b56e98526b9316825191600183523392a251611e829081620003698239f35b6200025c90873d891162000264575b620002538183620002ff565b8101906200034e565b5038620001d9565b503d62000247565b86513d86823e3d90fd5b6200029090853d87116200026457620002538183620002ff565b5038620001a7565b89513d89823e3d90fd5b620002bc90893d8b116200026457620002538183620002ff565b503862000172565b8a513d8a823e3d90fd5b620002e890853d87116200026457620002538183620002ff565b503862000149565b8b513d8b823e3d90fd5b600080fd5b601f909101601f19168101906001600160401b038211908210176200032357604052565b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b0382168203620002fa57565b90816020910312620002fa57518015158103620002fa579056fe61018080604052600436101561001457600080fd5b600061014052610140513560e01c9081630134aeba146118c357508063022914a71461187e57806308a199da146117925780630ee56f781461176757806318ff318d1461173c5780631a753866146117145780631e1bff3f146116935780632b66d78a1461166a5780632c40f7471461164a5780634626402b1461161f578063516c731c1461158c57806353ba352c146115615780635d84969e1461153857806377e591fb146111a25780637902019414610fb25780637c33c06b14610f3857806386e0c63314610f0d5780638a5ad542146106255780638de7386414610605578063960bfe04146105c75780639ac2a011146105845780639c22b9a6146104ef578063a8602fea14610445578063ab4d60231461041c578063ac21d47a146103f1578063b26f9a09146103cb578063b37b50e3146102e0578063cfc6dee8146102b7578063d94a42d31461028c5763de0e14351461017257600080fd5b34610285576101405136600319011261028557336101405152610140516020526101a560ff604061014051205416611b5f565b6101b360ff600b5416611bb2565b600c5462015180810180821161026b574211156102265760207f18f688726e6ca19a212dbb115f67c79ad15f8ffefcd4eac589e69d816869667591604051908152a161021f600080600b5580600c5580600d5580600e5580600f55806010558060115580601255601355565b6101405180f35b60405162461bcd60e51b815260206004820152601c60248201527f446973747269627574696f6e206e6f74206578706972656420796574000000006044820152606490fd5b634e487b7160e01b61014051526011600452602461014051fd5b6101405180fd5b346102855761014051366003190112610285576005546040516001600160a01b039091168152602090f35b34610285576101405136600319011261028557602063ffffffff600a5460601c16604051908152f35b346102855760403660031901126102855760043563ffffffff80821682036103c6576024359080821682036103c65762989680903361014051526101405160205261033460ff604061014051205416611b5f565b61033e8385611e34565b1603610382576008805467ffffffffffffffff60a01b191660a09390931b63ffffffff60a01b169290921760c09190911b63ffffffff60c01b161790556101405180f35b606460405162461bcd60e51b815260206004820152602060248201527f536861726573206d7573742061646420757020746f2031305f3030305f3030306044820152fd5b600080fd5b34610285576101405136600319011261028557602063ffffffff600a5416604051908152f35b346102855761014051366003190112610285576002546040516001600160a01b039091168152602090f35b34610285576101405136600319011261028557602063ffffffff600a5460401c16604051908152f35b346102855760203660031901126102855761045e6119e1565b3361014051526101405160205261047e60ff604061014051205416611b5f565b6001600160a01b031680156104aa576001600160601b0360a01b60085416176008556101405161014051f35b60405162461bcd60e51b815260206004820152601760248201527f496e76616c69642074726561737572792077616c6c65740000000000000000006044820152606490fd5b3461028557610140513660031901126102855761018060ff600b5416600c54600d54600e54600f5460105460115491601254936013549563ffffffff976040519915158a5260208a015260408901526060880152608087015260a086015260c085015260e0840152818116610100840152818160201c16610120840152818160401c1661014084015260601c16610160820152f35b34610285576020366003190112610285576001600160a01b036105a56119e1565b1661014051526001602052602060ff6040610140512054166040519015158152f35b3461028557602036600319011261028557336101405152610140516020526105f860ff604061014051205416611b5f565b6004356009556101405180f35b346102855761014051366003190112610285576020600954604051908152f35b346102855760603660031901126102855761063e6119e1565b60c05267ffffffffffffffff60243581811161028557610662903690600401611a26565b60a052906044359081116102855761067e903690600401611a26565b60e0526101005233610140515260016020526106a360ff604061014051205416611b5f565b600b5460ff8116610ec8576003546040516370a0823160e01b815230600482015292906001600160a01b0316602084602481845afa938415610c8a576101405194610e94575b506009548410610e4f576004546001600160a01b0316928315610e15576005546040516370a0823160e01b81526001600160a01b03909116600482015290602082602481885afa918215610c8a576101405192610de1575b506007546040516370a0823160e01b81526001600160a01b039091166004820152602081602481895afa908115610c8a576101405191610daf575b506006546040516370a0823160e01b81526001600160a01b039091166004820152926020846024818a5afa938415610c8a576101405194610d7b575b506024602060018060a01b036002541698604051928380926370a0823160e01b82528c60048301525afa8015610c8a576101405190610d47575b61080a9150610805846108058886611bf8565b611bf8565b8015610d09578061084367ffffffff000000006108618361084363ffffffff610848610876986108436008549b848d60c01c1690611db3565b611dc6565b169a600a546101605263ffffffff8960c01c1690611db3565b60201b169463ffffffff8560c01c1690611db3565b60401b9263ffffffff6108c163ffffffff60401b8616876001600160601b0319610160511617861717826108b6818360201c168a610140518b1617611e34565b9160401c1690611e34565b1663ffffffff8360c01c16039163ffffffff831161026b5763ffffffff60601b8360601b16866001600160801b0319610160511617851763ffffffff60401b87161717600a5560a01c63ffffffff1661091a908a611db3565b62989680900485610140518460601b1617610935908b611db3565b6298968090049063ffffffff60601b8460601b16876001600160801b0319610160511617861763ffffffff60401b8816171760201c63ffffffff1661097a908c611db3565b6298968090049263ffffffff60601b8560601b16886001600160801b0319610160511617871763ffffffff60401b8916171760401c63ffffffff166109bf908d611db3565b6298968090046101205263ffffffff60601b8560601b16886001600160801b0319610160511617871763ffffffff60401b8916171760601c63ffffffff16610a07908d611db3565b629896809004608052604051610a1c81611a54565b600181524260208201528c60408201528260608201528360808201528460a08201526101205160c082015260805160e082015288610140518760601b161761010082015263ffffffff60601b8660601b16896001600160801b0319610160511617881763ffffffff60401b8a16171760201c63ffffffff1661012082015263ffffffff60601b8660601b16896001600160801b0319610160511617881763ffffffff60401b8a16171760401c63ffffffff1661014082015263ffffffff60601b8660601b16896001600160801b0319610160511617881763ffffffff60401b8a16171760601c63ffffffff1690610160015260ff1916600117600b5542600c558a600d55600e55600f55601055610120516011556080516012556013549063ffffffff60601b8160601b169463ffffffff60601b1991610140519060601b1663ffffffff161716906001600160801b03191617179063ffffffff60401b16171760135561012051610c98575b505050608051610c05575b60e07f54970141f2db6e89be6a424e53748215e66cc4a1181215dfe55ab0ecacb7f5549163ffffffff600a5460405192835260805160208401526101205160408401528181166060840152818160201c166080840152818160401c1660a084015260601c1660c0820152a16101405180f35b6002546003546001600160a01b039182169116813b156102855760405180926344bc937b60e01b82528180610c59610140519560e0519061010051906080519060018060a01b0360c0511660048701611de6565b039161014051905af18015610c8a57610c73575b50610b93565b610c7c90611a87565b610140516102855781610c6d565b6040513d61014051823e3d90fd5b823b1561028557610cd79260405180809581946344bc937b60e01b8352610140519660a05191610120519060018060a01b0360c0511660048701611de6565b039161014051905af18015610c8a57610cf2575b8080610b88565b610cfb90611a87565b610140516102855781610ceb565b60405162461bcd60e51b8152602060048201526016602482015275139bc8151213d48818985b185b98d95cc8199bdd5b9960521b6044820152606490fd5b506020813d602011610d73575b81610d6160209383611ab7565b810103126103c65761080a90516107f2565b3d9150610d54565b9093506020813d602011610da7575b81610d9760209383611ab7565b810103126103c6575192886107b8565b3d9150610d8a565b90506020813d602011610dd9575b81610dca60209383611ab7565b810103126103c657518761077c565b3d9150610dbd565b9091506020813d602011610e0d575b81610dfd60209383611ab7565b810103126103c657519086610741565b3d9150610df0565b60405162461bcd60e51b8152602060048201526012602482015271151213d4881d1bdad95b881b9bdd081cd95d60721b6044820152606490fd5b60405162461bcd60e51b815260206004820152601760248201527f42616c616e63652062656c6f77207468726573686f6c640000000000000000006044820152606490fd5b9093506020813d602011610ec0575b81610eb060209383611ab7565b810103126103c6575192846106e9565b3d9150610ea3565b60405162461bcd60e51b815260206004820152601c60248201527f446973747269627574696f6e20616c72656164792070656e64696e67000000006044820152606490fd5b346102855761014051366003190112610285576006546040516001600160a01b039091168152602090f35b34610285576101405136600319011261028557610f53611c1b565b60405191151582528160206040602083015282519081604084015261014051935b828510610f995750506060925061014051838284010152601f80199101168101030190f35b8481018201518686016060015293810193859350610f74565b3461028557604036600319011261028557610fcb6119e1565b602435336101405152602091610140518352610ff060ff604061014051205416611b5f565b60ff600b541661114a576003546001600160a01b03918216911681811480159185916110d7575b5050156110885760405163a9059cbb60e01b8152336004820152602481019290925261014051839183916044918391905af18015610c8a5761105a576101405180f35b8161107992903d10611081575b6110718183611ab7565b810190611b9a565b50808061021f565b503d611067565b60405162461bcd60e51b815260048101849052602160248201527f43616e6e6f74207265636f76657220646973747269627574696f6e2066756e646044820152607360f81b6064820152608490fd5b6040516370a0823160e01b81523060048201529250829060249082905afa908115610c8a57610140519161111d575b50600954810390811161026b578211158385611017565b90508381813d8311611143575b6111348183611ab7565b810103126103c6575184611106565b503d61112a565b60405162461bcd60e51b815260048101849052602a60248201527f43616e6e6f74207265636f76657220647572696e672070656e64696e6720646960448201526939ba3934b13aba34b7b760b11b6064820152608490fd5b34610285576020806003193601126102855760043567ffffffffffffffff8111610285576111d4903690600401611a26565b5050336101405152600181526111f360ff604061014051205416611b5f565b61120160ff600b5416611bb2565b600c5462015180810180911161026b5742116114f45761121f611ad9565b9060608201908151818161148c575b5050608083019283518061143c575b5060a08101938451806113e4575b5060249060018060a01b03848160045416604051948580926370a0823160e01b82523060048301525afa928315610c8a5761014051936113b5575b50821515806113a8575b611338575b50907f6d6a2972794287cd64d186746a477049175cdd308ec060105d3fd34c6d1b99519560c0959493926112e9600080600b5580600c5580600d5580600e5580600f55806010558060115580601255601355565b604084015195519051915187850151909360e091908181106113305750945b01519460405196875286015260408501526060840152608083015260a0820152a16101405180f35b905094611308565b60c08401518084106113a057905b60075416803b1561028557604051916345efb3f960e11b8352600483015281602481610140519361014051905af18015610c8a57156112955761138e90959493929195611a87565b61014051610285579091929386611295565b508290611346565b5060c08401511515611290565b9092508481813d83116113dd575b6113cd8183611ab7565b810103126103c657519187611286565b503d6113c3565b6006546001600160a01b0316803b1561028557604051916345efb3f960e11b8352600483015281602481610140519361014051905af18015610c8a571561124b5761142e90611a87565b61014051610285578561124b565b6005546001600160a01b0316803b1561028557604051916345efb3f960e11b8352600483015281602481610140519361014051905af18015610c8a571561123d5761148690611a87565b8461123d565b60035460085460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810194909452610140518492604492849291165af18015610c8a576114d7575b8161122e565b6114ed90823d8411611081576110718183611ab7565b50836114d1565b6064906040519062461bcd60e51b82526004820152601c60248201527f50656e64696e6720646973747269627574696f6e2065787069726564000000006044820152fd5b34610285576101405136600319011261028557602063ffffffff60085460a01c16604051908152f35b346102855761014051366003190112610285576003546040516001600160a01b039091168152602090f35b346102855760207ff74826f11048fa8ecf33e91132bf280f6582ed97548a84e426b56e98526b93166115bd366119f7565b92903361014051526101405182526115de60ff604061014051205416611b5f565b60018060a01b03169283610140515261014051825261160f81604061014051209060ff801983541691151516179055565b6040519015158152a26101405180f35b346102855761014051366003190112610285576008546040516001600160a01b039091168152602090f35b346102855761014051366003190112610285576020604051620151808152f35b34610285576101405136600319011261028557602063ffffffff60085460c01c16604051908152f35b346102855760207f278b09622564dd3991fe7744514513d64ea2c8ed2b2b9ec1150ad964fde80a996116c4366119f7565b92903361014051526101405182526116e560ff604061014051205416611b5f565b60018060a01b0316928361014051526001825261160f81604061014051209060ff801983541691151516179055565b346102855761014051366003190112610285576020600a5463ffffffff60405191831c168152f35b346102855761014051366003190112610285576004546040516001600160a01b039091168152602090f35b346102855761014051366003190112610285576007546040516001600160a01b039091168152602090f35b3461028557602080600319360112610285576117ac6119e1565b3361014051526101405182526117cb60ff604061014051205416611b5f565b60018060a01b0380911690816001600160601b0360a01b600254161760025580600354169160405191848360448163095ea7b360e01b9788825286600483015261014051602483015261014051905af1908115610c8a578593604492611861575b506003541693604051948593849283526004830152600019602483015261014051905af18015610c8a5761105a576101405180f35b61187790853d8711611081576110718183611ab7565b508661182c565b34610285576020366003190112610285576001600160a01b0361189f6119e1565b16610140515261014051602052602060ff6040610140512054166040519015158152f35b34610285576101405136600319011261028557806118e361018092611a54565b6101405181526101405160208201526101405160408201526101405160608201526101405160808201526101405160a08201526101405160c08201526101405160e08201526101009061014051828201526101209161014051838301526101409161014051838201526101609283918261014051910152611962611ad9565b90604051958251151587526020830151602088015260408301516040880152606083015160608801526080830151608088015260a083015160a088015260c083015160c088015260e083015160e0880152848301519463ffffffff80961690880152848184015116908701528381830151169086015201511690820152f35b600435906001600160a01b03821682036103c657565b60409060031901126103c6576004356001600160a01b03811681036103c6579060243580151581036103c65790565b9181601f840112156103c65782359167ffffffffffffffff83116103c657602083818601950101116103c657565b610180810190811067ffffffffffffffff821117611a7157604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff8111611a7157604052565b6040810190811067ffffffffffffffff821117611a7157604052565b90601f8019910116810190811067ffffffffffffffff821117611a7157604052565b60405190611ae682611a54565b8160ff600b541615158152600c546020820152600d546040820152600e546060820152600f54608082015260105460a082015260115460c082015260125460e082015261016060135463ffffffff90818116610100850152818160201c16610120850152818160401c1661014085015260601c16910152565b15611b6657565b60405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606490fd5b908160209103126103c6575180151581036103c65790565b15611bb957565b60405162461bcd60e51b81526020600482015260176024820152762737903832b73234b733903234b9ba3934b13aba34b7b760491b6044820152606490fd5b91908201809211611c0557565b634e487b7160e01b600052601160045260246000fd5b60ff600b541615611d7d57600c54620151808101809111611c05574211611d4a5760018060a01b036004541690604091825180916370a0823160e01b825230600483015281602460209485935afa908115611d3f57600091611d12575b5060115411611cb357752932b0b23c903337b9103234b9ba3934b13aba34b7b760511b6001935191611ca983611a9b565b6016835282015290565b916000928151916060830183811067ffffffffffffffff821117611a71576a686f72207265776172647360a81b927f496e73756666696369656e742054484f522062616c616e636520666f72207654918352602b855284015282015290565b90508181813d8311611d38575b611d298183611ab7565b810103126103c6575138611c78565b503d611d1f565b84513d6000823e3d90fd5b600090604051611d5981611a9b565b6014815273111a5cdd1c9a589d5d1a5bdb88195e1c1a5c995960621b602082015290565b600090604051611d8c81611a9b565b60178152762737903832b73234b733903234b9ba3934b13aba34b7b760491b602082015290565b81810292918115918404141715611c0557565b8115611dd0570490565b634e487b7160e01b600052601260045260246000fd5b95949260c09491849360018060a01b038092168952166020880152604087015260a060608701528160a0870152838601376000828286010152601f8019910116830101916080600019910152565b91909163ffffffff80809416911601918211611c055756fea2646970667358221220247de117b1922e4edfccbe38cf1fc07dff73201622f57f03418dd927b45ad2e664736f6c63430008160033000000000000000000000000d37bbe5744d730a1d98d8dc97c42f0ca46ad7146000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000c85fef7a1b039a9e080aadf80ff6f1536dada088000000000000000000000000a5f2211b9b8170f694421f2046281775e846804400000000000000000000000034deff97889f3a6a483e3b9255cafcb9a6e03588000000000000000000000000815c23eca83261b6ec689b60cc4a58b54bc24d8d0000000000000000000000008793cd69895c45b2d2474236b3cb28fc5c764775