Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion SNIPS/snip-9.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
snip: 9
title: Outside execution
authors: Argent Labs <argent.xyz>, AVNU <avnu.fi>, Braavos <braavos.app>
authors: Argent Labs <argent.xyz>, AVNU <avnu.fi>, Braavos <braavos.app>, Cartridge <cartridge.gg>
discussions-to: https://community.starknet.io/t/snip-outside-execution/101058
status: Review
type: Standards Track
Expand Down Expand Up @@ -120,6 +120,41 @@ And the type hash of `Call` is:

which results in `0x3635c7f2a7ba93844c0d064e18e487f35ab90f7c39d00f186a781fc3f0c2ca9`

#### 2.3. Version 3

In [domain_separator](https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-12.md#domain-separator):
- `version` is set to `3`

In `OutsideExecution` type definition:

- **Nonce**: changed to type `(felt,u128)` to support nonce channels

So the version `3` type definition to sign is:
```rust
OutsideExecution: [
{ name: "Caller", type: "ContractAddress" },
{ name: "Nonce", type: "(felt,u128)" },
{ name: "Execute After", type: "u128" },
{ name: "Execute Before", type: "u128" },
{ name: "Calls", type: "Call*" },
],
Call: [
{ name: "To", type: "ContractAddress" },
{ name: "Selector", type: "selector" },
{ name: "Calldata", type: "felt*" },
]
```
The type hash of `OutsideExecution` is then:

**`H('"OutsideExecution"("Caller":"ContractAddress","Nonce":"(felt,u128)","Execute After":"u128","Execute Before":"u128","Calls":"Call*")"Call"("To":"ContractAddress","Selector":"selector","Calldata":"felt*")')`**

which results in `0x012371bfd23fb68f7214682d0c7b20a411620eb73288435e6623489325129f84`

And the type hash of `Call` is:
**`H('"Call"("To":"ContractAddress","Selector":"selector","Calldata":"felt*")')`**

which results in `0x3635c7f2a7ba93844c0d064e18e487f35ab90f7c39d00f186a781fc3f0c2ca9`

See [SNIP 12](https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-12.md) for more info on offchain signatures on Starknet

### 3. Pass the structure and signature to the account
Expand Down