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

Add missing fields in Account #270

Merged
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 42 additions & 7 deletions services/state/token/account.proto
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ message Account {
* NFT token number using approved_for_all flag.
* Allowances for a specific serial number is stored in the NFT itself in state.
*/
repeated AccountTokenAllowance approve_for_all_nft_allowances = 28;
repeated AccountApprovalForAllAllowance approve_for_all_nft_allowances = 28;

/**
* (Optional) List of fungible token allowances approved by the account.
Expand All @@ -189,29 +189,64 @@ message Account {
* and the time the system task actually auto-renews it.
*/
bool expired_and_pending_removal = 31;
/**
* The first key in the doubly-linked list of this contract's storage mappings;
* It will be null if if the account is not a contract or the contract has no storage mappings.
*/
uint256 first_contract_storage_key = 32;
}

/**
* Allowance granted by this account to another account for a specific token.
* Allowance granted by this account to a spender for a specific non-fungible token
* using ApproveForAll. This allows spender to spend all serial numbers for the given
* non-fungible token number.
*/
message AccountTokenAllowance {
message AccountApprovalForAllAllowance {
int64 token_num = 1;
int64 account_num = 2;
int64 spender_num = 2;
}

/**
* Allowance granted by this account to another account for a specific fungible token.
* This also contains the amount of the token that is approved for the account.
* This allows spender to spend the amount of tokens approved for the account.
*/
message AccountFungibleTokenAllowance {
AccountTokenAllowance token_allowance_key = 1;
int64 amount = 2;
int64 token_num = 1;
int64 spender_num = 2;
int64 amount = 3;
}

/**
* Allowance granted by this account to another account for an amount of hbars.
* This allows spender to spend the amount of hbars approved for the account.
*/
message AccountCryptoAllowance {
int64 account_num = 1;
int64 spender_num = 1;
int64 amount = 2;
}
/**
* Message representing a uint256 value.
*/
message uint256 {
/**
* The number low-order bytes in the 256-bits that contain ones
*/
uint32 non_zero_bits = 1;
tinker-michaelj marked this conversation as resolved.
Show resolved Hide resolved
/**
* The first 64 bits of a uint256 value
*/
uint64 first_long = 2;
/**
* The second 64 bits of a uint256 value
*/
uint64 second_long = 3;
/**
* The first 64 bits of a uint256 value
*/
uint64 third_long = 4;
/**
* The first 64 bits of a uint256 value
*/
uint64 fourth_long = 5;
}