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

Commit

Permalink
Merge pull request grpc-ecosystem#32 from tronprotocol/add_frozen_all…
Browse files Browse the repository at this point in the history
…owance

Add frozen and allowance
  • Loading branch information
zhaohong authored Apr 26, 2018
2 parents f5e7632 + 88da776 commit 9313380
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
21 changes: 21 additions & 0 deletions api/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,27 @@ service Wallet {
};
}

rpc FreezeBalance (FreezeBalanceContract) returns (Transaction) {
option (google.api.http) = {
post: "/wallet/freezebalance"
body: "*"
};
}

rpc UnfreezeBalance (UnfreezeBalanceContract) returns (Transaction) {
option (google.api.http) = {
post: "/wallet/unfreezebalance"
body: "*"
};
}

rpc WithdrawBalance (WithdrawBalanceContract) returns (Transaction) {
option (google.api.http) = {
post: "/wallet/withdrawbalance"
body: "*"
};
}

rpc ListNodes (EmptyMessage) returns (NodeList) {
option (google.api.http) = {
post: "/wallet/listnodes"
Expand Down
13 changes: 13 additions & 0 deletions core/Contract.proto
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,16 @@ message DeployContract {
bytes script = 2;
}

message FreezeBalanceContract {
bytes owner_address = 1;
int64 frozen_balance = 2;
int64 frozen_duration = 3;
}

message UnfreezeBalanceContract {
bytes owner_address = 1;
}

message WithdrawBalanceContract {
bytes owner_address = 1;
}
17 changes: 16 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 Expand Up @@ -114,6 +126,9 @@ message Transaction {
WitnessUpdateContract = 8;
ParticipateAssetIssueContract = 9;
AccountUpdateContract = 10;
FreezeBalanceContract = 11;
UnfreezeBalanceContract = 12;
WithdrawBalanceContract = 13;
CustomContract = 20;
}
ContractType type = 1;
Expand Down

0 comments on commit 9313380

Please sign in to comment.