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

Opcode: STREAMCREATE #137

Open
PaulRBerg opened this issue May 15, 2024 · 0 comments
Open

Opcode: STREAMCREATE #137

PaulRBerg opened this issue May 15, 2024 · 0 comments
Labels
effort: epic Multi-stage task that may require multiple PRs. priority: 1 This is important. It should be dealt with shortly. type: feature New feature or request. work: complex Probe-sense-respond. The relationship between cause and effect can only be perceived in retrospect.

Comments

@PaulRBerg
Copy link
Member

PaulRBerg commented May 15, 2024

Spec

Creates a stream from msg.sender to recipient for token with ID token_id and sets the payment rate to amount per cadence.

Input

  • recipient of type Address
  • token_id of type U256
  • amount of type U256
  • cadence of type U16

Output

Nothing.

Receipt

  • New receipt of type StreamCreate
  • Data
    • The sender's calculated terminus of type U256

Errors

  • The stream MUST NOT cause the sender to be either insolvent or have a solvency lower than 1 hour

Notes

  • Can be executed either by an EOA via one of the new transaction types or by a contract
  • I went with STREAMCREATE instead of CREATESTREAM so that (i) there's no potential confusion with the CREATE* opcodes, and (ii) all streaming-related opcodes can be grouped together

Related

Tasks

Discussions

@PaulRBerg PaulRBerg added effort: epic Multi-stage task that may require multiple PRs. priority: 1 This is important. It should be dealt with shortly. work: complex Probe-sense-respond. The relationship between cause and effect can only be perceived in retrospect. type: feature New feature or request. labels May 15, 2024
This was referenced May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: epic Multi-stage task that may require multiple PRs. priority: 1 This is important. It should be dealt with shortly. type: feature New feature or request. work: complex Probe-sense-respond. The relationship between cause and effect can only be perceived in retrospect.
Projects
None yet
Development

No branches or pull requests

1 participant