Skip to content

Commit

Permalink
Create multi_chain_support.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 11, 2024
1 parent ec835aa commit 0310e28
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
pragma solidity ^0.8.0;

import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";

contract MultiChainSupport {
// Mapping of supported chains
mapping (address => Chain) public supportedChains;

// Function to bridge assets between chains
function bridgeAssets(address fromChain, address toChain, uint256 amount) public {
// Get the bridge contract for the fromChain
BridgeContract bridge = BridgeContract(supportedChains[fromChain].bridge);
// Call the bridge contract to bridge assets
bridge.bridgeAssets(toChain, amount);
}
}

0 comments on commit 0310e28

Please sign in to comment.