syntax = "proto3";

package types;
option go_package = "github.com/33cn/chain33/types";

// Account 的信息
message Account {
    // coins标识，目前只有0 一个值
    int32 currency = 1;
    //账户可用余额
    int64 balance = 2;
    //账户冻结余额
    int64 frozen = 3;
    //账户的地址
    string addr = 4;
}

//账户余额改变的一个交易回报（合约内）
message ReceiptExecAccountTransfer {
    //合约地址
    string execAddr = 1;
    //转移前
    Account prev = 2;
    //转移后
    Account current = 3;
}

//账户余额改变的一个交易回报（coins内）
message ReceiptAccountTransfer {
    //转移前
    Account prev = 1;
    //转移后
    Account current = 2;
}

//查询一个地址列表在某个执行器中余额
message ReqBalance {
    //地址列表
    repeated string addresses = 1;
    //执行器名称
    string execer       = 2;
    string stateHash    = 3;
    string asset_exec   = 4;
    string asset_symbol = 5;
}

// Account 的列表
message Accounts {
    repeated Account acc = 1;
}

message ExecAccount {
    string  execer  = 1;
    Account account = 2;
}

message AllExecBalance {
    string   addr                    = 1;
    repeated ExecAccount ExecAccount = 2;
}
