Skip to content

Pheasant-Network/contracts

Repository files navigation

PheasantNetworkBridgeChild

This repository contains the core smart contracts for pheasant network v1. These smart contracts manage all the records user's and relayer's activity. Please refer bridge-dispute-manager for inter-chain communication and tx verification.

Testnet Deployment

  1. Deploy Diamond
npx hardhat run scripts/deployDiamond.js --network [target L1 Network]
  1. Deploy ChildCheckpointManager (You can skip this step for some networks)
npx hardhat run scripts/deployCheckpointManager.js --network [target L2 Network]
  1. Deploy RootCheckpointManager (You can skip this step for some networks)
npx hardhat run scripts/deployCheckpointManager.js --network [target L1 Network]
  1. Deploy BridgeDisputeManager
npx hardhat run scripts/deployDisputeManager.js --network [target L2 Network]
  1. Deploy PheasantNetworkParameters
npx hardhat run scripts/deployParameters.js --network [target L2 Network]
  1. Deploy PheasantNetworkBridgeChild
npx hardhat run scripts/deploy.js --network [target L2 Network]
  1. Deploy BondManager
npx hardhat run scripts/deployBondManager.js --network [target L2 Network]
  1. For zkSync (Because of the different logic to calculate contract address, we need to use managerSetting.js to change BondManager address)
npx hardhat run scripts/managerSetting.js --network zkSyncTestnet

Which contract should be deployed when you add change on each contract

  • BondManager
    • (PheasantNetworkBridgeChild)

      There is updator function in PheasantNetworkBridgeChild, but you need to wait for 3 hours.

  • BridgeDisputeManager
    • PheasantNetworkBridgeChild
    • BondManager
  • Diamond
    • RootCheckpointManager
    • ChildCheckpointManager
    • BridgeDisputeManager
    • PheasantNetworkBridgeChild
    • BondManager
  • ChildCheckpointManager
    • RootCheckpointManager
    • BridgeDisputeManager
    • PheasantNetworkBridgeChild
    • BondManager
  • RootCheckpointManager
    • no need to deploy, but need to call diamond cut function
  • PheasantNetworkBridgeChild
    • BondManager

Don't forget to withdraw asset from BondManager contract before you deploy a new contract.

License

Pheasant Network is distributed under the MIT license.

About

Pheasant Network Contracts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published