Skip to content

Commit a506806

Browse files
authored
Update rpc-endpoint.mdx for ethers v6
In v6 id is exported directly from 'ethers' https://docs.ethers.org/v6/migrating/
1 parent 097b958 commit a506806

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/flashbots-auction/advanced/rpc-endpoint.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,13 +1031,13 @@ The signature is calculated by taking the [EIP-191](https://eips.ethereum.org/EI
10311031
<TabItem value="ethers.js">
10321032

10331033
```ts
1034-
import {Wallet, utils} from 'ethers';
1034+
import {Wallet, id} from 'ethers';
10351035

10361036
const privateKey = '0x1234';
10371037
const wallet = new Wallet(privateKey);
10381038
const body =
10391039
'{"jsonrpc":"2.0","method":"eth_sendBundle","params":[{see above}],"id":1}';
1040-
const signature = wallet.address + ':' + wallet.signMessage(utils.id(body));
1040+
const signature = wallet.address + ':' + wallet.signMessage(id(body));
10411041
```
10421042

10431043
</TabItem>

0 commit comments

Comments
 (0)