-
Notifications
You must be signed in to change notification settings - Fork 594
Expand file tree
/
Copy pathglobal_variable_builder.ts
More file actions
28 lines (25 loc) · 1.04 KB
/
global_variable_builder.ts
File metadata and controls
28 lines (25 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import type { EthAddress } from '@aztec/foundation/eth-address';
import type { Fr } from '@aztec/foundation/fields';
import type { AztecAddress } from '../aztec-address/index.js';
import type { GasFees } from '../gas/gas_fees.js';
import type { GlobalVariables } from './global_variables.js';
/**
* Interface for building global variables for Aztec blocks.
*/
export interface GlobalVariableBuilder {
getCurrentBaseFees(): Promise<GasFees>;
/**
* Builds global variables for a given block.
* @param blockNumber - The block number to build global variables for.
* @param coinbase - The address to receive block reward.
* @param feeRecipient - The address to receive fees.
* @param slotNumber - Optional. The slot number to use for the global variables. If undefined, it will be calculated.
* @returns A promise that resolves to the GlobalVariables for the given block number.
*/
buildGlobalVariables(
blockNumber: Fr,
coinbase: EthAddress,
feeRecipient: AztecAddress,
slotNumber?: bigint,
): Promise<GlobalVariables>;
}