Skip to content
New issue

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

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

Already on GitHub? # to your account

Opcode: STREAMUPDATE #139

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

Opcode: STREAMUPDATE #139

PaulRBerg opened this issue May 17, 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

Spec

Updates the stream with the sender msg.sender and the recipient recipient for token with ID token_id by setting the payment rate to new_amount per new_cadence.

Input

  • recipient of type `Address
  • token_id of type U256
  • new_amount of type U256
  • new_cadence of type U16

Output

None.

Receipt

  • New receipt of type StreamUpdate
  • Data
    • The sender's updated terminus of type U256

Errors

  • The update 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 STREAMUPDATE instead of UPDATESTREAM so that all streaming-related opcodes can be grouped together
  • The spec assumes that there can be only one stream between users

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 17, 2024
# for free to join this conversation on GitHub. Already have an account? # 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