(self, builder: float, takerFeeRate: float, makerFeeRate: float, accountIndex: float, apiKeyIndex: float, params: object = {})
| 611 | return True |
| 612 | |
| 613 | async def approve_builder_fee(self, builder: float, takerFeeRate: float, makerFeeRate: float, accountIndex: float, apiKeyIndex: float, params: object = {}): |
| 614 | strAccountIndex = self.number_to_string(accountIndex) |
| 615 | strApiKeyIndex = self.number_to_string(apiKeyIndex) |
| 616 | signer = await self.load_account(self.options['chainId'], self.get_lighter_private_key(strAccountIndex, strApiKeyIndex), strApiKeyIndex, strAccountIndex, params) |
| 617 | nonce = await self.fetch_nonce(accountIndex, apiKeyIndex, self.extend(params, {'skipNonce': False})) |
| 618 | expiry = self.milliseconds() + 365 * 864000 |
| 619 | signRaw = { |
| 620 | 'integrator_account_index': builder, |
| 621 | 'integrator_taker_fee': takerFeeRate, |
| 622 | 'integrator_maker_fee': makerFeeRate, |
| 623 | 'approval_expiry': expiry, |
| 624 | 'nonce': nonce, |
| 625 | 'api_key_index': apiKeyIndex, |
| 626 | 'account_index': accountIndex, |
| 627 | } |
| 628 | txType, txInfo, messageToSign = self.lighter_sign_approve_integrator(signer, self.extend(signRaw, params)) |
| 629 | newTxInfo = self.sign_l1_and_prepare_tx_info(txInfo, messageToSign, self.privateKey) |
| 630 | request = { |
| 631 | 'tx_type': txType, |
| 632 | 'tx_info': newTxInfo, |
| 633 | } |
| 634 | response = await self.publicPostSendTx(request) |
| 635 | return response |
| 636 | |
| 637 | async def change_api_key(self, params: object = {}): |
| 638 | apiKeyIndex = None |
no test coverage detected