Helper function to create a new eth payload attributes
(timestamp: u64)
| 58 | |
| 59 | /// Helper function to create a new eth payload attributes |
| 60 | pub fn payload_attributes<T>(timestamp: u64) -> BasePayloadBuilderAttributes<T> { |
| 61 | let attributes = PayloadAttributes { |
| 62 | timestamp, |
| 63 | prev_randao: B256::ZERO, |
| 64 | suggested_fee_recipient: Address::ZERO, |
| 65 | withdrawals: Some(vec![]), |
| 66 | parent_beacon_block_root: Some(B256::ZERO), |
| 67 | slot_number: None, |
| 68 | target_gas_limit: None, |
| 69 | }; |
| 70 | |
| 71 | BasePayloadBuilderAttributes { |
| 72 | payload_attributes: EthPayloadBuilderAttributes { |
| 73 | id: Default::default(), |
| 74 | parent: B256::ZERO, |
| 75 | timestamp: attributes.timestamp, |
| 76 | suggested_fee_recipient: attributes.suggested_fee_recipient, |
| 77 | prev_randao: attributes.prev_randao, |
| 78 | has_withdrawals: attributes.withdrawals.is_some(), |
| 79 | withdrawals: attributes.withdrawals.unwrap_or_default().into(), |
| 80 | parent_beacon_block_root: attributes.parent_beacon_block_root, |
| 81 | slot_number: None, |
| 82 | }, |
| 83 | transactions: vec![], |
| 84 | no_tx_pool: false, |
| 85 | gas_limit: Some(30_000_000), |
| 86 | eip_1559_params: None, |
| 87 | min_base_fee: None, |
| 88 | } |
| 89 | } |