execute_change_pubkey
Documentation for eth_defi.lighter.pubkey.execute_change_pubkey function.
- execute_change_pubkey(web3, safe, owner_private_key, account_index, api_key_index, pubkey, zk_lighter='0x3B4D794a66304F130a4Db8F2551B0070dfCf5ca7', hot_wallet=None)
Build, sign and execute the
changePubKeySafe transaction immediately.For a single-owner Safe (or local simulation). For a real multisig, build the transaction with
build_change_pubkey_safe_tx()(or print it withscripts/lighter/lagoon-lighter-change-pubkey.py) and collect the owner signatures in the Safe UI.- Parameters
owner_private_key (str) – The executing owner’s private key (
0x-prefixed).hot_wallet (Optional[eth_defi.hotwallet.HotWallet]) – Optional owner wallet for nonce allocation. Use this in scripts that already submit transactions through
HotWalletto avoid stale RPC nonce reads.web3 (web3.main.Web3) –
safe (safe_eth.safe.safe.Safe) –
account_index (int) –
api_key_index (int) –
pubkey (bytes) –
zk_lighter (Union[eth_typing.evm.HexAddress, str]) –
- Returns
The executed transaction hash.
- Return type
hexbytes.main.HexBytes