github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/protobuf/payload.proto (about) 1 syntax = 'proto3'; 2 3 option go_package = "github.com/hyperledger/burrow/txs/payload"; 4 5 import "gogoproto/gogo.proto"; 6 7 import "permission.proto"; 8 import "registry.proto"; 9 import "spec.proto"; 10 11 package payload; 12 13 option (gogoproto.stable_marshaler_all) = true; 14 // Enable custom Marshal method. 15 option (gogoproto.marshaler_all) = true; 16 // Enable custom Unmarshal method. 17 option (gogoproto.unmarshaler_all) = true; 18 // Enable custom Size method (Required by Marshal and Unmarshal). 19 option (gogoproto.sizer_all) = true; 20 // Enable registration with golang/protobuf for the grpc-gateway. 21 option (gogoproto.goproto_registration) = true; 22 // Enable generation of XXX_MessageName methods for grpc-go/status. 23 option (gogoproto.messagename_all) = true; 24 25 // Any encodes a sum type for which only one should be set 26 message Any { 27 option (gogoproto.onlyone) = true; 28 29 CallTx CallTx = 1; 30 SendTx SendTx = 2; 31 NameTx NameTx = 3; 32 PermsTx PermsTx = 4; 33 GovTx GovTx = 5; 34 BondTx BondTx = 6; 35 UnbondTx UnbondTx = 7; 36 BatchTx BatchTx = 8; 37 ProposalTx ProposalTx = 9; 38 IdentifyTx IdentifyTx = 10; 39 } 40 41 // An input to a transaction that may carry an Amount as a charge and whose sequence number must be one greater than 42 // that associated with the account at Address at the time of being received 43 message TxInput { 44 option (gogoproto.goproto_stringer) = false; 45 // The address from which this input flows 46 bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; 47 // The amount of native token to transfer from the input address 48 uint64 Amount = 2; 49 // The sequence number that this transaction will induce (i.e. one greater than the input account's current sequence) 50 uint64 Sequence = 3; 51 } 52 53 // An output from a transaction that may carry an amount as a charge 54 message TxOutput { 55 option (gogoproto.goproto_stringer) = false; 56 // The address to which this output flows 57 bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; 58 // The amount of native token to transfer to the output address 59 uint64 Amount = 2; 60 } 61 62 // A instruction to run smart contract code in the EVM 63 message CallTx { 64 option (gogoproto.goproto_stringer) = false; 65 // The caller's input 66 TxInput Input = 1; 67 // The contract address to call or nil if we are creating a contract 68 bytes Address = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"]; 69 // The upper bound on the amount of gas (and therefore EVM execution steps) this CallTx may generate 70 uint64 GasLimit = 3; 71 // Fee to offer validators for processing transaction 72 uint64 Fee = 4; 73 // EVM bytecode 74 bytes Data = 5 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; 75 // WASM bytecode 76 bytes WASM = 6 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false, (gogoproto.jsontag)="tags,omitempty"]; 77 // Set of contracts this code will deploy 78 repeated ContractMeta ContractMeta = 7; 79 // The upper bound on the price per unit of gas 80 uint64 GasPrice = 8; 81 } 82 83 message ContractMeta { 84 bytes CodeHash = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; 85 string Meta = 2; 86 } 87 88 // A payment between two sets of parties 89 message SendTx { 90 option (gogoproto.goproto_stringer) = false; 91 option (gogoproto.goproto_getters) = false; 92 // The payers 93 repeated TxInput Inputs = 1; 94 // The payees 95 repeated TxOutput Outputs = 2; 96 } 97 98 // An update to the on-chain permissions 99 message PermsTx { 100 option (gogoproto.goproto_stringer) = false; 101 // The permission moderator 102 TxInput Input = 1; 103 // The modified permissions 104 permission.PermArgs PermArgs = 2 [(gogoproto.nullable) = false]; 105 } 106 107 // A request to claim a globally unique name across the entire chain with some optional data storage leased for a fee 108 message NameTx { 109 option (gogoproto.goproto_stringer) = false; 110 // The name updater 111 TxInput Input = 1; 112 // The name to update or create 113 string Name = 2; 114 // The data to store against the name 115 string Data = 3; 116 // The fee to provide that will determine the length of the name lease 117 uint64 Fee = 4; 118 } 119 120 message BondTx { 121 option (gogoproto.goproto_stringer) = false; 122 option (gogoproto.goproto_getters) = false; 123 124 // Input must be the validator that desires to bond 125 TxInput Input = 1; 126 } 127 128 message UnbondTx { 129 option (gogoproto.goproto_stringer) = false; 130 option (gogoproto.goproto_getters) = false; 131 132 TxInput Input = 1; 133 // Account to unbond 134 TxOutput Output = 2; 135 } 136 137 message GovTx { 138 option (gogoproto.goproto_stringer) = false; 139 option (gogoproto.goproto_getters) = false; 140 141 repeated TxInput Inputs = 1; 142 repeated spec.TemplateAccount AccountUpdates = 2 [(gogoproto.nullable) = true]; 143 } 144 145 message ProposalTx { 146 option (gogoproto.goproto_stringer) = false; 147 option (gogoproto.goproto_getters) = false; 148 149 TxInput Input = 1; 150 int64 VotingWeight = 2; 151 bytes ProposalHash = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes"]; 152 Proposal Proposal = 4; 153 } 154 155 message IdentifyTx { 156 option (gogoproto.goproto_stringer) = false; 157 option (gogoproto.goproto_getters) = false; 158 159 // Senders 160 repeated TxInput Inputs = 1; 161 // Node to register 162 registry.NodeIdentity Node = 2; 163 } 164 165 message BatchTx { 166 option (gogoproto.goproto_stringer) = false; 167 option (gogoproto.goproto_getters) = false; 168 169 repeated TxInput Inputs = 1; 170 repeated Any Txs = 2; 171 } 172 173 message Vote { 174 option (gogoproto.goproto_stringer) = false; 175 option (gogoproto.goproto_getters) = false; 176 177 bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; 178 int64 VotingWeight = 2; 179 } 180 181 message Proposal { 182 option (gogoproto.goproto_stringer) = false; 183 option (gogoproto.goproto_getters) = false; 184 185 string Name = 1; 186 string Description = 2; 187 BatchTx BatchTx = 3; 188 } 189 190 message Ballot { 191 Proposal Proposal = 1; 192 bytes FinalizingTx = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes"]; 193 enum ProposalState { 194 // PROPOSED might be expired, if sequence number of any of the input accounts are out of date 195 PROPOSED = 0; 196 EXECUTED = 1; 197 FAILED = 2; 198 } 199 ProposalState proposalState = 4; 200 repeated Vote Votes = 5; 201 }