Skip to content

Commit

Permalink
feat(gas pricing): OP
Browse files Browse the repository at this point in the history
  • Loading branch information
sambacha authored Nov 29, 2024
1 parent 34ba62e commit c0376dc
Showing 1 changed file with 132 additions and 0 deletions.
132 changes: 132 additions & 0 deletions optimism/price_oracle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
const OPTIMISM_PRICE_ORACLE = "0x420000000000000000000000000000000000000F";

const OPTIMISM_PRICE_ORACLE_ABI = [
{
inputs: [],
name: "DECIMALS",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "baseFee",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "baseFeeScalar",
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "blobBaseFee",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "blobBaseFeeScalar",
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "decimals",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "pure",
type: "function",
},
{
inputs: [],
name: "gasPrice",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "bytes", name: "_data", type: "bytes" }],
name: "getL1Fee",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "uint256", name: "_unsignedTxSize", type: "uint256" },
],
name: "getL1FeeUpperBound",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "bytes", name: "_data", type: "bytes" }],
name: "getL1GasUsed",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "isEcotone",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "isFjord",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "l1BaseFee",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "overhead",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "scalar",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "setEcotone",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "setFjord",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "version",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
];

0 comments on commit c0376dc

Please sign in to comment.