diff --git a/ABIs/gauge.json b/ABIs/gauge.json new file mode 100644 index 0000000..8d6792e --- /dev/null +++ b/ABIs/gauge.json @@ -0,0 +1,312 @@ +[ + { + "inputs": [ + { "internalType": "address", "name": "_token", "type": "address" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "name": "RewardAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "name": "RewardPaid", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Staked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdrawn", + "type": "event" + }, + { + "inputs": [], + "name": "DILL", + "outputs": [ + { "internalType": "contract IERC20", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DISTRIBUTION", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DURATION", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PICKLE", + "outputs": [ + { "internalType": "contract IERC20", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TOKEN", + "outputs": [ + { "internalType": "contract IERC20", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TREASURY", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "depositAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "depositFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "derivedBalance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "derivedBalances", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "derivedSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "earned", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "exit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getReward", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getRewardForDuration", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "kick", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lastTimeRewardApplicable", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastUpdateTime", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "reward", "type": "uint256" } + ], + "name": "notifyRewardAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "periodFinish", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardPerToken", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardPerTokenStored", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardRate", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "rewards", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "userRewardPerTokenPaid", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/ABIs/gaugeproxy.json b/ABIs/gaugeproxy.json new file mode 100644 index 0000000..db5e27b --- /dev/null +++ b/ABIs/gaugeproxy.json @@ -0,0 +1,218 @@ +[ + { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, + { + "inputs": [], + "name": "DILL", + "outputs": [ + { "internalType": "contract IERC20", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MASTER", + "outputs": [ + { "internalType": "contract MasterChef", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PICKLE", + "outputs": [ + { "internalType": "contract IERC20", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TOKEN", + "outputs": [ + { "internalType": "contract IERC20", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptGovernance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_token", "type": "address" } + ], + "name": "addGauge", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "collect", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "distribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "gauges", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_token", "type": "address" } + ], + "name": "getGauge", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governance", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "length", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingGovernance", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pid", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" } + ], + "name": "poke", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "reset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_governance", "type": "address" } + ], + "name": "setGovernance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_pid", "type": "uint256" } + ], + "name": "setPID", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "name": "tokenVote", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokens", + "outputs": [ + { "internalType": "address[]", "name": "", "type": "address[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalWeight", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "usedWeights", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_tokenVote", + "type": "address[]" + }, + { "internalType": "uint256[]", "name": "_weights", "type": "uint256[]" } + ], + "name": "vote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "votes", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "weights", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + } +] diff --git a/maaplust.json b/maaplust.json new file mode 100644 index 0000000..9b0ee82 --- /dev/null +++ b/maaplust.json @@ -0,0 +1,57 @@ +{ + "0xaCfE4511CE883C14c4eA40563F176C3C09b4c47C": { + "rawValue": "830746442795363301", + "value": "0.830746442795363301", + "luna": 0.004920905963190509 + }, + "0xA1EFa0adEcB7f5691605899d13285928AE025844": { + "rawValue": "1765959582868491590534", + "value": "1765.959582868491590534", + "luna": 7.188915896623463 + }, + "0x5275817b74021E97c980E95EdE6bbAc0D0d6f3a2": { + "rawValue": "3203978666038649085129", + "value": "3203.978666038649085129", + "luna": 18.97868821513414 + }, + "0xE551388B683BB1E34e27E5a7b00eaBE79b080Bf7": { + "rawValue": "943661752798194722826", + "value": "943.661752798194722826", + "luna": 5.2437070046039524 + }, + "0x552A41f4F9520EFBb74c1fC0E5a03F9421A76f1E": { + "rawValue": "1446257607616455887230", + "value": "1446.25760761645588723", + "luna": 8.566871092077186 + }, + "0x38285825A026D7fA92dA7B8aE49A049C30770A15": { + "rawValue": "0", + "value": "0.0", + "luna": 3.3596153875848462 + }, + "0xB8f98D08f1A456d1EC9417e5eaF46fc2eDe9c0a1": { + "rawValue": "2897615858377587006548", + "value": "2897.615858377587006548", + "luna": 17.16395571739838 + }, + "0x80629DE4EA833C62597964FD1b09E9d097F9C2B2": { + "rawValue": "0", + "value": "0.0", + "luna": 13.762473006529397 + }, + "0x38C7dAFfc73fb9d4057F31118cBEE74Edc19665D": { + "rawValue": "0", + "value": "0.0", + "luna": 16.883742835108947 + }, + "0x614D98a57A5D879D717152dE0690ed2b04562adE": { + "rawValue": "17562256881253126004503", + "value": "17562.256881253126004503", + "luna": 71.49290895386666 + }, + "0xbc3c5Fb793DE124ED40CFF2ED073f4ACa366ED8C": { + "rawValue": "22407080419423444465", + "value": "22.407080419423444465", + "luna": 0.018700985109828098 + } +} \ No newline at end of file diff --git a/mbabaust.json b/mbabaust.json new file mode 100644 index 0000000..f1d0505 --- /dev/null +++ b/mbabaust.json @@ -0,0 +1,47 @@ +{ + "0xA1EFa0adEcB7f5691605899d13285928AE025844": { + "rawValue": "1754192397640881729555", + "value": "1754.192397640881729555", + "luna": 16.42890120801941 + }, + "0x9bBA6257036C367e76baA8916725913a1aD60912": { + "rawValue": "16885147062848368703", + "value": "16.885147062848368703", + "luna": 0.15813796328810972 + }, + "0x5275817b74021E97c980E95EdE6bbAc0D0d6f3a2": { + "rawValue": "2141465701651993776243", + "value": "2141.465701651993776243", + "luna": 20.05591205395535 + }, + "0x28552Ea8B232Fc63d6ce69692D8A723eFc5D4502": { + "rawValue": "0", + "value": "0.0", + "luna": 0.12189699731102345 + }, + "0x8181bf635957e37aa25320B3299285Bf942cd141": { + "rawValue": "5224549033007361675534", + "value": "5224.549033007361675534", + "luna": 33.54263673891601 + }, + "0xE14B67fF72Ad34FFF91622F9A634F205810701e0": { + "rawValue": "0", + "value": "0.0", + "luna": 1.3578918989340047 + }, + "0x80629DE4EA833C62597964FD1b09E9d097F9C2B2": { + "rawValue": "0", + "value": "0.0", + "luna": 12.808483585395791 + }, + "0xb2F22B8f50b8E57494cAEea95B4A1A892F32157E": { + "rawValue": "114796010285877921766", + "value": "114.796010285877921766", + "luna": 0.6423879687548142 + }, + "0x614D98a57A5D879D717152dE0690ed2b04562adE": { + "rawValue": "13858027110794385991523", + "value": "13858.027110794385991523", + "luna": 77.54825158542548 + } +} \ No newline at end of file diff --git a/mirust.json b/mirust.json new file mode 100644 index 0000000..88be1ce --- /dev/null +++ b/mirust.json @@ -0,0 +1,232 @@ +{ + "0xFb8335f09904A761a49C9c1C9b1308AC0A3D780D": { + "rawValue": "345138641871790539484", + "value": "345.138641871790539484", + "luna": 0.8727883811368167 + }, + "0xB6647caE065c321e75775B50a25fd54e9ac5C436": { + "rawValue": "13875578022522560201942", + "value": "13875.578022522560201942", + "luna": 35.08863340811821 + }, + "0x3C7108FAD72AbA31e2Fa59dFBc458b54F58d9966": { + "rawValue": "2139100327856181018146", + "value": "2139.100327856181018146", + "luna": 5.409367963302012 + }, + "0xE3E39161d35E9A81edEc667a5387bfAE85752854": { + "rawValue": "2991008474077722315676", + "value": "2991.008474077722315676", + "luna": 7.563677685869005 + }, + "0x6B512B3237430B1a7B5C718Aa63602311a7a8699": { + "rawValue": "142152011513295093895", + "value": "142.152011513295093895", + "luna": 0.3594747413131416 + }, + "0x7502af434f59E4E1DfD371E15e9183ebb6501AC0": { + "rawValue": "402086120880759094166", + "value": "402.086120880759094166", + "luna": 1.0167974603419316 + }, + "0xff3b47a66d1CD6544ee91dd5a69dB660BB4a867d": { + "rawValue": "1508160310206277342424", + "value": "1508.160310206277342424", + "luna": 3.8138435861629976 + }, + "0xdebccc195e08Ab253ea31917DefFBF5121b1cE3A": { + "rawValue": "711742418602098196983", + "value": "711.742418602098196983", + "luna": 1.7998579062291342 + }, + "0xB774ccBb0E559129c43E5e8C4F10227645ab3ab1": { + "rawValue": "564645932136994512210", + "value": "564.64593213699451221", + "luna": 1.4278795511063174 + }, + "0x485f5df0654c8405d6124821E95F093aDEc1b16b": { + "rawValue": "155558986040484861175", + "value": "155.558986040484861175", + "luna": 0.393378367780662 + }, + "0x92f93FaDcACb86F6Bd163A87a0944341B838CC62": { + "rawValue": "330906480177490414712", + "value": "330.906480177490414712", + "luna": 0.8367980170967916 + }, + "0xC16623Cb1505c57C56B3dd9633DbB43991ab2804": { + "rawValue": "30811542439637181047", + "value": "30.811542439637181047", + "luna": 0.07791638774602594 + }, + "0x41de0fF7e391b304ED0033819E91046853e14656": { + "rawValue": "2874547163287360003715", + "value": "2874.547163287360003715", + "luna": 5.999294014427619 + }, + "0xdE708DEcb61D06eE30a95051DD203f43e0D44c70": { + "rawValue": "0", + "value": "0.0", + "luna": 2.007510770530006 + }, + "0x230c40fF3dD28910a959FE135342ce9E8250ED12": { + "rawValue": "50434855137559827798246", + "value": "50434.855137559827798246", + "luna": 99.74277842603247 + }, + "0x604115C5E484FD8ADfd79123817e48257c96a925": { + "rawValue": "241283781404729797484", + "value": "241.283781404729797484", + "luna": 0.6101596732974104 + }, + "0xe0e5D2d2AE5a629928D452fFa325D1083AAC3997": { + "rawValue": "1869846182146132892983", + "value": "1869.846182146132892983", + "luna": 4.728476688206985 + }, + "0xdF7495fc2EAf599A8105044D480Ad5C97488a5F1": { + "rawValue": "885744615968644995952", + "value": "885.744615968644995952", + "luna": 2.239875562120043 + }, + "0xcEE50f8FA88CA2B05c4ef67A45832ef3833760eF": { + "rawValue": "714356168366801778616", + "value": "714.356168366801778616", + "luna": 1.8064675701411796 + }, + "0xccFeee24dDb48ef826Bbe63674AE13925D22AEca": { + "rawValue": "2667298020302532490573", + "value": "2667.298020302532490573", + "luna": 6.745077017525224 + }, + "0x806388E04b7583a0148451A8ECd29A748b8fd584": { + "rawValue": "6547419995405553912442", + "value": "6547.419995405553912442", + "luna": 16.55714951945491 + }, + "0xb153d4c31Ae85C8591f1B80a0E068cf8d08714e2": { + "rawValue": "205561831936068556471", + "value": "205.561831936068556471", + "luna": 0.5198258228808996 + }, + "0xbE93d14C5dEFb8F41aF8FB092F58e3C71C712b85": { + "rawValue": "345842214935396484093", + "value": "345.842214935396484093", + "luna": 0.8745675803359148 + }, + "0x5be28e441F325D8B005839fD69695884f11da063": { + "rawValue": "389269403081706972585", + "value": "389.269403081706972585", + "luna": 0.9843864781387929 + }, + "0xb25a5657838004321B3cf7676A34954979415dD6": { + "rawValue": "3725290889407734572003", + "value": "3725.290889407734572003", + "luna": 9.42053485230353 + }, + "0xdcC333CcE887c856e7DE7afe683FDB4641C5f0ad": { + "rawValue": "404543176733054067836", + "value": "404.543176733054067836", + "luna": 1.023010875878532 + }, + "0xD2357FffBcdC3780835CEFf1447c357C413DDD65": { + "rawValue": "16502575200102342", + "value": "0.016502575200102342", + "luna": 0.000041731797446222714 + }, + "0x87885AaEEdED51C7e3858a782644F5d89759f245": { + "rawValue": "966242993978299600482", + "value": "966.242993978299600482", + "luna": 2.443440276421969 + }, + "0x91fC4b647Ff0b2D1c3BE38C1DfFdE42c0292AaBd": { + "rawValue": "4532689174049118963138", + "value": "4532.689174049118963138", + "luna": 11.462287806893206 + }, + "0x14866CCdffBc8c349a5923B85B25672752386d8d": { + "rawValue": "429376914353153776229", + "value": "429.376914353153776229", + "luna": 1.085810559905436 + }, + "0x45d09A3fc6103d8f08f208247333C31BF8eBCbeA": { + "rawValue": "2462036726384624628528", + "value": "2462.036726384624628528", + "luna": 6.226011196737739 + }, + "0xD8eD830E33859AF668Bf4bF1550DFe4CC9984157": { + "rawValue": "2967412428591610235020", + "value": "2967.41242859161023502", + "luna": 7.504007884106546 + }, + "0x577BE3eD9A71E1c355f519BBDF5f09Ba2018b1Cc": { + "rawValue": "227006008077430929416", + "value": "227.006008077430929416", + "luna": 0.574053966324151 + }, + "0xb2F22B8f50b8E57494cAEea95B4A1A892F32157E": { + "rawValue": "941368548327114613776", + "value": "941.368548327114613776", + "luna": 2.184876608749259 + }, + "0x9c48c15556719B287eF1286f6375FEF24AE4d666": { + "rawValue": "276624449789708052098", + "value": "276.624449789708052098", + "luna": 0.6420336549672447 + }, + "0xd164ff4c786d851A0E2d2Fc1BF78370DC9cc1d80": { + "rawValue": "6825091773923489489749", + "value": "6825.091773923489489749", + "luna": 15.840749508693674 + }, + "0x39eEb91D9e1eF80170A99AD0221Bb20a0FEF1b8e": { + "rawValue": "625749140443024843854", + "value": "625.749140443024843854", + "luna": 1.4523373043729937 + }, + "0x81aFcF6Dd79897cBa488471eCEc2f41BF3f7CA9B": { + "rawValue": "199310250930502860926", + "value": "199.310250930502860926", + "luna": 0.4625906675083441 + }, + "0x80629DE4EA833C62597964FD1b09E9d097F9C2B2": { + "rawValue": "0", + "value": "0.0", + "luna": 2.7120392997033025 + }, + "0xC0585729465EF60A88fCF94D017b22F1257da57f": { + "rawValue": "559452567476528128928", + "value": "559.452567476528128928", + "luna": 1.1941952997141978 + }, + "0x442361621cb03C92CD10455B08eB1B91602399C0": { + "rawValue": "1314827638221399195996", + "value": "1314.827638221399195996", + "luna": 2.3191137166410103 + }, + "0x8d07D225a769b7Af3A923481E1FdF49180e6A265": { + "rawValue": "733526162280232360978", + "value": "733.526162280232360978", + "luna": 1.2938050091191338 + }, + "0x773213f778C690cf85aF3214A932c6d0706e1A41": { + "rawValue": "263650250344097757392", + "value": "263.650250344097757392", + "luna": 0.41709463080955617 + }, + "0x3B410AF25d51CE5a21D093842e452B0d7DE9ed59": { + "rawValue": "2229049593486603151718", + "value": "2229.049593486603151718", + "luna": 0.7067025594299625 + }, + "0x553E92c5910408e00bcc6D399ad9f41ED7Efa8a9": { + "rawValue": "4079342962388158369675", + "value": "4079.342962388158369675", + "luna": 0.6353335940040132 + }, + "0xFe4e914e30F478b1CD048A84a8E50F0C58b1eE3F": { + "rawValue": "201910806478650793368", + "value": "201.910806478650793368", + "luna": 0.03144641662421807 + } +} \ No newline at end of file diff --git a/mqqqust.json b/mqqqust.json new file mode 100644 index 0000000..500a21a --- /dev/null +++ b/mqqqust.json @@ -0,0 +1,67 @@ +{ + "0xaCfE4511CE883C14c4eA40563F176C3C09b4c47C": { + "rawValue": "54791648769479665", + "value": "0.054791648769479665", + "luna": 0.0005426861684138676 + }, + "0xA1EFa0adEcB7f5691605899d13285928AE025844": { + "rawValue": "1519743330305513866146", + "value": "1519.743330305513866146", + "luna": 15.052361142954481 + }, + "0x5275817b74021E97c980E95EdE6bbAc0D0d6f3a2": { + "rawValue": "1784324143051895744875", + "value": "1784.324143051895744875", + "luna": 17.672912827925092 + }, + "0x3695F64a232921909F7E986E756db827cE5D9aF3": { + "rawValue": "207546734255829232178", + "value": "207.546734255829232178", + "luna": 2.0556552779419093 + }, + "0xCF7D96549aAc0f17540E36F50A3Fe1B401035fBC": { + "rawValue": "0", + "value": "0.0", + "luna": 1.1974572042711138 + }, + "0xaDf76760f1D6B984E39C27c87D5F9661cEFc5A21": { + "rawValue": "2755674672000746185623", + "value": "2755.674672000746185623", + "luna": 21.940155432016976 + }, + "0x7c554a32D176a6c028Fbf0D84248F528Ab3eEB07": { + "rawValue": "111778658756922566069", + "value": "111.778658756922566069", + "luna": 1.107116383492225 + }, + "0xf486d56ccE70c481b3455aF901fCC4F03FeE8107": { + "rawValue": "0", + "value": "0.0", + "luna": 16.619758799955054 + }, + "0x734bBd2BC0084776D2DDBEC6e03680a46fd06f1F": { + "rawValue": "13221005286332851116", + "value": "13.221005286332851116", + "luna": 0.13094799777985264 + }, + "0x614D98a57A5D879D717152dE0690ed2b04562adE": { + "rawValue": "10284055271064824423074", + "value": "10284.055271064824423074", + "luna": 68.20245512251674 + }, + "0x9064F45ddB3875B83cE86602330E493e6aBDA6F1": { + "rawValue": "333329020236532920787", + "value": "333.329020236532920787", + "luna": 1.5997366301527067 + }, + "0x79320de2e3a2D1B644F655d990dc5A51CC91d74b": { + "rawValue": "16308229204523841173596", + "value": "16308.229204523841173596", + "luna": 16.995069912887118 + }, + "0x6Fd67A58e636b1132Ed1Eb623234E0fC96eb8f21": { + "rawValue": "130019927129953033319", + "value": "130.019927129953033319", + "luna": 0.09033058193831281 + } +} \ No newline at end of file diff --git a/mslvust.json b/mslvust.json new file mode 100644 index 0000000..667f55f --- /dev/null +++ b/mslvust.json @@ -0,0 +1,92 @@ +{ + "0x5be10f3434bC1aC6C0A34f86Da39Ea0095392f21": { + "rawValue": "641024022166", + "value": "0.000000641024022166", + "luna": 2.2337414469000007e-9 + }, + "0xbd1293983CBDc189f986bAfDA8cbf9f37fb30E2C": { + "rawValue": "107221256242224040362", + "value": "107.221256242224040362", + "luna": 0.37362807869607834 + }, + "0x41de0fF7e391b304ED0033819E91046853e14656": { + "rawValue": "635474247883549696127", + "value": "635.474247883549696127", + "luna": 2.2144025412385075 + }, + "0x5275817b74021E97c980E95EdE6bbAc0D0d6f3a2": { + "rawValue": "6737280692467067967270", + "value": "6737.28069246706796727", + "luna": 23.477035515009753 + }, + "0x8E135A49282863157BdB05063a54FE26DBDD2628": { + "rawValue": "1054021100602652164417", + "value": "1054.021100602652164417", + "luna": 3.672889989589681 + }, + "0xed56bc4d7DfC7E0cc3f5F3314141a054Cb457192": { + "rawValue": "5174083943771115615673", + "value": "5174.083943771115615673", + "luna": 18.02984884411508 + }, + "0x68e845717eA2ae0Ca63E7B2c9f6052FE7397e96E": { + "rawValue": "79577843463964041100", + "value": "79.5778434639640411", + "luna": 0.2098508477501866 + }, + "0xf696350F37cb8a1cc9C56EC5C8CfF00a5e01FD40": { + "rawValue": "724064932115643864540", + "value": "724.06493211564386454", + "luna": 1.909396299479467 + }, + "0xe4Bc891d2D771739A88b6AC11419Ed1a4EE5c542": { + "rawValue": "1327712382024774298878", + "value": "1327.712382024774298878", + "luna": 3.5012455327780936 + }, + "0x38C7dAFfc73fb9d4057F31118cBEE74Edc19665D": { + "rawValue": "0", + "value": "0.0", + "luna": 2.7721148764533408 + }, + "0xb0e83C2D71A991017e0116d58c5765Abc57384af": { + "rawValue": "2004798870962474657167", + "value": "2004.798870962474657167", + "luna": 3.935307007371136 + }, + "0x30E90CcBB23704a7D893fbc20CDFec712A6b2a41": { + "rawValue": "1500385337944486217814", + "value": "1500.385337944486217814", + "luna": 2.945171717567455 + }, + "0xAe9DB1fF69cfCa2720fF2e5d81807d7383138A39": { + "rawValue": "34666346859814205996128", + "value": "34666.346859814205996128", + "luna": 68.04808187660772 + }, + "0x9F74142501830AF396d88bcF79E850398bd79e78": { + "rawValue": "0", + "value": "0.0", + "luna": 12.208353411122877 + }, + "0x75AfAEce8CF2a7974B1e541648923aFD9339B3f8": { + "rawValue": "9823567091670194188875", + "value": "9823.567091670194188875", + "luna": 17.2231159174167 + }, + "0xa7E5C22BcC367d47392313167588B20bB2CeD72e": { + "rawValue": "296764405675497857538", + "value": "296.764405675497857538", + "luna": 0.5203005905508984 + }, + "0xA5F9f3e9Ec7cE29cf9c0692085ED9D5F5a03e149": { + "rawValue": "687976726283964346818", + "value": "687.976726283964346818", + "luna": 1.097092624899523 + }, + "0xf928400344eC91B7e728B428C68E8F0136Bb984c": { + "rawValue": "1155696595842828118637", + "value": "1155.696595842828118637", + "luna": 0.5266643271197535 + } +} \ No newline at end of file diff --git a/mtlsaust.json b/mtlsaust.json new file mode 100644 index 0000000..2b3bd0d --- /dev/null +++ b/mtlsaust.json @@ -0,0 +1,57 @@ +{ + "0x33D3C029FD119ebb90df20c3427a97074637Bf7c": { + "rawValue": "204596825788376129912", + "value": "204.596825788376129912", + "luna": 6.516811209052526 + }, + "0x4EB71d22AF87ECf228a856075c80c143890256e4": { + "rawValue": "234433287105941684463", + "value": "234.433287105941684463", + "luna": 7.467161170756672 + }, + "0x5275817b74021E97c980E95EdE6bbAc0D0d6f3a2": { + "rawValue": "2727934398518905501117", + "value": "2727.934398518905501117", + "luna": 86.8900746496232 + }, + "0x806388E04b7583a0148451A8ECd29A748b8fd584": { + "rawValue": "324730345998773458238", + "value": "324.730345998773458238", + "luna": 10.343300051552124 + }, + "0x801d47b871b82624fA77f775183f0e6a7c9c2e44": { + "rawValue": "1046105580313800461", + "value": "1.046105580313800461", + "luna": 0.03332051973617997 + }, + "0xA0206Ac75aa347327F8CA82440279bd6A0Fdef27": { + "rawValue": "21360977957347615603", + "value": "21.360977957347615603", + "luna": 0.680389150967344 + }, + "0x9bBA6257036C367e76baA8916725913a1aD60912": { + "rawValue": "9756387753405885630", + "value": "9.75638775340588563", + "luna": 0.310760134358206 + }, + "0x80629DE4EA833C62597964FD1b09E9d097F9C2B2": { + "rawValue": "0", + "value": "0.0", + "luna": 13.49436447951088 + }, + "0x66B3b394D4D4c7155fb25Ab043E5F440eB74187d": { + "rawValue": "40879086872714761383", + "value": "40.879086872714761383", + "luna": 1.0573322929235898 + }, + "0xA1EFa0adEcB7f5691605899d13285928AE025844": { + "rawValue": "769681766516554509588", + "value": "769.681766516554509588", + "luna": 19.907719307585968 + }, + "0x98561eF50556Eb2ff5448EA3b3fe633c4770595e": { + "rawValue": "676409814477469831647", + "value": "676.409814477469831647", + "luna": 15.963267033933292 + } +} \ No newline at end of file diff --git a/package.json b/package.json index 27f06ff..9e52125 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "@studydefi/money-legos": "^2.4.1", "abi-decoder": "^2.3.0", "dotenv": "^8.2.0", - "ethers": "^5.1.3" + "ethers": "^5.1.3", + "jsonexport": "^3.2.0" }, "devDependencies": { "eslint": "^7.10.0" diff --git a/scripts/contracts.js b/scripts/contracts.js index d6c795f..2b4c861 100644 --- a/scripts/contracts.js +++ b/scripts/contracts.js @@ -6,10 +6,18 @@ const provider = new ethers.providers.InfuraProvider(1, process.env.INFURA_API); const jarABI = require("../ABIs/jar.json"); const masterchefABI = require("../ABIs/masterchef.json"); +const gaugeABI = require("../ABIs/gauge.json"); +const gaugeProxyABI = require("../ABIs/gaugeproxy.json") module.exports = { provider, masterchef: new ethers.Contract("0xbD17B1ce622d73bD438b9E658acA5996dc394b0d", masterchefABI, provider), - pBACDAI: new ethers.Contract("0x2350fc7268F3f5a6cC31f26c38f706E41547505d", jarABI, provider), - pBASDAI: new ethers.Contract("0x748712686a78737da0b7643df78fdf2778dc5944", jarABI, provider), + gauge: new ethers.Contract("0xe9bead1d3e3a25e8af7a6b40e48de469a9613ede", gaugeABI, provider), + gaugeProxy: new ethers.Contract("0x2e57627ACf6c1812F99e274d0ac61B786c19E74f", gaugeProxyABI, provider), + pMIRUST: new ethers.Contract("0x3bcd97dca7b1ced292687c97702725f37af01cac", jarABI, provider), + pMTSLAUST: new ethers.Contract("0xaFB2FE266c215B5aAe9c4a9DaDC325cC7a497230", jarABI, provider), + pMAAPLUST: new ethers.Contract("0xF303B35D5bCb4d9ED20fB122F5E268211dEc0EBd", jarABI, provider), + pMQQQUST: new ethers.Contract("0x7C8de3eE2244207A54b57f45286c9eE1465fee9f", jarABI, provider), + pMSLVUST: new ethers.Contract("0x1ed1fD33b62bEa268e527A622108fe0eE0104C07", jarABI, provider), + pMBABAUST: new ethers.Contract("0x1CF137F651D8f0A4009deD168B442ea2E870323A", jarABI, provider), }; diff --git a/scripts/snapshot.js b/scripts/snapshot.js index a570ef5..bbe371f 100644 --- a/scripts/snapshot.js +++ b/scripts/snapshot.js @@ -2,134 +2,156 @@ const fs = require("fs"); const { ethers } = require("ethers"); const contracts = require("./contracts"); const erc20IFace = new ethers.utils.Interface(require("../ABIs/jar.json")); +const gaugeABI = require("../ABIs/gauge.json"); const provider = contracts.provider; -const generateData = async ({ jar, poolID, fuckedBlock }) => { - const snapshotBlock = 12272232; +const initializeUsers = async jar => { let users = {}; - - // 1. Getting all the users const filter = jar.filters.Transfer(); + const gaugeAddress = await contracts.gaugeProxy.getGauge(jar.address); const events = await jar.queryFilter(filter); for (const e of events) { - users[e.args.from] = ethers.constants.Zero; - users[e.args.to] = ethers.constants.Zero; + users[e.args.from] = { bal: ethers.constants.Zero, luna: 0 }; + users[e.args.to] = { bal: ethers.constants.Zero, luna: 0 }; } // Delete burn address, dead address and masterchef delete users[ethers.constants.AddressZero]; delete users[contracts.masterchef.address]; + delete users[gaugeAddress]; delete users["0x000000000000000000000000000000000000dEaD"]; + return users; +}; + +const generateData = async (jar, poolID, lunaRewards, blockNum, users) => { + // 1. Getting all the users + const filter = jar.filters.Transfer(); + const events = await jar.queryFilter(filter); + const gaugeAddress = await contracts.gaugeProxy.getGauge(jar.address); + const gaugeContract = new ethers.Contract(gaugeAddress, gaugeABI, provider); + // 2. Getting the total asset balance of the users at the pre-fucked block - const ratio = await jar.getRatio({ blockTag: fuckedBlock - 1 }); + const ratio = await jar.getRatio({ blockTag: blockNum - 1 }); await Promise.all( - Object.keys(users).map(async (userAddress) => { + Object.keys(users).map(async userAddress => { // pToken balance in jar const balInJar = await jar.balanceOf(userAddress, { - blockTag: fuckedBlock - 1, + blockTag: blockNum - 1 }); - // pToken balance in farm - const { amount: balInFarm } = await contracts.masterchef.userInfo(poolID, userAddress, { - blockTag: fuckedBlock - 1, + // pToken balance in gauge + const balInGauge = await gaugeContract.balanceOf(userAddress, { + blockTag: blockNum - 1 }); - // store total asset balance of the users (at pre-fucked state) - users[userAddress] = balInJar - .add(balInFarm) - .mul(ratio) // convert from pToken to token - .div(ethers.utils.parseEther("1")); - }) - ); - - // Post fuck block - // 3. Do a state transition to see how much users have withdrawn and deposited into the fund - const depositEventsPostFuck = events - .filter((x) => x.blockNumber >= fuckedBlock && x.blockNumber < snapshotBlock) - .filter((x) => x.args.from === ethers.constants.AddressZero); - await Promise.all( - depositEventsPostFuck.map(async (evt) => { - const txReceipt = await provider.getTransactionReceipt(evt.transactionHash); - txReceipt.logs = txReceipt.logs.map((x) => { - return erc20IFace.parseLog(x); - }); - txReceipt.logs.forEach((x) => { - // for each transfer, see how much non-pToken is deposited into the jar - if (x.args.to === jar.address) { - // whatever ppl put into the jar, add that to the balance - users[x.args.from] = (users[x.args.from] || ethers.BigNumber.from(0)).add(x.args.value); + // pToken balance in farm + const { amount: balInFarm } = await contracts.masterchef.userInfo( + poolID, + userAddress, + { + blockTag: blockNum - 1 } - }); - }) - ); + ); - const withdrawEventsPostFuck = events - .filter((x) => x.blockNumber >= fuckedBlock) - .filter((x) => x.args.to === ethers.constants.AddressZero); - await Promise.all( - withdrawEventsPostFuck.map(async (evt) => { - const txReceipt = await provider.getTransactionReceipt(evt.transactionHash); - - txReceipt.logs = txReceipt.logs - .map((x) => { - try { - return erc20IFace.parseLog(x); - } catch (e) { - return null; - } - }) - .filter((x) => x !== null); - - txReceipt.logs.forEach((x) => { - // for each transfer, see how much non-pToken was sent out from the jar - if (x.args.from === jar.address && x.args.to !== ethers.constants.AddressZero) { - users[x.args.to] = (users[x.args.to] || ethers.BigNumber.from(0)).sub(x.args.value); - } - }); + // store total asset balance of the users (at pre-fucked state) + users[userAddress] = { + ...users[userAddress], + bal: balInJar + .add(balInFarm) + .add(balInGauge) + .mul(ratio) // convert from pToken to token + .div(ethers.utils.parseEther("1")) + }; }) ); + const totalDeposits = Object.keys(users).reduce((acc, curr) => { + return acc.add(users[curr].bal); + }, ethers.BigNumber.from(0)); + // Readable format - Object.keys(users).forEach((userAddress) => { + Object.keys(users).forEach(userAddress => { const temp = users[userAddress]; - // No need to airdrop 0 tokens - if (temp.lte(ethers.constants.Zero)) { - delete users[userAddress]; - } - - // Airdrop intial amount of tokens - else { - users[userAddress] = { - rawValue: temp.toString(), - value: ethers.utils.formatEther(temp), - }; - } + // Airdrop tokens + const userLuna = + temp.luna + + lunaRewards * + +ethers.utils.formatEther( + temp.bal.mul(ethers.utils.parseEther("1")).div(totalDeposits) + ); + + users[userAddress] = { + rawValue: temp.bal.toString(), + value: ethers.utils.formatEther(temp.bal), + luna: userLuna + }; }); return users; }; const main = async () => { - const bacdaiFuckedBlock = 12243088; - const basdaiFuckedBlock = 12243432; + const startBlock = 12371130; // ~1AM UTC May 5 + const endBlock = 12461800; // ~1AM UTC May 19 const monies = [ { - jar: contracts.pBACDAI, - poolID: 22, - fuckedBlock: bacdaiFuckedBlock, - outfile: "bacdai.json", + jar: contracts.pMIRUST, + poolID: 28, + luna: 271.1075, + outfile: "mirust.json" }, { - jar: contracts.pBASDAI, - poolID: 27, - fuckedBlock: basdaiFuckedBlock, - outfile: "basdai.json", + jar: contracts.pMTSLAUST, + poolID: 30, + luna: 162.6645, + outfile: "mtlsaust.json" }, + { + jar: contracts.pMAAPLUST, + poolID: 31, + luna: 162.6645, + outfile: "maaplust.json" + }, + { + jar: contracts.pMQQQUST, + poolID: 32, + luna: 162.6645, + outfile: "mqqqust.json" + }, + { + jar: contracts.pMSLVUST, + poolID: 33, + luna: 162.6645, + outfile: "mslvust.json" + }, + { + jar: contracts.pMBABAUST, + poolID: 34, + luna: 162.6645, + outfile: "mbabaust.json" + } ]; for (const moneh of monies) { - const data = await generateData(moneh); + const blockIncrement = Math.floor((endBlock - startBlock) / 14); // Space out snapshots daily over 2 weeks + + let data; + let users = await initializeUsers(moneh.jar); + for (i = 0; i < 14; i++) { + data = await generateData( + moneh.jar, + moneh.poolID, + moneh.luna / 14, + startBlock + blockIncrement * i, + users + ); + } + + // Cleanup + for (const user in users) { + if (data[user].luna === 0) delete data[user]; + } fs.writeFileSync(moneh.outfile, JSON.stringify(data, null, 4)); } }; diff --git a/yarn.lock b/yarn.lock index ff97d51..7924be3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1125,6 +1125,11 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= +jsonexport@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/jsonexport/-/jsonexport-3.2.0.tgz#e5b4905ea1f6c8f8e0f62e4ceb26e4a31f1c93a8" + integrity sha512-GbO9ugb0YTZatPd/hqCGR0FSwbr82H6OzG04yzdrG7XOe4QZ0jhQ+kOsB29zqkzoYJLmLxbbrFiuwbQu891XnQ== + levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"