TON-EVM token bridge - Solidity smart contracts
Developed by RSquad by order of TON Foundation.
npm run test
change PRIVATE_KEY
, GOERLI_ENDPOINT
, BSC_TESTNET_ENDPOINT
in .env
.
Ethereum Goerli Testnet:
npm run deploy-test-token-goerli
npm run deploy-bridge-goerli
BSC Testnet:
npm run deploy-test-token-bsc-testnet
npm run deploy-bridge-bsc-testnet
Based on Toncoin Bridge.
-
TonUtils
-token
address added toSwapData
.TonAddress
replaced byaddress_hash
because all tokens and token owners in workchain = 0. -
SignatureChecker
-getSwapDataId
:token
address andchainId
added to signing data,workchain
removed from signing data; 'uint64 amount' -> 'uint256 amount'; cosmetic changes;`checkSignature` `getNewSetId` - `chainId` added to signing data `getNewBurnStatusId` renamed to `getNewLockStatusId`, `chainId` added to signing data
-
Bridge
`SwapEthToTon` renamed to `Lock`, some fields removed and added `SwapTonToEth` renamed to `Unlock`, some fields removed and added `burn` -> `lock`, new functionality `voteForMinting` -> `unlock`, new functionality `voteForNewOracleSet` same `allowBurn` renamed to `allowLock` `voteForSwitchBurn` renamed to `voteForSwitchLock` cosmetic changes and optimizations