Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Storage #494

Merged
merged 2 commits into from
Sep 26, 2017
Merged

Storage #494

merged 2 commits into from
Sep 26, 2017

Conversation

pavybez
Copy link

@pavybez pavybez commented Sep 25, 2017

A first cut implementation of storage contract. Does not do anything yet. Still needs implementation of reserving tokens for storage and freeing tokens when storage is released.

Also methods to read structures from message are yet to be implemented. Issues #493 and #492

}
}

void apply_storage_transfer( const TOKEN_NAME::Transfer& transfer ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

storage doesn't implement a currency...

/// The apply method implements the dispatch of events to this contract
void apply( uint64_t code, uint64_t action ) {
if( code == N(storage) ) {
if( action == N(transfer) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be code == EOS and action == transfer... apply_eos_transfer(...)

/**
* quantity to transfer
*/
StorageTokens quantity;
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't create StorageTokens and storage, instead we have storage quota and storage consumed and its measured in bytes.

Copy link
Contributor

@bytemaster bytemaster left a comment

Choose a reason for hiding this comment

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

I'm approving this because it doesn't break anyone else.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants