-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...twork/pi-network-interoperability/bridge-contracts/contracts/KosasihUniversalisBridge.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
pragma solidity ^0.8.0; | ||
|
||
import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; | ||
import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/utils/Address.sol"; | ||
|
||
contract KosasihUniversalisBridge { | ||
address public multiChainRouter; | ||
address public interoperabilityLayer; | ||
|
||
constructor(address _multiChainRouter, address _interoperabilityLayer) public { | ||
multiChainRouter = _multiChainRouter; | ||
interoperabilityLayer = _interoperabilityLayer; | ||
} | ||
|
||
function transferTokens(address _token, address _from, address _to, uint256 _amount) public { | ||
// Call the multi-chain router to transfer tokens between chains | ||
MultiChainRouter(multiChainRouter).transferTokens(_token, _from, _to, _amount); | ||
} | ||
|
||
function executeCrossChainTransaction(bytes _transactionData) public { | ||
// Call the interoperability layer to execute the cross-chain transaction | ||
InteroperabilityLayer(interoperabilityLayer).executeTransaction(_transactionData); | ||
} | ||
} |