Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 3.4 KB

BRIDGE.md

File metadata and controls

56 lines (40 loc) · 3.4 KB

Bridge

This project is a truffle project. There are multiple files in the contracts folder and you can select between:

bridge/Implementation/BridgeFeatures/ folder contains the different functions of the bridge. The bridge implements the ERC-1538 proxy pattern in order to be upgradable:

bridge/Implementation/Proxification/ folder contains the different functions of the ERC-1538 proxy pattern for Bridge deployment. Get more infos here

bridge/Implementation/Test/ folder contains an implementation of a token ERC-721 and a custom ERC-721 with premint functions (IOU)

Testing

$ npm test

Configuration

To deploy the bridge you need to choose which network it will be operating on. To this, find the universe unique id (last 4 bytes of keccak256 hash of the nameof the network) and add it line 45-48 (await instancedInit.init("0xe35d7d6b");) to the deployement script here

Deployment

Update truffle-config.js with your credentials and network data:

networks : {
 rinkeby: {
       provider: () => new HDWalletProvider('yourprivatekey', `your_rpc_url`),
       network_id: 4,       // (eg : 4 = Rinkeby)
       gas: 5500000,        // Rinkeby has a lower block limit than mainnet
       confirmations: 2,    // # of confs to wait between deployments. (default: 0)
       timeoutBlocks: 200,  // # of blocks before a deployment times out  (minimum/default: 50)
       skipDryRun: true     // Skip dry run before migrations? (default: false for public nets )
     },
}

Deploy all contracts on this network (migration/bridge/erc721/iou): (after setting configuration for the Manipulator (see MANIPULATOR.md))

$ truffle migrate --network rinkeby --reset

After deployement

Please note all the deployement informations. The BridgeTransparentProxy contract address is the address of your bridge. You can then use that address in the relay configuration.