pragma solidity ^0.8.24; contract RemmitancePayment { IGateway public immutable gateway; address public responseContract; function makePayment( bytes32 pid_, uint256 amount_, string memory accountTo_, string memory accountFrom_, string memory currencyFrom_, string memory currencyTo_, ) external returns (Structs.MessagingReceipt memory) { string memory message = abi.encodePacked( amount_, accountFrom_, accountTo_, currencyFrom_, currencyTo_ ); return gateway.send{value: msg.value}( IGateway.ReqParams({ pid: pid_, receiver: responseContract, reqBody: bytes(message) }) ); } }
pragma solidity ^0.8.24; contract EURAccount { IGateway public immutable gateway; address public responseContract; function getEurBalance( string memory id_, bytes32 pid_ ) external returns (Structs.MessagingReceipt memory) { string memory message = abi.encodePacked(id_); return gateway.send{value: msg.value}( IGateway.ReqParams({ pid: pid_, receiver: responseContract, reqBody: bytes(message) }) ); } }
pragma solidity ^0.8.24; contract Token is ERC20 { IGateway public immutable gateway; address public responseContract; bytes32 public pid; function tokenTransfer( address to, uint256 value ) external returns (Structs.MessagingReceipt memory) { transfer(to, value); string memory message = string( abi.encodePacked( "Successful transfer of ", value_.toString(), " from ", Strings.toHexString(_msgSender()), " to ", Strings.toHexString(to_) ) ); return gateway.send{value: msg.value}( IGateway.ReqParams({ pid: pid, receiver: responseContract, reqBody: bytes(message) }) ); } }