1 package hardfork
2 3 import (
4 "encoding/hex"
5 "github.com/p9c/p9/pkg/amt"
6 "github.com/p9c/p9/pkg/btcaddr"
7 "github.com/p9c/p9/pkg/chaincfg"
8 )
9 10 // Payee is an address and amount
11 type Payee struct {
12 Address btcaddr.Address
13 Amount amt.Amount
14 }
15 16 var (
17 // The following prepares hard fork disbursement payout transactions
18 tn = &chaincfg.TestNet3Params
19 mn = &chaincfg.MainNetParams
20 // Payees are the list of payments to be made on the hard fork activation on mainnet
21 Payees = []Payee{
22 {Addr("ag7s5bmcA8XoP1CcS1QPjiD4C5hhMWATik", mn), Amount(4400)},
23 }
24 // TestnetPayees are the list of payments to be made on the hard fork activation in the testnet
25 //
26 // these are made using the following seed for testnet
27 // f4d2c4c542bb52512ed9e6bbfa2d000e576a0c8b4ebd1acafd7efa37247366bc
28 TestnetPayees = []Payee{
29 {Addr("8K73LTaMHZmwwqe4vTHu7wm7QtwusvRCwC", tn), Amount(100)},
30 // {Addr("8JEEhaMxJf4dZh5rvVCVSA7JKeYBvy8fir", tn), Amount(15500)},
31 {Addr("8bec3m8qpMePrBPHDAyCrkSm7TanGX8yWW", tn), Amount(1223)},
32 {Addr("8MCLEWq8pjXikrpb9rF9M5DpnpaoWPUD2W", tn), Amount(4000)},
33 {Addr("8cYGvT7km339nVukTj3ztfyQDFEHFivBNk", tn), Amount(2440)},
34 {Addr("8YUAAfUeS2mqUnsfiwDwQcEbMfM3tazKr7", tn), Amount(100)},
35 {Addr("8MMam6gxH1ns5LqASfhkHfRV2vsQaoM9VC", tn), Amount(8800)},
36 {Addr("8JABYpdqqyRD5FbACtMJ3XF5HJ38jaytrk", tn), Amount(422)},
37 {Addr("8MUnJMYi5Fo7Bm5Pmpr7JjdL3ZDJ7wqmXJ", tn), Amount(5000)},
38 {Addr("8d2RLbCBE8CiF4DetVuRfFFLEJJaXYjhdH", tn), Amount(30000)},
39 }
40 // CorePubkeyBytes is the address and public keys for the core dev disbursement
41 CorePubkeyBytes = [][]byte{
42 // nWo
43 Key("021a00c7e054279124e2d3eb8b64a58f1fda515464cd8df3c0823d2ff2931ebf37"),
44 // loki
45 Key("0387484f75bc5e45092b1334684def6b47f3dba1566b4b87f62d11c73d8f98db3e"),
46 // trax0r
47 Key("02daf0bda15f83899f4ebb62fd837c2dd2368ec8ed90ed0f050054d75d35935c99"),
48 }
49 // CoreAmount is the amount paid into the dev pool
50 CoreAmount = Amount(30000)
51 // TestnetCorePubkeyBytes are the addresses for the 3 of 4 multisig payment for dev costs
52 //
53 // these are made using the following seed for testnet
54 // f4d2c4c542bb52512ed9e6bbfa2d000e576a0c8b4ebd1acafd7efa37247366bc
55 TestnetCorePubkeyBytes = [][]byte{
56 // "8cL2fDzTSMu9Cd2rFi1dceWitQheAaCgTs",
57 Key("03f040c0cff7918415974f05154c8ffe126ad93db7216103fb6f4080dc3bcf4803"),
58 // "8YUDhyrcGrQk4PMpxnaNk1XyLRpQLa7N47",
59 Key("03f5a5ff1ce0564c7f4565a108220ebac9bd544b44e79ca5a2a805e585d8297cc6"),
60 // "8Rpf7CT4ikJQqXRpSp4EnAypKmidhHADN2",
61 Key("022976653e490cea689faafa899aa41b6295c32a5fb3e02d0fa201ac698e0c0c24"),
62 // "8Yw41PD1A3RviyjFQc38L9VufZasDU1pY8",
63 Key("029ed2885ea597fddea070a5c4c9f40900a514f67f9d5f662aa7b556e8bc5a26f8"),
64 }
65 // TestnetCoreAmount is the amount paid into the dev pool
66 TestnetCoreAmount = Amount(30000)
67 )
68 69 func Amount(f float64) (amount amt.Amount) {
70 var e error
71 amount, e = amt.NewAmount(f)
72 if e != nil {
73 panic(e)
74 }
75 return
76 }
77 78 func Addr(addr string, defaultNet *chaincfg.Params) (out btcaddr.Address) {
79 out, e := btcaddr.Decode(addr, defaultNet)
80 if e != nil {
81 panic(e)
82 }
83 return
84 }
85 86 func Key(key string) (out []byte) {
87 out, e := hex.DecodeString(key)
88 if e != nil {
89 panic(e)
90 }
91 return
92 }
93