Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: inaccuracies in delegate action errors #496

Merged
merged 2 commits into from
Aug 4, 2023
Merged
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
20 changes: 11 additions & 9 deletions neps/nep-0366.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ NEP: 366
Title: Meta Transactions
Author: Illia Polosukhin <[email protected]>, Egor Uleyskiy ([email protected]), Alexander Fadeev ([email protected])
DiscussionsTo: https://github.com/nearprotocol/neps/pull/366
Status: Draft
Status: Approved
Type: Protocol Track
Category: Runtime
Version: 1.1.0
Created: 19-Oct-2022
LastUpdated: 03-Aug-2023
---

## Summary
Expand Down Expand Up @@ -149,7 +151,7 @@ DelegateActionInvalidSignature

```rust
/// Receiver of the transaction doesn't match Sender of the delegate action
DelegateActionSenderDoesNotMatchReceiver
DelegateActionSenderDoesNotMatchTxReceiver
```

- If the current block is equal or greater than `max_block_height`
Expand Down Expand Up @@ -180,13 +182,6 @@ DelegateActionInvalidNonce
DelegateActionNonceTooLarge
```

- If the list of delegated actions contains another `DelegateAction`

```rust
/// DelegateAction actions contain another DelegateAction
DelegateActionCantContainNestedOne
```

- If the list of Transaction actions contains several `DelegateAction`

```rust
Expand Down Expand Up @@ -214,6 +209,13 @@ See the **_Validation_** section in [DelegateAction specification](/specs/Runtim

Supporting ZK proofs instead of just signatures can allow for anonymous transactions, which pay fees to relayers anonymously.

## Changelog

### 1.1.0 - Adjust errors to reflect deployed reality (03-Aug`2023)

- Remove the error variant `DelegateActionCantContainNestedOne` because this would already fail in the parsing stage.
- Rename the error variant `DelegateActionSenderDoesNotMatchReceiver` to `DelegateActionSenderDoesNotMatchTxReceiver` to reflect published types in [near_primitives](https://docs.rs/near-primitives/0.17.0/near_primitives/errors/enum.ActionErrorKind.html#variant.DelegateActionSenderDoesNotMatchTxReceiver).

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).