(ctx context.Context, client *ethclient.Client, contract common.Address, shardIdx uint64)
| 157 | } |
| 158 | |
| 159 | func getDifficulty(ctx context.Context, client *ethclient.Client, contract common.Address, shardIdx uint64) (*big.Int, error) { |
| 160 | res, err := getMiningInfo(ctx, client, contract, shardIdx) |
| 161 | if err != nil { |
| 162 | return nil, err |
| 163 | } |
| 164 | return res[1].(*big.Int), nil |
| 165 | } |
| 166 | |
| 167 | func getMiningInfo(ctx context.Context, client *ethclient.Client, contract common.Address, shardIdx uint64) ([]interface{}, error) { |
| 168 | uint256Type, _ := abi.NewType("uint256", "", nil) |
no test coverage detected