def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] super().__init__( OrderedDict([ ("destination", Uint64(kwargs["destination"])), ]))
def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: prefix = kwargs.pop("prefix", default_prefix) if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] super().__init__(OrderedDict([ ('from', PublicKey(kwargs["from"], prefix=prefix)), ('to', PublicKey(kwargs["to"], prefix=prefix)), ('nonce', Uint64(int(kwargs["nonce"]))), ('check', Uint32(int(kwargs["check"]))), ('encrypted', Bytes(kwargs["encrypted"])), ]))
def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] p = ChainProperties18(kwargs).data p.update( OrderedDict([ # Note that param order is critical to serialization ("max_referral_interest_rate", Uint16(kwargs["max_referral_interest_rate"])), ("max_referral_term_sec", Uint32(kwargs["max_referral_term_sec"])), ("min_referral_break_fee", Amount(kwargs["min_referral_break_fee"])), ("max_referral_break_fee", Amount(kwargs["max_referral_break_fee"])), ("posts_window", Uint16(kwargs["posts_window"])), ("posts_per_window", Uint16(kwargs["posts_per_window"])), ("comments_window", Uint16(kwargs["comments_window"])), ("comments_per_window", Uint16(kwargs["comments_per_window"])), ("votes_window", Uint16(kwargs["votes_window"])), ("votes_per_window", Uint16(kwargs["votes_per_window"])), ("auction_window_size", Uint16(kwargs["auction_window_size"])), ("max_delegated_vesting_interest_rate", Uint16(kwargs["max_delegated_vesting_interest_rate"])), ("custom_ops_bandwidth_multiplier", Uint16(kwargs["custom_ops_bandwidth_multiplier"])), ("min_curation_percent", Uint16(kwargs["min_curation_percent"])), ("max_curation_percent", Uint16(kwargs["max_curation_percent"])), ("curation_reward_curve", Uint64(kwargs["curation_reward_curve"])), ("allow_distribute_auction_reward", Bool(bool(kwargs["allow_distribute_auction_reward"]))), ( "allow_return_auction_reward_to_fund", Bool( bool(kwargs["allow_return_auction_reward_to_fund"]) ), ), ])) super().__init__(p)
def __init__(self, *args, **kwargs): if isArgsThisClass(self, args): self.data = args[0].data else: if len(args) == 1 and len(kwargs) == 0: kwargs = args[0] self.data = OrderedDict() for key, value in kwargs.items(): if isinstance(value, str): _value = String(value) elif isinstance(value, int): if value > 0: _value = Uint64(value) else: _value = Int64(value) self.data[key] = _value