Skip to content

Commit 0d725e2

Browse files
committed
copy in specifications
1 parent a185290 commit 0d725e2

File tree

1 file changed

+150
-53
lines changed

1 file changed

+150
-53
lines changed

EIPS/eip-5792.md

Lines changed: 150 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,68 @@ Requests that the wallet deliver a group of function calls on-chain from the use
7575
- The wallet MAY reject the request if the `from` address does not match the enabled account.
7676
- The wallet MAY reject the request if one or more calls in the bundle will fail.
7777

78-
#### `wallet_sendFunctionCallBundle` Parameters
79-
80-
The method takes an array containing one object element, with the following keys:
81-
82-
- `chainId`: `INTEGER` - The chain ID on which the function calls should be sent
83-
- `from`: `ADDRESS` - The address of the wallet that should send the calls in the bundle
84-
- `calls`: `ARRAY` - An array containing 1 or more call objects, where each call has the following keys:
85-
- `to`: `ADDRESS` - (optional when creating new contract) The address the call is directed to.
86-
- `gas`: `QUANTITY` - (optional) Integer of the gas provided for the call execution. Unused gas MAY be made
87-
available to subsequent calls.
88-
- `value`: `QUANTITY` - (optional) Integer of the value sent with this call.
89-
- `data`: `DATA` - The compiled code of a contract OR the call data to include with the call, e.g. encoded
90-
function signature and parameters.
91-
- `optional`: `BOOLEAN` - (optional, default false) Whether the wallet should continue with subsequent calls if
92-
this particular call fails
78+
#### `wallet_sendFunctionCallBundle` OpenRPC Specification
79+
80+
```yaml
81+
- name: wallet_sendFunctionCallBundle
82+
summary: Sends a bundle of function calls from the user wallet
83+
params:
84+
- name: Function calls
85+
required: true
86+
schema:
87+
type: object
88+
title: Transaction object generic to all types
89+
required:
90+
- chainId
91+
- from
92+
- calls
93+
properties:
94+
chainId:
95+
title: chainId
96+
description: Chain ID that these calls should be sent on
97+
$ref: '#/components/schemas/uint'
98+
from:
99+
title: from address
100+
description: The address from which the function calls should be sent
101+
$ref: '#/components/schemas/address'
102+
calls:
103+
title: calls to make
104+
description: The calls that the wallet should make from the user's address
105+
type: array
106+
minItems: 1
107+
items:
108+
title: function call
109+
description: A single function call
110+
type: object
111+
required:
112+
- gas
113+
- data
114+
to:
115+
title: to address
116+
description: The address that is being called
117+
$ref: '#/components/schemas/address'
118+
gas:
119+
title: gas limit
120+
description: The gas limit for this particular call
121+
$ref: '#/components/schemas/uint'
122+
value:
123+
title: value
124+
description: How much value to send with the call
125+
$ref: '#/components/schemas/uint'
126+
data:
127+
title: data
128+
description: The data to send with the function call
129+
$ref: '#/components/schemas/bytes'
130+
optional:
131+
title: optional
132+
description: Whether the call must succeed for subsequent calls to be made
133+
type: boolean
134+
result:
135+
name: Bundle identifier
136+
schema:
137+
type: string
138+
maxLength: 66
139+
```
93140
94141
##### `wallet_sendFunctionCallBundle` Example Parameters
95142

@@ -117,16 +164,6 @@ The method takes an array containing one object element, with the following keys
117164
]
118165
```
119166

120-
#### `wallet_sendFunctionCallBundle` Return value
121-
122-
DATA, String - an identifier that the wallet uses to represent the bundle of calls.
123-
124-
- This identifier MUST persist between connections of the same Dapp and account
125-
- The dapp SHOULD track the returned identifier to check the status of the bundle in the future
126-
- The returned identifier value MUST be unique for the given `from` address
127-
- The length of the returned identifier MUST NOT exceed 66 characters
128-
- There are no other requirements on the pattern of the identifier
129-
130167
##### `wallet_sendFunctionCallBundle` Example Return Value
131168

132169
The identifier may be the hash of the call bundle, e.g.:
@@ -153,9 +190,78 @@ Returns the status of a bundle that was sent via `wallet_sendFunctionCallBundle`
153190
value returned from the `wallet_sendFunctionCallBundle` RPC. Note this method only returns a subset of fields
154191
that `eth_getTransactionReceipt` returns, excluding any fields that may differ across wallet implementations.
155192

156-
#### `wallet_getBundleStatus` Parameters
157-
158-
The method takes an array containing one string element, a bundle ID returned by `wallet_sendFunctionCallBundle`.
193+
#### `wallet_getBundleStatus` OpenRPC Specification
194+
195+
```yaml
196+
- name: wallet_getBundleStatus
197+
summary: Sends a bundle of function calls from the user wallet
198+
params:
199+
- name: Bundle identifier
200+
required: true
201+
schema:
202+
type: string
203+
title: Bundle identifier
204+
result:
205+
name: Call status
206+
schema:
207+
type: object
208+
properties:
209+
calls:
210+
type: array
211+
items:
212+
title: call status
213+
description: Status of the call at the given index
214+
type: object
215+
status:
216+
title: The current status of the call
217+
enum:
218+
- CONFIRMED
219+
- PENDING
220+
receipt:
221+
type: object
222+
required:
223+
- success
224+
- blockHash
225+
- blockNumber
226+
- blockTimestamp
227+
- gasUsed
228+
- transactionHash
229+
properties:
230+
logs:
231+
type: array
232+
items:
233+
title: Log object
234+
type: object
235+
properties:
236+
address:
237+
$ref: '#/components/schemas/address'
238+
data:
239+
title: data
240+
$ref: '#/components/schemas/bytes'
241+
topics:
242+
title: topics
243+
type: array
244+
items:
245+
$ref: '#/components/schemas/bytes32'
246+
success:
247+
type: boolean
248+
title: Whether the call succeeded
249+
blockHash:
250+
title: The hash of the block in which the call was included
251+
$ref: '#/components/schemas/bytes32'
252+
blockNumber:
253+
title: The number of the block in which the call was included
254+
$ref: '#/components/schemas/uint'
255+
blockTimestamp:
256+
title: The timestamp of the block in which the call was included
257+
$ref: '#/components/schemas/uint'
258+
gasUsed:
259+
title: How much gas the call actually used
260+
$ref: '#/components/schemas/uint'
261+
transactionHash:
262+
title: The hash of the transaction in which the call was made
263+
$ref: '#/components/schemas/bytes32'
264+
```
159265

160266
##### `wallet_getBundleStatus` Example Parameters
161267

@@ -179,24 +285,6 @@ It may be a base64 encoded string:
179285
["aGVsbG8gd29ybGQ="]
180286
```
181287

182-
#### `wallet_getBundleStatus` Return value
183-
184-
Returns an object describing the status of each call in the bundle. Each call has its own status in the response,
185-
even if all the calls were submitted as part of a single transaction.
186-
187-
- `calls`: `ARRAY` - An array of objects containing the status of each call from the bundle
188-
- `status`: `"PENDING" | "CONFIRMED"` - Either `"PENDING"` indicating the call is not yet included on-chain,
189-
or `"CONFIRMED"` indicating the call was included in a block
190-
- `receipt`: `OBJECT` - (optional) An object containing the receipt for the given call, _iff_ status
191-
is `"CONFIRMED"`
192-
- `logs`: `ARRAY` - An array of log objects describing logs that were emitted by the call
193-
- `success`: `BOOLEAN` - Whether the call was successfully delivered on-chain
194-
- `blockHash`: `DATA` - The hash of the block in which the call was sent
195-
- `blockNumber`: `QUANTITY` - The block number of the block in which the call was sent
196-
- `blockTimestamp`: `QUANTITY` - The block timestamp of the block in which the call was sent
197-
- `transactionHash`: `DATA` - The hash of the transaction in which the call was sent
198-
- `gasUsed`: `QUANTITY` - The amount of gas that the call cost to deliver
199-
200288
##### `wallet_getBundleStatus` Example Return Value
201289

202290
```json
@@ -239,9 +327,22 @@ transaction hash.
239327
- The wallet MAY ignore the request, for example if the wallet is busy with other user actions.
240328
- The wallet MAY direct the user to a third party block explorer for more information.
241329

242-
#### `wallet_showBundleStatus` Parameters
243-
244-
The method takes an array containing one string element, a bundle ID returned by `wallet_sendFunctionCallBundle`.
330+
#### `wallet_showBundleStatus` OpenRPC Specification
331+
332+
```yaml
333+
- name: wallet_showBundleStatus
334+
summary: Requests that the wallet show the status of the bundle with the given identifier
335+
params:
336+
- name: Bundle identifier
337+
required: true
338+
schema:
339+
type: string
340+
maxLength: 66
341+
result:
342+
name: Empty
343+
schema:
344+
type: "null"
345+
```
245346

246347
##### `wallet_showBundleStatus` Example Parameters
247348

@@ -251,10 +352,6 @@ The method takes an array containing one string element, a bundle ID returned by
251352
]
252353
```
253354

254-
#### `wallet_showBundleStatus` Return Value
255-
256-
This method always returns `null`.
257-
258355
##### `wallet_showBundleStatus` Example Return Value
259356

260357
```json

0 commit comments

Comments
 (0)