()
| 32 | ) |
| 33 | |
| 34 | func main() { |
| 35 | log.Info("cmdline args", "args", os.Args) |
| 36 | if len(os.Args) != 4 { |
| 37 | fmt.Println("Usage: smartcontract <endpoint> <keystore path> <password>") |
| 38 | return |
| 39 | } |
| 40 | config.SetConfig(os.Args[1], os.Args[2]) |
| 41 | |
| 42 | password := os.Args[3] |
| 43 | log.Info("start deploy contract") |
| 44 | |
| 45 | var wg1 sync.WaitGroup |
| 46 | wg1.Add(1) |
| 47 | go deployRNodeAdmissionAndCampaign(password, &wg1) |
| 48 | wg1.Wait() |
| 49 | |
| 50 | var wg2 sync.WaitGroup |
| 51 | wg2.Add(1) |
| 52 | go deployRpt(password, &wg2) |
| 53 | |
| 54 | wg2.Wait() |
| 55 | |
| 56 | var wg3 sync.WaitGroup |
| 57 | wg3.Add(1) |
| 58 | go deployNetwork(password, &wg3) |
| 59 | wg3.Wait() |
| 60 | |
| 61 | deploy.UpdateCampaignParameters(password, proxyCampaignContractAddress, 5, 6) |
| 62 | |
| 63 | fmt.Println("======== init contract deploy completed=========") |
| 64 | } |
| 65 | |
| 66 | func deployRNodeAdmissionAndCampaign(password string, wg *sync.WaitGroup) { |
| 67 | // 1 |
nothing calls this directly
no test coverage detected