https://github.com/denizumutdereli/eth-bsc-bridge-adapter
ETH to BSC or BSC to ETH Cross Bridge Adapter, including Burning and Minting Template
https://github.com/denizumutdereli/eth-bsc-bridge-adapter
binance-smart-chain bridge-adapters chaincode chainlink dapp-bridges ethereum oracles smart-contracts
Last synced: 7 months ago
JSON representation
ETH to BSC or BSC to ETH Cross Bridge Adapter, including Burning and Minting Template
- Host: GitHub
- URL: https://github.com/denizumutdereli/eth-bsc-bridge-adapter
- Owner: denizumutdereli
- License: apache-2.0
- Created: 2022-05-16T10:05:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-16T10:28:31.000Z (over 3 years ago)
- Last Synced: 2024-04-22T15:24:23.310Z (over 1 year ago)
- Topics: binance-smart-chain, bridge-adapters, chaincode, chainlink, dapp-bridges, ethereum, oracles, smart-contracts
- Language: JavaScript
- Homepage:
- Size: 123 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eth-bsc-bridge-adapter
ETH to BSC or BSC to ETH Cross Bridge Adapter, including Burning and Minting TemplatePS. Use it with filled ETH/Rinkeby and BSC testnet faucets for testing.
https://faucet.rinkeby.io/
https://testnet.binance.org/faucet-smart
> npm install
Bridge contract on ETH
> truffle migrate --reset --network ethTestnet
Bridge contract on BSC
> truffle migrate --reset --network bscTestnet
Ok we have both smart contracts bridges on ETH and BSC
Now lets check the token balances on ETH and BSC networks.ETH Network balance (which should be 1000 ref:scripts/eth-bsc-transfer.js line 6)
> truffle exec scripts/eth-token-balance.js --network ethTestnet
BSC Network balance (which should be 0)
> truffle exec scripts/bsc-token-balance.js --network bscTestnet
Open a new terminal to build the bridge between networks, its going to listen transactions (currently no .env its hardcode. Be sure the you are on the right network!)
Listening from bridge contract on the ETH
> node scripts/eth-bsc-bridge.js
Create transaction from another terminal:
> truffle exec scripts/eth-bsc-transfer.js --networkTestnet
You should see the bridge api is going to detect the transaction event on previous terminal
Which means its burned on ETH and minted on BSC and the tokens are now available.Summarize and checking the current balances
ETH Network Balance should be 0
> truffle exec scripts/eth-token-balance.js --network ethTestnet
BSC Network Balance should be 1000
> truffle exec scripts/bsc-token-balance.js --network bscTestnet
All done,
Cheers.@denizumutdereli