コード例 #1
0
ファイル: payment.py プロジェクト: wg-git/cashflow-contract
    def getCurrentUnits(self, uid):
        consume_type = self.getConsumeType(uid)

        # for a TimeContract, the current units are always the seconds, which passed since the beginning timestamp
        if consume_type == self.CONSUME_TYPE_TIME:
            return self.getCurrentTimeUnits(uid)
        elif consume_type == self.CONSUME_TYPE_UNITS:
            return getFromStorage(self.STORAGE_KEY_CURRENT_UNITS, uid)
        else:
            n = 0

        return False
コード例 #2
0
 def getOpenWithdrawalValue(self, uid):
     return getFromStorage(self.STORAGE_KEY_WITHDRAWAL_REQUEST_VALUE, uid)
コード例 #3
0
 def getWithdrawalRequest(self, uid):
     return getFromStorage(self.STORAGE_KEY_WITHDRAWAL_REQUEST, uid)
コード例 #4
0
 def getReleasedAssets(self, address):
     return getFromStorage(self.STORAGE_KEY_RELEASED_ASSETS, address)
コード例 #5
0
ファイル: payment.py プロジェクト: wg-git/cashflow-contract
 def getReservedUnits(self, uid):
     return getFromStorage(self.STORAGE_KEY_RESERVED_UNITS, uid)
コード例 #6
0
ファイル: payment.py プロジェクト: wg-git/cashflow-contract
 def getSpentUnits(self, uid):
     return getFromStorage(self.STORAGE_KEY_SPENT_UNITS, uid)
コード例 #7
0
ファイル: payment.py プロジェクト: wg-git/cashflow-contract
 def getOverallValue(self, uid):
     return getFromStorage(self.STORAGE_KEY_OVERALL_VALUE, uid)
コード例 #8
0
ファイル: payment.py プロジェクト: wg-git/cashflow-contract
 def getTotalUnits(self, uid):
     return getFromStorage(self.STORAGE_KEY_TOTAL_UNITS, uid)
コード例 #9
0
ファイル: payment.py プロジェクト: wg-git/cashflow-contract
 def getToTimestamp(self, uid):
     return getFromStorage(self.STORAGE_KEY_TO_TIMESTAMP, uid)
コード例 #10
0
ファイル: payment.py プロジェクト: wg-git/cashflow-contract
 def getReceiverAddress(self, uid):
     return getFromStorage(self.STORAGE_KEY_RECEIVER_ADDRESS, uid)
コード例 #11
0
ファイル: payment.py プロジェクト: wg-git/cashflow-contract
 def getPrincipalAddress(self, uid):
     return getFromStorage(self.STORAGE_KEY_PRINCIPAL_ADDRESS, uid)
コード例 #12
0
ファイル: payment.py プロジェクト: wg-git/cashflow-contract
 def getConsumeType(self, uid):
     return getFromStorage(self.STORAGE_KEY_CONSUME_TYPE, uid)
コード例 #13
0
ファイル: payment.py プロジェクト: wg-git/cashflow-contract
 def getType(self, uid):
     return getFromStorage(self.STORAGE_KEY_PAYMENT_TYPE, uid)