(ctx *cli.Context, withTransactor bool)
| 160 | } |
| 161 | |
| 162 | func PrepareAll(ctx *cli.Context, withTransactor bool) (addr common.Address, client *cpclient.Client, key *keystore.Key, err error) { |
| 163 | |
| 164 | endpoint, err := flags.GetEndpoint(ctx) |
| 165 | if err != nil { |
| 166 | return common.Address{}, nil, nil, err |
| 167 | } |
| 168 | addr, err = flags.GetContractAddress(ctx) |
| 169 | if err != nil { |
| 170 | return common.Address{}, nil, nil, err |
| 171 | } |
| 172 | client, err = PrepareCpclient(endpoint) |
| 173 | if err != nil { |
| 174 | return common.Address{}, nil, nil, err |
| 175 | } |
| 176 | |
| 177 | if withTransactor { |
| 178 | keystoreFile, err := flags.GetKeystorePath(ctx) |
| 179 | if err != nil { |
| 180 | return common.Address{}, &cpclient.Client{}, &keystore.Key{}, err |
| 181 | } |
| 182 | password := GetPassword() |
| 183 | _, key = GetAddressAndKey(keystoreFile, password) |
| 184 | } |
| 185 | |
| 186 | return addr, client, key, nil |
| 187 | } |
| 188 | |
| 189 | func WaitMined(client *cpclient.Client, tx *types.Transaction) error { |
| 190 |
nothing calls this directly
no test coverage detected