Skip to content

Conversation

@greg7mdp
Copy link
Contributor

Change Description

Resolves #166.

See requirements and technical proposal.

@greg7mdp greg7mdp added this to the Contracts 3.7.0-rc1 milestone Jan 22, 2025
@greg7mdp greg7mdp self-assigned this Jan 22, 2025
@greg7mdp greg7mdp requested review from arhag and heifner January 22, 2025 15:35
@heifner
Copy link
Contributor

heifner commented Jan 23, 2025

See requirements and technical proposal.

These hackmd docs are not publicly available. Seems like copying their content into the description would be useful.

@greg7mdp
Copy link
Contributor Author

See requirements and technical proposal.

These hackmd docs are not publicly available. Seems like copying their content into the description would be useful.

I thought Areg made them publicly available. I can access them when not logged into my ENF account.

@greg7mdp
Copy link
Contributor Author

greg7mdp commented Jan 23, 2025

I think I should change the parameter names for giftram and ungiftram to from and to (instead of gifter and giftee) to match ramtransfer and also because we reuse the ramtransfer return value which uses from and to.
@arhag ?

@greg7mdp
Copy link
Contributor Author

questions:

  1. do I need a require_recipient(to) in ungiftram?
  2. in ramtransfer, the require_recipient calls are made at the end of the action while in sellram at the beginning. Does the location make any difference?
  3. is there a rule of thumb I can use to tell whether require_recipient is needed or not.

@heifner
Copy link
Contributor

heifner commented Jan 24, 2025

  1. do I need a require_recipient(to) in ungiftram?

Seems like we would want that notification and report in the trace.

  1. in ramtransfer, the require_recipient calls are made at the end of the action while in sellram at the beginning. Does the location make any difference?

Doesn't make any difference. They run after the action completes. If the action fails then they don't run.

  1. is there a rule of thumb I can use to tell whether require_recipient is needed or not.

My understanding is you want require_recipient when you want to provide the recipient the opportunity to reject the action.

@greg7mdp
Copy link
Contributor Author

My understanding is you want require_recipient when you want to provide the recipient the opportunity to reject the action.

Thanks Kevin, this helps a lot!

@greg7mdp
Copy link
Contributor Author

In the last commit I updated a comment formatting. I can undo it if this shouldn't be in this PR.

@greg7mdp greg7mdp merged commit ff718a3 into main Jan 25, 2025
1 check passed
@greg7mdp greg7mdp deleted the gh_164 branch January 25, 2025 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for gifting RAM, which is encumbered and cannot be sold or transfered.

4 participants