diff --git a/package.json b/package.json index 2e41a94e..78c18b14 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "devDependencies": { "@arbitrum/sdk": "^3.1.13", "@aws-sdk/client-s3": "^3.465.0", - "@eth-optimism/sdk": "^3.2.0", + "@eth-optimism/sdk": "^3.2.3", "@ethersproject/bytes": "^5.7.0", "@fxportal/maticjs-fxportal": "^1.1.1", "@maticnetwork/maticjs": "^3.5.0", diff --git a/scripts/native-bridge-helpers/optimism/l2tol1Relay.ts b/scripts/native-bridge-helpers/optimism/l2tol1Relay.ts index 39069d08..dd348703 100644 --- a/scripts/native-bridge-helpers/optimism/l2tol1Relay.ts +++ b/scripts/native-bridge-helpers/optimism/l2tol1Relay.ts @@ -1,26 +1,24 @@ import { providers, Wallet } from "ethers"; import { CrossChainMessenger, MessageStatus } from "@eth-optimism/sdk"; import { getJsonRpcUrl } from "../../constants"; -import { ChainKey } from "../../../src"; +import { HardhatChainName, ChainId } from "../../../src"; // get providers for source and destination -const localChain = ChainKey.GOERLI; -const remoteChain = ChainKey.OPTIMISM_GOERLI; +const l1ChainId = ChainId.SEPOLIA; +const l2ChainId = ChainId.OPTIMISM_SEPOLIA; const walletPrivateKey = process.env.SOCKET_SIGNER_KEY!; -const l1Provider = new providers.JsonRpcProvider(getJsonRpcUrl(localChain)); +const l1Provider = new providers.JsonRpcProvider(getJsonRpcUrl(l1ChainId)); const l1Wallet = new Wallet(walletPrivateKey, l1Provider); const sealTxHash = ""; export const main = async () => { const crossChainMessenger = new CrossChainMessenger({ - l1ChainId: 5, - l2ChainId: 420, + l1ChainId, + l2ChainId, l1SignerOrProvider: l1Wallet, - l2SignerOrProvider: new providers.JsonRpcProvider( - getJsonRpcUrl(remoteChain) - ), + l2SignerOrProvider: new providers.JsonRpcProvider(getJsonRpcUrl(l2ChainId)), }); const status = await crossChainMessenger.getMessageStatus(sealTxHash); @@ -40,6 +38,7 @@ export const main = async () => { } }; +// npx ts-node scripts/native-bridge-helpers/optimism/l2tol1Relay.ts main() .then(() => process.exit(0)) .catch((error: Error) => { diff --git a/yarn.lock b/yarn.lock index 941dc00e..e24b4dbd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2197,10 +2197,10 @@ ethers "^5.7.2" node-fetch "^2.6.7" -"@eth-optimism/sdk@^3.2.0": - version "3.2.2" - resolved "https://registry.yarnpkg.com/@eth-optimism/sdk/-/sdk-3.2.2.tgz#732c2d6fde96a25303b3c5b39b3b3ed1f913d9aa" - integrity sha512-P8YXAlh2lun0KZlwrw4FqmK4kNIoOOzI816XXhfkW3nMVADGRAru3TKSM74MgmEuyGiHrA9EoPRq1WLqUX4B0w== +"@eth-optimism/sdk@^3.2.3": + version "3.2.3" + resolved "https://registry.yarnpkg.com/@eth-optimism/sdk/-/sdk-3.2.3.tgz#42aa99ed388355ec85b5cf68589aaa15f0c6c7f6" + integrity sha512-e3XQTbbU+HTzsEv/VIsJpZifK6YZVlzEtF6tj/Vz/VIEDCjZk5JPcnCQOMVcs9ICI4EJyyur+y/+RU7fPa6qtg== dependencies: "@eth-optimism/contracts" "0.6.0" "@eth-optimism/contracts-bedrock" "0.17.1" @@ -11343,7 +11343,7 @@ semver@^7.3.8: dependencies: lru-cache "^6.0.0" -semver@^7.5.4, semver@^7.6.0: +semver@^7.6.0: version "7.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==