Skip to content

Commit

Permalink
feat: base evm provider wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnigir1 committed Jul 15, 2024
1 parent a5ff23f commit 1038090
Show file tree
Hide file tree
Showing 15 changed files with 815 additions and 68 deletions.
1 change: 1 addition & 0 deletions libs/abis/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/src/types
340 changes: 340 additions & 0 deletions libs/abis/src/abi/GettersFacet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,340 @@
[
{
"inputs": [],
"name": "baseTokenGasPriceMultiplierDenominator",
"outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "baseTokenGasPriceMultiplierNominator",
"outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "bytes4", "name": "_selector", "type": "bytes4" }],
"name": "facetAddress",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "facetAddresses",
"outputs": [{ "internalType": "address[]", "name": "", "type": "address[]" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "_facet", "type": "address" }],
"name": "facetFunctionSelectors",
"outputs": [{ "internalType": "bytes4[]", "name": "", "type": "bytes4[]" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "facets",
"outputs": [
{
"components": [
{ "internalType": "address", "name": "addr", "type": "address" },
{ "internalType": "bytes4[]", "name": "selectors", "type": "bytes4[]" }
],
"internalType": "struct IGetters.Facet[]",
"name": "result",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getAdmin",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getBaseToken",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getBaseTokenBridge",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getBridgehub",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getFirstUnprocessedPriorityTx",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getL2BootloaderBytecodeHash",
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getL2DefaultAccountBytecodeHash",
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getL2SystemContractsUpgradeBatchNumber",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getL2SystemContractsUpgradeBlockNumber",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getL2SystemContractsUpgradeTxHash",
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getPendingAdmin",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getPriorityQueueSize",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getPriorityTxMaxGasLimit",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getProtocolVersion",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getPubdataPricingMode",
"outputs": [{ "internalType": "enum PubdataPricingMode", "name": "", "type": "uint8" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getSemverProtocolVersion",
"outputs": [
{ "internalType": "uint32", "name": "", "type": "uint32" },
{ "internalType": "uint32", "name": "", "type": "uint32" },
{ "internalType": "uint32", "name": "", "type": "uint32" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getStateTransitionManager",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalBatchesCommitted",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalBatchesExecuted",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalBatchesVerified",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalBlocksCommitted",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalBlocksExecuted",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalBlocksVerified",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalPriorityTxs",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getVerifier",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getVerifierParams",
"outputs": [
{
"components": [
{
"internalType": "bytes32",
"name": "recursionNodeLevelVkHash",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "recursionLeafLevelVkHash",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "recursionCircuitsSetVksHash",
"type": "bytes32"
}
],
"internalType": "struct VerifierParams",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isDiamondStorageFrozen",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "uint256", "name": "_l2BatchNumber", "type": "uint256" },
{ "internalType": "uint256", "name": "_l2MessageIndex", "type": "uint256" }
],
"name": "isEthWithdrawalFinalized",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "_facet", "type": "address" }],
"name": "isFacetFreezable",
"outputs": [{ "internalType": "bool", "name": "isFreezable", "type": "bool" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "bytes4", "name": "_selector", "type": "bytes4" }],
"name": "isFunctionFreezable",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "_address", "type": "address" }],
"name": "isValidator",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "uint256", "name": "_batchNumber", "type": "uint256" }],
"name": "l2LogsRootHash",
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "priorityQueueFrontOperation",
"outputs": [
{
"components": [
{ "internalType": "bytes32", "name": "canonicalTxHash", "type": "bytes32" },
{ "internalType": "uint64", "name": "expirationTimestamp", "type": "uint64" },
{ "internalType": "uint192", "name": "layer2Tip", "type": "uint192" }
],
"internalType": "struct PriorityOperation",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "uint256", "name": "_batchNumber", "type": "uint256" }],
"name": "storedBatchHash",
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "uint256", "name": "_batchNumber", "type": "uint256" }],
"name": "storedBlockHash",
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
"stateMutability": "view",
"type": "function"
}
]
1 change: 1 addition & 0 deletions libs/abis/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./types";
9 changes: 9 additions & 0 deletions libs/abis/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"declaration": true,
"outDir": "../../dist/libs/abis"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "test", "**/*spec.ts"]
}
Loading

0 comments on commit 1038090

Please sign in to comment.