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

[Main] Merge ram_actions #47

Merged
merged 148 commits into from
Feb 7, 2024
Merged

[Main] Merge ram_actions #47

merged 148 commits into from
Feb 7, 2024

Conversation

ericpassmore
Copy link
Contributor

@ericpassmore ericpassmore commented Feb 2, 2024

Merge updated ram_actions and associated tests.
resolves #44

New actions

  • ramtransfer
  • ramburn
  • buyramself

New action return values structs

  • action_return_sellram
  • action_return_buyram
  • action_return_ramtransfer

New action return values to actions

  • buyram
  • buyrambytes
  • sellram
  • ramtransfer
  • ramburn
  • buyramself

New log inline actions

  • logbuyram
  • logsellram
  • logramchange

spoonincode and others added 30 commits August 28, 2022 23:08
[3.1] Change ICON_BASE_URL to a working address
…_main

[3.1 -> main] Update ICON_BASE_URL to a working address
…th_vector_3_1

[3.1] Replace usage of deque and map with vector in system contracts
…th_vector_main

[3.1 -> main] Replace usage of deque and map with vector in system contracts
**Summary**
* Reference to DUNE in place of old instructions
* Removed meta-data link tag
* Replace github references to EOS Network Foundation
* Replace references to old documentation portal
* Fix broken links

**Files Changed**: Markdown files under `docs`
<hr/>
The 03_build_and_deploy document was three years old. The compilation instructions were out of date. This page now points to the DUNE README

The developer documentation portal is powered by markdown files. We use MDX as the parsing engine. Removed *link-text* meta data at the top of the page because it caused formatting issues.

Many times we found documentation pointing to old repositories that had not been updated in years. We updated the links and pointed to repositories that are better maintained.

We made sure links to the documentation portal did not leak back to older, previous versions.

We found relative links that no longer existed. We made sure to point the links to best location. Sometimes the links broke because were missing a key file extension. We made sure to add back the file extension.

**Note:** This is essentially a no-op; however summarizing here for anyone following the commit history. Glossary and Protocol Guides were added and removed during the course of development. We had added a Glossary and Protocol Guides , and we decided to utilize the welcome repository as the source for both.
<hr/>
Squashed commit of the following:

commit cfdf8461f05a8e703112081f6e57278fcabb4504
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Thu Aug 4 12:47:37 2022 -0700

    fixed relative path hyphen not underscore

commit 6724f3d277d2098eb060cd050619d56653ead0b4
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Thu Aug 4 11:02:32 2022 -0700

    rm eos.io references

commit b783c12263164e6b5a32413f9e0ff984c4a82b39
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Thu Aug 4 10:59:05 2022 -0700

    removed eos.io references

commit c6d6258827bf281f526a5b904433711aae66c0cd
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Tue Aug 2 14:41:39 2022 -0700

    fixed broken links

commit d1758d7350a4b60685436c193468d2df44e4b00f
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Tue Aug 2 10:45:00 2022 -0700

    updating paths to docs.eosnetwork.com
[3.1] Curate eos-contracts docs and rename welcome links [docs]
[3.1] Curate EOSIO references in eos-system-contracts [docs]
[3.1 -> main] Curate eos-contracts docs and rename welcome links [docs]
[3.1 -> main] Curate EOSIO references in eos-system-contracts [docs]
name account;
asset quantity;
int64_t bytes;
int64_t ram_bytes;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big deal. Those two fields bytes and ram_bytes are confusing at the first glance. ram_bytes cannot be changed; can bytes be renamed to bytes_sold? Or just add some comments here.

Copy link
Member

@DenisCarriere DenisCarriere Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 bytes_sold is a good idea, can easily rename the struct to that

@ericpassmore would you be able to push that rename

Can also rename bytes_purchased (for the action_return_buyram struct)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opened issue and PR with code changes.

tests/eosio.system_ram_tests.cpp Show resolved Hide resolved
Copy link
Member

@DenisCarriere DenisCarriere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

Only minor changes would be the renaming of the action return value structs fields

  • bytes_sold (sellram)
  • bytes_purchased (buyram)

@@ -1118,7 +1164,49 @@ namespace eosiosystem {
* @param bytes - the amount of ram to sell in bytes.
*/
[[eosio::action]]
void sellram( const name& account, int64_t bytes );
action_return_sellram sellram( const name& account, int64_t bytes );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not uint64_t used here and in other places so you don't need to do the negativeness check later?

@ericpassmore ericpassmore merged commit 8c85d8b into main Feb 7, 2024
1 check passed
@ericpassmore ericpassmore deleted the ram_actions branch February 7, 2024 16:46
@ericpassmore ericpassmore restored the ram_actions branch February 7, 2024 17:01
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.

Test coverage for ram_action return values
10 participants