github.com/inklabsfoundation/inkchain@v0.17.1-0.20181025012015-c3cef8062f19/examples/xc/eth/contracts/XCInterface.sol (about) 1 pragma solidity ^0.4.19; 2 3 /** 4 * XC Contract Interface. 5 */ 6 interface XCInterface { 7 8 /** 9 * Set contract service status. 10 * @param status contract service status (0:closed;1:only-closed-lock;2:only-closed-unlock;3:opened;). 11 */ 12 function setStatus(uint8 status) external; 13 14 /** 15 * Get contract service status. 16 * @return contract service status. 17 */ 18 function getStatus() external view returns (uint8); 19 20 /** 21 * Set the current contract platform name. 22 * @param platformName platform name. 23 */ 24 function setPlatformName(bytes32 platformName) external; 25 26 /** 27 * Get the current contract platform name. 28 * @return contract platform name. 29 */ 30 function getPlatformName() external view returns (bytes32); 31 32 /** 33 * Set the current contract administrator. 34 * @param account account of contract administrator. 35 */ 36 function setAdmin(address account) external; 37 38 /** 39 * Get the current contract administrator. 40 * @return contract administrator. 41 */ 42 function getAdmin() external view returns (address); 43 44 /** 45 * Set the Token contract address. 46 * @param account contract address. 47 */ 48 function setToken(address account) external; 49 50 /** 51 * Get the Token contract address. 52 * @return contract address. 53 */ 54 function getToken() external view returns (address); 55 56 /** 57 * Set the XCPlugin contract address. 58 * @param account contract address. 59 */ 60 function setXCPlugin(address account) external; 61 62 /** 63 * Get the XCPlugin contract address. 64 * @return contract address. 65 */ 66 function getXCPlugin() external view returns (address); 67 68 /** 69 * Set the comparison symbol in the contract. 70 * @param symbol comparison symbol ({"-=" : ">" , "+=" : ">=" }). 71 */ 72 function setCompare(bytes2 symbol) external; 73 74 /** 75 * Get the comparison symbol in the contract. 76 * @return comparison symbol. 77 */ 78 function getCompare() external view returns (bytes2); 79 80 /** 81 * Transfer out of cross chain. 82 * @param toPlatform name of to platform. 83 * @param toAccount account of to platform. 84 * @param value transfer amount. 85 */ 86 function lock(bytes32 toPlatform, address toAccount, uint value) external payable; 87 88 /** 89 * Transfer in of cross chain. 90 * @param txid transaction id. 91 * @param fromPlatform name of form platform. 92 * @param fromAccount ame of to platform. 93 * @param toAccount account of to platform. 94 * @param value transfer amount. 95 */ 96 function unlock(string txid, bytes32 fromPlatform, address fromAccount, address toAccount, uint value) external payable; 97 98 /** 99 * Transfer the misoperation to the amount of the contract account to the specified account. 100 * @param account the specified account. 101 * @param value transfer amount. 102 */ 103 function withdraw(address account, uint value) external payable; 104 105 /** 106 * Transfer the money(qtum/eth) from the contract account. 107 * @param account the specified account. 108 * @param value transfer amount. 109 */ 110 function transfer(address account, uint value) external payable; 111 }