Contract 0x47ee58801c1ac44e54ff2651ae50525c5cfc66d0

 

Contract Overview

Synthetix: Reward Escrow V2
Balance:
0 Ether

EtherValue:
$0.00

Token:
Txn Hash Method
Index
From
To
Value
0x854af1cb0f29d4ec08ed40e55df962862d1bc2b112b31a36224f1174e973b2c1Vest137275922022-07-03 3:48:421 hr 49 mins ago0x40377a6641805858eb1bddd7f478a345a9e65bb8 IN Synthetix: Reward Escrow V20 Ether0.0001061016420.001
0xf7204ae074ff9168c7dd9ea01abad9b24a7c21108c356d811b0e61e38fc33bb3Merge Account137259872022-07-03 2:51:432 hrs 46 mins ago0x706d961ab69d54a0fcbaa13e77842279a5724139 IN Synthetix: Reward Escrow V20 Ether0.0000394841670.001
0x4fd7acd10335061158cb9b89468396d2b5a9f64c4564a04fa1e97c9c4006d4f2Merge Account137259792022-07-03 2:51:102 hrs 47 mins ago0x706d961ab69d54a0fcbaa13e77842279a5724139 IN Synthetix: Reward Escrow V20 Ether0.0000451310480.001
0x5f5c0974587e96e4d078298c2a3fbbf838a97969742bb13d75b0b94380d58cf7Nominate Account...137259532022-07-03 2:50:012 hrs 48 mins ago0x9e3144d34eb9cf57f9a217fbd2f98fc2195d5759 IN Synthetix: Reward Escrow V20 Ether0.0000187804490.001
0xfc94789e7363a8e4f992e5ebee9f859a3e5b8901320041e7201ba15e564bbd4cMerge Account137259212022-07-03 2:49:012 hrs 49 mins ago0x706d961ab69d54a0fcbaa13e77842279a5724139 IN Synthetix: Reward Escrow V20 Ether0.0000419710280.001
0xc0a58f69f9a871781c0341e837532e34232bf4c14c431e725ad4032a8ab91b14Merge Account137259122022-07-03 2:48:462 hrs 49 mins ago0x706d961ab69d54a0fcbaa13e77842279a5724139 IN Synthetix: Reward Escrow V20 Ether0.0000314050910.001
0x2263262aea7b7c0a7b0ad5c21992e4a4d76731cfb8178bca2d85f28fc1b3d826Nominate Account...137258722022-07-03 2:47:382 hrs 50 mins ago0x46d3101e96dfe3f84a7eea176aa3699107900a9c IN Synthetix: Reward Escrow V20 Ether0.0000339509030.001
0x7ca0a26efcd84764450c6a6fe5eb6172e9cbedd97523879c748170d4a86173a6Vest137247342022-07-03 2:10:553 hrs 27 mins ago0xa9214877410560b17560955ca84eabde4e30dcca IN Synthetix: Reward Escrow V20 Ether0.0001439856020.001
0x6c3ff516a50a6e7557cb42014227948ab26c59f8012414f0bb7bef39beb85878Vest137231422022-07-03 1:27:184 hrs 10 mins ago0x18a4e9b06065c447f68c05c213a0670f92f60c7f IN Synthetix: Reward Escrow V20 Ether0.0000858264460.001
0x4eedad6df9b79f85b63c54ca4ef883591530a19b99f4f6dbcffb3ee81f1e5a4fVest137213542022-07-03 0:25:245 hrs 12 mins ago0xb2e0ec15c1663e30c0a432bdc5899df0d7474868 IN Synthetix: Reward Escrow V20 Ether0.0000993497840.001
0x7f0883237b85bc3d09e8f976c843c7e1c3e4b47821b0d0d45bc1ad13c4321d18Vest137183722022-07-02 22:46:386 hrs 51 mins ago0xe167fef7a6c99554917ba90d7ec6fe5b08e43120 IN Synthetix: Reward Escrow V20 Ether0.0001181012460.001
0x732ccd26ccebf2e0c09bbbc21bb482edf0307749f64c550da69f9c644e841c16Vest137180642022-07-02 22:32:207 hrs 5 mins ago0x60ce047de9952e080f84d3f8a13495f6d9277167 IN Synthetix: Reward Escrow V20 Ether0.0001583725710.001
0xbc50f9a22fdd169b1358998fff0586e3686052146f179fcc6d8a9fe2f063cf81Vest137179442022-07-02 22:26:557 hrs 11 mins ago0xca2bf247da8ff7d361afab7af13b25aa28f973a2 IN Synthetix: Reward Escrow V20 Ether0.00012428530.001
0x27ae4557969c0c8959a6f833ff525a38c5c300471e29ea231527aba263dc1cafVest137179152022-07-02 22:26:227 hrs 11 mins ago0x437ae28150189890d987deee46cc29bf4098622f IN Synthetix: Reward Escrow V20 Ether0.0001037254170.001
0x98fed7549e9f1fd9ecffba84284685194e110dddba43abc43d13a0d612141e42Vest137158732022-07-02 21:21:508 hrs 16 mins ago0x8c878b8f805472c0b70ed66a71c0b33da3d233c8 IN Synthetix: Reward Escrow V20 Ether0.0000711157340.001
0x3b087b8eb29566841094fc0e24c98e7bf5c040e8d1eddbb284a3ca1ce2657405Vest137153462022-07-02 21:06:568 hrs 31 mins ago0x2e63ee889bb210392ced9c03d3c0bdaf97e1cc08 IN Synthetix: Reward Escrow V20 Ether0.000136556470.001
0xc113052a2015478e74f76c9d2ad20511299d79646ac497c00b5a4bb02af06515Vest137137702022-07-02 20:12:129 hrs 26 mins ago0x80fb5880f38185661962e475ac1557817dc9faea IN Synthetix: Reward Escrow V20 Ether0.0001822628160.001
0x6a0509955abb346926ee86101f42f890a4f94cc06c27c08738c11e7dc4d9a085Vest137134522022-07-02 20:02:559 hrs 35 mins ago0x00929c5c2c4f00b540e429247669eb6fcd8b1dbf IN Synthetix: Reward Escrow V20 Ether0.0001420198180.001
0x041b2a1158b28032ca8f18f3c13ff0364d7bff6d7cd0fc6706013500ffe88d8bVest137133312022-07-02 19:59:169 hrs 38 mins ago0x1f80673cba95a1792dd6d75a6f6ccfd14ee6b4a1 IN Synthetix: Reward Escrow V20 Ether0.0001120031940.001
0xf2ae96c932eee6824f32bc329a00494afe37febb78e2c48fac477f34c8519048Vest137092002022-07-02 18:18:5911 hrs 19 mins ago0xacdce7fdae3f5e363a926bb31ade3f8e5f84ea6b IN Synthetix: Reward Escrow V20 Ether0.0002176569690.001
0x9411c2e46d3b6d0944e888c4e439bcf6d6a6fadc99f13e718408b8cbbc655067Vest137086132022-07-02 17:56:4511 hrs 41 mins ago0x921d58c0cc78aaf04652ff28e68f66d15ac7b73e IN Synthetix: Reward Escrow V20 Ether0.0001391904650.001
0x5875cc31966fbd7446ebb3aa51c1b3b42d6b4465aa6785e268621bbcb413f3feVest137063732022-07-02 16:48:2612 hrs 49 mins ago0x26b11a2497381ef5e28bcfcf881185791ba11a5d IN Synthetix: Reward Escrow V20 Ether0.0003082607610.001
0x95edc8cfd8865e1920c715a61fdcb36336b4dc7af99b10fb2a31a7d2fb0f843bVest137058722022-07-02 16:35:1913 hrs 2 mins ago0xb3eb17a451d32bacf7f5a8a6ee98034df45bd599 IN Synthetix: Reward Escrow V20 Ether0.0006199991150.001
0x0b3818d729a46425c14980f59c81deefa58935809c84c88039ffb91247227b14Vest137036732022-07-02 15:56:4113 hrs 41 mins ago0x77a9f757a769c94c26b66b832b7d06ca880e9eed IN Synthetix: Reward Escrow V20 Ether0.0002933410570.001
0x060b76261479ec55ecfaa0fb486a959cf52ff1e7e164363def6804839057d622Vest137027672022-07-02 15:32:4614 hrs 5 mins ago0x83d420a602b5cd560ac5fa9bbca0d5e91e4cb975 IN Synthetix: Reward Escrow V20 Ether0.0002094578210.001
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xaceb9822f1e7c0004b9ebf4c9c9682652f827268b6535c95d48191889c3f2dee137334182022-07-03 5:05:0233 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
0xfecd2ed46e104b57daad6da6ef894f3f4ef66f3a6d0ed67af71dca3072d18667137333892022-07-03 5:04:3133 mins ago Synthetix: Reward Escrow V2 0xfe8e48bf36ccc3254081ec8c65965d1c8b2e744d0 Ether
0xfecd2ed46e104b57daad6da6ef894f3f4ef66f3a6d0ed67af71dca3072d18667137333892022-07-03 5:04:3133 mins ago Synthetix: Fee PoolSynthetix: Reward Escrow V20 Ether
0xfecd2ed46e104b57daad6da6ef894f3f4ef66f3a6d0ed67af71dca3072d18667137333892022-07-03 5:04:3133 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
0x3d7555fb545146fe9e15b52e6233397e660cfbcbf54cdc61dedbffe10f9ef148137333482022-07-03 5:03:4434 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
0xebcaba96f8219a1c7a2c6fddecceb294d98a3feffaa04ae5d0df929d9fcee12f137326632022-07-03 5:00:5937 mins ago Synthetix: Reward Escrow V2 0xfe8e48bf36ccc3254081ec8c65965d1c8b2e744d0 Ether
0xebcaba96f8219a1c7a2c6fddecceb294d98a3feffaa04ae5d0df929d9fcee12f137326632022-07-03 5:00:5937 mins ago Synthetix: Fee PoolSynthetix: Reward Escrow V20 Ether
0xebcaba96f8219a1c7a2c6fddecceb294d98a3feffaa04ae5d0df929d9fcee12f137326632022-07-03 5:00:5937 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
0xfbe4e7010e683319046f5c626ae6275f39f28ff9e1df5f2e03bee0ac810cb360137325892022-07-03 5:00:4437 mins ago Synthetix: Reward Escrow V2 0xfe8e48bf36ccc3254081ec8c65965d1c8b2e744d0 Ether
0xfbe4e7010e683319046f5c626ae6275f39f28ff9e1df5f2e03bee0ac810cb360137325892022-07-03 5:00:4437 mins ago Synthetix: Fee PoolSynthetix: Reward Escrow V20 Ether
0xfbe4e7010e683319046f5c626ae6275f39f28ff9e1df5f2e03bee0ac810cb360137325892022-07-03 5:00:4437 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
0x87f80cfb0a3843cf8e786d626353ed2c5468c3faeac0bf27813fd9d61f08a342137323972022-07-03 5:00:2937 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
0xe9d1d884f570a66d36253897ef40eaa804e81199ee308993c2a4c3311fd65b7d137317702022-07-03 4:58:4139 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
0x06bce133bc550c3fe12b0b5c1798d49bafde9ba704615a2ce50e257580f6e20b137310462022-07-03 4:57:4140 mins ago Synthetix: Reward Escrow V2 0xfe8e48bf36ccc3254081ec8c65965d1c8b2e744d0 Ether
0x06bce133bc550c3fe12b0b5c1798d49bafde9ba704615a2ce50e257580f6e20b137310462022-07-03 4:57:4140 mins ago Synthetix: Fee PoolSynthetix: Reward Escrow V20 Ether
0x06bce133bc550c3fe12b0b5c1798d49bafde9ba704615a2ce50e257580f6e20b137310462022-07-03 4:57:4140 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
0xc49f80d1cb8492a2ebe8236bd78864122dea22e777844762df95b1d3792fcb29137307932022-07-03 4:56:4041 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
0x802fc6fc85a71d823424376f54f1512bbc9320df92efa2eb8a420f059a99c24b137301122022-07-03 4:54:0944 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
0x645de82838f14f5bb3a158d5f04a5ae13f7f8bd13508446c6705f0c12b4d0801137300752022-07-03 4:53:3544 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
0x6e3b2661f0a3f1dee6c1b6fb8345bde67cff9efadfe9982762bc1ced0e577b2b137294042022-07-03 4:49:1848 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
0xd96b2cb7f92a87426bd6e93c8e43e00ebc1421e97f5af1a38b634166576743d2137292042022-07-03 4:47:4150 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
0xfafe28084e8614cc7b2c3b81e40a9edf4fda4a354f86785140436cb217fd9d82137291152022-07-03 4:45:0853 mins ago Synthetix: Reward Escrow V2 0xfe8e48bf36ccc3254081ec8c65965d1c8b2e744d0 Ether
0xfafe28084e8614cc7b2c3b81e40a9edf4fda4a354f86785140436cb217fd9d82137291152022-07-03 4:45:0853 mins ago Synthetix: Fee PoolSynthetix: Reward Escrow V20 Ether
0xfafe28084e8614cc7b2c3b81e40a9edf4fda4a354f86785140436cb217fd9d82137291152022-07-03 4:45:0853 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
0x4f682ce2a71e62fa190d697d5893db7fc6d9642bad3cab51ebaf1b0b6e1944df137290142022-07-03 4:40:1857 mins ago 0x7ef2edd3623312b9a82e25647e12f1c77d0ea012Synthetix: Reward Escrow V20 Ether
[ Download CSV Export 
Latest 25 Deposits
L2 Txn Hash L1 Deposit Txn Value Token
0x21b1669bf4dfc437f0f221f5b28746300bb2fe3f5806d80bd8205f221e49648a2022-07-02 12:14:1817 hrs 23 mins ago0x66d137573fd3479918f449c395aed6f90b1551ba5e105489c358536a06ce78a9381.234805606761991858 Synthetix Ne... (SNX)
0x9b4ade1825213bd49754f6c77cac9c2433e0cc5f23dc06ff9c04ade1b3a09e712022-07-02 12:14:1817 hrs 23 mins ago0x66d137573fd3479918f449c395aed6f90b1551ba5e105489c358536a06ce78a95,242.977547395630022609 Synthetix Ne... (SNX)
0x6ece03bd47f208f62d3ee0157272fa70a890a84119339ed9976666f4ca8413e22022-06-30 5:53:542 days 23 hrs ago0xf5ca75b9035690feee52c1eab536bb5d44569ca57cbf4ffc6205db7cecc3451a31,347.977037959068746104 Synthetix Ne... (SNX)
0x5a65ad0cbeac02e36475251ae84f1ba2a921f49eb068710d85930f5c5d24ce492022-06-30 5:53:542 days 23 hrs ago0xf5ca75b9035690feee52c1eab536bb5d44569ca57cbf4ffc6205db7cecc3451a32,503.300932866943681117 Synthetix Ne... (SNX)
0x34463c50628e4635de2ad8bc9aede5c763e57b3f7d4e93b8068e034f99e5348f2022-06-30 5:53:542 days 23 hrs ago0xf5ca75b9035690feee52c1eab536bb5d44569ca57cbf4ffc6205db7cecc3451a3,973.317608204504165999 Synthetix Ne... (SNX)
0xae37f65208a4deebf1859a99347fb12278da07620b326b063b5d4f56654b883e2022-06-30 5:25:493 days 12 mins ago0x19b4edc08168891ed71d7ea0e914a6f9f890122cde70a94624daf1343801bcec38,058.774906329157292829 Synthetix Ne... (SNX)
0xcd0f4d913339262079025b77227d57929b2584c158ce692b5f66f0d0175025162022-06-30 5:25:493 days 12 mins ago0x19b4edc08168891ed71d7ea0e914a6f9f890122cde70a94624daf1343801bcec38,249.19215704628985991 Synthetix Ne... (SNX)
0x798aae030fbdaa679ae4b8cc017d4f00445ebac0765010610966739dab375ed32022-06-30 5:25:493 days 12 mins ago0x19b4edc08168891ed71d7ea0e914a6f9f890122cde70a94624daf1343801bcec7,285.423940034408198059 Synthetix Ne... (SNX)
0xe599e16af84239bc0db80e78252f41753777987acf3191ba72d0ef07006877432022-06-30 0:16:063 days 5 hrs ago0x7af99454e9f99c28131eee896316f9f96fb51a13de5ae9f7da115994c497a738912,997.3204 Synthetix Ne... (SNX)
0x84c5cb212394a8ff2655d47e56ed5ddd31300b296ca3a8215ffc2f9f4f0dadd62022-06-29 17:57:473 days 11 hrs ago0x8558f5ca9a805619fc7404a72ef0c32fe4d56783832961915fb81daf44abe06930.508342045993651305 Synthetix Ne... (SNX)
0x6825947fd22993bd00725ea238ce629481fa77dd92b791822e830277b0d716e42022-06-28 23:02:454 days 6 hrs ago0x0a20012263392c29dc9971f3ec52cf60db75ab053ddcef9ee2db7d0654918a84587.939995079474598628 Synthetix Ne... (SNX)
0x56dd18b9717349c7cf0913ea32d9f7977cebae0c66e0a6a38a02d7dfbf9a71382022-06-23 0:18:2510 days 5 hrs ago0x50ec28a09e90e535e8c44636e8accc5e5a7686a917eac06cdf783a200a6f9024912,997.3204 Synthetix Ne... (SNX)
0x00d540d29da074aa4c0760575643acf1a440ab2e0742bbd6637be1497bc16d1b2022-06-22 12:02:0510 days 17 hrs ago0x20c0a1f7d86cb567d3f64d7ef41681a9ab153f7997a825382863d433a479869f1,679.4610288790166675 Synthetix Ne... (SNX)
0x2f71a1f785abf4aeffd275330c13adef7dac4095b8ac296fec30dd7072d04a012022-06-22 12:02:0510 days 17 hrs ago0x20c0a1f7d86cb567d3f64d7ef41681a9ab153f7997a825382863d433a479869f213.240333653977061016 Synthetix Ne... (SNX)
0x0eac1d2c038ea280f701a1acdc1df05c284364c73076f3422ddc0647448826502022-06-20 13:35:2812 days 16 hrs ago0xff67ac8140456770a08d2800e181e822bf22c60eb8b812147274388426c88b12792.546299722842572672 Synthetix Ne... (SNX)
0x6a297074f35756ecb0e150c5db7e90bd1720b1d5c9b8667f96703c31b01464582022-06-20 8:12:5212 days 21 hrs ago0x71372e00b5ec82c4f5de5c8dfc8093953b468e8582dda43e0cf50401bedc655d607.742544269948141848 Synthetix Ne... (SNX)
0xb79c9304a757772f38898e7e2a76df1391f649320e93cc569e136a359d4d962b2022-06-20 7:53:2212 days 21 hrs ago0xd828d8962d7c3fefdfc1238436ec247caf1e0cda0acfad234ae80dcc0a89131a21,410.407187504163631215 Synthetix Ne... (SNX)
0xb8524907f7d06107603cb477dea04144160e386a7fa78c2ca6b57aa26a5b77fe2022-06-20 7:53:2212 days 21 hrs ago0xd828d8962d7c3fefdfc1238436ec247caf1e0cda0acfad234ae80dcc0a89131a5,708.167069408061609571 Synthetix Ne... (SNX)
0xfbe96240d4dd9e3446e6a8ef65d2101300473a2b404a6bd16944c18c70a1d38e2022-06-20 7:40:0512 days 21 hrs ago0xce0f42233381ceccfd02148aef8acb6aa6e058168e69cf0477af0db19de814da1,933.589175408382812793 Synthetix Ne... (SNX)
0x697b0463021307b84c22f365c36ac76888cb1f7b9e3f7fb67c063487167c9fe22022-06-20 7:40:0512 days 21 hrs ago0xce0f42233381ceccfd02148aef8acb6aa6e058168e69cf0477af0db19de814da8,606.43339399693486837 Synthetix Ne... (SNX)
0xd3cb954257c6afdf140c7e5c4138e4a1137e2fde5051f5d6cc3ef96c65a3ebac2022-06-20 7:40:0512 days 21 hrs ago0xce0f42233381ceccfd02148aef8acb6aa6e058168e69cf0477af0db19de814da14,530.581249708538937061 Synthetix Ne... (SNX)
0xf9d3506a7d42308d6792a978f1decaa5a4d43f335e07b1a8a4562281cb4048c32022-06-19 3:15:0614 days 2 hrs ago0x27831752b9062bdbddc938a7194d7423fdcf748b2fe406a305ab4438de8a911a386.830060025000534079 Synthetix Ne... (SNX)
0x57a58b8c53bad9c6b69b01a12cdee71fd5c5c8b0851f40247ada27594217dd852022-06-19 3:15:0614 days 2 hrs ago0x27831752b9062bdbddc938a7194d7423fdcf748b2fe406a305ab4438de8a911a1,073.274199071207439655 Synthetix Ne... (SNX)
0x0582ae5b622f14299e177ef94b2cc0a017d655ff3c8eb763858cffac2c49e46d2022-06-18 16:13:0714 days 13 hrs ago0x80fe004c32e75fc6be4a08c0474489b7a1f99d9997bbd2669cd40ad6b2d9ca872,638.781861772040716175 Synthetix Ne... (SNX)
0x47d08effe9f824543892264a7576a3f11490229d9e32e6d28037cd685185576c2022-06-18 16:13:0714 days 13 hrs ago0x80fe004c32e75fc6be4a08c0474489b7a1f99d9997bbd2669cd40ad6b2d9ca87892.147444414630583177 Synthetix Ne... (SNX)
[ Download CSV Export 
Loading

Contract Source Code Verified (Genesis Bytecode Match Only)

Contract Name:
ImportableRewardEscrowV2

Compiler Version
v0.5.16

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at optimistic.etherscan.io on 2021-08-25
*/

/*
   ____            __   __        __   _
  / __/__ __ ___  / /_ / /  ___  / /_ (_)__ __
 _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
     /___/

* Synthetix: ImportableRewardEscrowV2.sol
*
* Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/ImportableRewardEscrowV2.sol
* Docs: https://docs.synthetix.io/contracts/ImportableRewardEscrowV2
*
* Contract Dependencies: 
*	- BaseRewardEscrowV2
*	- IAddressResolver
*	- Owned
* Libraries: 
*	- SafeDecimalMath
*	- SafeMath
*	- VestingEntries
*
* MIT License
* ===========
*
* Copyright (c) 2021 Synthetix
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/



pragma solidity ^0.5.16;

// https://docs.synthetix.io/contracts/source/contracts/owned
contract Owned {
    address public owner;
    address public nominatedOwner;

    constructor(address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);
    }

    function acceptOwnership() external {
        require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    modifier onlyOwner {
        _onlyOwner();
        _;
    }

    function _onlyOwner() private view {
        require(msg.sender == owner, "Only the contract owner may perform this action");
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}


// https://docs.synthetix.io/contracts/source/interfaces/iaddressresolver
interface IAddressResolver {
    function getAddress(bytes32 name) external view returns (address);

    function getSynth(bytes32 key) external view returns (address);

    function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address);
}


// https://docs.synthetix.io/contracts/source/interfaces/isynth
interface ISynth {
    // Views
    function currencyKey() external view returns (bytes32);

    function transferableSynths(address account) external view returns (uint);

    // Mutative functions
    function transferAndSettle(address to, uint value) external returns (bool);

    function transferFromAndSettle(
        address from,
        address to,
        uint value
    ) external returns (bool);

    // Restricted: used internally to Synthetix
    function burn(address account, uint amount) external;

    function issue(address account, uint amount) external;
}


// https://docs.synthetix.io/contracts/source/interfaces/iissuer
interface IIssuer {
    // Views
    function anySynthOrSNXRateIsInvalid() external view returns (bool anyRateInvalid);

    function availableCurrencyKeys() external view returns (bytes32[] memory);

    function availableSynthCount() external view returns (uint);

    function availableSynths(uint index) external view returns (ISynth);

    function canBurnSynths(address account) external view returns (bool);

    function collateral(address account) external view returns (uint);

    function collateralisationRatio(address issuer) external view returns (uint);

    function collateralisationRatioAndAnyRatesInvalid(address _issuer)
        external
        view
        returns (uint cratio, bool anyRateIsInvalid);

    function debtBalanceOf(address issuer, bytes32 currencyKey) external view returns (uint debtBalance);

    function issuanceRatio() external view returns (uint);

    function lastIssueEvent(address account) external view returns (uint);

    function maxIssuableSynths(address issuer) external view returns (uint maxIssuable);

    function minimumStakeTime() external view returns (uint);

    function remainingIssuableSynths(address issuer)
        external
        view
        returns (
            uint maxIssuable,
            uint alreadyIssued,
            uint totalSystemDebt
        );

    function synths(bytes32 currencyKey) external view returns (ISynth);

    function getSynths(bytes32[] calldata currencyKeys) external view returns (ISynth[] memory);

    function synthsByAddress(address synthAddress) external view returns (bytes32);

    function totalIssuedSynths(bytes32 currencyKey, bool excludeOtherCollateral) external view returns (uint);

    function transferableSynthetixAndAnyRateIsInvalid(address account, uint balance)
        external
        view
        returns (uint transferable, bool anyRateIsInvalid);

    // Restricted: used internally to Synthetix
    function issueSynths(address from, uint amount) external;

    function issueSynthsOnBehalf(
        address issueFor,
        address from,
        uint amount
    ) external;

    function issueMaxSynths(address from) external;

    function issueMaxSynthsOnBehalf(address issueFor, address from) external;

    function burnSynths(address from, uint amount) external;

    function burnSynthsOnBehalf(
        address burnForAddress,
        address from,
        uint amount
    ) external;

    function burnSynthsToTarget(address from) external;

    function burnSynthsToTargetOnBehalf(address burnForAddress, address from) external;

    function burnForRedemption(
        ISynth deprecatedSynth,
        address account,
        uint balance
    ) external;

    function liquidateDelinquentAccount(
        address account,
        uint susdAmount,
        address liquidator
    ) external returns (uint totalRedeemed, uint amountToLiquidate);
}


// Inheritance


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/addressresolver
contract AddressResolver is Owned, IAddressResolver {
    mapping(bytes32 => address) public repository;

    constructor(address _owner) public Owned(_owner) {}

    /* ========== RESTRICTED FUNCTIONS ========== */

    function importAddresses(bytes32[] calldata names, address[] calldata destinations) external onlyOwner {
        require(names.length == destinations.length, "Input lengths must match");

        for (uint i = 0; i < names.length; i++) {
            bytes32 name = names[i];
            address destination = destinations[i];
            repository[name] = destination;
            emit AddressImported(name, destination);
        }
    }

    /* ========= PUBLIC FUNCTIONS ========== */

    function rebuildCaches(MixinResolver[] calldata destinations) external {
        for (uint i = 0; i < destinations.length; i++) {
            destinations[i].rebuildCache();
        }
    }

    /* ========== VIEWS ========== */

    function areAddressesImported(bytes32[] calldata names, address[] calldata destinations) external view returns (bool) {
        for (uint i = 0; i < names.length; i++) {
            if (repository[names[i]] != destinations[i]) {
                return false;
            }
        }
        return true;
    }

    function getAddress(bytes32 name) external view returns (address) {
        return repository[name];
    }

    function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address) {
        address _foundAddress = repository[name];
        require(_foundAddress != address(0), reason);
        return _foundAddress;
    }

    function getSynth(bytes32 key) external view returns (address) {
        IIssuer issuer = IIssuer(repository["Issuer"]);
        require(address(issuer) != address(0), "Cannot find Issuer address");
        return address(issuer.synths(key));
    }

    /* ========== EVENTS ========== */

    event AddressImported(bytes32 name, address destination);
}


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/mixinresolver
contract MixinResolver {
    AddressResolver public resolver;

    mapping(bytes32 => address) private addressCache;

    constructor(address _resolver) internal {
        resolver = AddressResolver(_resolver);
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    function combineArrays(bytes32[] memory first, bytes32[] memory second)
        internal
        pure
        returns (bytes32[] memory combination)
    {
        combination = new bytes32[](first.length + second.length);

        for (uint i = 0; i < first.length; i++) {
            combination[i] = first[i];
        }

        for (uint j = 0; j < second.length; j++) {
            combination[first.length + j] = second[j];
        }
    }

    /* ========== PUBLIC FUNCTIONS ========== */

    // Note: this function is public not external in order for it to be overridden and invoked via super in subclasses
    function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {}

    function rebuildCache() public {
        bytes32[] memory requiredAddresses = resolverAddressesRequired();
        // The resolver must call this function whenver it updates its state
        for (uint i = 0; i < requiredAddresses.length; i++) {
            bytes32 name = requiredAddresses[i];
            // Note: can only be invoked once the resolver has all the targets needed added
            address destination =
                resolver.requireAndGetAddress(name, string(abi.encodePacked("Resolver missing target: ", name)));
            addressCache[name] = destination;
            emit CacheUpdated(name, destination);
        }
    }

    /* ========== VIEWS ========== */

    function isResolverCached() external view returns (bool) {
        bytes32[] memory requiredAddresses = resolverAddressesRequired();
        for (uint i = 0; i < requiredAddresses.length; i++) {
            bytes32 name = requiredAddresses[i];
            // false if our cache is invalid or if the resolver doesn't have the required address
            if (resolver.getAddress(name) != addressCache[name] || addressCache[name] == address(0)) {
                return false;
            }
        }

        return true;
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    function requireAndGetAddress(bytes32 name) internal view returns (address) {
        address _foundAddress = addressCache[name];
        require(_foundAddress != address(0), string(abi.encodePacked("Missing address: ", name)));
        return _foundAddress;
    }

    /* ========== EVENTS ========== */

    event CacheUpdated(bytes32 name, address destination);
}


// https://docs.synthetix.io/contracts/source/contracts/limitedsetup
contract LimitedSetup {
    uint public setupExpiryTime;

    /**
     * @dev LimitedSetup Constructor.
     * @param setupDuration The time the setup period will last for.
     */
    constructor(uint setupDuration) internal {
        setupExpiryTime = now + setupDuration;
    }

    modifier onlyDuringSetup {
        require(now < setupExpiryTime, "Can only perform this action during setup");
        _;
    }
}


pragma experimental ABIEncoderV2;

library VestingEntries {
    struct VestingEntry {
        uint64 endTime;
        uint256 escrowAmount;
    }
    struct VestingEntryWithID {
        uint64 endTime;
        uint256 escrowAmount;
        uint256 entryID;
    }
}

interface IRewardEscrowV2 {
    // Views
    function balanceOf(address account) external view returns (uint);

    function numVestingEntries(address account) external view returns (uint);

    function totalEscrowedAccountBalance(address account) external view returns (uint);

    function totalVestedAccountBalance(address account) external view returns (uint);

    function getVestingQuantity(address account, uint256[] calldata entryIDs) external view returns (uint);

    function getVestingSchedules(
        address account,
        uint256 index,
        uint256 pageSize
    ) external view returns (VestingEntries.VestingEntryWithID[] memory);

    function getAccountVestingEntryIDs(
        address account,
        uint256 index,
        uint256 pageSize
    ) external view returns (uint256[] memory);

    function getVestingEntryClaimable(address account, uint256 entryID) external view returns (uint);

    function getVestingEntry(address account, uint256 entryID) external view returns (uint64, uint256);

    // Mutative functions
    function vest(uint256[] calldata entryIDs) external;

    function createEscrowEntry(
        address beneficiary,
        uint256 deposit,
        uint256 duration
    ) external;

    function appendVestingEntry(
        address account,
        uint256 quantity,
        uint256 duration
    ) external;

    function migrateVestingSchedule(address _addressToMigrate) external;

    function migrateAccountEscrowBalances(
        address[] calldata accounts,
        uint256[] calldata escrowBalances,
        uint256[] calldata vestedBalances
    ) external;

    // Account Merging
    function startMergingWindow() external;

    function mergeAccount(address accountToMerge, uint256[] calldata entryIDs) external;

    function nominateAccountToMerge(address account) external;

    function accountMergingIsOpen() external view returns (bool);

    // L2 Migration
    function importVestingEntries(
        address account,
        uint256 escrowedAmount,
        VestingEntries.VestingEntry[] calldata vestingEntries
    ) external;

    // Return amount of SNX transfered to SynthetixBridgeToOptimism deposit contract
    function burnForMigration(address account, uint256[] calldata entryIDs)
        external
        returns (uint256 escrowedAccountBalance, VestingEntries.VestingEntry[] memory vestingEntries);
}


/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, "SafeMath: division by zero");
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0, "SafeMath: modulo by zero");
        return a % b;
    }
}


// Libraries


// https://docs.synthetix.io/contracts/source/libraries/safedecimalmath
library SafeDecimalMath {
    using SafeMath for uint;

    /* Number of decimal places in the representations. */
    uint8 public constant decimals = 18;
    uint8 public constant highPrecisionDecimals = 27;

    /* The number representing 1.0. */
    uint public constant UNIT = 10**uint(decimals);

    /* The number representing 1.0 for higher fidelity numbers. */
    uint public constant PRECISE_UNIT = 10**uint(highPrecisionDecimals);
    uint private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint(highPrecisionDecimals - decimals);

    /**
     * @return Provides an interface to UNIT.
     */
    function unit() external pure returns (uint) {
        return UNIT;
    }

    /**
     * @return Provides an interface to PRECISE_UNIT.
     */
    function preciseUnit() external pure returns (uint) {
        return PRECISE_UNIT;
    }

    /**
     * @return The result of multiplying x and y, interpreting the operands as fixed-point
     * decimals.
     *
     * @dev A unit factor is divided out after the product of x and y is evaluated,
     * so that product must be less than 2**256. As this is an integer division,
     * the internal division always rounds down. This helps save on gas. Rounding
     * is more expensive on gas.
     */
    function multiplyDecimal(uint x, uint y) internal pure returns (uint) {
        /* Divide by UNIT to remove the extra factor introduced by the product. */
        return x.mul(y) / UNIT;
    }

    /**
     * @return The result of safely multiplying x and y, interpreting the operands
     * as fixed-point decimals of the specified precision unit.
     *
     * @dev The operands should be in the form of a the specified unit factor which will be
     * divided out after the product of x and y is evaluated, so that product must be
     * less than 2**256.
     *
     * Unlike multiplyDecimal, this function rounds the result to the nearest increment.
     * Rounding is useful when you need to retain fidelity for small decimal numbers
     * (eg. small fractions or percentages).
     */
    function _multiplyDecimalRound(
        uint x,
        uint y,
        uint precisionUnit
    ) private pure returns (uint) {
        /* Divide by UNIT to remove the extra factor introduced by the product. */
        uint quotientTimesTen = x.mul(y) / (precisionUnit / 10);

        if (quotientTimesTen % 10 >= 5) {
            quotientTimesTen += 10;
        }

        return quotientTimesTen / 10;
    }

    /**
     * @return The result of safely multiplying x and y, interpreting the operands
     * as fixed-point decimals of a precise unit.
     *
     * @dev The operands should be in the precise unit factor which will be
     * divided out after the product of x and y is evaluated, so that product must be
     * less than 2**256.
     *
     * Unlike multiplyDecimal, this function rounds the result to the nearest increment.
     * Rounding is useful when you need to retain fidelity for small decimal numbers
     * (eg. small fractions or percentages).
     */
    function multiplyDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) {
        return _multiplyDecimalRound(x, y, PRECISE_UNIT);
    }

    /**
     * @return The result of safely multiplying x and y, interpreting the operands
     * as fixed-point decimals of a standard unit.
     *
     * @dev The operands should be in the standard unit factor which will be
     * divided out after the product of x and y is evaluated, so that product must be
     * less than 2**256.
     *
     * Unlike multiplyDecimal, this function rounds the result to the nearest increment.
     * Rounding is useful when you need to retain fidelity for small decimal numbers
     * (eg. small fractions or percentages).
     */
    function multiplyDecimalRound(uint x, uint y) internal pure returns (uint) {
        return _multiplyDecimalRound(x, y, UNIT);
    }

    /**
     * @return The result of safely dividing x and y. The return value is a high
     * precision decimal.
     *
     * @dev y is divided after the product of x and the standard precision unit
     * is evaluated, so the product of x and UNIT must be less than 2**256. As
     * this is an integer division, the result is always rounded down.
     * This helps save on gas. Rounding is more expensive on gas.
     */
    function divideDecimal(uint x, uint y) internal pure returns (uint) {
        /* Reintroduce the UNIT factor that will be divided out by y. */
        return x.mul(UNIT).div(y);
    }

    /**
     * @return The result of safely dividing x and y. The return value is as a rounded
     * decimal in the precision unit specified in the parameter.
     *
     * @dev y is divided after the product of x and the specified precision unit
     * is evaluated, so the product of x and the specified precision unit must
     * be less than 2**256. The result is rounded to the nearest increment.
     */
    function _divideDecimalRound(
        uint x,
        uint y,
        uint precisionUnit
    ) private pure returns (uint) {
        uint resultTimesTen = x.mul(precisionUnit * 10).div(y);

        if (resultTimesTen % 10 >= 5) {
            resultTimesTen += 10;
        }

        return resultTimesTen / 10;
    }

    /**
     * @return The result of safely dividing x and y. The return value is as a rounded
     * standard precision decimal.
     *
     * @dev y is divided after the product of x and the standard precision unit
     * is evaluated, so the product of x and the standard precision unit must
     * be less than 2**256. The result is rounded to the nearest increment.
     */
    function divideDecimalRound(uint x, uint y) internal pure returns (uint) {
        return _divideDecimalRound(x, y, UNIT);
    }

    /**
     * @return The result of safely dividing x and y. The return value is as a rounded
     * high precision decimal.
     *
     * @dev y is divided after the product of x and the high precision unit
     * is evaluated, so the product of x and the high precision unit must
     * be less than 2**256. The result is rounded to the nearest increment.
     */
    function divideDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) {
        return _divideDecimalRound(x, y, PRECISE_UNIT);
    }

    /**
     * @dev Convert a standard decimal representation to a high precision one.
     */
    function decimalToPreciseDecimal(uint i) internal pure returns (uint) {
        return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);
    }

    /**
     * @dev Convert a high precision decimal to a standard decimal representation.
     */
    function preciseDecimalToDecimal(uint i) internal pure returns (uint) {
        uint quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);

        if (quotientTimesTen % 10 >= 5) {
            quotientTimesTen += 10;
        }

        return quotientTimesTen / 10;
    }

    // Computes `a - b`, setting the value to 0 if b > a.
    function floorsub(uint a, uint b) internal pure returns (uint) {
        return b >= a ? 0 : a - b;
    }
}


// https://docs.synthetix.io/contracts/source/interfaces/ierc20
interface IERC20 {
    // ERC20 Optional Views
    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function decimals() external view returns (uint8);

    // Views
    function totalSupply() external view returns (uint);

    function balanceOf(address owner) external view returns (uint);

    function allowance(address owner, address spender) external view returns (uint);

    // Mutative functions
    function transfer(address to, uint value) external returns (bool);

    function approve(address spender, uint value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint value
    ) external returns (bool);

    // Events
    event Transfer(address indexed from, address indexed to, uint value);

    event Approval(address indexed owner, address indexed spender, uint value);
}


// https://docs.synthetix.io/contracts/source/interfaces/ifeepool
interface IFeePool {
    // Views

    // solhint-disable-next-line func-name-mixedcase
    function FEE_ADDRESS() external view returns (address);

    function feesAvailable(address account) external view returns (uint, uint);

    function feePeriodDuration() external view returns (uint);

    function isFeesClaimable(address account) external view returns (bool);

    function targetThreshold() external view returns (uint);

    function totalFeesAvailable() external view returns (uint);

    function totalRewardsAvailable() external view returns (uint);

    // Mutative Functions
    function claimFees() external returns (bool);

    function claimOnBehalf(address claimingForAddress) external returns (bool);

    function closeCurrentFeePeriod() external;

    // Restricted: used internally to Synthetix
    function appendAccountIssuanceRecord(
        address account,
        uint lockedAmount,
        uint debtEntryIndex
    ) external;

    function recordFeePaid(uint sUSDAmount) external;

    function setRewardsToDistribute(uint amount) external;
}


interface IVirtualSynth {
    // Views
    function balanceOfUnderlying(address account) external view returns (uint);

    function rate() external view returns (uint);

    function readyToSettle() external view returns (bool);

    function secsLeftInWaitingPeriod() external view returns (uint);

    function settled() external view returns (bool);

    function synth() external view returns (ISynth);

    // Mutative functions
    function settle(address account) external;
}


// https://docs.synthetix.io/contracts/source/interfaces/isynthetix
interface ISynthetix {
    // Views
    function anySynthOrSNXRateIsInvalid() external view returns (bool anyRateInvalid);

    function availableCurrencyKeys() external view returns (bytes32[] memory);

    function availableSynthCount() external view returns (uint);

    function availableSynths(uint index) external view returns (ISynth);

    function collateral(address account) external view returns (uint);

    function collateralisationRatio(address issuer) external view returns (uint);

    function debtBalanceOf(address issuer, bytes32 currencyKey) external view returns (uint);

    function isWaitingPeriod(bytes32 currencyKey) external view returns (bool);

    function maxIssuableSynths(address issuer) external view returns (uint maxIssuable);

    function remainingIssuableSynths(address issuer)
        external
        view
        returns (
            uint maxIssuable,
            uint alreadyIssued,
            uint totalSystemDebt
        );

    function synths(bytes32 currencyKey) external view returns (ISynth);

    function synthsByAddress(address synthAddress) external view returns (bytes32);

    function totalIssuedSynths(bytes32 currencyKey) external view returns (uint);

    function totalIssuedSynthsExcludeOtherCollateral(bytes32 currencyKey) external view returns (uint);

    function transferableSynthetix(address account) external view returns (uint transferable);

    // Mutative Functions
    function burnSynths(uint amount) external;

    function burnSynthsOnBehalf(address burnForAddress, uint amount) external;

    function burnSynthsToTarget() external;

    function burnSynthsToTargetOnBehalf(address burnForAddress) external;

    function exchange(
        bytes32 sourceCurrencyKey,
        uint sourceAmount,
        bytes32 destinationCurrencyKey
    ) external returns (uint amountReceived);

    function exchangeOnBehalf(
        address exchangeForAddress,
        bytes32 sourceCurrencyKey,
        uint sourceAmount,
        bytes32 destinationCurrencyKey
    ) external returns (uint amountReceived);

    function exchangeWithTracking(
        bytes32 sourceCurrencyKey,
        uint sourceAmount,
        bytes32 destinationCurrencyKey,
        address rewardAddress,
        bytes32 trackingCode
    ) external returns (uint amountReceived);

    function exchangeWithTrackingForInitiator(
        bytes32 sourceCurrencyKey,
        uint sourceAmount,
        bytes32 destinationCurrencyKey,
        address rewardAddress,
        bytes32 trackingCode
    ) external returns (uint amountReceived);

    function exchangeOnBehalfWithTracking(
        address exchangeForAddress,
        bytes32 sourceCurrencyKey,
        uint sourceAmount,
        bytes32 destinationCurrencyKey,
        address rewardAddress,
        bytes32 trackingCode
    ) external returns (uint amountReceived);

    function exchangeWithVirtual(
        bytes32 sourceCurrencyKey,
        uint sourceAmount,
        bytes32 destinationCurrencyKey,
        bytes32 trackingCode
    ) external returns (uint amountReceived, IVirtualSynth vSynth);

    function issueMaxSynths() external;

    function issueMaxSynthsOnBehalf(address issueForAddress) external;

    function issueSynths(uint amount) external;

    function issueSynthsOnBehalf(address issueForAddress, uint amount) external;

    function mint() external returns (bool);

    function settle(bytes32 currencyKey)
        external
        returns (
            uint reclaimed,
            uint refunded,
            uint numEntries
        );

    // Liquidations
    function liquidateDelinquentAccount(address account, uint susdAmount) external returns (bool);

    // Restricted Functions

    function mintSecondary(address account, uint amount) external;

    function mintSecondaryRewards(uint amount) external;

    function burnSecondary(address account, uint amount) external;
}


// Inheritance


// Libraries


// Internal references


// https://docs.synthetix.io/contracts/RewardEscrow
contract BaseRewardEscrowV2 is Owned, IRewardEscrowV2, LimitedSetup(8 weeks), MixinResolver {
    using SafeMath for uint;
    using SafeDecimalMath for uint;

    mapping(address => mapping(uint256 => VestingEntries.VestingEntry)) public vestingSchedules;

    mapping(address => uint256[]) public accountVestingEntryIDs;

    /*Counter for new vesting entry ids. */
    uint256 public nextEntryId;

    /* An account's total escrowed synthetix balance to save recomputing this for fee extraction purposes. */
    mapping(address => uint256) public totalEscrowedAccountBalance;

    /* An account's total vested reward synthetix. */
    mapping(address => uint256) public totalVestedAccountBalance;

    /* Mapping of nominated address to recieve account merging */
    mapping(address => address) public nominatedReceiver;

    /* The total remaining escrowed balance, for verifying the actual synthetix balance of this contract against. */
    uint256 public totalEscrowedBalance;

    /* Max escrow duration */
    uint public max_duration = 2 * 52 weeks; // Default max 2 years duration

    /* Max account merging duration */
    uint public maxAccountMergingDuration = 4 weeks; // Default 4 weeks is max

    /* ========== ACCOUNT MERGING CONFIGURATION ========== */

    uint public accountMergingDuration = 1 weeks;

    uint public accountMergingStartTime;

    /* ========== ADDRESS RESOLVER CONFIGURATION ========== */

    bytes32 private constant CONTRACT_SYNTHETIX = "Synthetix";
    bytes32 private constant CONTRACT_ISSUER = "Issuer";
    bytes32 private constant CONTRACT_FEEPOOL = "FeePool";

    /* ========== CONSTRUCTOR ========== */

    constructor(address _owner, address _resolver) public Owned(_owner) MixinResolver(_resolver) {
        nextEntryId = 1;
    }

    /* ========== VIEWS ======================= */

    function feePool() internal view returns (IFeePool) {
        return IFeePool(requireAndGetAddress(CONTRACT_FEEPOOL));
    }

    function synthetix() internal view returns (ISynthetix) {
        return ISynthetix(requireAndGetAddress(CONTRACT_SYNTHETIX));
    }

    function issuer() internal view returns (IIssuer) {
        return IIssuer(requireAndGetAddress(CONTRACT_ISSUER));
    }

    function _notImplemented() internal pure {
        revert("Cannot be run on this layer");
    }

    /* ========== VIEW FUNCTIONS ========== */

    // Note: use public visibility so that it can be invoked in a subclass
    function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {
        addresses = new bytes32[](3);
        addresses[0] = CONTRACT_SYNTHETIX;
        addresses[1] = CONTRACT_FEEPOOL;
        addresses[2] = CONTRACT_ISSUER;
    }

    /**
     * @notice A simple alias to totalEscrowedAccountBalance: provides ERC20 balance integration.
     */
    function balanceOf(address account) public view returns (uint) {
        return totalEscrowedAccountBalance[account];
    }

    /**
     * @notice The number of vesting dates in an account's schedule.
     */
    function numVestingEntries(address account) external view returns (uint) {
        return accountVestingEntryIDs[account].length;
    }

    /**
     * @notice Get a particular schedule entry for an account.
     * @return The vesting entry object and rate per second emission.
     */
    function getVestingEntry(address account, uint256 entryID) external view returns (uint64 endTime, uint256 escrowAmount) {
        endTime = vestingSchedules[account][entryID].endTime;
        escrowAmount = vestingSchedules[account][entryID].escrowAmount;
    }

    function getVestingSchedules(
        address account,
        uint256 index,
        uint256 pageSize
    ) external view returns (VestingEntries.VestingEntryWithID[] memory) {
        uint256 endIndex = index + pageSize;

        // If index starts after the endIndex return no results
        if (endIndex <= index) {
            return new VestingEntries.VestingEntryWithID[](0);
        }

        // If the page extends past the end of the accountVestingEntryIDs, truncate it.
        if (endIndex > accountVestingEntryIDs[account].length) {
            endIndex = accountVestingEntryIDs[account].length;
        }

        uint256 n = endIndex - index;
        VestingEntries.VestingEntryWithID[] memory vestingEntries = new VestingEntries.VestingEntryWithID[](n);
        for (uint256 i; i < n; i++) {
            uint256 entryID = accountVestingEntryIDs[account][i + index];

            VestingEntries.VestingEntry memory entry = vestingSchedules[account][entryID];

            vestingEntries[i] = VestingEntries.VestingEntryWithID({
                endTime: uint64(entry.endTime),
                escrowAmount: entry.escrowAmount,
                entryID: entryID
            });
        }
        return vestingEntries;
    }

    function getAccountVestingEntryIDs(
        address account,
        uint256 index,
        uint256 pageSize
    ) external view returns (uint256[] memory) {
        uint256 endIndex = index + pageSize;

        // If the page extends past the end of the accountVestingEntryIDs, truncate it.
        if (endIndex > accountVestingEntryIDs[account].length) {
            endIndex = accountVestingEntryIDs[account].length;
        }
        if (endIndex <= index) {
            return new uint256[](0);
        }

        uint256 n = endIndex - index;
        uint256[] memory page = new uint256[](n);
        for (uint256 i; i < n; i++) {
            page[i] = accountVestingEntryIDs[account][i + index];
        }
        return page;
    }

    function getVestingQuantity(address account, uint256[] calldata entryIDs) external view returns (uint total) {
        for (uint i = 0; i < entryIDs.length; i++) {
            VestingEntries.VestingEntry memory entry = vestingSchedules[account][entryIDs[i]];

            /* Skip entry if escrowAmount == 0 */
            if (entry.escrowAmount != 0) {
                uint256 quantity = _claimableAmount(entry);

                /* add quantity to total */
                total = total.add(quantity);
            }
        }
    }

    function getVestingEntryClaimable(address account, uint256 entryID) external view returns (uint) {
        VestingEntries.VestingEntry memory entry = vestingSchedules[account][entryID];
        return _claimableAmount(entry);
    }

    function _claimableAmount(VestingEntries.VestingEntry memory _entry) internal view returns (uint256) {
        uint256 quantity;
        if (_entry.escrowAmount != 0) {
            /* Escrow amounts claimable if block.timestamp equal to or after entry endTime */
            quantity = block.timestamp >= _entry.endTime ? _entry.escrowAmount : 0;
        }
        return quantity;
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    /**
     * Vest escrowed amounts that are claimable
     * Allows users to vest their vesting entries based on msg.sender
     */

    function vest(uint256[] calldata entryIDs) external {
        uint256 total;
        for (uint i = 0; i < entryIDs.length; i++) {
            VestingEntries.VestingEntry storage entry = vestingSchedules[msg.sender][entryIDs[i]];

            /* Skip entry if escrowAmount == 0 already vested */
            if (entry.escrowAmount != 0) {
                uint256 quantity = _claimableAmount(entry);

                /* update entry to remove escrowAmount */
                if (quantity > 0) {
                    entry.escrowAmount = 0;
                }

                /* add quantity to total */
                total = total.add(quantity);
            }
        }

        /* Transfer vested tokens. Will revert if total > totalEscrowedAccountBalance */
        if (total != 0) {
            _transferVestedTokens(msg.sender, total);
        }
    }

    /**
     * @notice Create an escrow entry to lock SNX for a given duration in seconds
     * @dev This call expects that the depositor (msg.sender) has already approved the Reward escrow contract
     to spend the the amount being escrowed.
     */
    function createEscrowEntry(
        address beneficiary,
        uint256 deposit,
        uint256 duration
    ) external {
        require(beneficiary != address(0), "Cannot create escrow with address(0)");

        /* Transfer SNX from msg.sender */
        require(IERC20(address(synthetix())).transferFrom(msg.sender, address(this), deposit), "token transfer failed");

        /* Append vesting entry for the beneficiary address */
        _appendVestingEntry(beneficiary, deposit, duration);
    }

    /**
     * @notice Add a new vesting entry at a given time and quantity to an account's schedule.
     * @dev A call to this should accompany a previous successful call to synthetix.transfer(rewardEscrow, amount),
     * to ensure that when the funds are withdrawn, there is enough balance.
     * @param account The account to append a new vesting entry to.
     * @param quantity The quantity of SNX that will be escrowed.
     * @param duration The duration that SNX will be emitted.
     */
    function appendVestingEntry(
        address account,
        uint256 quantity,
        uint256 duration
    ) external onlyFeePool {
        _appendVestingEntry(account, quantity, duration);
    }

    /* Transfer vested tokens and update totalEscrowedAccountBalance, totalVestedAccountBalance */
    function _transferVestedTokens(address _account, uint256 _amount) internal {
        _reduceAccountEscrowBalances(_account, _amount);
        totalVestedAccountBalance[_account] = totalVestedAccountBalance[_account].add(_amount);
        IERC20(address(synthetix())).transfer(_account, _amount);
        emit Vested(_account, block.timestamp, _amount);
    }

    function _reduceAccountEscrowBalances(address _account, uint256 _amount) internal {
        // Reverts if amount being vested is greater than the account's existing totalEscrowedAccountBalance
        totalEscrowedBalance = totalEscrowedBalance.sub(_amount);
        totalEscrowedAccountBalance[_account] = totalEscrowedAccountBalance[_account].sub(_amount);
    }

    /* ========== ACCOUNT MERGING ========== */

    function accountMergingIsOpen() public view returns (bool) {
        return accountMergingStartTime.add(accountMergingDuration) > block.timestamp;
    }

    function startMergingWindow() external onlyOwner {
        accountMergingStartTime = block.timestamp;
        emit AccountMergingStarted(accountMergingStartTime, accountMergingStartTime.add(accountMergingDuration));
    }

    function setAccountMergingDuration(uint256 duration) external onlyOwner {
        require(duration <= maxAccountMergingDuration, "exceeds max merging duration");
        accountMergingDuration = duration;
        emit AccountMergingDurationUpdated(duration);
    }

    function setMaxAccountMergingWindow(uint256 duration) external onlyOwner {
        maxAccountMergingDuration = duration;
        emit MaxAccountMergingDurationUpdated(duration);
    }

    function setMaxEscrowDuration(uint256 duration) external onlyOwner {
        max_duration = duration;
        emit MaxEscrowDurationUpdated(duration);
    }

    /* Nominate an account to merge escrow and vesting schedule */
    function nominateAccountToMerge(address account) external {
        require(account != msg.sender, "Cannot nominate own account to merge");
        require(accountMergingIsOpen(), "Account merging has ended");
        require(issuer().debtBalanceOf(msg.sender, "sUSD") == 0, "Cannot merge accounts with debt");
        nominatedReceiver[msg.sender] = account;
        emit NominateAccountToMerge(msg.sender, account);
    }

    function mergeAccount(address accountToMerge, uint256[] calldata entryIDs) external {
        require(accountMergingIsOpen(), "Account merging has ended");
        require(issuer().debtBalanceOf(accountToMerge, "sUSD") == 0, "Cannot merge accounts with debt");
        require(nominatedReceiver[accountToMerge] == msg.sender, "Address is not nominated to merge");

        uint256 totalEscrowAmountMerged;
        for (uint i = 0; i < entryIDs.length; i++) {
            // retrieve entry
            VestingEntries.VestingEntry memory entry = vestingSchedules[accountToMerge][entryIDs[i]];

            /* ignore vesting entries with zero escrowAmount */
            if (entry.escrowAmount != 0) {
                /* copy entry to msg.sender (destination address) */
                vestingSchedules[msg.sender][entryIDs[i]] = entry;

                /* Add the escrowAmount of entry to the totalEscrowAmountMerged */
                totalEscrowAmountMerged = totalEscrowAmountMerged.add(entry.escrowAmount);

                /* append entryID to list of entries for account */
                accountVestingEntryIDs[msg.sender].push(entryIDs[i]);

                /* Delete entry from accountToMerge */
                delete vestingSchedules[accountToMerge][entryIDs[i]];
            }
        }

        /* update totalEscrowedAccountBalance for merged account and accountToMerge */
        totalEscrowedAccountBalance[accountToMerge] = totalEscrowedAccountBalance[accountToMerge].sub(
            totalEscrowAmountMerged
        );
        totalEscrowedAccountBalance[msg.sender] = totalEscrowedAccountBalance[msg.sender].add(totalEscrowAmountMerged);

        emit AccountMerged(accountToMerge, msg.sender, totalEscrowAmountMerged, entryIDs, block.timestamp);
    }

    /* Internal function for importing vesting entry and creating new entry for escrow liquidations */
    function _addVestingEntry(address account, VestingEntries.VestingEntry memory entry) internal returns (uint) {
        uint entryID = nextEntryId;
        vestingSchedules[account][entryID] = entry;

        /* append entryID to list of entries for account */
        accountVestingEntryIDs[account].push(entryID);

        /* Increment the next entry id. */
        nextEntryId = nextEntryId.add(1);

        return entryID;
    }

    /* ========== MIGRATION OLD ESCROW ========== */

    function migrateVestingSchedule(address) external {
        _notImplemented();
    }

    function migrateAccountEscrowBalances(
        address[] calldata,
        uint256[] calldata,
        uint256[] calldata
    ) external {
        _notImplemented();
    }

    /* ========== L2 MIGRATION ========== */

    function burnForMigration(address, uint[] calldata) external returns (uint256, VestingEntries.VestingEntry[] memory) {
        _notImplemented();
    }

    function importVestingEntries(
        address,
        uint256,
        VestingEntries.VestingEntry[] calldata
    ) external {
        _notImplemented();
    }

    /* ========== INTERNALS ========== */

    function _appendVestingEntry(
        address account,
        uint256 quantity,
        uint256 duration
    ) internal {
        /* No empty or already-passed vesting entries allowed. */
        require(quantity != 0, "Quantity cannot be zero");
        require(duration > 0 && duration <= max_duration, "Cannot escrow with 0 duration OR above max_duration");

        /* There must be enough balance in the contract to provide for the vesting entry. */
        totalEscrowedBalance = totalEscrowedBalance.add(quantity);

        require(
            totalEscrowedBalance <= IERC20(address(synthetix())).balanceOf(address(this)),
            "Must be enough balance in the contract to provide for the vesting entry"
        );

        /* Escrow the tokens for duration. */
        uint endTime = block.timestamp + duration;

        /* Add quantity to account's escrowed balance */
        totalEscrowedAccountBalance[account] = totalEscrowedAccountBalance[account].add(quantity);

        uint entryID = nextEntryId;
        vestingSchedules[account][entryID] = VestingEntries.VestingEntry({endTime: uint64(endTime), escrowAmount: quantity});

        accountVestingEntryIDs[account].push(entryID);

        /* Increment the next entry id. */
        nextEntryId = nextEntryId.add(1);

        emit VestingEntryCreated(account, block.timestamp, quantity, duration, entryID);
    }

    /* ========== MODIFIERS ========== */
    modifier onlyFeePool() {
        require(msg.sender == address(feePool()), "Only the FeePool can perform this action");
        _;
    }

    /* ========== EVENTS ========== */
    event Vested(address indexed beneficiary, uint time, uint value);
    event VestingEntryCreated(address indexed beneficiary, uint time, uint value, uint duration, uint entryID);
    event MaxEscrowDurationUpdated(uint newDuration);
    event MaxAccountMergingDurationUpdated(uint newDuration);
    event AccountMergingDurationUpdated(uint newDuration);
    event AccountMergingStarted(uint time, uint endTime);
    event AccountMerged(
        address indexed accountToMerge,
        address destinationAddress,
        uint escrowAmountMerged,
        uint[] entryIDs,
        uint time
    );
    event NominateAccountToMerge(address indexed account, address destination);
}


// Inheritance


// https://docs.synthetix.io/contracts/RewardEscrow
contract ImportableRewardEscrowV2 is BaseRewardEscrowV2 {
    /* ========== ADDRESS RESOLVER CONFIGURATION ========== */
    bytes32 private constant CONTRACT_SYNTHETIX_BRIDGE_BASE = "SynthetixBridgeToBase";

    /* ========== CONSTRUCTOR ========== */

    constructor(address _owner, address _resolver) public BaseRewardEscrowV2(_owner, _resolver) {}

    /* ========== VIEWS ======================= */

    function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {
        bytes32[] memory existingAddresses = BaseRewardEscrowV2.resolverAddressesRequired();
        bytes32[] memory newAddresses = new bytes32[](1);
        newAddresses[0] = CONTRACT_SYNTHETIX_BRIDGE_BASE;
        return combineArrays(existingAddresses, newAddresses);
    }

    function synthetixBridgeToBase() internal view returns (address) {
        return requireAndGetAddress(CONTRACT_SYNTHETIX_BRIDGE_BASE);
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    function importVestingEntries(
        address account,
        uint256 escrowedAmount,
        VestingEntries.VestingEntry[] calldata vestingEntries
    ) external onlySynthetixBridge {
        // There must be enough balance in the contract to provide for the escrowed balance.
        totalEscrowedBalance = totalEscrowedBalance.add(escrowedAmount);
        require(
            totalEscrowedBalance <= IERC20(address(synthetix())).balanceOf(address(this)),
            "Insufficient balance in the contract to provide for escrowed balance"
        );

        /* Add escrowedAmount to account's escrowed balance */
        totalEscrowedAccountBalance[account] = totalEscrowedAccountBalance[account].add(escrowedAmount);

        for (uint i = 0; i < vestingEntries.length; i++) {
            _importVestingEntry(account, vestingEntries[i]);
        }
    }

    function _importVestingEntry(address account, VestingEntries.VestingEntry memory entry) internal {
        uint entryID = nextEntryId;
        vestingSchedules[account][entryID] = entry;

        /* append entryID to list of entries for account */
        accountVestingEntryIDs[account].push(entryID);

        /* Increment the next entry id. */
        nextEntryId = nextEntryId.add(1);
    }

    modifier onlySynthetixBridge() {
        require(msg.sender == synthetixBridgeToBase(), "Can only be invoked by SynthetixBridgeToBase contract");
        _;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_resolver","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"accountToMerge","type":"address"},{"indexed":false,"internalType":"address","name":"destinationAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"escrowAmountMerged","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"entryIDs","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"AccountMerged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"AccountMergingDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"AccountMergingStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"name","type":"bytes32"},{"indexed":false,"internalType":"address","name":"destination","type":"address"}],"name":"CacheUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"MaxAccountMergingDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"MaxEscrowDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"address","name":"destination","type":"address"}],"name":"NominateAccountToMerge","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Vested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"entryID","type":"uint256"}],"name":"VestingEntryCreated","type":"event"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"accountMergingDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"accountMergingIsOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"accountMergingStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"accountVestingEntryIDs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"appendVestingEntry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"name":"burnForMigration","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"components":[{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint256","name":"escrowAmount","type":"uint256"}],"internalType":"struct VestingEntries.VestingEntry[]","name":"","type":"tuple[]"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"deposit","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"createEscrowEntry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"pageSize","type":"uint256"}],"name":"getAccountVestingEntryIDs","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"entryID","type":"uint256"}],"name":"getVestingEntry","outputs":[{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint256","name":"escrowAmount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"entryID","type":"uint256"}],"name":"getVestingEntryClaimable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"entryIDs","type":"uint256[]"}],"name":"getVestingQuantity","outputs":[{"internalType":"uint256","name":"total","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"pageSize","type":"uint256"}],"name":"getVestingSchedules","outputs":[{"components":[{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint256","name":"escrowAmount","type":"uint256"},{"internalType":"uint256","name":"entryID","type":"uint256"}],"internalType":"struct VestingEntries.VestingEntryWithID[]","name":"","type":"tuple[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"escrowedAmount","type":"uint256"},{"components":[{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint256","name":"escrowAmount","type":"uint256"}],"internalType":"struct VestingEntries.VestingEntry[]","name":"vestingEntries","type":"tuple[]"}],"name":"importVestingEntries","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isResolverCached","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxAccountMergingDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"max_duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"accountToMerge","type":"address"},{"internalType":"uint256[]","name":"entryIDs","type":"uint256[]"}],"name":"mergeAccount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"name":"migrateAccountEscrowBalances","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"migrateVestingSchedule","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nextEntryId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"nominateAccountToMerge","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nominatedReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"numVestingEntries","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebuildCache","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"resolver","outputs":[{"internalType":"contract AddressResolver","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"resolverAddressesRequired","outputs":[{"internalType":"bytes32[]","name":"addresses","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"setAccountMergingDuration","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"setMaxAccountMergingWindow","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"setMaxEscrowDuration","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"setupExpiryTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"startMergingWindow","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalEscrowedAccountBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalEscrowedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalVestedAccountBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256[]","name":"entryIDs","type":"uint256[]"}],"name":"vest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"vestingSchedules","outputs":[{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint256","name":"escrowAmount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]

80604052348015610019576000806100166128ae565b50505b506004361061025c5760003560e01c80636dc05bd31161014f57806380d46f58116100cc578063ae58254911610090578063ae582549146104d3578063b95375bd146104e6578063cd7b43dd146104f9578063e6b2cf6c1461050c578063eac6248914610514578063f0b882ba146105345761025c565b806380d46f581461047a578063899ffef41461049b5780638da5cb5b146104b0578063910a326d146104b8578063a0416ed3146104c05761025c565b8063773ab39f11610113578063773ab39f146104195780637839b92f146104395780637993e6991461044c57806379ba50971461045f5780637cc1d756146104675761025c565b80636dc05bd3146103d057806370a08231146103e357806371e780f3146103f657806373307e40146103fe57806374185360146104115761025c565b806330104c5f116101dd57806345626bd6116101a157806345626bd61461037757806346ba2d901461039857806353a47bb7146103a05780635eb8cf25146103b55780636154c343146103bd5761025c565b806330104c5f14610323578063326a3cfb1461033657806334c7fec91461034957806337088ffc1461035c5780634525aabc146103645761025c565b8063178c565511610224578063178c5655146102da5780631bb47b44146102e2578063204b676a146102f5578063227d517a146103085780632af64bd31461031b5761025c565b8063018c6c551461026a57806304f3bcec1461027f578063056629861461029d5780630fcdefb7146102b25780631627540c146102c7575b6000806102676128ae565b50505b61027d610278366004613105565b610547565b005b610287610598565b6040516102949190613afd565b60405180910390f35b6102a56105b7565b6040516102949190613ab3565b6102ba6105ec565b6040516102949190613ac1565b61027d6102d5366004612ddb565b6105f9565b61027d610662565b61027d6102f0366004612f4c565b6106d1565b6102ba610303366004612ddb565b610733565b6102ba610316366004612ddb565b61075b565b6102a5610773565b6102ba610331366004612e90565b6108f4565b6102ba610344366004612ddb565b610977565b61027d610357366004613064565b61098f565b6102ba610a99565b61027d610372366004613105565b610aa3565b61038a610385366004612e90565b610ae9565b604051610294929190613ca8565b6102ba610b34565b6103a8610b3e565b604051610294919061399d565b6102ba610b4a565b61038a6103cb366004612e90565b610b54565b6102ba6103de366004612e29565b610be1565b6102ba6103f1366004612ddb565b610cab565b6102ba610ccb565b6103a861040c366004612ddb565b610cd5565b61027d610cef565b61042c610427366004612f4c565b610e86565b6040516102949190613a91565b61027d610447366004612ddb565b611074565b61027d61045a366004613105565b61107f565b61027d611100565b61027d610475366004612ddb565b61125b565b61048d610488366004612e29565b611465565b604051610294929190613c3c565b6104a3611479565b6040516102949190613a80565b6103a86114f9565b6102ba611504565b61027d6104ce366004612f4c565b61150e565b6102ba6104e1366004612e90565b611670565b61027d6104f4366004612fa2565b6116a6565b61027d610507366004612ed3565b6116b6565b6102ba6118ee565b610527610522366004612f4c565b6118f8565b6040516102949190613aa2565b61027d610542366004612e29565b611a22565b61054f611f10565b8080600d61055b612919565b5050507fe829efae5d8a2f7163f46c23a8190bf14625c1e446561ca0f5cf279ab7c8015e8160405161058d9190613ac1565b60405180910390a150565b600060036105a4612976565b906101000a90046001600160a01b031681565b60005a6105c26129c2565b6105e5600e6105cf612976565b600f6105d9612976565b9063ffffffff611f7416565b1190505b90565b600f6105f6612976565b81565b610601611f10565b806001808061060e612976565b816001600160a01b0302191690836001600160a01b0316021790610630612919565b5050507f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce228160405161058d919061399d565b61066a611f10565b5a6106736129c2565b80600f61067e612919565b5050507fceade2b9bc02350b17075c94bb699508b89ed2752f501ea42024b1bb5fd34445600f6106ac612976565b6106b9600e6105cf612976565b6040516106c7929190613c5c565b60405180910390a1565b6106d9611fb1565b6001600160a01b03165a6106eb612a08565b6001600160a01b0316146107235760405162461bcd60e51b815260040161071190613c0c565b604051809103906107206128ae565b50505b61072e838383611fcb565b505050565b6001600160a01b038116600090815260066020526040812080610754612976565b9392505050565b600960205280600052604060002090506105f6612976565b6000606061077f611479565b905060005b81518110156108eb57600082828151811061079b57fe5b602002602001015160008181526004602052909150604090206000906107bf612976565b6001600160a01b036101009290920a900416600060036107dd612976565b906101000a90046001600160a01b03166001600160a01b03166321f8a721836040518263ffffffff1660e01b81526004016108189190613ac1565b602060405180830381868061082b612a4e565b1580156108405760008061083d6128ae565b50505b505a61084a612a9a565b5050505050158015610869573d6000803e3d60006108666128ae565b50505b50505050604051601f3d908101601f1916820160405261088c9190810190612e02565b6001600160a01b03161415806108d1575060008181526004602052604081206000906108b6612976565b906101000a90046001600160a01b03166001600160a01b0316145b156108e257600093505050506105e9565b50600101610784565b50600191505090565b60006108fe612b85565b6001600160a01b038416600090815260056020526040902060008481526020919091526040902060405160408082019052908160008261093c612976565b6001600160401b036101009290920a90041681526020016001820161095f612976565b905250905061096d8161234f565b9150505b92915050565b600860205280600052604060002090506105f6612976565b6000805b82811015610a80576000600560005a6109aa612a08565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008686858181106109d857fe5b9050602002013581526020019081526020016000209050806001016109fb612976565b15610a77576000610a4882604051604080820190529081600082610a1d612976565b6001600160401b036101009290920a900416815260200160018201610a40612976565b90525061234f565b90508015610a635760008060018401610a5f612919565b5050505b610a73848263ffffffff611f7416565b9350505b50600101610993565b50801561072e5761072e5a610a93612a08565b82612389565b600d6105f6612976565b610aab611f10565b8080600c610ab7612919565b5050507f6b92bd20c4b2e6861047ba7209ddc78d538419aae187d0df46716b827b8997a48160405161058d9190613ac1565b600560205281600052604060002060205280600052604060002091506000905081610b12612976565b906101000a90046001600160401b03169080600101610b2f612976565b905082565b60026105f6612976565b600060016105a4612976565b600c6105f6612976565b6001600160a01b038216600090815260056020528060408120600084815260209190915260409020600090610b87612976565b906101000a90046001600160401b0316915060056000856001600160a01b03166001600160a01b03168152602001908152602001600020600084815260209190915260409020600101610bd8612976565b90509250929050565b6000805b82811015610ca357610bf5612b85565b6001600160a01b03861660009081526005602052604090206000868685818110610c1b57fe5b905060200201358152602001908152602001600020604051604080820190529081600082610c47612976565b6001600160401b036101009290920a900416815260200160018201610c6a612976565b9052509050602081015115610c9a576000610c848261234f565b9050610c96848263ffffffff611f7416565b9350505b50600101610be5565b509392505050565b6001600160a01b0381166000908152600860205260408120610971612976565b600b6105f6612976565b600a602052806000526040600020600091506105a4612976565b6060610cf9611479565b905060005b8151811015610e82576000828281518110610d1557fe5b602002602001015190506000806003610d2c612976565b906101000a90046001600160a01b03166001600160a01b031663dacb2d018384604051602001610d5c9190613992565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401610d88929190613add565b6020604051808303818680610d9b612a4e565b158015610db057600080610dad6128ae565b50505b505a610dba612a9a565b5050505050158015610dd9573d6000803e3d6000610dd66128ae565b50505b50505050604051601f3d908101601f19168201604052610dfc9190810190612e02565b60008381526004602052909150819060409020600181610e1a612976565b816001600160a01b0302191690836001600160a01b0316021790610e3c612919565b5050507f88a93678a3692f6789d9546fc621bf7234b101ddb7d4fe479455112831b8aa688282604051610e70929190613acf565b60405180910390a15050600101610cfe565b5050565b6060828201838111610ed6576000604051908082528060200260200182016040528015610ecd57816020015b610eba612b9c565b815260200190600190039081610eb25790505b50915050610754565b6001600160a01b038516600090815260066020526040902080610ef7612976565b9050811115610f25576001600160a01b038516600090815260066020526040902080610f21612976565b9150505b838103606081604051908082528060200260200182016040528015610f6457816020015b610f51612b9c565b815260200190600190039081610f495790505b50905060005b82811015611069576001600160a01b038816600090815260066020526040812088830181610f96612976565b8110610f9e57fe5b90600052602060002001610fb0612976565b9050610fba612b85565b6001600160a01b038a166000908152600560205260409020600083815260209190915260409020604051604080820190529081600082610ff8612976565b6001600160401b036101009290920a90041681526020016001820161101b612976565b9052509050604051606081016040528082516001600160401b031681526020018260200151815260200183905284848151811061105457fe5b60209081029190910101525050600101610f6a565b509695505050505050565b61107c6124da565b50565b611087611f10565b600d611091612976565b8111156110c25760405162461bcd60e51b81526004016110b090613bfc565b604051809103906110bf6128ae565b50505b8080600e6110ce612919565b5050507f723c43349da7aeae47190396f2e2fbe6bedb46b9e9705bc5b908d65bc7a1e0e68160405161058d9190613ac1565b6000600161110c612976565b906101000a90046001600160a01b03166001600160a01b03165a61112e612a08565b6001600160a01b0316146111665760405162461bcd60e51b815260040161115490613b1c565b604051809103906111636128ae565b50505b7fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c600080611192612976565b906101000a90046001600160a01b031660016000906111af612976565b906101000a90046001600160a01b03166040516111cd929190613a3c565b60405180910390a1600060016111e1612976565b906101000a90046001600160a01b03166000806101000a81611201612976565b816001600160a01b0302191690836001600160a01b0316021790611223612919565b5050506000600160006101000a81611239612976565b816001600160a01b0302191690836001600160a01b031602179061072e612919565b5a611264612a08565b6001600160a01b0316816001600160a01b031614156112a75760405162461bcd60e51b815260040161129590613bcc565b604051809103906112a46128ae565b50505b6112af6105b7565b6112dd5760405162461bcd60e51b81526004016112cb90613bac565b604051809103906112da6128ae565b50505b6112e56124f2565b6001600160a01b031663d37c4d8b5a6112fc612a08565b6040518263ffffffff1660e01b815260040161131891906139db565b602060405180830381868061132b612a4e565b1580156113405760008061133d6128ae565b50505b505a61134a612a9a565b5050505050158015611369573d6000803e3d60006113666128ae565b50505b50505050604051601f3d908101601f1916820160405261138c919081019061312c565b156113bb5760405162461bcd60e51b81526004016113a990613c2c565b604051809103906113b86128ae565b50505b80600a60005a6113c9612a08565b6001600160a01b03166001600160a01b031681526020019081526020016000206001816113f4612976565b816001600160a01b0302191690836001600160a01b0316021790611416612919565b5050505a611422612a08565b6001600160a01b03167fcf51776bb16e5780edcca2e64a9ba8a9c7d5d00a6699cbd7606e465361ba48528260405161145a919061399d565b60405180910390a250565b600060606114716124da565b935093915050565b606080611484612506565b9050606060016040519080825280602002602001820160405280156114b3578160200160208202803883390190505b5090507453796e746865746978427269646765546f4261736560581b816000815181106114dc57fe5b6020026020010181815250506114f282826125a6565b9250505090565b6000806105a4612976565b600e6105f6612976565b6001600160a01b0383166115465760405162461bcd60e51b815260040161153490613b4c565b604051809103906115436128ae565b50505b61154e612662565b6001600160a01b03166323b872dd5a611565612a08565b5a63996d79a5598160e01b8152602081600483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b8051925060005b60408110156115bb576000828201526020016115a4565b505050856040518463ffffffff1660e01b81526004016115dd939291906139ab565b602060405180830381600087806115f2612a4e565b158015611607576000806116046128ae565b50505b505a611611612bbb565b505050505050158015611631573d6000803e3d600061162e6128ae565b50505b50505050604051601f3d908101601f1916820160405261165491908101906130b7565b6107235760405162461bcd60e51b815260040161071190613bbc565b60066020528160005260406000208181611688612976565b811061169057fe5b9060005260206000200191506105f69050612976565b6116ae6124da565b505050505050565b6116be612679565b6001600160a01b03165a6116d0612a08565b6001600160a01b0316146117085760405162461bcd60e51b81526004016116f690613b5c565b604051809103906117056128ae565b50505b61171683600b6105d9612976565b80600b611721612919565b50505061172c612662565b6001600160a01b03166370a082315a63996d79a5598160e01b8152602081600483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b8051925060005b604081101561179057600082820152602001611779565b5050506040518263ffffffff1660e01b81526004016117af919061399d565b60206040518083038186806117c2612a4e565b1580156117d7576000806117d46128ae565b50505b505a6117e1612a9a565b5050505050158015611800573d6000803e3d60006117fd6128ae565b50505b50505050604051601f3d908101601f19168201604052611823919081019061312c565b600b61182d612976565b111561185d5760405162461bcd60e51b815260040161184b90613c1c565b6040518091039061185a6128ae565b50505b6001600160a01b03841660009081526008602052611883908490604090206105d9612976565b6001600160a01b038516600090815260086020526040902081906118a5612919565b5060009150505b818110156118e7576118df858484848181106118c457fe5b9050604002018036036118da91908101906130de565b61269c565b6001016118ac565b5050505050565b60076105f6612976565b6001600160a01b03831660009081526006602052606090838301906040902080611920612976565b905081111561194e576001600160a01b03851660009081526006602052604090208061194a612976565b9150505b838111611988576000604051908082528060200260200182016040528015610ecd5781602001602082028038833901905050915050610754565b8381036060816040519080825280602002602001820160405280156119b7578160200160208202803883390190505b50905060005b82811015611069576001600160a01b0388166000908152600660205260409020878201816119e9612976565b81106119f157fe5b90600052602060002001611a03612976565b828281518110611a0f57fe5b60209081029190910101526001016119bd565b611a2a6105b7565b611a585760405162461bcd60e51b8152600401611a4690613bac565b60405180910390611a556128ae565b50505b611a606124f2565b6001600160a01b031663d37c4d8b846040518263ffffffff1660e01b8152600401611a8b9190613a57565b6020604051808303818680611a9e612a4e565b158015611ab357600080611ab06128ae565b50505b505a611abd612a9a565b5050505050158015611adc573d6000803e3d6000611ad96128ae565b50505b50505050604051601f3d908101601f19168201604052611aff919081019061312c565b15611b2e5760405162461bcd60e51b8152600401611b1c90613c2c565b60405180910390611b2b6128ae565b50505b5a611b37612a08565b6001600160a01b038481166000908152600a60205291169060409020600090611b5e612976565b906101000a90046001600160a01b03166001600160a01b031614611ba65760405162461bcd60e51b8152600401611b9490613bec565b60405180910390611ba36128ae565b50505b6000805b82811015611de657611bba612b85565b6001600160a01b03861660009081526005602052604090206000868685818110611be057fe5b905060200201358152602001908152602001600020604051604080820190529081600082611c0c612976565b6001600160401b036101009290920a900416815260200160018201611c2f612976565b9052509050602081015115611ddd5780600560005a611c4c612a08565b6001600160a01b03166001600160a01b031681526020019081526020016000206000878786818110611c7a57fe5b905060200201358152602001908152602001600020815181600181611c9d612976565b816001600160401b0302191690836001600160401b0316021790611cbf612919565b505050602082015181600101611cd3612919565b5050905050611ced8160200151849063ffffffff611f7416565b9250600660005a611cfc612a08565b6001600160a01b03166001600160a01b03168152602001908152602001600020858584818110611d2857fe5b905060200201359080600181611d3c612976565b018082611d47612919565b5050600092835291600019830191506020902091929101611d66612919565b5050506001600160a01b03861660009081526005602052604090206000868685818110611d8f57fe5b905060200201358152602001908152602001600020600081600181611db2612976565b906001600160401b0302191690611dc7612919565b505060018201600090611dd8612919565b505050505b50600101611baa565b506001600160a01b03841660009081526008602052611e1990829060409020611e0d612976565b9063ffffffff61278916565b6001600160a01b03851660009081526008602052604090208190611e3b612919565b505050611e7781600860005a611e4f612a08565b6001600160a01b03166001600160a01b031681526020019081526020016000206105d9612976565b600860005a611e84612a08565b6001600160a01b03166001600160a01b031681526020019081526020016000208190611eae612919565b505050836001600160a01b03167f48d567deaa7db90f8a443344e519ca8906521ffe118e1df43e89a3c257963f7c5a611ee5612a08565b8386865a611ef16129c2565b604051611f029594939291906139f5565b60405180910390a250505050565b600080611f1b612976565b906101000a90046001600160a01b03166001600160a01b03165a611f3d612a08565b6001600160a01b031614611f725760405162461bcd60e51b8152600401611f6390613bdc565b60405180910390610e826128ae565b565b6000828201838110156107545760405162461bcd60e51b8152600401611f9990613b2c565b60405180910390611fa86128ae565b50509392505050565b6000611fc666119959541bdbdb60ca1b6127c3565b905090565b81611ffa5760405162461bcd60e51b8152600401611fe890613b8c565b60405180910390611ff76128ae565b50505b6000811180156120135750600c61200f612976565b8111155b6120415760405162461bcd60e51b815260040161202f90613b3c565b6040518091039061203e6128ae565b50505b61204f82600b6105d9612976565b80600b61205a612919565b505050612065612662565b6001600160a01b03166370a082315a63996d79a5598160e01b8152602081600483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b8051925060005b60408110156120c9576000828201526020016120b2565b5050506040518263ffffffff1660e01b81526004016120e8919061399d565b60206040518083038186806120fb612a4e565b1580156121105760008061210d6128ae565b50505b505a61211a612a9a565b5050505050158015612139573d6000803e3d60006121366128ae565b50505b50505050604051601f3d908101601f1916820160405261215c919081019061312c565b600b612166612976565b11156121965760405162461bcd60e51b815260040161218490613b9c565b604051809103906121936128ae565b50505b6000815a6121a26129c2565b6001600160a01b03861660009081526008602052910191506121cc908490604090206105d9612976565b6001600160a01b038516600090815260086020526040902081906121ee612919565b505050600060076121fd612976565b9050604051604080820181526001600160401b038416825260208083018790526001600160a01b038816600090815260059091522060008381526020919091526040902081518160018161224f612976565b816001600160401b0302191690836001600160401b0316021790612271612919565b505050602082015181600101612285612919565b5050506001600160a01b0386166000908152600660205260409150208190806001816122af612976565b0180826122ba612919565b50506000928352916000198301915060209020919291016122d9612919565b5050506122eb600160076105d9612976565b8060076122f6612919565b505050846001600160a01b03167f2cc016694185d38abbe28d9e9baea2e9d95a321ae43475e5ea7b643756840bc05a61232d6129c2565b8686856040516123409493929190613c6a565b60405180910390a25050505050565b6000808260200151156109715782516001600160401b03165a6123706129c2565b101561237d576000610754565b82602001519392505050565b612393828261284a565b6001600160a01b038216600090815260096020526123b9908290604090206105d9612976565b6001600160a01b038316600090815260096020526040902081906123db612919565b5050506123e6612662565b6001600160a01b031663a9059cbb83836040518363ffffffff1660e01b8152600401612413929190613a65565b60206040518083038160008780612428612a4e565b15801561243d5760008061243a6128ae565b50505b505a612447612bbb565b505050505050158015612467573d6000803e3d60006124646128ae565b50505b50505050604051601f3d908101601f1916820160405261248a91908101906130b7565b50816001600160a01b03167ffbeff59d2bfda0d79ea8a29f8c57c66d48c7a13eabbdb90908d9115ec41c9dc65a6124bf6129c2565b836040516124ce929190613c5c565b60405180910390a25050565b60405162461bcd60e51b8152600401611f6390613b7c565b6000611fc66524b9b9bab2b960d11b6127c3565b60606003604051908082528060200260200182016040528015612533578160200160208202803883390190505b509050680a6f2dce8d0cae8d2f60bb1b8160008151811061255057fe5b60200260200101818152505066119959541bdbdb60ca1b8160018151811061257457fe5b6020026020010181815250506524b9b9bab2b960d11b8160028151811061259757fe5b60200260200101818152505090565b606081518351016040519080825280602002602001820160405280156125d6578160200160208202803883390190505b50905060005b8351811015612618578381815181106125f157fe5b602002602001015182828151811061260557fe5b60209081029190910101526001016125dc565b5060005b825181101561265b5782818151811061263157fe5b602002602001015182828651018151811061264857fe5b602090810291909101015260010161261c565b5092915050565b6000611fc6680a6f2dce8d0cae8d2f60bb1b6127c3565b6000611fc67453796e746865746978427269646765546f4261736560581b6127c3565b600060076126a8612976565b6001600160a01b038416600090815260056020529091508290604090206000838152602091909152604090208151816001816126e2612976565b816001600160401b0302191690836001600160401b0316021790612704612919565b505050602082015181600101612718612919565b5050506001600160a01b038416600090815260066020526040915020819080600181612742612976565b01808261274d612919565b505060009283529160001983019150602090209192910161276c612919565b50505061277e600160076105d9612976565b8060076116ae612919565b6000828211156127bd5760405162461bcd60e51b81526004016127ab90613b6c565b604051809103906127ba6128ae565b50505b50900390565b6000818152600460205280604081206000906127dd612976565b6001600160a01b036101009290920a9004169050801515836040516020016128059190613972565b6040516020818303038152906040529061265b5760405162461bcd60e51b81526004016128329190613b0b565b604051809103906128416128ae565b50505092915050565b61285881600b611e0d612976565b80600b612863612919565b5050506001600160a01b0382166000908152600860205261288c90829060409020611e0d612976565b6001600160a01b038316600090815260086020526040902081906118e7612919565b632a2a7adb598160e01b8152600481016020815285602082015260005b868110156128e65780860151828201604001526020016128cb565b506020828760640184336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b505050565b6322bd64c0598160e01b8152836004820152846024820152600081604483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b60005b604081101561072e5760008282015260200161295f565b6303daa959598160e01b8152836004820152602081602483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b8051600082529350602061295f565b63bdbf8c36598160e01b8152602081600483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b8051600082529350602061295f565b6373509064598160e01b8152602081600483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b8051600082529350602061295f565b638435035b598160e01b8152836004820152602081602483336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b8051600082529350602061295f565b638540661f598160e01b8152612acb565b8080831115610971575090919050565b8080831015610971575090919050565b836004820152846024820152606060448201528660648201526084810160005b88811015612b03578088015182820152602001612aeb565b506060828960a40184336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b815160408301513d6000853e8b8b82606087013350600060045af15059612b588d3d612abb565b8c01612b648187612aab565b5b82811015612b795760008152602001612b65565b50929c50505050505050565b604051604080820190526000808252602082015290565b6040516060810160409081526000808352602083018190529082015290565b6385979f76598160e01b8152836004820152846024820152606060448201528760648201526084810160005b89811015612bff578089015182820152602001612be7565b506060828a60a40184336000905af158600e01573d6000803e3d6000fd5b3d6001141558600a015760016000f35b815160408301513d6000853e8c8c82606087013350600060045af15059612c548e3d612abb565b8d01612c608187612aab565b5b82811015612c755760008152602001612c61565b50929d50505050505050565b803561097181613d83565b60008151905061097181613d83565b60008083601f840112612cb657600080612cb36128ae565b50505b5081356001600160401b03811115612cd657600080612cd36128ae565b50505b602083019150836020820283011115612cf757600080612cf46128ae565b50505b9250929050565b60008083601f840112612d1957600080612d166128ae565b50505b5081356001600160401b03811115612d3957600080612d366128ae565b50505b602083019150836040820283011115612cf757600080612cf46128ae565b60008151905061097181613d9d565b600060408284031215612d8157600080612d7e6128ae565b50505b612d8b6040613cb6565b90506000612d998484612dd0565b8252506020612daa84848301612db6565b60208301525092915050565b803561097181613da6565b60008151905061097181613da6565b803561097181613daf565b600060208284031215612df657600080612df36128ae565b50505b600061096d8484612c81565b600060208284031215612e1d57600080612e1a6128ae565b50505b600061096d8484612c8c565b600080600060408486031215612e4757600080612e446128ae565b50505b6000612e538686612c81565b93505060208401356001600160401b03811115612e7857600080612e756128ae565b50505b612e8486828701612c9b565b92509250509250925092565b60008060408385031215612eac57600080612ea96128ae565b50505b6000612eb88585612c81565b9250506020612ec985828601612db6565b9150509250929050565b60008060008060608587031215612ef257600080612eef6128ae565b50505b6000612efe8787612c81565b9450506020612f0f87828801612db6565b93505060408501356001600160401b03811115612f3457600080612f316128ae565b50505b612f4087828801612cfe565b95989497509550505050565b600080600060608486031215612f6a57600080612f676128ae565b50505b6000612f768686612c81565b9350506020612f8786828701612db6565b9250506040612f9886828701612db6565b9150509250925092565b60008060008060008060608789031215612fc457600080612fc16128ae565b50505b86356001600160401b03811115612fe357600080612fe06128ae565b50505b612fef89828a01612c9b565b965096505060208701356001600160401b03811115613016576000806130136128ae565b50505b61302289828a01612c9b565b945094505060408701356001600160401b03811115613049576000806130466128ae565b50505b61305589828a01612c9b565b92509250509295509295509295565b600080602083850312156130805760008061307d6128ae565b50505b82356001600160401b0381111561309f5760008061309c6128ae565b50505b6130ab85828601612c9b565b92509250509250929050565b6000602082840312156130d2576000806130cf6128ae565b50505b600061096d8484612d57565b6000604082840312156130f9576000806130f66128ae565b50505b600061096d8484612d66565b6000602082840312156131205760008061311d6128ae565b50505b600061096d8484612db6565b600060208284031215613147576000806131446128ae565b50505b600061096d8484612dc1565b600061315f8383613335565b505060200190565b6000613173838361390a565b505060600190565b60006131878383613946565b505060400190565b61319881613d2f565b82525050565b61319881613d07565b60006131b282613cef565b6131bc8185613cf9565b93506131c783613ce9565b8060005b838110156131f55781516131df8882613153565b97506131ea83613ce9565b9250506001016131cb565b509495945050505050565b600061320b82613cef565b6132158185613cf9565b935061322083613ce9565b8060005b838110156131f55781516132388882613167565b975061324383613ce9565b925050600101613224565b600061325982613cef565b6132638185613cf9565b935061326e83613ce9565b8060005b838110156131f5578151613286888261317b565b975061329183613ce9565b925050600101613272565b60006132a88385613cf9565b93506001600160fb1b038311156132c7576000806132c46128ae565b50505b6020830292506132d8838584613d41565b50500190565b60006132e982613cef565b6132f38185613cf9565b93506132fe83613ce9565b8060005b838110156131f55781516133168882613153565b975061332183613ce9565b925050600101613302565b61319881613d12565b613198816105e9565b61319861334a826105e9565b6105e9565b61319881613d36565b600061336382613cef565b61336d8185613cf9565b935061337d818560208601613d4d565b61338681613d79565b9093019392505050565b600061339d603583613cf9565b7f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7581527402063616e20616363657074206f776e65727368697605c1b602082015260400192915050565b60006133f4601b83613cf9565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b600061342d603383613cf9565b7f43616e6e6f7420657363726f7720776974682030206475726174696f6e204f528152721030b137bb329036b0bc2fb23ab930ba34b7b760691b602082015260400192915050565b6000613482602483613cf9565b7f43616e6e6f742063726561746520657363726f772077697468206164647265738152637328302960e01b602082015260400192915050565b60006134c8603583613cf9565b7f43616e206f6e6c7920626520696e766f6b65642062792053796e746865746978815274109c9a5919d9551bd0985cd94818dbdb9d1c9858dd605a1b602082015260400192915050565b600061351f601e83613cf9565b7f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815260200192915050565b6000613558601b83613cf9565b7f43616e6e6f742062652072756e206f6e2074686973206c617965720000000000815260200192915050565b6000613591601183613d02565b70026b4b9b9b4b7339030b2323932b9b99d1607d1b815260110192915050565b60006135be601783613cf9565b7f5175616e746974792063616e6e6f74206265207a65726f000000000000000000815260200192915050565b60006135f7604783613cf9565b7f4d75737420626520656e6f7567682062616c616e636520696e2074686520636f81527f6e747261637420746f2070726f7669646520666f72207468652076657374696e6020820152666720656e74727960c81b604082015260600192915050565b6000613666601983613cf9565b7f4163636f756e74206d657267696e672068617320656e64656400000000000000815260200192915050565b600061369f601583613cf9565b741d1bdad95b881d1c985b9cd9995c8819985a5b1959605a1b815260200192915050565b60006136d0602483613cf9565b7f43616e6e6f74206e6f6d696e617465206f776e206163636f756e7420746f206d8152636572676560e01b602082015260400192915050565b6000613716602f83613cf9565b7f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726681526e37b936903a3434b99030b1ba34b7b760891b602082015260400192915050565b631cd554d160e21b9052565b6000613773602183613cf9565b7f41646472657373206973206e6f74206e6f6d696e6174656420746f206d6572678152606560f81b602082015260400192915050565b60006137b6601c83613cf9565b7f65786365656473206d6178206d657267696e67206475726174696f6e00000000815260200192915050565b60006137ef601983613d02565b7f5265736f6c766572206d697373696e67207461726765743a2000000000000000815260190192915050565b6000613828602883613cf9565b7f4f6e6c792074686520466565506f6f6c2063616e20706572666f726d20746869815267399030b1ba34b7b760c11b602082015260400192915050565b6000613872604483613cf9565b7f496e73756666696369656e742062616c616e636520696e2074686520636f6e7481527f7261637420746f2070726f7669646520666f7220657363726f7765642062616c602082015263616e636560e01b604082015260600192915050565b60006138de601f83613cf9565b7f43616e6e6f74206d65726765206163636f756e74732077697468206465627400815260200192915050565b60608201815161391a8482613969565b50602082015161392d6020850182613335565b5060408201516139406040850182613335565b50505050565b6040820181516139568482613969565b5060208201516139406020850182613335565b61319881613d23565b600061397d82613584565b9150613989828461333e565b50602001919050565b600061397d826137e2565b60208101610971828461319e565b606081016139b9828661318f565b6139c6602083018561319e565b6139d36040830184613335565b949350505050565b604081016139e9828461318f565b6109716020830161375a565b60808101613a03828861318f565b613a106020830187613335565b8181036040830152613a2381858761329c565b9050613a326060830184613335565b9695505050505050565b60408101613a4a828561319e565b610754602083018461319e565b604081016139e9828461319e565b60408101613a73828561319e565b6107546020830184613335565b6020808252810161075481846131a7565b602080825281016107548184613200565b6020808252810161075481846132de565b60208101610971828461332c565b602081016109718284613335565b60408101613a4a8285613335565b60408101613aeb8285613335565b81810360208301526139d38184613358565b60208101610971828461334f565b602080825281016107548184613358565b6020808252810161097181613390565b60208082528101610971816133e7565b6020808252810161097181613420565b6020808252810161097181613475565b60208082528101610971816134bb565b6020808252810161097181613512565b602080825281016109718161354b565b60208082528101610971816135b1565b60208082528101610971816135ea565b6020808252810161097181613659565b6020808252810161097181613692565b60208082528101610971816136c3565b6020808252810161097181613709565b6020808252810161097181613766565b60208082528101610971816137a9565b602080825281016109718161381b565b6020808252810161097181613865565b60208082528101610971816138d1565b60408101613c4a8285613335565b81810360208301526139d3818461324e565b60408101613a738285613335565b60808101613c788287613335565b613c856020830186613335565b613c926040830185613335565b613c9f6060830184613335565b95945050505050565b60408101613a738285613969565b600060405190508181018181106001600160401b0382111715613ce157600080613cde6128ae565b50505b604052919050565b60200190565b6000815192915050565b90815260200190565b919050565b600061097182613d17565b151590565b6001600160a01b031690565b6001600160401b031690565b6000610971825b600061097182613d07565b82818337506000910152565b60005b83811015613d68578082015183820152602001613d50565b838111156139405750506000910152565b601f01601f191690565b613d8c81613d07565b811461107c5760008061072e6128ae565b613d8c81613d12565b613d8c816105e9565b613d8c81613d2356

Library Used

SafeDecimalMath : 0x0142f40c25ce1f1177ed131101fa19217396cb88

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.