Code Monkey home page Code Monkey logo

contracts's Introduction

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.

contracts's People

Contributors

pheasantboy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.