(self, order)
| 1116 | } |
| 1117 | |
| 1118 | def hash_order_message(self, order): |
| 1119 | accountHash = self.hash(self.eth_abi_encode([ |
| 1120 | 'bytes32', 'uint256', 'uint256', 'address', 'bytes32', 'uint256', 'address', 'address', |
| 1121 | ], order), 'keccak', 'binary') |
| 1122 | sandboxMode = self.safe_bool(self.options, 'sandboxMode', False) |
| 1123 | DOMAIN_SEPARATOR = '9bcf4dc06df5d8bf23af818d5716491b995020f377d3b7b64c29ed14e3dd1105' if (sandboxMode) else 'd96e5f90797da7ec8dc4e276260c7f3f87fedf68775fbe1ef116e996fc60441b' |
| 1124 | binaryDomainSeparator = self.base16_to_binary(DOMAIN_SEPARATOR) |
| 1125 | prefix = self.base16_to_binary('1901') |
| 1126 | return self.hash(self.binary_concat(prefix, binaryDomainSeparator, accountHash), 'keccak', 'hex') |
| 1127 | |
| 1128 | def sign_order(self, order, privateKey): |
| 1129 | hashOrder = self.hash_order_message(order) |
no test coverage detected