-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234 from Consensys/chore/remove-dist-gitignore
chore: added dist folder in repo
- Loading branch information
Showing
26 changed files
with
780 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,6 @@ out | |
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { AddressLike, JsonRpcProvider } from "ethers"; | ||
import { IProofService, StateProof } from "./evm-gateway"; | ||
export type L2ProvableBlock = number; | ||
/** | ||
* The proofService class can be used to calculate proofs for a given target and slot on the Optimism Bedrock network. | ||
* It's also capable of proofing long types such as mappings or string by using all included slots in the proof. | ||
* | ||
*/ | ||
export declare class L2ProofService implements IProofService<L2ProvableBlock> { | ||
private readonly rollup; | ||
private readonly helper; | ||
constructor(providerL1: JsonRpcProvider, providerL2: JsonRpcProvider, rollupAddress: string, shomeiNode?: JsonRpcProvider); | ||
/** | ||
* @dev Returns an object representing a block whose state can be proven on L1. | ||
*/ | ||
getProvableBlock(): Promise<number>; | ||
/** | ||
* @dev Returns the value of a contract state slot at the specified block | ||
* @param block A `ProvableBlock` returned by `getProvableBlock`. | ||
* @param address The address of the contract to fetch data from. | ||
* @param slot The slot to fetch. | ||
* @returns The value in `slot` of `address` at block `block` | ||
*/ | ||
getStorageAt(block: L2ProvableBlock, address: AddressLike, slot: bigint): Promise<string>; | ||
/** | ||
* @dev Fetches a set of proofs for the requested state slots. | ||
* @param block A `ProvableBlock` returned by `getProvableBlock`. | ||
* @param address The address of the contract to fetch data from. | ||
* @param slots An array of slots to fetch data for. | ||
* @returns A proof of the given slots, encoded in a manner that this service's | ||
* corresponding decoding library will understand. | ||
*/ | ||
getProofs(blockNo: L2ProvableBlock, address: AddressLike, slots: bigint[]): Promise<string>; | ||
/** | ||
* linea_getProof returns a different structure when a storage proof is | ||
* unitialized, to handle this case we return unitialized for this particular storage | ||
* @param proof | ||
* @returns modifier proof with the | ||
*/ | ||
checkStorageInitialized(proof: StateProof): StateProof; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
packages/linea-ccip-gateway/dist/evm-gateway/EVMGateway.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { HandlerDescription } from "@chainlink/ccip-read-server"; | ||
import { Fragment, Interface, JsonFragment } from "@ethersproject/abi"; | ||
import { IProofService, ProvableBlock } from "./IProofService"; | ||
export declare enum StorageLayout { | ||
/** | ||
* address,uint,bytes32,bool | ||
*/ | ||
FIXED = 0, | ||
/** | ||
* array,bytes,string | ||
*/ | ||
DYNAMIC = 1 | ||
} | ||
interface Server { | ||
add: (abi: string | readonly (string | Fragment | JsonFragment)[] | Interface, handlers: HandlerDescription[]) => void; | ||
} | ||
export declare class EVMGateway<T extends ProvableBlock> { | ||
readonly proofService: IProofService<T>; | ||
constructor(proofService: IProofService<T>); | ||
add(server: Server): Server; | ||
/** | ||
* | ||
* @param address The address to fetch storage slot proofs for | ||
* @param paths Each element of this array specifies a Solidity-style path derivation for a storage slot ID. | ||
* See README.md for details of the encoding. | ||
*/ | ||
createProofs(address: string, commands: string[], constants: string[]): Promise<string>; | ||
private executeOperation; | ||
private computeFirstSlot; | ||
private getDynamicValue; | ||
private getValueFromPath; | ||
} | ||
export {}; |
Oops, something went wrong.