Skip to content

Commit

Permalink
Merge pull request #234 from Consensys/chore/remove-dist-gitignore
Browse files Browse the repository at this point in the history
chore: added dist folder in repo
  • Loading branch information
Julink-eth authored Aug 26, 2024
2 parents bfaf8fe + 6ae9f89 commit d716cc9
Show file tree
Hide file tree
Showing 26 changed files with 780 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/linea-ccip-gateway/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
Expand Down
41 changes: 41 additions & 0 deletions packages/linea-ccip-gateway/dist/L2ProofService.d.ts
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;
}
137 changes: 137 additions & 0 deletions packages/linea-ccip-gateway/dist/L2ProofService.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/linea-ccip-gateway/dist/L2ProofService.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions packages/linea-ccip-gateway/dist/evm-gateway/EVMGateway.d.ts
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 {};
Loading

0 comments on commit d716cc9

Please sign in to comment.