Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add createAccessList type (#5146) #5204

Merged
merged 2 commits into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,8 @@ Released with 1.0.0-beta.37 code base.
- Replace xhr2-cookies deps to cross-fetch for web3-providers-http (#5085)

### Added
- Documentation details about `maxFeePerGas` and `maxPriorityFeePerGas` (#5121)
- Documentation details about `maxFeePerGas` and `maxPriorityFeePerGas` (#5121)
- Added `createAccessList` types in web3.eth (#5146)

### Fixed
- Fix typos in web3-eth-accounts.rst & TESTING.md (#5047)
Expand All @@ -578,7 +579,6 @@ Released with 1.0.0-beta.37 code base.
- Add optional hex formatting parameter for getTransactionrReceipt (#5153)
- Fix transactionRoot -> transactionsRoot in BlockHeader (#5083)


### Security
- Updated `got` lib version and fixed other libs using npm audit fix
- Updated `got` lib version and fixed other libs using npm audit fix

22 changes: 22 additions & 0 deletions packages/web3-eth/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,17 @@ export class Eth {
callback?: (error: Error, gas: number) => void
): Promise<number>;

createAccessList(
transactionConfig: TransactionConfig,
callback?: (error: Error, result: CreateAccessList) => void
): Promise<CreateAccessList>;

createAccessList(
transactionConfig: TransactionConfig,
defaultBlock: BlockNumber,
callback?: (error: Error, result: CreateAccessList) => void
): Promise<CreateAccessList>;

getPastLogs(
options: PastLogsOptions,
callback?: (error: Error, logs: Log[]) => void
Expand Down Expand Up @@ -441,6 +452,17 @@ export interface BlockTransactionString extends BlockTransactionBase {
transactions: string[];
}

export interface AccessTuple {
address: string;
storageKeys: string[];
}

export interface CreateAccessList {
accessList: AccessTuple[];
error?: string;
gasUsed: string;
}

export interface GetProof {
address: string;
balance: string;
Expand Down