Skip to content

[Task] Add construct-meta-transactionΒ #561

@frol

Description

@frol

Background

Meta-transactions on near are basically just a transaction with a single action DelegateAction.

The DelegateAction is basically a SignedTransaction with max_block_height which controls the expiration of the signed payload.

near-cli-rs already has support for creating and sending Meta-transactions if the network config has meta_transaction_relayer_url, so currently signer implementations (e.g. 1) make the decision based on this config setting, but there is no way to explicitly create and sign the Delegate Action.

User Story

As a NEAR CLI user, who uses dApps that support meta-transactions and use NEAR Connect with NEAR CLI plugin, I need CLI to support construction of meta-transactions just like construct-transaction.

Acceptance Criteria

I would like to have a new subcommand under transaction, so next to construct-transaction we could have construct-meta-transaction, the construct-transaction implementations should be reused without copy-pasting them, and the only change that is expected is to the signers implementation that would use the context flag to make the decision whether they should construct & sign a transaction or delegate action. As for the meta_transaction_relayer_url config option, it should be translated into the context flag setting as well, so signers don't need to check two places for the decision.

Resources & Additional Notes

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Shipped πŸš€

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions