|
| 1 | +// Copyright 2016 The go-ethereum Authors |
| 2 | +// This file is part of the go-ethereum library. |
| 3 | +// |
| 4 | +// The go-ethereum library is free software: you can redistribute it and/or modify |
| 5 | +// it under the terms of the GNU Lesser General Public License as published by |
| 6 | +// the Free Software Foundation, either version 3 of the License, or |
| 7 | +// (at your option) any later version. |
| 8 | +// |
| 9 | +// The go-ethereum library is distributed in the hope that it will be useful, |
| 10 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | +// GNU Lesser General Public License for more details. |
| 13 | +// |
| 14 | +// You should have received a copy of the GNU Lesser General Public License |
| 15 | +// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. |
| 16 | + |
| 17 | +package params |
| 18 | + |
| 19 | +import ( |
| 20 | + "encoding/json" |
| 21 | + "fmt" |
| 22 | + |
| 23 | + "github.com/ethereum/go-ethereum/common" |
| 24 | +) |
| 25 | + |
| 26 | +// DAODrainList is the list of accounts whose full balances will be moved into a |
| 27 | +// refund contract at the beginning of the dao-fork block. |
| 28 | +var DAODrainList []common.Address |
| 29 | + |
| 30 | +func init() { |
| 31 | + // Parse the list of DAO accounts to drain |
| 32 | + var list []map[string]string |
| 33 | + if err := json.Unmarshal([]byte(daoDrainListJSON), &list); err != nil { |
| 34 | + panic(fmt.Errorf("Failed to parse DAO drain list: %v", err)) |
| 35 | + } |
| 36 | + // Collect all the accounts that need draining |
| 37 | + for _, dao := range list { |
| 38 | + DAODrainList = append(DAODrainList, common.HexToAddress(dao["address"])) |
| 39 | + DAODrainList = append(DAODrainList, common.HexToAddress(dao["extraBalanceAccount"])) |
| 40 | + } |
| 41 | +} |
| 42 | + |
| 43 | +// daoDrainListJSON is the JSON encoded list of accounts whose full balances will |
| 44 | +// be moved into a refund contract at the beginning of the dao-fork block. |
| 45 | +const daoDrainListJSON = ` |
| 46 | +[ |
| 47 | + { |
| 48 | + "address":"0x304a554a310c7e546dfe434669c62820b7d83490", |
| 49 | + "balance":"30328a3f333ac2fb5f509", |
| 50 | + "extraBalance":"9184e72a000", |
| 51 | + "extraBalanceAccount":"0x914d1b8b43e92723e64fd0a06f5bdb8dd9b10c79" |
| 52 | + }, |
| 53 | + { |
| 54 | + "address":"0xfe24cdd8648121a43a7c86d289be4dd2951ed49f", |
| 55 | + "balance":"ea0b1bdc78f500a43", |
| 56 | + "extraBalance":"0", |
| 57 | + "extraBalanceAccount":"0x17802f43a0137c506ba92291391a8a8f207f487d" |
| 58 | + }, |
| 59 | + { |
| 60 | + "address":"0xb136707642a4ea12fb4bae820f03d2562ebff487", |
| 61 | + "balance":"6050bdeb3354b5c98adc3", |
| 62 | + "extraBalance":"0", |
| 63 | + "extraBalanceAccount":"0xdbe9b615a3ae8709af8b93336ce9b477e4ac0940" |
| 64 | + }, |
| 65 | + { |
| 66 | + "address":"0xf14c14075d6c4ed84b86798af0956deef67365b5", |
| 67 | + "balance":"1d77844e94c25ba2", |
| 68 | + "extraBalance":"0", |
| 69 | + "extraBalanceAccount":"0xca544e5c4687d109611d0f8f928b53a25af72448" |
| 70 | + }, |
| 71 | + { |
| 72 | + "address":"0xaeeb8ff27288bdabc0fa5ebb731b6f409507516c", |
| 73 | + "balance":"2e93a72de4fc5ec0ed", |
| 74 | + "extraBalance":"0", |
| 75 | + "extraBalanceAccount":"0xcbb9d3703e651b0d496cdefb8b92c25aeb2171f7" |
| 76 | + }, |
| 77 | + { |
| 78 | + "address":"0xaccc230e8a6e5be9160b8cdf2864dd2a001c28b6", |
| 79 | + "balance":"14d0944eb3be947a8", |
| 80 | + "extraBalance":"0", |
| 81 | + "extraBalanceAccount":"0x2b3455ec7fedf16e646268bf88846bd7a2319bb2" |
| 82 | + }, |
| 83 | + { |
| 84 | + "address":"0x4613f3bca5c44ea06337a9e439fbc6d42e501d0a", |
| 85 | + "balance":"275eaa8345ced6523a8", |
| 86 | + "extraBalance":"0", |
| 87 | + "extraBalanceAccount":"0xd343b217de44030afaa275f54d31a9317c7f441e" |
| 88 | + }, |
| 89 | + { |
| 90 | + "address":"0x84ef4b2357079cd7a7c69fd7a37cd0609a679106", |
| 91 | + "balance":"4accfbf922fd046baa05", |
| 92 | + "extraBalance":"0", |
| 93 | + "extraBalanceAccount":"0xda2fef9e4a3230988ff17df2165440f37e8b1708" |
| 94 | + }, |
| 95 | + { |
| 96 | + "address":"0xf4c64518ea10f995918a454158c6b61407ea345c", |
| 97 | + "balance":"38d275b0ed7862ba4f13", |
| 98 | + "extraBalance":"0", |
| 99 | + "extraBalanceAccount":"0x7602b46df5390e432ef1c307d4f2c9ff6d65cc97" |
| 100 | + }, |
| 101 | + { |
| 102 | + "address":"0xbb9bc244d798123fde783fcc1c72d3bb8c189413", |
| 103 | + "balance":"1", |
| 104 | + "extraBalance":"49097c66ae78c50e4d3c", |
| 105 | + "extraBalanceAccount":"0x807640a13483f8ac783c557fcdf27be11ea4ac7a" |
| 106 | + } |
| 107 | +] |
| 108 | +` |
0 commit comments