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

Commit

Permalink
Merge commit 'c3b07944ee8eb47d7461fd304520364db41671ad' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/protos/core/Tron.proto
  • Loading branch information
zhaohong committed Apr 26, 2018
2 parents 3464107 + c3b0794 commit 08b0663
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
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;
}
20 changes: 20 additions & 0 deletions core/Tron.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ 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 @@ -41,10 +49,19 @@ 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;
// bandwidth, get from frozen
int64 bandwidth = 8;
// 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 +131,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 08b0663

Please sign in to comment.