GithubHelp home page GithubHelp logo

feiyiban / bridge-contracts-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mapprotocol/bridge-contracts

0.0 0.0 0.0 757 KB

MAP Cross-chain Service contracts

JavaScript 30.11% Solidity 69.89%

bridge-contracts-1's Introduction

MAP Bridge Contracts

1. MapCoin Contract

Map cross-chain bridge special token contract, all tokens need to be mapped to MapCoin for cross-chain operation.

2. MapTxVerify Contract

Map cross-chain bridge transaction verification contract, the user verifies the transaction details provided by the relay node.

3. MapRouter Contract

Map cross-chain bridge transaction main routing contract for overall agency

Event

//Cross-chain transfer of tokens to minting
event LogSwapIn(uint orderId, address indexed token, address indexed from, address indexed to, uint amount, uint fromChainID, uint toChainID);

//Token cross-chain transfer out and burn
event LogSwapOut(uint orderId, address indexed token, address indexed from, address indexed to, uint amount, uint fromChainID, uint toChainID);

//Token cross-chain transfer verification failed
event LogSwapInFail(uint orderId, bytes32[] message,address indexed from, address indexed to, uint amount, uint fromChainID, uint toChainID);

Swap

//Cross-chain transfer in
function swapIn(uint256 id, address token, address to, uint amount, uint fromChainID, bytes32[] memory data) 

//Cross-chain transfer out
function swapOut(address token, address to, uint amount, uint toChainID)

bridge-contracts-1's People

Contributors

apollowoo avatar jsonfelix avatar philllau avatar redace85 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.