Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
add frozen and allowance balance
Browse files Browse the repository at this point in the history
  • Loading branch information
nanfengpo committed Apr 25, 2018
1 parent f5e7632 commit e18bdf2
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
18 changes: 18 additions & 0 deletions api/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,24 @@ service Wallet {
body: "*"
};
}
rpc FreezeBalance (FreezeBalanceContract) returns (Transaction) {
option (google.api.http) = {
post: "/wallet/freezebalance"
body: "*"
};
}
rpc UnfreezeBalance (EmptyMessage) returns (Transaction) {
option (google.api.http) = {
post: "/wallet/unfreezebalance"
body: "*"
};
}
rpc WithdrawBalance (EmptyMessage) returns (Transaction) {
option (google.api.http) = {
post: "/withdrawbalance"
body: "*"
};
}
};


Expand Down
4 changes: 4 additions & 0 deletions core/Contract.proto
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,7 @@ message DeployContract {
bytes script = 2;
}

message FreezeBalanceContract {
int64 frozen_balance = 1;
int64 frozen_duration 2;
}
14 changes: 13 additions & 1 deletion core/Tron.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ message Account {
// the vote num to this super rep.
int64 vote_count = 2;
}

// frozen balance
message Frozen {
// the frozen trx balance
int64 frozen_balance = 1;
// the expire time
int64 expire_time = 2;
}
bytes account_name = 1;
AccountType type = 2;
// the create adress
Expand All @@ -42,10 +48,16 @@ message Account {
repeated Vote votes = 5;
// the other asset owned by this account
map<string, int64> asset = 6;
// the frozen balance
repeated Frozen frozen = 7;
// this account create time
int64 create_time = 9;
// this last opration time, including transfer, voting and so on.
int64 latest_opration_time = 10;
// witness block producing allowance
int64 allowance = 11;
// last withdraw time
int64 latest_withdraw_time = 12;
// not used so far
bytes code = 13;
}
Expand Down

0 comments on commit e18bdf2

Please sign in to comment.