(ctx context.Context, rst result)
| 256 | } |
| 257 | |
| 258 | func (m *l1MiningAPI) composeCalldata(ctx context.Context, rst result) ([]byte, error) { |
| 259 | headerRlp, err := m.getRandaoProof(ctx, rst.blockNumber) |
| 260 | if err != nil { |
| 261 | m.lg.Error("Failed to get randao proof", "error", err) |
| 262 | return nil, err |
| 263 | } |
| 264 | uint256Type, _ := abi.NewType("uint256", "", nil) |
| 265 | uint256Array, _ := abi.NewType("uint256[]", "", nil) |
| 266 | addrType, _ := abi.NewType("address", "", nil) |
| 267 | bytes32Array, _ := abi.NewType("bytes32[]", "", nil) |
| 268 | bytesArray, _ := abi.NewType("bytes[]", "", nil) |
| 269 | bytesType, _ := abi.NewType("bytes", "", nil) |
| 270 | dataField, _ := abi.Arguments{ |
| 271 | {Type: uint256Type}, |
| 272 | {Type: uint256Type}, |
| 273 | {Type: addrType}, |
| 274 | {Type: uint256Type}, |
| 275 | {Type: bytes32Array}, |
| 276 | {Type: uint256Array}, |
| 277 | {Type: bytesType}, |
| 278 | {Type: bytesArray}, |
| 279 | {Type: bytesArray}, |
| 280 | }.Pack( |
| 281 | rst.blockNumber, |
| 282 | new(big.Int).SetUint64(rst.startShardId), |
| 283 | rst.miner, |
| 284 | new(big.Int).SetUint64(rst.nonce), |
| 285 | rst.encodedData, |
| 286 | rst.masks, |
| 287 | headerRlp, |
| 288 | rst.inclusiveProofs, |
| 289 | rst.decodeProof, |
| 290 | ) |
| 291 | calldata := append(mineSig[0:4], dataField...) |
| 292 | return calldata, nil |
| 293 | } |
| 294 | |
| 295 | func (m *l1MiningAPI) suggestGasPrices(ctx context.Context, cfg Config) (*big.Int, *big.Int, *big.Int, bool, error) { |
| 296 | gasFeeCap := cfg.GasPrice |
no test coverage detected