Mainnet: https://cbridge-prod2.celer.app
Testnet: https://cbridge-v2-test.celer.network
curl -d '{"transfer_id":"0000000000000000000000000000000000000000000000000000000000000000"}' -H "Content-Type: application/json" -X POST https://cbridge-prod2.celer.app/v2/getTransferStatus
curl https://cbridge-prod2.celer.app/v2/estimateAmt?src_chain_id=1&dst_chain_id=43114&token_symbol=USDT&amt=1337000000&usr_addr=0x0000000000000000000000000000000000000000&slippage_tolerance=5000
curl https://cbridge-prod2.celer.app/v2/getTransferConfigs
Funds that will get transferred in intermediate token:
- Bounties
- Non-FeeDistributor Receiver (the ones that are configured in the Fee itself)
This can be a multisig or an EOA which receives any funds that can't be processed anymore in order to process them manually.
yarn deploy:diamond:avax
yarn deploy:diamond:eth
# or
yarn deploy:diamond:bnb
This is necessary to apply configurations and contract information that are deployed on target chains
yarn deploy:diamond:avax:finalize
npx hardhat deploy --network mainnet-eth --tags DeployLaunchProtocol
npx hardhat deploy --network mainnet-eth --tags DeployDegenATM
Deploy the diamonds locally, you need to start the local nodes. This starts the current defined mainnet forks
yarn node:all
You can either prepend all commands with
USE_LOCALFORK_INSTEAD=true
You can also set up your .env
file with an environment variable
...
USE_LOCALFORK_INSTEAD=true
PRODUCTION=true
USE_DEF_DIAMOND=false
USE_REAL_ACCOUNTS=true
...
PRODUCTION=true USE_DEF_DIAMOND=false USE_LOCALFORK_INSTEAD=true USE_REAL_ACCOUNTS=true yarn deploy:diamond:avax
PRODUCTION=true USE_DEF_DIAMOND=false USE_LOCALFORK_INSTEAD=true USE_REAL_ACCOUNTS=true yarn deploy:diamond:eth
# or
PRODUCTION=true USE_DEF_DIAMOND=false USE_LOCALFORK_INSTEAD=true USE_REAL_ACCOUNTS=true yarn deploy:diamond:bnb
This is necessary to apply configurations and contract information that are deployed on target chains
PRODUCTION=true USE_DEF_DIAMOND=false USE_LOCALFORK_INSTEAD=true USE_REAL_ACCOUNTS=true yarn deploy:diamond:avax:finalize
PRODUCTION=true USE_DEF_DIAMOND=false USE_LOCALFORK_INSTEAD=true USE_REAL_ACCOUNTS=true npx hardhat deploy --network mainnet-eth --tags DeployLaunchProtocol
PRODUCTION=true USE_DEF_DIAMOND=false USE_LOCALFORK_INSTEAD=true USE_REAL_ACCOUNTS=true npx hardhat deploy --network mainnet-eth --tags DeployDegenATM
PRODUCTION=true USE_DEF_DIAMOND=false yarn test
This will give you more insights about the deployment process while executing a hardhat task that makes use of hardhat deploy scripts
DEBUG=hardhat:wighawag:hardhat-deploy PRODUCTION=true USE_DEF_DIAMOND=false yarn test
Create a report for all files
PRODUCTION=true USE_DEF_DIAMOND=false yarn coverage
Create a report for a specific file
PRODUCTION=true USE_DEF_DIAMOND=false yarn coverage --testfiles ./test/fee-distributor-facet.spec.ts
# or
PRODUCTION=true USE_DEF_DIAMOND=false yarn coverage --testfiles ./test/fee-store-facet.spec.ts
After creating the report, you can look it up in detail in your browser by using following command and opening up the proposed host
yarn show-coverage
Test Token: 0x6ef48fAE861010F369883d3614bCa91E2F720772
Test Token Owner: 0x2fcb9d07eD31874f5fe6da6de315B3b28Dd0aD10
CELER supports Goerlie ETH (chain 5) to BNB Chain Testnet (chain 97) pegged token bridge.
Therefore our integration testing is done with custom tokens to bridge from ETH to BNB.
Pair: 0xbe6056777601F9124bE432D96B40Ee96DBDb9201
pegUSDT: 0xb5c4Dc15DAb293E0Dc796a0Ba5DAC85207d2339C
WBNB: 0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd
pegUSDT: 0x7416F4870F1Cd9e60707D850606c969D9dCf7DAe
Use slither from Trail Of Bits
docker run -it -v $(pwd):/share --workdir="/share/contracts/diamond" trailofbits/eth-security-toolbox
Execute Slither per file
slither ./filename.sol --config-file ./../../slither.config.json
If you need to install a different solc
you can do this by following command:
# for solidity version 0.8.19
solc-select install 0.8.19 && solc-select use 0.8.19
# or for solidity version 0.8.17
solc-select install 0.8.17 && solc-select use 0.8.17