Add Tezos X Previewnet deployment - #18
Open
skenaja wants to merge 4 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for deploying
WXTZto TezosX Previewnet (chainId128064),an ephemeral (~1–2 month) test chain with no LayerZero infrastructure.
The contract is deployed unmodified by standing up a minimal
EndpointV2Stubthat satisfies the single endpoint call (
setDelegate) made fromOAppCore's constructor. LocalWXTZfeatures (deposit/withdraw, ERC20,permit) work; cross-chain
send/lzReceiveintentionally do not.Changes
hardhat.config.ts,chain-config.ts— registertezosXPreviewnetnetwork (RPC, chainId 128064, Blockscout verifier) and add 128064 to
testnetChains. The network has noeidbecause LayerZero has notassigned one for this chain.
deploy/WXTZ.ts— map chainId 128064 to itself for theetherlinkChainIdconstructor arg, sodeposit/withdrawwork locally.contracts/mocks/tezosXPreviewnet/EndpointV2Stub.sol— new previewnet-onlystub. Implements only
setDelegate(address)with a stored mapping + event.Path makes its scope obvious; clearly marked as not-for-production in NatSpec.
deploy/tezosXPreviewnet/EndpointV2Stub.ts— new deploy script thatregisters the stub under the deployment name
EndpointV2, so the existinghre.deployments.get('EndpointV2')call indeploy/WXTZ.tsresolves to it.Guarded by a
skipthat no-ops on every other network.npm run lint:fix+ prettier sweep across scripts,tests, configs, and docs (no behaviour changes).
README.md— new Deployments section listing every mainnet/testnetaddress with explorer links, plus a sidenote documenting the previewnet
stub workaround.
Deployments
EndpointV2Stub0xF01b3160F2926420C7416ddA62544969063269EDWXTZ0xf4a2e3BA5C14f11c23c8c4351093C058D20542f2Both contracts are verified on Blockscout.
Cleanup
The stub, its deploy script, and the previewnet network entries should be
removed when previewnet is decommissioned. All previewnet-only code is
contained under
contracts/mocks/tezosXPreviewnet/anddeploy/tezosXPreviewnet/to make that easy.Test plan
npx hardhat compilesucceedsnpx hardhat testpasses (no logic changes toWXTZ.sol)WXTZon previewnet acceptsdepositof native XTZ and returns it viawithdrawsetDelegatemapping reflects the WXTZ contract → deployer wiring set during constructionnpx hardhat deploy --tags EndpointV2Stub --network <other-network>is a no-op