示例#1
0
 def _encode(self, value):
     if is_dynamic_sized_type(self.arg_type):
         return to_hex(keccak(encode_single_packed(self.arg_type, value)))
     else:
         return to_hex(encode_single(self.arg_type, value))
示例#2
0
 def _encode(self, value: Any) -> HexStr:
     if is_dynamic_sized_type(self.arg_type):
         return to_hex(keccak(encode_single_packed(self.arg_type, value)))
     else:
         return to_hex(self.abi_codec.encode_single(self.arg_type, value))
示例#3
0
 def _encode(self, value):
     if is_dynamic_sized_type(self.arg_type):
         return to_hex(keccak(encode_single_packed(self.arg_type, value)))
     else:
         return to_hex(encode_single(self.arg_type, value))