github.com/inklabsfoundation/inkchain@v0.17.1-0.20181025012015-c3cef8062f19/examples/xc/eth-v1.0.3/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       * Get the current contract platform name.
    22       * @return contract platform name.
    23       */
    24      function getPlatformName() external view returns (bytes32);
    25  
    26      /**
    27       * Set the current contract administrator.
    28       * @param account account of contract administrator.
    29       */
    30      function setAdmin(address account) external;
    31  
    32      /**
    33       * Get the current contract administrator.
    34       * @return contract administrator.
    35       */
    36      function getAdmin() external view returns (address);
    37  
    38      /**
    39       * Set the Token contract address.
    40       * @param account contract address.
    41       */
    42      function setToken(address account) external;
    43  
    44      /**
    45       * Get the Token contract address.
    46       * @return contract address.
    47       */
    48      function getToken() external view returns (address);
    49  
    50      /**
    51       * Set the XCPlugin contract address.
    52       * @param account contract address.
    53       */
    54      function setXCPlugin(address account) external;
    55  
    56      /**
    57       * Get the XCPlugin contract address.
    58       * @return contract address.
    59       */
    60      function getXCPlugin() external view returns (address);
    61  
    62      /**
    63       * Transfer out of cross chain.
    64       * @param toAccount account of to platform.
    65       * @param value transfer amount.
    66       */
    67      function lock(address toAccount, uint value) external;
    68  
    69      /**
    70       * Transfer in of cross chain.
    71       * @param txid transaction id.
    72       * @param fromAccount ame of to platform.
    73       * @param toAccount account of to platform.
    74       * @param value transfer amount.
    75       */
    76      function unlock(string txid, address fromAccount, address toAccount, uint value) external;
    77  
    78      /**
    79       * Transfer the misoperation to the amount of the contract account to the specified account.
    80       * @param account the specified account.
    81       * @param value transfer amount.
    82       */
    83      function withdraw(address account, uint value) external;
    84  }