Exemple #1
0
 def __init__(self, token_address: str, partner_address: str,
              total_deposit: int, settle_timeout: int) -> None:
     """
     :params: token_address (address)   – The token we want to be used in the channel.
     :params: partner_address (address) – The partner we want to open a channel with.
     :params: total_deposit (int)       – Total amount of tokens to be deposited to the channel
     :params: settle_timeout (int)      – The amount of blocks that the settle timeout should have.
     """
     self.token_address = utils.normalize_address_eip55(token_address)
     self.partner_address = utils.normalize_address_eip55(partner_address)
     self.total_deposit = total_deposit
     self.settle_timeout = settle_timeout
Exemple #2
0
 def __init__(self,
              token_address: str,
              target_address: str,
              amount: int,
              identifier: int = None) -> None:
     """
     :params: amount (int) – Amount to be sent to the target
     :params: identifier (int) (optional) – Identifier of the payment
     """
     self.token_address = utils.normalize_address_eip55(token_address)
     self.target_address = utils.normalize_address_eip55(target_address)
     self.amount = amount
     self.identifier = identifier
Exemple #3
0
 def __init__(self,
              token_address: str,
              to: str,
              value: int,
              contract_method: str = "mintFor"):
     """
     :params: to (address) – The address to assign the minted tokens to.
     :params: value (int) – The amount of tokens to be minted.
     :params: contract_method (string) – The name of the contract’s minting method.
             Must be one of (mintFor/mint/increaseSupply). Defaults to mintFor.
     """
     self.token_address = utils.normalize_address_eip55(token_address)
     self.to = utils.normalize_address_eip55(to)
     self.value = value
     self.contract_method = contract_method
Exemple #4
0
 def __init__(self,
              token_address: str,
              funds: int,
              initial_channel_target: int = None,
              joinable_funds_target: float = None) -> None:
     self.token_address = utils.normalize_address_eip55(token_address)
     self.funds = funds
     self.initial_channel_target = initial_channel_target
     self.joinable_funds_target = joinable_funds_target
Exemple #5
0
 def __init__(self, token_address: str, target_address: str) -> None:
     self.token_address = utils.normalize_address_eip55(token_address)
     self.target_address = utils.normalize_address_eip55(target_address)
Exemple #6
0
 def __init__(self, token_address: str = None) -> None:
     self.token_address = utils.normalize_address_eip55(token_address)
Exemple #7
0
 def __init__(self, token_address: str, partner_address: str,
              total_withdraw: int) -> None:
     self.token_address = utils.normalize_address_eip55(token_address)
     self.partner_address = utils.normalize_address_eip55(partner_address)
     self.total_withdraw = total_withdraw
Exemple #8
0
 def __init__(self, token_address: str, partner_address: str) -> None:
     self.token_address = utils.normalize_address_eip55(token_address)
     self.partner_address = utils.normalize_address_eip55(partner_address)