diff --git a/packages/protocol/contracts/L2/V1TaikoL2.sol b/packages/protocol/contracts/L2/TaikoL2.sol similarity index 99% rename from packages/protocol/contracts/L2/V1TaikoL2.sol rename to packages/protocol/contracts/L2/TaikoL2.sol index a313c70bdfc..68f4be6a518 100644 --- a/packages/protocol/contracts/L2/V1TaikoL2.sol +++ b/packages/protocol/contracts/L2/TaikoL2.sol @@ -19,7 +19,7 @@ import "../libs/LibConstants.sol"; import "../libs/LibTxDecoder.sol"; /// @author dantaik -contract V1TaikoL2 is AddressResolver, ReentrancyGuard, IHeaderSync { +contract TaikoL2 is AddressResolver, ReentrancyGuard, IHeaderSync { using LibTxDecoder for bytes; /********************** diff --git a/packages/protocol/docs/L2/V1TaikoL2.md b/packages/protocol/docs/L2/TaikoL2.md similarity index 99% rename from packages/protocol/docs/L2/V1TaikoL2.md rename to packages/protocol/docs/L2/TaikoL2.md index 2b938ec4723..bf7ed0351ec 100644 --- a/packages/protocol/docs/L2/V1TaikoL2.md +++ b/packages/protocol/docs/L2/TaikoL2.md @@ -1,4 +1,4 @@ -## V1TaikoL2 +## TaikoL2 ### l2Hashes diff --git a/packages/protocol/tasks/deploy_L1.ts b/packages/protocol/tasks/deploy_L1.ts index 78fba005cc9..5dfdb613381 100644 --- a/packages/protocol/tasks/deploy_L1.ts +++ b/packages/protocol/tasks/deploy_L1.ts @@ -9,8 +9,8 @@ task("deploy_L1") .addParam("daoVault", "The DAO vault address") .addParam("teamVault", "The team vault address") .addOptionalParam( - "v1TaikoL2", - "The V1TaikoL2 address", + "taikoL2", + "The TaikoL2 address", ethers.constants.AddressZero ) .addOptionalParam( @@ -49,7 +49,7 @@ export async function deployContracts(hre: any) { const daoVault = hre.args.daoVault const teamVault = hre.args.teamVault const l2GenesisBlockHash = hre.args.l2GenesisBlockHash - const v1TaikoL2Address = hre.args.v1TaikoL2 + const taikoL2Address = hre.args.taikoL2 const l2ChainId = hre.args.l2ChainId log.debug(`network: ${network}`) @@ -57,7 +57,7 @@ export async function deployContracts(hre: any) { log.debug(`deployer: ${deployer}`) log.debug(`daoVault: ${daoVault}`) log.debug(`l2GenesisBlockHash: ${l2GenesisBlockHash}`) - log.debug(`v1TaikoL2Address: ${v1TaikoL2Address}`) + log.debug(`taikoL2Address: ${taikoL2Address}`) log.debug(`l2ChainId: ${l2ChainId}`) log.debug(`confirmations: ${hre.args.confirmations}`) log.debug() @@ -76,7 +76,7 @@ export async function deployContracts(hre: any) { // Used by V1Proving await utils.waitTx( hre, - await AddressManager.setAddress(`${l2ChainId}.taiko`, v1TaikoL2Address) + await AddressManager.setAddress(`${l2ChainId}.taiko`, taikoL2Address) ) // TkoToken diff --git a/packages/protocol/test/L2/V1TaikoL2.test.ts b/packages/protocol/test/L2/TaikoL2.test.ts similarity index 60% rename from packages/protocol/test/L2/V1TaikoL2.test.ts rename to packages/protocol/test/L2/TaikoL2.test.ts index 51813fb90e0..c4c1491bf55 100644 --- a/packages/protocol/test/L2/V1TaikoL2.test.ts +++ b/packages/protocol/test/L2/TaikoL2.test.ts @@ -1,53 +1,50 @@ import { expect } from "chai" import { ethers } from "hardhat" -describe("V1TaikoL2", function () { - async function deployV1TaikoL2Fixture() { +describe("TaikoL2", function () { + async function deployTaikoL2Fixture() { // Deploying addressManager Contract const addressManager = await ( await ethers.getContractFactory("AddressManager") ).deploy() await addressManager.init() - // Deploying V1TaikoL2 Contract linked with LibTxDecoder (throws error otherwise) + // Deploying TaikoL2 Contract linked with LibTxDecoder (throws error otherwise) const libTxDecoder = await ( await ethers.getContractFactory("LibTxDecoder") ).deploy() - const v1TaikoL2Factory = await ethers.getContractFactory("V1TaikoL2", { + const taikoL2Factory = await ethers.getContractFactory("TaikoL2", { libraries: { LibTxDecoder: libTxDecoder.address, }, }) - const v1TaikoL2 = await v1TaikoL2Factory.deploy(addressManager.address) + const taikoL2 = await taikoL2Factory.deploy(addressManager.address) - return { v1TaikoL2 } + return { taikoL2 } } describe("anchor()", async function () { it("should revert since ancestor hashes not written", async function () { - const { v1TaikoL2 } = await deployV1TaikoL2Fixture() + const { taikoL2 } = await deployTaikoL2Fixture() await expect( - v1TaikoL2.anchor( - Math.ceil(Math.random() * 1024), - randomBytes32() - ) + taikoL2.anchor(Math.ceil(Math.random() * 1024), randomBytes32()) ).to.be.revertedWith("L2:publicInputHash") }) }) describe("getLatestSyncedHeader()", async function () { it("should be 0 because no headers have been synced", async function () { - const { v1TaikoL2 } = await deployV1TaikoL2Fixture() - const hash = await v1TaikoL2.getLatestSyncedHeader() + const { taikoL2 } = await deployTaikoL2Fixture() + const hash = await taikoL2.getLatestSyncedHeader() expect(hash).to.be.eq(ethers.constants.HashZero) }) }) describe("getSyncedHeader()", async function () { it("should be 0 because header number has not been synced", async function () { - const { v1TaikoL2 } = await deployV1TaikoL2Fixture() - const hash = await v1TaikoL2.getSyncedHeader(1) + const { taikoL2 } = await deployTaikoL2Fixture() + const hash = await taikoL2.getSyncedHeader(1) expect(hash).to.be.eq(ethers.constants.HashZero) }) }) diff --git a/packages/protocol/test/genesis/generate_genesis.test.ts b/packages/protocol/test/genesis/generate_genesis.test.ts index f92955c6bfd..4abe3611ab1 100644 --- a/packages/protocol/test/genesis/generate_genesis.test.ts +++ b/packages/protocol/test/genesis/generate_genesis.test.ts @@ -126,11 +126,11 @@ action("Generate Genesis", function () { getContractAlloc("EtherVault").address ) - const v1TaikoL2 = await addressManager.getAddress( + const taikoL2 = await addressManager.getAddress( `${testConfig.chainId}.taiko` ) - expect(v1TaikoL2).to.be.equal(getContractAlloc("V1TaikoL2").address) + expect(taikoL2).to.be.equal(getContractAlloc("TaikoL2").address) }) it("LibTxDecoder", async function () { @@ -147,18 +147,18 @@ action("Generate Genesis", function () { ).to.be.revertedWith("empty txList") }) - it("V1TaikoL2", async function () { - const V1TaikoL2Alloc = getContractAlloc("V1TaikoL2") + it("TaikoL2", async function () { + const TaikoL2Alloc = getContractAlloc("TaikoL2") - const V1TaikoL2 = new hre.ethers.Contract( - V1TaikoL2Alloc.address, - require("../../artifacts/contracts/L2/V1TaikoL2.sol/V1TaikoL2.json").abi, + const TaikoL2 = new hre.ethers.Contract( + TaikoL2Alloc.address, + require("../../artifacts/contracts/L2/TaikoL2.sol/TaikoL2.json").abi, signer ) let latestL1Height = 1 for (let i = 0; i < 300; i++) { - const tx = await V1TaikoL2.anchor( + const tx = await TaikoL2.anchor( latestL1Height++, ethers.utils.hexlify(ethers.utils.randomBytes(32)), { gasLimit: 1000000 } @@ -170,18 +170,15 @@ action("Generate Genesis", function () { if (i === 299) { console.log({ - message: - "V1TaikoL2.anchor gas cost after 256 L2 blocks", + message: "TaikoL2.anchor gas cost after 256 L2 blocks", gasUsed: receipt.gasUsed, }) } } - const [bytes, txNums] = await generateMaxSizeInvalidTxList( - V1TaikoL2 - ) + const [bytes, txNums] = await generateMaxSizeInvalidTxList(TaikoL2) - const tx = await V1TaikoL2.invalidateBlock( + const tx = await TaikoL2.invalidateBlock( bytes, 5, // hint: TX_INVALID_SIG 0 @@ -192,8 +189,7 @@ action("Generate Genesis", function () { expect(receipt.status).to.be.equal(1) console.log({ - message: - "V1TaikoL2.invalidateBlock gas cost after 256 L2 blocks", + message: "TaikoL2.invalidateBlock gas cost after 256 L2 blocks", TxListBytes: ethers.utils.arrayify(bytes).length, txNums, reason: "TX_INVALID_SIG", @@ -334,8 +330,8 @@ action("Generate Genesis", function () { } }) -async function generateMaxSizeInvalidTxList(V1TaikoL2: any) { - const constants = await V1TaikoL2.getConstants() +async function generateMaxSizeInvalidTxList(TaikoL2: any) { + const constants = await TaikoL2.getConstants() const chainId = constants[0].toNumber() const blockMaxTxNums = constants[7].toNumber() diff --git a/packages/protocol/test/genesis/test_config.json b/packages/protocol/test/genesis/test_config.json index d5a0518c829..36ec33239d9 100644 --- a/packages/protocol/test/genesis/test_config.json +++ b/packages/protocol/test/genesis/test_config.json @@ -76,7 +76,7 @@ } ], "contractAddresses": { - "V1TaikoL2": "0x0000777700000000000000000000000000000001", + "TaikoL2": "0x0000777700000000000000000000000000000001", "TokenVault": "0x0000777700000000000000000000000000000002", "EtherVault": "0x0000777700000000000000000000000000000003", "Bridge": "0x0000777700000000000000000000000000000004", diff --git a/packages/protocol/utils/generate_genesis/main.ts b/packages/protocol/utils/generate_genesis/main.ts index 079c520f300..797e484163f 100644 --- a/packages/protocol/utils/generate_genesis/main.ts +++ b/packages/protocol/utils/generate_genesis/main.ts @@ -2,7 +2,7 @@ import { Config } from "./interface" const fs = require("fs") const path = require("path") const { ethers } = require("ethers") -const { deployV1TaikoL2 } = require("./v1TaikoL2") +const { deployTaikoL2 } = require("./taikoL2") const { deployERC20 } = require("./erc20") // Generate a L2 genesis JSON based on the given configurations. @@ -45,9 +45,9 @@ async function main() { console.log("config: %o", config) - console.log("start deploy V1TaikoL2 contract") + console.log("start deploy TaikoL2 contract") - let result = await deployV1TaikoL2(config, { + let result = await deployTaikoL2(config, { alloc: {}, storageLayouts: {}, }).catch(console.error) diff --git a/packages/protocol/utils/generate_genesis/v1TaikoL2.ts b/packages/protocol/utils/generate_genesis/taikoL2.ts similarity index 95% rename from packages/protocol/utils/generate_genesis/v1TaikoL2.ts rename to packages/protocol/utils/generate_genesis/taikoL2.ts index 716ed0e2bd5..fd384f1e6be 100644 --- a/packages/protocol/utils/generate_genesis/v1TaikoL2.ts +++ b/packages/protocol/utils/generate_genesis/taikoL2.ts @@ -9,8 +9,8 @@ const { } = require("@defi-wonderland/smock/dist/src/utils") const ARTIFACTS_PATH = path.join(__dirname, "../../artifacts/contracts") -// deployV1TaikoL2 generates a L2 genesis alloc of the V1TaikoL2 contract. -export async function deployV1TaikoL2( +// deployTaikoL2 generates a L2 genesis alloc of the TaikoL2 contract. +export async function deployTaikoL2( config: Config, result: Result ): Promise { @@ -115,9 +115,9 @@ async function generateContractConfigs( ARTIFACTS_PATH, "./thirdparty/AddressManager.sol/AddressManager.json" )), - V1TaikoL2: require(path.join( + TaikoL2: require(path.join( ARTIFACTS_PATH, - "./L2/V1TaikoL2.sol/V1TaikoL2.json" + "./L2/TaikoL2.sol/TaikoL2.json" )), Bridge: require(path.join( ARTIFACTS_PATH, @@ -138,12 +138,12 @@ async function generateContractConfigs( for (const [contractName, artifact] of Object.entries(contractArtifacts)) { let bytecode = (artifact as any).bytecode - if (contractName === "V1TaikoL2") { + if (contractName === "TaikoL2") { if (!addressMap.LibTxDecoder) { throw new Error("LibTxDecoder not initialized") } - bytecode = linkContractLibs(contractArtifacts.V1TaikoL2, addressMap) + bytecode = linkContractLibs(contractArtifacts.TaikoL2, addressMap) } else if (contractName === "LibBridgeProcess") { if (!addressMap.LibTrieProof) { throw new Error("LibTrieProof not initialized") @@ -226,7 +226,7 @@ async function generateContractConfigs( [`${ethers.utils.solidityKeccak256( ["string"], [`${chainId}.taiko`] - )}`]: addressMap.V1TaikoL2, + )}`]: addressMap.TaikoL2, [`${ethers.utils.solidityKeccak256( ["string"], [`${chainId}.bridge`] @@ -242,10 +242,10 @@ async function generateContractConfigs( }, }, }, - V1TaikoL2: { - address: addressMap.V1TaikoL2, + TaikoL2: { + address: addressMap.TaikoL2, deployedBytecode: linkContractLibs( - contractArtifacts.V1TaikoL2, + contractArtifacts.TaikoL2, addressMap ), variables: { @@ -253,7 +253,7 @@ async function generateContractConfigs( _status: 1, // _NOT_ENTERED // AddressResolver _addressManager: addressMap.AddressManager, - // V1TaikoL2 + // TaikoL2 // keccak256(abi.encodePacked(block.chainid, basefee, ancestors)) publicInputHash: `${ethers.utils.solidityKeccak256( ["uint256", "uint256", "uint256", "bytes32[255]"], diff --git a/packages/relayer/.gitignore b/packages/relayer/.gitignore index 0299de6c5bd..eeedab188e5 100644 --- a/packages/relayer/.gitignore +++ b/packages/relayer/.gitignore @@ -42,5 +42,5 @@ terraform.rc .idea Bridge.json -V1TaikoL2.json +TaikoL2.json IHeaderSync.json \ No newline at end of file diff --git a/packages/relayer/abigen.sh b/packages/relayer/abigen.sh index 6b6cdd41bb0..b29393a4e9f 100755 --- a/packages/relayer/abigen.sh +++ b/packages/relayer/abigen.sh @@ -5,9 +5,9 @@ if [ ! -d "../protocol/artifacts" ]; then exit 1 fi -paths=("bridge/Bridge.sol" "common/IHeaderSync.sol" "L2/V1TaikoL2.sol" "L1/TaikoL1.sol") +paths=("bridge/Bridge.sol" "common/IHeaderSync.sol" "L2/TaikoL2.sol" "L1/TaikoL1.sol") -names=("Bridge" "IHeaderSync" "V1TaikoL2" "TaikoL1") +names=("Bridge" "IHeaderSync" "TaikoL2" "TaikoL1") for (( i = 0; i < ${#paths[@]}; ++i )); do diff --git a/packages/relayer/contracts/V1TaikoL2.go b/packages/relayer/contracts/TaikoL2.go similarity index 50% rename from packages/relayer/contracts/V1TaikoL2.go rename to packages/relayer/contracts/TaikoL2.go index 9d225a57d1e..c330325194d 100644 --- a/packages/relayer/contracts/V1TaikoL2.go +++ b/packages/relayer/contracts/TaikoL2.go @@ -26,107 +26,107 @@ var ( _ = event.NewSubscription ) -// V1TaikoL2ABI is the input ABI used to generate the binding from. -const V1TaikoL2ABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"}],\"name\":\"BlockInvalidated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"height\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"srcHash\",\"type\":\"bytes32\"}],\"name\":\"HeaderSynced\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"l1Height\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"}],\"name\":\"anchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"getBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConstants\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"getSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"},{\"internalType\":\"enumLibInvalidTxList.Reason\",\"name\":\"hint\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"txIdx\",\"type\":\"uint256\"}],\"name\":\"invalidateBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"publicInputHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]" +// TaikoL2ABI is the input ABI used to generate the binding from. +const TaikoL2ABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"}],\"name\":\"BlockInvalidated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"height\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"srcHash\",\"type\":\"bytes32\"}],\"name\":\"HeaderSynced\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"l1Height\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"}],\"name\":\"anchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"getBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConstants\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"getSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"},{\"internalType\":\"enumLibInvalidTxList.Reason\",\"name\":\"hint\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"txIdx\",\"type\":\"uint256\"}],\"name\":\"invalidateBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"publicInputHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]" -// V1TaikoL2 is an auto generated Go binding around an Ethereum contract. -type V1TaikoL2 struct { - V1TaikoL2Caller // Read-only binding to the contract - V1TaikoL2Transactor // Write-only binding to the contract - V1TaikoL2Filterer // Log filterer for contract events +// TaikoL2 is an auto generated Go binding around an Ethereum contract. +type TaikoL2 struct { + TaikoL2Caller // Read-only binding to the contract + TaikoL2Transactor // Write-only binding to the contract + TaikoL2Filterer // Log filterer for contract events } -// V1TaikoL2Caller is an auto generated read-only Go binding around an Ethereum contract. -type V1TaikoL2Caller struct { +// TaikoL2Caller is an auto generated read-only Go binding around an Ethereum contract. +type TaikoL2Caller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// V1TaikoL2Transactor is an auto generated write-only Go binding around an Ethereum contract. -type V1TaikoL2Transactor struct { +// TaikoL2Transactor is an auto generated write-only Go binding around an Ethereum contract. +type TaikoL2Transactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// V1TaikoL2Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type V1TaikoL2Filterer struct { +// TaikoL2Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TaikoL2Filterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// V1TaikoL2Session is an auto generated Go binding around an Ethereum contract, +// TaikoL2Session is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. -type V1TaikoL2Session struct { - Contract *V1TaikoL2 // Generic contract binding to set the session for +type TaikoL2Session struct { + Contract *TaikoL2 // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// V1TaikoL2CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// TaikoL2CallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. -type V1TaikoL2CallerSession struct { - Contract *V1TaikoL2Caller // Generic contract caller binding to set the session for +type TaikoL2CallerSession struct { + Contract *TaikoL2Caller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } -// V1TaikoL2TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// TaikoL2TransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. -type V1TaikoL2TransactorSession struct { - Contract *V1TaikoL2Transactor // Generic contract transactor binding to set the session for +type TaikoL2TransactorSession struct { + Contract *TaikoL2Transactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// V1TaikoL2Raw is an auto generated low-level Go binding around an Ethereum contract. -type V1TaikoL2Raw struct { - Contract *V1TaikoL2 // Generic contract binding to access the raw methods on +// TaikoL2Raw is an auto generated low-level Go binding around an Ethereum contract. +type TaikoL2Raw struct { + Contract *TaikoL2 // Generic contract binding to access the raw methods on } -// V1TaikoL2CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type V1TaikoL2CallerRaw struct { - Contract *V1TaikoL2Caller // Generic read-only contract binding to access the raw methods on +// TaikoL2CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TaikoL2CallerRaw struct { + Contract *TaikoL2Caller // Generic read-only contract binding to access the raw methods on } -// V1TaikoL2TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type V1TaikoL2TransactorRaw struct { - Contract *V1TaikoL2Transactor // Generic write-only contract binding to access the raw methods on +// TaikoL2TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TaikoL2TransactorRaw struct { + Contract *TaikoL2Transactor // Generic write-only contract binding to access the raw methods on } -// NewV1TaikoL2 creates a new instance of V1TaikoL2, bound to a specific deployed contract. -func NewV1TaikoL2(address common.Address, backend bind.ContractBackend) (*V1TaikoL2, error) { - contract, err := bindV1TaikoL2(address, backend, backend, backend) +// NewTaikoL2 creates a new instance of TaikoL2, bound to a specific deployed contract. +func NewTaikoL2(address common.Address, backend bind.ContractBackend) (*TaikoL2, error) { + contract, err := bindTaikoL2(address, backend, backend, backend) if err != nil { return nil, err } - return &V1TaikoL2{V1TaikoL2Caller: V1TaikoL2Caller{contract: contract}, V1TaikoL2Transactor: V1TaikoL2Transactor{contract: contract}, V1TaikoL2Filterer: V1TaikoL2Filterer{contract: contract}}, nil + return &TaikoL2{TaikoL2Caller: TaikoL2Caller{contract: contract}, TaikoL2Transactor: TaikoL2Transactor{contract: contract}, TaikoL2Filterer: TaikoL2Filterer{contract: contract}}, nil } -// NewV1TaikoL2Caller creates a new read-only instance of V1TaikoL2, bound to a specific deployed contract. -func NewV1TaikoL2Caller(address common.Address, caller bind.ContractCaller) (*V1TaikoL2Caller, error) { - contract, err := bindV1TaikoL2(address, caller, nil, nil) +// NewTaikoL2Caller creates a new read-only instance of TaikoL2, bound to a specific deployed contract. +func NewTaikoL2Caller(address common.Address, caller bind.ContractCaller) (*TaikoL2Caller, error) { + contract, err := bindTaikoL2(address, caller, nil, nil) if err != nil { return nil, err } - return &V1TaikoL2Caller{contract: contract}, nil + return &TaikoL2Caller{contract: contract}, nil } -// NewV1TaikoL2Transactor creates a new write-only instance of V1TaikoL2, bound to a specific deployed contract. -func NewV1TaikoL2Transactor(address common.Address, transactor bind.ContractTransactor) (*V1TaikoL2Transactor, error) { - contract, err := bindV1TaikoL2(address, nil, transactor, nil) +// NewTaikoL2Transactor creates a new write-only instance of TaikoL2, bound to a specific deployed contract. +func NewTaikoL2Transactor(address common.Address, transactor bind.ContractTransactor) (*TaikoL2Transactor, error) { + contract, err := bindTaikoL2(address, nil, transactor, nil) if err != nil { return nil, err } - return &V1TaikoL2Transactor{contract: contract}, nil + return &TaikoL2Transactor{contract: contract}, nil } -// NewV1TaikoL2Filterer creates a new log filterer instance of V1TaikoL2, bound to a specific deployed contract. -func NewV1TaikoL2Filterer(address common.Address, filterer bind.ContractFilterer) (*V1TaikoL2Filterer, error) { - contract, err := bindV1TaikoL2(address, nil, nil, filterer) +// NewTaikoL2Filterer creates a new log filterer instance of TaikoL2, bound to a specific deployed contract. +func NewTaikoL2Filterer(address common.Address, filterer bind.ContractFilterer) (*TaikoL2Filterer, error) { + contract, err := bindTaikoL2(address, nil, nil, filterer) if err != nil { return nil, err } - return &V1TaikoL2Filterer{contract: contract}, nil + return &TaikoL2Filterer{contract: contract}, nil } -// bindV1TaikoL2 binds a generic wrapper to an already deployed contract. -func bindV1TaikoL2(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(V1TaikoL2ABI)) +// bindTaikoL2 binds a generic wrapper to an already deployed contract. +func bindTaikoL2(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(TaikoL2ABI)) if err != nil { return nil, err } @@ -137,46 +137,46 @@ func bindV1TaikoL2(address common.Address, caller bind.ContractCaller, transacto // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_V1TaikoL2 *V1TaikoL2Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _V1TaikoL2.Contract.V1TaikoL2Caller.contract.Call(opts, result, method, params...) +func (_TaikoL2 *TaikoL2Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TaikoL2.Contract.TaikoL2Caller.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. -func (_V1TaikoL2 *V1TaikoL2Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _V1TaikoL2.Contract.V1TaikoL2Transactor.contract.Transfer(opts) +func (_TaikoL2 *TaikoL2Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoL2.Contract.TaikoL2Transactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_V1TaikoL2 *V1TaikoL2Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _V1TaikoL2.Contract.V1TaikoL2Transactor.contract.Transact(opts, method, params...) +func (_TaikoL2 *TaikoL2Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TaikoL2.Contract.TaikoL2Transactor.contract.Transact(opts, method, params...) } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. -func (_V1TaikoL2 *V1TaikoL2CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _V1TaikoL2.Contract.contract.Call(opts, result, method, params...) +func (_TaikoL2 *TaikoL2CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TaikoL2.Contract.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. -func (_V1TaikoL2 *V1TaikoL2TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _V1TaikoL2.Contract.contract.Transfer(opts) +func (_TaikoL2 *TaikoL2TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TaikoL2.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_V1TaikoL2 *V1TaikoL2TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _V1TaikoL2.Contract.contract.Transact(opts, method, params...) +func (_TaikoL2 *TaikoL2TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TaikoL2.Contract.contract.Transact(opts, method, params...) } // AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. // // Solidity: function addressManager() view returns(address) -func (_V1TaikoL2 *V1TaikoL2Caller) AddressManager(opts *bind.CallOpts) (common.Address, error) { +func (_TaikoL2 *TaikoL2Caller) AddressManager(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _V1TaikoL2.contract.Call(opts, &out, "addressManager") + err := _TaikoL2.contract.Call(opts, &out, "addressManager") if err != nil { return *new(common.Address), err @@ -191,23 +191,23 @@ func (_V1TaikoL2 *V1TaikoL2Caller) AddressManager(opts *bind.CallOpts) (common.A // AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. // // Solidity: function addressManager() view returns(address) -func (_V1TaikoL2 *V1TaikoL2Session) AddressManager() (common.Address, error) { - return _V1TaikoL2.Contract.AddressManager(&_V1TaikoL2.CallOpts) +func (_TaikoL2 *TaikoL2Session) AddressManager() (common.Address, error) { + return _TaikoL2.Contract.AddressManager(&_TaikoL2.CallOpts) } // AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. // // Solidity: function addressManager() view returns(address) -func (_V1TaikoL2 *V1TaikoL2CallerSession) AddressManager() (common.Address, error) { - return _V1TaikoL2.Contract.AddressManager(&_V1TaikoL2.CallOpts) +func (_TaikoL2 *TaikoL2CallerSession) AddressManager() (common.Address, error) { + return _TaikoL2.Contract.AddressManager(&_TaikoL2.CallOpts) } // GetBlockHash is a free data retrieval call binding the contract method 0xee82ac5e. // // Solidity: function getBlockHash(uint256 number) view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2Caller) GetBlockHash(opts *bind.CallOpts, number *big.Int) ([32]byte, error) { +func (_TaikoL2 *TaikoL2Caller) GetBlockHash(opts *bind.CallOpts, number *big.Int) ([32]byte, error) { var out []interface{} - err := _V1TaikoL2.contract.Call(opts, &out, "getBlockHash", number) + err := _TaikoL2.contract.Call(opts, &out, "getBlockHash", number) if err != nil { return *new([32]byte), err @@ -222,23 +222,23 @@ func (_V1TaikoL2 *V1TaikoL2Caller) GetBlockHash(opts *bind.CallOpts, number *big // GetBlockHash is a free data retrieval call binding the contract method 0xee82ac5e. // // Solidity: function getBlockHash(uint256 number) view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2Session) GetBlockHash(number *big.Int) ([32]byte, error) { - return _V1TaikoL2.Contract.GetBlockHash(&_V1TaikoL2.CallOpts, number) +func (_TaikoL2 *TaikoL2Session) GetBlockHash(number *big.Int) ([32]byte, error) { + return _TaikoL2.Contract.GetBlockHash(&_TaikoL2.CallOpts, number) } // GetBlockHash is a free data retrieval call binding the contract method 0xee82ac5e. // // Solidity: function getBlockHash(uint256 number) view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2CallerSession) GetBlockHash(number *big.Int) ([32]byte, error) { - return _V1TaikoL2.Contract.GetBlockHash(&_V1TaikoL2.CallOpts, number) +func (_TaikoL2 *TaikoL2CallerSession) GetBlockHash(number *big.Int) ([32]byte, error) { + return _TaikoL2.Contract.GetBlockHash(&_TaikoL2.CallOpts, number) } // GetConstants is a free data retrieval call binding the contract method 0x9a295e73. // // Solidity: function getConstants() pure returns(uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, bytes32, uint256, uint256, uint256, bytes4, bytes32) -func (_V1TaikoL2 *V1TaikoL2Caller) GetConstants(opts *bind.CallOpts) (*big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, [32]byte, *big.Int, *big.Int, *big.Int, [4]byte, [32]byte, error) { +func (_TaikoL2 *TaikoL2Caller) GetConstants(opts *bind.CallOpts) (*big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, [32]byte, *big.Int, *big.Int, *big.Int, [4]byte, [32]byte, error) { var out []interface{} - err := _V1TaikoL2.contract.Call(opts, &out, "getConstants") + err := _TaikoL2.contract.Call(opts, &out, "getConstants") if err != nil { return *new(*big.Int), *new(*big.Int), *new(*big.Int), *new(*big.Int), *new(*big.Int), *new(*big.Int), *new(*big.Int), *new(*big.Int), *new([32]byte), *new(*big.Int), *new(*big.Int), *new(*big.Int), *new([4]byte), *new([32]byte), err @@ -266,23 +266,23 @@ func (_V1TaikoL2 *V1TaikoL2Caller) GetConstants(opts *bind.CallOpts) (*big.Int, // GetConstants is a free data retrieval call binding the contract method 0x9a295e73. // // Solidity: function getConstants() pure returns(uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, bytes32, uint256, uint256, uint256, bytes4, bytes32) -func (_V1TaikoL2 *V1TaikoL2Session) GetConstants() (*big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, [32]byte, *big.Int, *big.Int, *big.Int, [4]byte, [32]byte, error) { - return _V1TaikoL2.Contract.GetConstants(&_V1TaikoL2.CallOpts) +func (_TaikoL2 *TaikoL2Session) GetConstants() (*big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, [32]byte, *big.Int, *big.Int, *big.Int, [4]byte, [32]byte, error) { + return _TaikoL2.Contract.GetConstants(&_TaikoL2.CallOpts) } // GetConstants is a free data retrieval call binding the contract method 0x9a295e73. // // Solidity: function getConstants() pure returns(uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, bytes32, uint256, uint256, uint256, bytes4, bytes32) -func (_V1TaikoL2 *V1TaikoL2CallerSession) GetConstants() (*big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, [32]byte, *big.Int, *big.Int, *big.Int, [4]byte, [32]byte, error) { - return _V1TaikoL2.Contract.GetConstants(&_V1TaikoL2.CallOpts) +func (_TaikoL2 *TaikoL2CallerSession) GetConstants() (*big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, [32]byte, *big.Int, *big.Int, *big.Int, [4]byte, [32]byte, error) { + return _TaikoL2.Contract.GetConstants(&_TaikoL2.CallOpts) } // GetLatestSyncedHeader is a free data retrieval call binding the contract method 0x5155ce9f. // // Solidity: function getLatestSyncedHeader() view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2Caller) GetLatestSyncedHeader(opts *bind.CallOpts) ([32]byte, error) { +func (_TaikoL2 *TaikoL2Caller) GetLatestSyncedHeader(opts *bind.CallOpts) ([32]byte, error) { var out []interface{} - err := _V1TaikoL2.contract.Call(opts, &out, "getLatestSyncedHeader") + err := _TaikoL2.contract.Call(opts, &out, "getLatestSyncedHeader") if err != nil { return *new([32]byte), err @@ -297,23 +297,23 @@ func (_V1TaikoL2 *V1TaikoL2Caller) GetLatestSyncedHeader(opts *bind.CallOpts) ([ // GetLatestSyncedHeader is a free data retrieval call binding the contract method 0x5155ce9f. // // Solidity: function getLatestSyncedHeader() view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2Session) GetLatestSyncedHeader() ([32]byte, error) { - return _V1TaikoL2.Contract.GetLatestSyncedHeader(&_V1TaikoL2.CallOpts) +func (_TaikoL2 *TaikoL2Session) GetLatestSyncedHeader() ([32]byte, error) { + return _TaikoL2.Contract.GetLatestSyncedHeader(&_TaikoL2.CallOpts) } // GetLatestSyncedHeader is a free data retrieval call binding the contract method 0x5155ce9f. // // Solidity: function getLatestSyncedHeader() view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2CallerSession) GetLatestSyncedHeader() ([32]byte, error) { - return _V1TaikoL2.Contract.GetLatestSyncedHeader(&_V1TaikoL2.CallOpts) +func (_TaikoL2 *TaikoL2CallerSession) GetLatestSyncedHeader() ([32]byte, error) { + return _TaikoL2.Contract.GetLatestSyncedHeader(&_TaikoL2.CallOpts) } // GetSyncedHeader is a free data retrieval call binding the contract method 0x25bf86f2. // // Solidity: function getSyncedHeader(uint256 number) view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2Caller) GetSyncedHeader(opts *bind.CallOpts, number *big.Int) ([32]byte, error) { +func (_TaikoL2 *TaikoL2Caller) GetSyncedHeader(opts *bind.CallOpts, number *big.Int) ([32]byte, error) { var out []interface{} - err := _V1TaikoL2.contract.Call(opts, &out, "getSyncedHeader", number) + err := _TaikoL2.contract.Call(opts, &out, "getSyncedHeader", number) if err != nil { return *new([32]byte), err @@ -328,23 +328,23 @@ func (_V1TaikoL2 *V1TaikoL2Caller) GetSyncedHeader(opts *bind.CallOpts, number * // GetSyncedHeader is a free data retrieval call binding the contract method 0x25bf86f2. // // Solidity: function getSyncedHeader(uint256 number) view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2Session) GetSyncedHeader(number *big.Int) ([32]byte, error) { - return _V1TaikoL2.Contract.GetSyncedHeader(&_V1TaikoL2.CallOpts, number) +func (_TaikoL2 *TaikoL2Session) GetSyncedHeader(number *big.Int) ([32]byte, error) { + return _TaikoL2.Contract.GetSyncedHeader(&_TaikoL2.CallOpts, number) } // GetSyncedHeader is a free data retrieval call binding the contract method 0x25bf86f2. // // Solidity: function getSyncedHeader(uint256 number) view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2CallerSession) GetSyncedHeader(number *big.Int) ([32]byte, error) { - return _V1TaikoL2.Contract.GetSyncedHeader(&_V1TaikoL2.CallOpts, number) +func (_TaikoL2 *TaikoL2CallerSession) GetSyncedHeader(number *big.Int) ([32]byte, error) { + return _TaikoL2.Contract.GetSyncedHeader(&_TaikoL2.CallOpts, number) } // LatestSyncedHeader is a free data retrieval call binding the contract method 0xc8d772ab. // // Solidity: function latestSyncedHeader() view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2Caller) LatestSyncedHeader(opts *bind.CallOpts) ([32]byte, error) { +func (_TaikoL2 *TaikoL2Caller) LatestSyncedHeader(opts *bind.CallOpts) ([32]byte, error) { var out []interface{} - err := _V1TaikoL2.contract.Call(opts, &out, "latestSyncedHeader") + err := _TaikoL2.contract.Call(opts, &out, "latestSyncedHeader") if err != nil { return *new([32]byte), err @@ -359,23 +359,23 @@ func (_V1TaikoL2 *V1TaikoL2Caller) LatestSyncedHeader(opts *bind.CallOpts) ([32] // LatestSyncedHeader is a free data retrieval call binding the contract method 0xc8d772ab. // // Solidity: function latestSyncedHeader() view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2Session) LatestSyncedHeader() ([32]byte, error) { - return _V1TaikoL2.Contract.LatestSyncedHeader(&_V1TaikoL2.CallOpts) +func (_TaikoL2 *TaikoL2Session) LatestSyncedHeader() ([32]byte, error) { + return _TaikoL2.Contract.LatestSyncedHeader(&_TaikoL2.CallOpts) } // LatestSyncedHeader is a free data retrieval call binding the contract method 0xc8d772ab. // // Solidity: function latestSyncedHeader() view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2CallerSession) LatestSyncedHeader() ([32]byte, error) { - return _V1TaikoL2.Contract.LatestSyncedHeader(&_V1TaikoL2.CallOpts) +func (_TaikoL2 *TaikoL2CallerSession) LatestSyncedHeader() ([32]byte, error) { + return _TaikoL2.Contract.LatestSyncedHeader(&_TaikoL2.CallOpts) } // PublicInputHash is a free data retrieval call binding the contract method 0xdac5df78. // // Solidity: function publicInputHash() view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2Caller) PublicInputHash(opts *bind.CallOpts) ([32]byte, error) { +func (_TaikoL2 *TaikoL2Caller) PublicInputHash(opts *bind.CallOpts) ([32]byte, error) { var out []interface{} - err := _V1TaikoL2.contract.Call(opts, &out, "publicInputHash") + err := _TaikoL2.contract.Call(opts, &out, "publicInputHash") if err != nil { return *new([32]byte), err @@ -390,23 +390,23 @@ func (_V1TaikoL2 *V1TaikoL2Caller) PublicInputHash(opts *bind.CallOpts) ([32]byt // PublicInputHash is a free data retrieval call binding the contract method 0xdac5df78. // // Solidity: function publicInputHash() view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2Session) PublicInputHash() ([32]byte, error) { - return _V1TaikoL2.Contract.PublicInputHash(&_V1TaikoL2.CallOpts) +func (_TaikoL2 *TaikoL2Session) PublicInputHash() ([32]byte, error) { + return _TaikoL2.Contract.PublicInputHash(&_TaikoL2.CallOpts) } // PublicInputHash is a free data retrieval call binding the contract method 0xdac5df78. // // Solidity: function publicInputHash() view returns(bytes32) -func (_V1TaikoL2 *V1TaikoL2CallerSession) PublicInputHash() ([32]byte, error) { - return _V1TaikoL2.Contract.PublicInputHash(&_V1TaikoL2.CallOpts) +func (_TaikoL2 *TaikoL2CallerSession) PublicInputHash() ([32]byte, error) { + return _TaikoL2.Contract.PublicInputHash(&_TaikoL2.CallOpts) } // Resolve is a free data retrieval call binding the contract method 0x461a4478. // // Solidity: function resolve(string name) view returns(address) -func (_V1TaikoL2 *V1TaikoL2Caller) Resolve(opts *bind.CallOpts, name string) (common.Address, error) { +func (_TaikoL2 *TaikoL2Caller) Resolve(opts *bind.CallOpts, name string) (common.Address, error) { var out []interface{} - err := _V1TaikoL2.contract.Call(opts, &out, "resolve", name) + err := _TaikoL2.contract.Call(opts, &out, "resolve", name) if err != nil { return *new(common.Address), err @@ -421,23 +421,23 @@ func (_V1TaikoL2 *V1TaikoL2Caller) Resolve(opts *bind.CallOpts, name string) (co // Resolve is a free data retrieval call binding the contract method 0x461a4478. // // Solidity: function resolve(string name) view returns(address) -func (_V1TaikoL2 *V1TaikoL2Session) Resolve(name string) (common.Address, error) { - return _V1TaikoL2.Contract.Resolve(&_V1TaikoL2.CallOpts, name) +func (_TaikoL2 *TaikoL2Session) Resolve(name string) (common.Address, error) { + return _TaikoL2.Contract.Resolve(&_TaikoL2.CallOpts, name) } // Resolve is a free data retrieval call binding the contract method 0x461a4478. // // Solidity: function resolve(string name) view returns(address) -func (_V1TaikoL2 *V1TaikoL2CallerSession) Resolve(name string) (common.Address, error) { - return _V1TaikoL2.Contract.Resolve(&_V1TaikoL2.CallOpts, name) +func (_TaikoL2 *TaikoL2CallerSession) Resolve(name string) (common.Address, error) { + return _TaikoL2.Contract.Resolve(&_TaikoL2.CallOpts, name) } // Resolve0 is a free data retrieval call binding the contract method 0xf16c7934. // // Solidity: function resolve(uint256 chainId, string name) view returns(address) -func (_V1TaikoL2 *V1TaikoL2Caller) Resolve0(opts *bind.CallOpts, chainId *big.Int, name string) (common.Address, error) { +func (_TaikoL2 *TaikoL2Caller) Resolve0(opts *bind.CallOpts, chainId *big.Int, name string) (common.Address, error) { var out []interface{} - err := _V1TaikoL2.contract.Call(opts, &out, "resolve0", chainId, name) + err := _TaikoL2.contract.Call(opts, &out, "resolve0", chainId, name) if err != nil { return *new(common.Address), err @@ -452,62 +452,62 @@ func (_V1TaikoL2 *V1TaikoL2Caller) Resolve0(opts *bind.CallOpts, chainId *big.In // Resolve0 is a free data retrieval call binding the contract method 0xf16c7934. // // Solidity: function resolve(uint256 chainId, string name) view returns(address) -func (_V1TaikoL2 *V1TaikoL2Session) Resolve0(chainId *big.Int, name string) (common.Address, error) { - return _V1TaikoL2.Contract.Resolve0(&_V1TaikoL2.CallOpts, chainId, name) +func (_TaikoL2 *TaikoL2Session) Resolve0(chainId *big.Int, name string) (common.Address, error) { + return _TaikoL2.Contract.Resolve0(&_TaikoL2.CallOpts, chainId, name) } // Resolve0 is a free data retrieval call binding the contract method 0xf16c7934. // // Solidity: function resolve(uint256 chainId, string name) view returns(address) -func (_V1TaikoL2 *V1TaikoL2CallerSession) Resolve0(chainId *big.Int, name string) (common.Address, error) { - return _V1TaikoL2.Contract.Resolve0(&_V1TaikoL2.CallOpts, chainId, name) +func (_TaikoL2 *TaikoL2CallerSession) Resolve0(chainId *big.Int, name string) (common.Address, error) { + return _TaikoL2.Contract.Resolve0(&_TaikoL2.CallOpts, chainId, name) } // Anchor is a paid mutator transaction binding the contract method 0xa0ca2d08. // // Solidity: function anchor(uint256 l1Height, bytes32 l1Hash) returns() -func (_V1TaikoL2 *V1TaikoL2Transactor) Anchor(opts *bind.TransactOpts, l1Height *big.Int, l1Hash [32]byte) (*types.Transaction, error) { - return _V1TaikoL2.contract.Transact(opts, "anchor", l1Height, l1Hash) +func (_TaikoL2 *TaikoL2Transactor) Anchor(opts *bind.TransactOpts, l1Height *big.Int, l1Hash [32]byte) (*types.Transaction, error) { + return _TaikoL2.contract.Transact(opts, "anchor", l1Height, l1Hash) } // Anchor is a paid mutator transaction binding the contract method 0xa0ca2d08. // // Solidity: function anchor(uint256 l1Height, bytes32 l1Hash) returns() -func (_V1TaikoL2 *V1TaikoL2Session) Anchor(l1Height *big.Int, l1Hash [32]byte) (*types.Transaction, error) { - return _V1TaikoL2.Contract.Anchor(&_V1TaikoL2.TransactOpts, l1Height, l1Hash) +func (_TaikoL2 *TaikoL2Session) Anchor(l1Height *big.Int, l1Hash [32]byte) (*types.Transaction, error) { + return _TaikoL2.Contract.Anchor(&_TaikoL2.TransactOpts, l1Height, l1Hash) } // Anchor is a paid mutator transaction binding the contract method 0xa0ca2d08. // // Solidity: function anchor(uint256 l1Height, bytes32 l1Hash) returns() -func (_V1TaikoL2 *V1TaikoL2TransactorSession) Anchor(l1Height *big.Int, l1Hash [32]byte) (*types.Transaction, error) { - return _V1TaikoL2.Contract.Anchor(&_V1TaikoL2.TransactOpts, l1Height, l1Hash) +func (_TaikoL2 *TaikoL2TransactorSession) Anchor(l1Height *big.Int, l1Hash [32]byte) (*types.Transaction, error) { + return _TaikoL2.Contract.Anchor(&_TaikoL2.TransactOpts, l1Height, l1Hash) } // InvalidateBlock is a paid mutator transaction binding the contract method 0x975e09a0. // // Solidity: function invalidateBlock(bytes txList, uint8 hint, uint256 txIdx) returns() -func (_V1TaikoL2 *V1TaikoL2Transactor) InvalidateBlock(opts *bind.TransactOpts, txList []byte, hint uint8, txIdx *big.Int) (*types.Transaction, error) { - return _V1TaikoL2.contract.Transact(opts, "invalidateBlock", txList, hint, txIdx) +func (_TaikoL2 *TaikoL2Transactor) InvalidateBlock(opts *bind.TransactOpts, txList []byte, hint uint8, txIdx *big.Int) (*types.Transaction, error) { + return _TaikoL2.contract.Transact(opts, "invalidateBlock", txList, hint, txIdx) } // InvalidateBlock is a paid mutator transaction binding the contract method 0x975e09a0. // // Solidity: function invalidateBlock(bytes txList, uint8 hint, uint256 txIdx) returns() -func (_V1TaikoL2 *V1TaikoL2Session) InvalidateBlock(txList []byte, hint uint8, txIdx *big.Int) (*types.Transaction, error) { - return _V1TaikoL2.Contract.InvalidateBlock(&_V1TaikoL2.TransactOpts, txList, hint, txIdx) +func (_TaikoL2 *TaikoL2Session) InvalidateBlock(txList []byte, hint uint8, txIdx *big.Int) (*types.Transaction, error) { + return _TaikoL2.Contract.InvalidateBlock(&_TaikoL2.TransactOpts, txList, hint, txIdx) } // InvalidateBlock is a paid mutator transaction binding the contract method 0x975e09a0. // // Solidity: function invalidateBlock(bytes txList, uint8 hint, uint256 txIdx) returns() -func (_V1TaikoL2 *V1TaikoL2TransactorSession) InvalidateBlock(txList []byte, hint uint8, txIdx *big.Int) (*types.Transaction, error) { - return _V1TaikoL2.Contract.InvalidateBlock(&_V1TaikoL2.TransactOpts, txList, hint, txIdx) +func (_TaikoL2 *TaikoL2TransactorSession) InvalidateBlock(txList []byte, hint uint8, txIdx *big.Int) (*types.Transaction, error) { + return _TaikoL2.Contract.InvalidateBlock(&_TaikoL2.TransactOpts, txList, hint, txIdx) } -// V1TaikoL2BlockInvalidatedIterator is returned from FilterBlockInvalidated and is used to iterate over the raw logs and unpacked data for BlockInvalidated events raised by the V1TaikoL2 contract. -type V1TaikoL2BlockInvalidatedIterator struct { - Event *V1TaikoL2BlockInvalidated // Event containing the contract specifics and raw log +// TaikoL2BlockInvalidatedIterator is returned from FilterBlockInvalidated and is used to iterate over the raw logs and unpacked data for BlockInvalidated events raised by the TaikoL2 contract. +type TaikoL2BlockInvalidatedIterator struct { + Event *TaikoL2BlockInvalidated // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -521,7 +521,7 @@ type V1TaikoL2BlockInvalidatedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *V1TaikoL2BlockInvalidatedIterator) Next() bool { +func (it *TaikoL2BlockInvalidatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -530,7 +530,7 @@ func (it *V1TaikoL2BlockInvalidatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(V1TaikoL2BlockInvalidated) + it.Event = new(TaikoL2BlockInvalidated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -545,7 +545,7 @@ func (it *V1TaikoL2BlockInvalidatedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(V1TaikoL2BlockInvalidated) + it.Event = new(TaikoL2BlockInvalidated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -561,19 +561,19 @@ func (it *V1TaikoL2BlockInvalidatedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *V1TaikoL2BlockInvalidatedIterator) Error() error { +func (it *TaikoL2BlockInvalidatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *V1TaikoL2BlockInvalidatedIterator) Close() error { +func (it *TaikoL2BlockInvalidatedIterator) Close() error { it.sub.Unsubscribe() return nil } -// V1TaikoL2BlockInvalidated represents a BlockInvalidated event raised by the V1TaikoL2 contract. -type V1TaikoL2BlockInvalidated struct { +// TaikoL2BlockInvalidated represents a BlockInvalidated event raised by the TaikoL2 contract. +type TaikoL2BlockInvalidated struct { TxListHash [32]byte Raw types.Log // Blockchain specific contextual infos } @@ -581,31 +581,31 @@ type V1TaikoL2BlockInvalidated struct { // FilterBlockInvalidated is a free log retrieval operation binding the contract event 0x64b299ff9f8ba674288abb53380419048a4271dda03b837ecba6b40e6ddea4a2. // // Solidity: event BlockInvalidated(bytes32 indexed txListHash) -func (_V1TaikoL2 *V1TaikoL2Filterer) FilterBlockInvalidated(opts *bind.FilterOpts, txListHash [][32]byte) (*V1TaikoL2BlockInvalidatedIterator, error) { +func (_TaikoL2 *TaikoL2Filterer) FilterBlockInvalidated(opts *bind.FilterOpts, txListHash [][32]byte) (*TaikoL2BlockInvalidatedIterator, error) { var txListHashRule []interface{} for _, txListHashItem := range txListHash { txListHashRule = append(txListHashRule, txListHashItem) } - logs, sub, err := _V1TaikoL2.contract.FilterLogs(opts, "BlockInvalidated", txListHashRule) + logs, sub, err := _TaikoL2.contract.FilterLogs(opts, "BlockInvalidated", txListHashRule) if err != nil { return nil, err } - return &V1TaikoL2BlockInvalidatedIterator{contract: _V1TaikoL2.contract, event: "BlockInvalidated", logs: logs, sub: sub}, nil + return &TaikoL2BlockInvalidatedIterator{contract: _TaikoL2.contract, event: "BlockInvalidated", logs: logs, sub: sub}, nil } // WatchBlockInvalidated is a free log subscription operation binding the contract event 0x64b299ff9f8ba674288abb53380419048a4271dda03b837ecba6b40e6ddea4a2. // // Solidity: event BlockInvalidated(bytes32 indexed txListHash) -func (_V1TaikoL2 *V1TaikoL2Filterer) WatchBlockInvalidated(opts *bind.WatchOpts, sink chan<- *V1TaikoL2BlockInvalidated, txListHash [][32]byte) (event.Subscription, error) { +func (_TaikoL2 *TaikoL2Filterer) WatchBlockInvalidated(opts *bind.WatchOpts, sink chan<- *TaikoL2BlockInvalidated, txListHash [][32]byte) (event.Subscription, error) { var txListHashRule []interface{} for _, txListHashItem := range txListHash { txListHashRule = append(txListHashRule, txListHashItem) } - logs, sub, err := _V1TaikoL2.contract.WatchLogs(opts, "BlockInvalidated", txListHashRule) + logs, sub, err := _TaikoL2.contract.WatchLogs(opts, "BlockInvalidated", txListHashRule) if err != nil { return nil, err } @@ -615,8 +615,8 @@ func (_V1TaikoL2 *V1TaikoL2Filterer) WatchBlockInvalidated(opts *bind.WatchOpts, select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(V1TaikoL2BlockInvalidated) - if err := _V1TaikoL2.contract.UnpackLog(event, "BlockInvalidated", log); err != nil { + event := new(TaikoL2BlockInvalidated) + if err := _TaikoL2.contract.UnpackLog(event, "BlockInvalidated", log); err != nil { return err } event.Raw = log @@ -640,18 +640,18 @@ func (_V1TaikoL2 *V1TaikoL2Filterer) WatchBlockInvalidated(opts *bind.WatchOpts, // ParseBlockInvalidated is a log parse operation binding the contract event 0x64b299ff9f8ba674288abb53380419048a4271dda03b837ecba6b40e6ddea4a2. // // Solidity: event BlockInvalidated(bytes32 indexed txListHash) -func (_V1TaikoL2 *V1TaikoL2Filterer) ParseBlockInvalidated(log types.Log) (*V1TaikoL2BlockInvalidated, error) { - event := new(V1TaikoL2BlockInvalidated) - if err := _V1TaikoL2.contract.UnpackLog(event, "BlockInvalidated", log); err != nil { +func (_TaikoL2 *TaikoL2Filterer) ParseBlockInvalidated(log types.Log) (*TaikoL2BlockInvalidated, error) { + event := new(TaikoL2BlockInvalidated) + if err := _TaikoL2.contract.UnpackLog(event, "BlockInvalidated", log); err != nil { return nil, err } event.Raw = log return event, nil } -// V1TaikoL2HeaderSyncedIterator is returned from FilterHeaderSynced and is used to iterate over the raw logs and unpacked data for HeaderSynced events raised by the V1TaikoL2 contract. -type V1TaikoL2HeaderSyncedIterator struct { - Event *V1TaikoL2HeaderSynced // Event containing the contract specifics and raw log +// TaikoL2HeaderSyncedIterator is returned from FilterHeaderSynced and is used to iterate over the raw logs and unpacked data for HeaderSynced events raised by the TaikoL2 contract. +type TaikoL2HeaderSyncedIterator struct { + Event *TaikoL2HeaderSynced // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -665,7 +665,7 @@ type V1TaikoL2HeaderSyncedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *V1TaikoL2HeaderSyncedIterator) Next() bool { +func (it *TaikoL2HeaderSyncedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -674,7 +674,7 @@ func (it *V1TaikoL2HeaderSyncedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(V1TaikoL2HeaderSynced) + it.Event = new(TaikoL2HeaderSynced) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -689,7 +689,7 @@ func (it *V1TaikoL2HeaderSyncedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(V1TaikoL2HeaderSynced) + it.Event = new(TaikoL2HeaderSynced) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -705,19 +705,19 @@ func (it *V1TaikoL2HeaderSyncedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *V1TaikoL2HeaderSyncedIterator) Error() error { +func (it *TaikoL2HeaderSyncedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *V1TaikoL2HeaderSyncedIterator) Close() error { +func (it *TaikoL2HeaderSyncedIterator) Close() error { it.sub.Unsubscribe() return nil } -// V1TaikoL2HeaderSynced represents a HeaderSynced event raised by the V1TaikoL2 contract. -type V1TaikoL2HeaderSynced struct { +// TaikoL2HeaderSynced represents a HeaderSynced event raised by the TaikoL2 contract. +type TaikoL2HeaderSynced struct { Height *big.Int SrcHeight *big.Int SrcHash [32]byte @@ -727,7 +727,7 @@ type V1TaikoL2HeaderSynced struct { // FilterHeaderSynced is a free log retrieval operation binding the contract event 0x930c750845026c7bb04c0e3d9111d512b4c86981713c4944a35a10a4a7a854f3. // // Solidity: event HeaderSynced(uint256 indexed height, uint256 indexed srcHeight, bytes32 srcHash) -func (_V1TaikoL2 *V1TaikoL2Filterer) FilterHeaderSynced(opts *bind.FilterOpts, height []*big.Int, srcHeight []*big.Int) (*V1TaikoL2HeaderSyncedIterator, error) { +func (_TaikoL2 *TaikoL2Filterer) FilterHeaderSynced(opts *bind.FilterOpts, height []*big.Int, srcHeight []*big.Int) (*TaikoL2HeaderSyncedIterator, error) { var heightRule []interface{} for _, heightItem := range height { @@ -738,17 +738,17 @@ func (_V1TaikoL2 *V1TaikoL2Filterer) FilterHeaderSynced(opts *bind.FilterOpts, h srcHeightRule = append(srcHeightRule, srcHeightItem) } - logs, sub, err := _V1TaikoL2.contract.FilterLogs(opts, "HeaderSynced", heightRule, srcHeightRule) + logs, sub, err := _TaikoL2.contract.FilterLogs(opts, "HeaderSynced", heightRule, srcHeightRule) if err != nil { return nil, err } - return &V1TaikoL2HeaderSyncedIterator{contract: _V1TaikoL2.contract, event: "HeaderSynced", logs: logs, sub: sub}, nil + return &TaikoL2HeaderSyncedIterator{contract: _TaikoL2.contract, event: "HeaderSynced", logs: logs, sub: sub}, nil } // WatchHeaderSynced is a free log subscription operation binding the contract event 0x930c750845026c7bb04c0e3d9111d512b4c86981713c4944a35a10a4a7a854f3. // // Solidity: event HeaderSynced(uint256 indexed height, uint256 indexed srcHeight, bytes32 srcHash) -func (_V1TaikoL2 *V1TaikoL2Filterer) WatchHeaderSynced(opts *bind.WatchOpts, sink chan<- *V1TaikoL2HeaderSynced, height []*big.Int, srcHeight []*big.Int) (event.Subscription, error) { +func (_TaikoL2 *TaikoL2Filterer) WatchHeaderSynced(opts *bind.WatchOpts, sink chan<- *TaikoL2HeaderSynced, height []*big.Int, srcHeight []*big.Int) (event.Subscription, error) { var heightRule []interface{} for _, heightItem := range height { @@ -759,7 +759,7 @@ func (_V1TaikoL2 *V1TaikoL2Filterer) WatchHeaderSynced(opts *bind.WatchOpts, sin srcHeightRule = append(srcHeightRule, srcHeightItem) } - logs, sub, err := _V1TaikoL2.contract.WatchLogs(opts, "HeaderSynced", heightRule, srcHeightRule) + logs, sub, err := _TaikoL2.contract.WatchLogs(opts, "HeaderSynced", heightRule, srcHeightRule) if err != nil { return nil, err } @@ -769,8 +769,8 @@ func (_V1TaikoL2 *V1TaikoL2Filterer) WatchHeaderSynced(opts *bind.WatchOpts, sin select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(V1TaikoL2HeaderSynced) - if err := _V1TaikoL2.contract.UnpackLog(event, "HeaderSynced", log); err != nil { + event := new(TaikoL2HeaderSynced) + if err := _TaikoL2.contract.UnpackLog(event, "HeaderSynced", log); err != nil { return err } event.Raw = log @@ -794,9 +794,9 @@ func (_V1TaikoL2 *V1TaikoL2Filterer) WatchHeaderSynced(opts *bind.WatchOpts, sin // ParseHeaderSynced is a log parse operation binding the contract event 0x930c750845026c7bb04c0e3d9111d512b4c86981713c4944a35a10a4a7a854f3. // // Solidity: event HeaderSynced(uint256 indexed height, uint256 indexed srcHeight, bytes32 srcHash) -func (_V1TaikoL2 *V1TaikoL2Filterer) ParseHeaderSynced(log types.Log) (*V1TaikoL2HeaderSynced, error) { - event := new(V1TaikoL2HeaderSynced) - if err := _V1TaikoL2.contract.UnpackLog(event, "HeaderSynced", log); err != nil { +func (_TaikoL2 *TaikoL2Filterer) ParseHeaderSynced(log types.Log) (*TaikoL2HeaderSynced, error) { + event := new(TaikoL2HeaderSynced) + if err := _TaikoL2.contract.UnpackLog(event, "HeaderSynced", log); err != nil { return nil, err } event.Raw = log diff --git a/packages/relayer/indexer/service.go b/packages/relayer/indexer/service.go index 1e3e732cf88..ea313f9c47e 100644 --- a/packages/relayer/indexer/service.go +++ b/packages/relayer/indexer/service.go @@ -131,7 +131,7 @@ func NewService(opts NewServiceOpts) (*Service, error) { destHeaderSyncer, err := contracts.NewIHeaderSync(opts.DestTaikoAddress, opts.DestEthClient) if err != nil { - return nil, errors.Wrap(err, "contracts.NewV1TaikoL2") + return nil, errors.Wrap(err, "contracts.NewTaikoL2") } var taikoL1 *contracts.TaikoL1