update fork

This commit is contained in:
0xmuralik
2022-10-10 16:08:33 +05:30
parent 632d53e34a
commit 56d59feaa0
383 changed files with 36784 additions and 21462 deletions
@@ -3,7 +3,7 @@ package ethermint.crypto.v1.ethsecp256k1;
import "gogoproto/gogo.proto";
option go_package = "github.com/cerc-io/laconicd/crypto/ethsecp256k1";
option go_package = "github.com/evmos/ethermint/crypto/ethsecp256k1";
// PubKey defines a type alias for an ecdsa.PublicKey that implements
// Tendermint's PubKey interface. It represents the 33-byte compressed public
@@ -16,4 +16,6 @@ message PubKey {
// PrivKey defines a type alias for an ecdsa.PrivateKey that implements
// Tendermint's PrivateKey interface.
message PrivKey { bytes key = 1; }
message PrivKey {
bytes key = 1;
}
+50 -54
View File
@@ -3,27 +3,24 @@ package ethermint.evm.v1;
import "gogoproto/gogo.proto";
option go_package = "github.com/cerc-io/laconicd/x/evm/types";
option go_package = "github.com/evmos/ethermint/x/evm/types";
// Params defines the EVM module parameters
message Params {
// evm denom represents the token denomination used to run the EVM state
// transitions.
string evm_denom = 1 [ (gogoproto.moretags) = "yaml:\"evm_denom\"" ];
string evm_denom = 1 [(gogoproto.moretags) = "yaml:\"evm_denom\""];
// enable create toggles state transitions that use the vm.Create function
bool enable_create = 2 [ (gogoproto.moretags) = "yaml:\"enable_create\"" ];
bool enable_create = 2 [(gogoproto.moretags) = "yaml:\"enable_create\""];
// enable call toggles state transitions that use the vm.Call function
bool enable_call = 3 [ (gogoproto.moretags) = "yaml:\"enable_call\"" ];
bool enable_call = 3 [(gogoproto.moretags) = "yaml:\"enable_call\""];
// extra eips defines the additional EIPs for the vm.Config
repeated int64 extra_eips = 4 [
(gogoproto.customname) = "ExtraEIPs",
(gogoproto.moretags) = "yaml:\"extra_eips\""
];
repeated int64 extra_eips = 4 [(gogoproto.customname) = "ExtraEIPs", (gogoproto.moretags) = "yaml:\"extra_eips\""];
// chain config defines the EVM chain configuration parameters
ChainConfig chain_config = 5 [
(gogoproto.moretags) = "yaml:\"chain_config\"",
(gogoproto.nullable) = false
];
ChainConfig chain_config = 5 [(gogoproto.moretags) = "yaml:\"chain_config\"", (gogoproto.nullable) = false];
// Allow unprotected transactions defines if replay-protected (i.e non EIP155
// signed) transactions can be executed on the state machine.
bool allow_unprotected_txs = 6;
}
// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values
@@ -32,72 +29,67 @@ message ChainConfig {
// Homestead switch block (nil no fork, 0 = already homestead)
string homestead_block = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"homestead_block\""
(gogoproto.moretags) = "yaml:\"homestead_block\""
];
// TheDAO hard-fork switch block (nil no fork)
string dao_fork_block = 2 [
(gogoproto.customname) = "DAOForkBlock",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"dao_fork_block\""
(gogoproto.moretags) = "yaml:\"dao_fork_block\""
];
// Whether the nodes supports or opposes the DAO hard-fork
bool dao_fork_support = 3 [
(gogoproto.customname) = "DAOForkSupport",
(gogoproto.moretags) = "yaml:\"dao_fork_support\""
];
bool dao_fork_support = 3
[(gogoproto.customname) = "DAOForkSupport", (gogoproto.moretags) = "yaml:\"dao_fork_support\""];
// EIP150 implements the Gas price changes
// (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork)
string eip150_block = 4 [
(gogoproto.customname) = "EIP150Block",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"eip150_block\""
(gogoproto.moretags) = "yaml:\"eip150_block\""
];
// EIP150 HF hash (needed for header only clients as only gas pricing changed)
string eip150_hash = 5 [
(gogoproto.customname) = "EIP150Hash",
(gogoproto.moretags) = "yaml:\"byzantium_block\""
];
string eip150_hash = 5 [(gogoproto.customname) = "EIP150Hash", (gogoproto.moretags) = "yaml:\"byzantium_block\""];
// EIP155Block HF block
string eip155_block = 6 [
(gogoproto.customname) = "EIP155Block",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"eip155_block\""
(gogoproto.moretags) = "yaml:\"eip155_block\""
];
// EIP158 HF block
string eip158_block = 7 [
(gogoproto.customname) = "EIP158Block",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"eip158_block\""
(gogoproto.moretags) = "yaml:\"eip158_block\""
];
// Byzantium switch block (nil no fork, 0 = already on byzantium)
string byzantium_block = 8 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"byzantium_block\""
(gogoproto.moretags) = "yaml:\"byzantium_block\""
];
// Constantinople switch block (nil no fork, 0 = already activated)
string constantinople_block = 9 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"constantinople_block\""
(gogoproto.moretags) = "yaml:\"constantinople_block\""
];
// Petersburg switch block (nil same as Constantinople)
string petersburg_block = 10 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"petersburg_block\""
(gogoproto.moretags) = "yaml:\"petersburg_block\""
];
// Istanbul switch block (nil no fork, 0 = already on istanbul)
string istanbul_block = 11 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"istanbul_block\""
(gogoproto.moretags) = "yaml:\"istanbul_block\""
];
// Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated)
string muir_glacier_block = 12 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"muir_glacier_block\""
(gogoproto.moretags) = "yaml:\"muir_glacier_block\""
];
// Berlin switch block (nil = no fork, 0 = already on berlin)
string berlin_block = 13 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"berlin_block\""
(gogoproto.moretags) = "yaml:\"berlin_block\""
];
// DEPRECATED: EWASM, YOLOV3 and Catalyst block have been deprecated
reserved 14, 15, 16;
@@ -105,23 +97,31 @@ message ChainConfig {
// London switch block (nil = no fork, 0 = already on london)
string london_block = 17 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"london_block\""
(gogoproto.moretags) = "yaml:\"london_block\""
];
// Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated)
string arrow_glacier_block = 18 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"arrow_glacier_block\""
(gogoproto.moretags) = "yaml:\"arrow_glacier_block\""
];
// EIP-3675 (TheMerge) switch block (nil = no fork, 0 = already in merge proceedings)
string merge_fork_block = 19 [
// DEPRECATED: merge fork block was deprecated: https://github.com/ethereum/go-ethereum/pull/24904
reserved 19;
reserved "merge_fork_block";
// EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated)
string gray_glacier_block = 20 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"merge_fork_block\""
(gogoproto.moretags) = "yaml:\"gray_glacier_block\""
];
// Virtual fork after The Merge to use as a network splitter
string merge_netsplit_block = 21 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"merge_netsplit_block\""
];
}
// State represents a single Storage key value pair item.
message State {
string key = 1;
string key = 1;
string value = 2;
}
@@ -129,7 +129,7 @@ message State {
// with a given hash. It it used for import/export data as transactions are not
// persisted on blockchain state after an upgrade.
message TransactionLogs {
string hash = 1;
string hash = 1;
repeated Log logs = 2;
}
@@ -150,15 +150,15 @@ message Log {
// but not secured by consensus.
// block in which the transaction was included
uint64 block_number = 4 [ (gogoproto.jsontag) = "blockNumber" ];
uint64 block_number = 4 [(gogoproto.jsontag) = "blockNumber"];
// hash of the transaction
string tx_hash = 5 [ (gogoproto.jsontag) = "transactionHash" ];
string tx_hash = 5 [(gogoproto.jsontag) = "transactionHash"];
// index of the transaction in the block
uint64 tx_index = 6 [ (gogoproto.jsontag) = "transactionIndex" ];
uint64 tx_index = 6 [(gogoproto.jsontag) = "transactionIndex"];
// hash of the block in which the transaction was included
string block_hash = 7 [ (gogoproto.jsontag) = "blockHash" ];
string block_hash = 7 [(gogoproto.jsontag) = "blockHash"];
// index of the log in the block
uint64 index = 8 [ (gogoproto.jsontag) = "logIndex" ];
uint64 index = 8 [(gogoproto.jsontag) = "logIndex"];
// The Removed field is true if this log was reverted due to a chain
// reorganisation. You must pay attention to this field if you receive logs
@@ -173,16 +173,12 @@ message TxResult {
// contract_address contains the ethereum address of the created contract (if
// any). If the state transition is an evm.Call, the contract address will be
// empty.
string contract_address = 1
[ (gogoproto.moretags) = "yaml:\"contract_address\"" ];
string contract_address = 1 [(gogoproto.moretags) = "yaml:\"contract_address\""];
// bloom represents the bloom filter bytes
bytes bloom = 2;
// tx_logs contains the transaction hash and the proto-compatible ethereum
// logs.
TransactionLogs tx_logs = 3 [
(gogoproto.moretags) = "yaml:\"tx_logs\"",
(gogoproto.nullable) = false
];
TransactionLogs tx_logs = 3 [(gogoproto.moretags) = "yaml:\"tx_logs\"", (gogoproto.nullable) = false];
// ret defines the bytes from the execution.
bytes ret = 4;
// reverted flag is set to true when the call has been reverted
@@ -198,7 +194,7 @@ message AccessTuple {
// hex formatted ethereum address
string address = 1;
// hex formatted hashes of the storage keys
repeated string storage_keys = 2 [ (gogoproto.jsontag) = "storageKeys" ];
repeated string storage_keys = 2 [(gogoproto.jsontag) = "storageKeys"];
}
// TraceConfig holds extra parameters to trace functions.
@@ -216,9 +212,9 @@ message TraceConfig {
// number of blocks the tracer is willing to go back
uint64 reexec = 3;
// disable stack capture
bool disable_stack = 5 [ (gogoproto.jsontag) = "disableStack" ];
bool disable_stack = 5 [(gogoproto.jsontag) = "disableStack"];
// disable storage capture
bool disable_storage = 6 [ (gogoproto.jsontag) = "disableStorage" ];
bool disable_storage = 6 [(gogoproto.jsontag) = "disableStorage"];
// print output during capture end
bool debug = 8;
// maximum length of output, but zero means unlimited
@@ -226,7 +222,7 @@ message TraceConfig {
// Chain overrides, can be used to execute a trace using future fork rules
ChainConfig overrides = 10;
// enable memory capture
bool enable_memory = 11 [ (gogoproto.jsontag) = "enableMemory" ];
bool enable_memory = 11 [(gogoproto.jsontag) = "enableMemory"];
// enable return data capture
bool enable_return_data = 12 [ (gogoproto.jsontag) = "enableReturnData" ];
bool enable_return_data = 12 [(gogoproto.jsontag) = "enableReturnData"];
}
+4 -5
View File
@@ -4,14 +4,14 @@ package ethermint.evm.v1;
import "gogoproto/gogo.proto";
import "ethermint/evm/v1/evm.proto";
option go_package = "github.com/cerc-io/laconicd/x/evm/types";
option go_package = "github.com/evmos/ethermint/x/evm/types";
// GenesisState defines the evm module's genesis state.
message GenesisState {
// accounts is an array containing the ethereum genesis accounts.
repeated GenesisAccount accounts = 1 [ (gogoproto.nullable) = false ];
repeated GenesisAccount accounts = 1 [(gogoproto.nullable) = false];
// params defines all the parameters of the module.
Params params = 2 [ (gogoproto.nullable) = false ];
Params params = 2 [(gogoproto.nullable) = false];
}
// GenesisAccount defines an account to be initialized in the genesis state.
@@ -23,6 +23,5 @@ message GenesisAccount {
// code defines the hex bytes of the account code.
string code = 2;
// storage defines the set of state key values for the account.
repeated State storage = 3
[ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "Storage" ];
repeated State storage = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "Storage"];
}
+29 -17
View File
@@ -8,7 +8,7 @@ import "ethermint/evm/v1/evm.proto";
import "ethermint/evm/v1/tx.proto";
import "google/protobuf/timestamp.proto";
option go_package = "github.com/cerc-io/laconicd/x/evm/types";
option go_package = "github.com/evmos/ethermint/x/evm/types";
// Query defines the gRPC querier service.
service Query {
@@ -18,17 +18,14 @@ service Query {
}
// CosmosAccount queries an Ethereum account's Cosmos Address.
rpc CosmosAccount(QueryCosmosAccountRequest)
returns (QueryCosmosAccountResponse) {
rpc CosmosAccount(QueryCosmosAccountRequest) returns (QueryCosmosAccountResponse) {
option (google.api.http).get = "/ethermint/evm/v1/cosmos_account/{address}";
}
// ValidatorAccount queries an Ethereum account's from a validator consensus
// Address.
rpc ValidatorAccount(QueryValidatorAccountRequest)
returns (QueryValidatorAccountResponse) {
option (google.api.http).get =
"/ethermint/evm/v1/validator_account/{cons_address}";
rpc ValidatorAccount(QueryValidatorAccountRequest) returns (QueryValidatorAccountResponse) {
option (google.api.http).get = "/ethermint/evm/v1/validator_account/{cons_address}";
}
// Balance queries the balance of a the EVM denomination for a single
@@ -71,11 +68,17 @@ service Query {
rpc TraceBlock(QueryTraceBlockRequest) returns (QueryTraceBlockResponse) {
option (google.api.http).get = "/ethermint/evm/v1/trace_block";
}
// BaseFee queries the base fee of the parent block of the current block,
// it's similar to feemarket module's method, but also checks london hardfork status.
rpc BaseFee(QueryBaseFeeRequest) returns (QueryBaseFeeResponse) {
option (google.api.http).get = "/ethermint/evm/v1/base_fee";
}
}
// QueryAccountRequest is the request type for the Query/Account RPC method.
message QueryAccountRequest {
option (gogoproto.equal) = false;
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
// address is the ethereum hex address to query the account for.
@@ -95,7 +98,7 @@ message QueryAccountResponse {
// QueryCosmosAccountRequest is the request type for the Query/CosmosAccount RPC
// method.
message QueryCosmosAccountRequest {
option (gogoproto.equal) = false;
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
// address is the ethereum hex address to query the account for.
@@ -116,7 +119,7 @@ message QueryCosmosAccountResponse {
// QueryValidatorAccountRequest is the request type for the
// Query/ValidatorAccount RPC method.
message QueryValidatorAccountRequest {
option (gogoproto.equal) = false;
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
// cons_address is the validator cons address to query the account for.
@@ -136,7 +139,7 @@ message QueryValidatorAccountResponse {
// QueryBalanceRequest is the request type for the Query/Balance RPC method.
message QueryBalanceRequest {
option (gogoproto.equal) = false;
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
// address is the ethereum hex address to query the balance for.
@@ -151,7 +154,7 @@ message QueryBalanceResponse {
// QueryStorageRequest is the request type for the Query/Storage RPC method.
message QueryStorageRequest {
option (gogoproto.equal) = false;
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
/// address is the ethereum hex address to query the storage state for.
@@ -170,7 +173,7 @@ message QueryStorageResponse {
// QueryCodeRequest is the request type for the Query/Code RPC method.
message QueryCodeRequest {
option (gogoproto.equal) = false;
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
// address is the ethereum hex address to query the code for.
@@ -186,7 +189,7 @@ message QueryCodeResponse {
// QueryTxLogsRequest is the request type for the Query/TxLogs RPC method.
message QueryTxLogsRequest {
option (gogoproto.equal) = false;
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
// hash is the ethereum transaction hex hash to query the logs for.
@@ -209,7 +212,7 @@ message QueryParamsRequest {}
// QueryParamsResponse defines the response type for querying x/evm parameters.
message QueryParamsResponse {
// params define the evm module parameters.
Params params = 1 [ (gogoproto.nullable) = false ];
Params params = 1 [(gogoproto.nullable) = false];
}
// EthCallRequest defines EthCall request
@@ -230,8 +233,9 @@ message EstimateGasResponse {
message QueryTraceTxRequest {
// msgEthereumTx for the requested transaction
MsgEthereumTx msg = 1;
// transaction index
uint64 tx_index = 2;
// tx_index is not necessary anymore
reserved 2;
reserved "tx_index";
// TraceConfig holds extra parameters to trace functions.
TraceConfig trace_config = 3;
// the predecessor transactions included in the same block
@@ -270,3 +274,11 @@ message QueryTraceBlockResponse {
bytes data = 1;
}
// QueryBaseFeeRequest defines the request type for querying the EIP1559 base
// fee.
message QueryBaseFeeRequest {}
// BaseFeeResponse returns the EIP1559 base fee.
message QueryBaseFeeResponse {
string base_fee = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"];
}
+30 -44
View File
@@ -7,7 +7,7 @@ import "google/protobuf/any.proto";
import "cosmos_proto/cosmos.proto";
import "ethermint/evm/v1/evm.proto";
option go_package = "github.com/cerc-io/laconicd/x/evm/types";
option go_package = "github.com/evmos/ethermint/x/evm/types";
// Msg defines the evm Msg service.
service Msg {
@@ -25,10 +25,10 @@ message MsgEthereumTx {
google.protobuf.Any data = 1;
// caches
// encoded storage size of the transaction
double size = 2 [ (gogoproto.jsontag) = "-" ];
// DEPRECATED: encoded storage size of the transaction
double size = 2 [(gogoproto.jsontag) = "-"];
// transaction hash in hex format
string hash = 3 [ (gogoproto.moretags) = "rlp:\"-\"" ];
string hash = 3 [(gogoproto.moretags) = "rlp:\"-\""];
// ethereum signer address in hex format. This address value is checked
// against the address derived from the signature (V, R, S) using the
// secp256k1 elliptic curve
@@ -36,24 +36,23 @@ message MsgEthereumTx {
}
// LegacyTx is the transaction data of regular Ethereum transactions.
// NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the
// AllowUnprotectedTxs parameter is disabled.
message LegacyTx {
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_getters) = false;
option (cosmos_proto.implements_interface) = "TxData";
// nonce corresponds to the account nonce (transaction sequence).
uint64 nonce = 1;
// gas price defines the value for each gas unit
string gas_price = 2
[ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ];
string gas_price = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"];
// gas defines the gas limit defined for the transaction.
uint64 gas = 3 [ (gogoproto.customname) = "GasLimit" ];
uint64 gas = 3 [(gogoproto.customname) = "GasLimit"];
// hex formatted address of the recipient
string to = 4;
// value defines the unsigned integer value of the transaction amount.
string value = 5 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.customname) = "Amount"
];
string value = 5
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "Amount"];
// input defines the data payload bytes of the transaction.
bytes data = 6;
// v defines the signature value
@@ -66,36 +65,30 @@ message LegacyTx {
// AccessListTx is the data of EIP-2930 access list transactions.
message AccessListTx {
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_getters) = false;
option (cosmos_proto.implements_interface) = "TxData";
// destination EVM chain ID
string chain_id = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.customname) = "ChainID",
(gogoproto.jsontag) = "chainID"
(gogoproto.jsontag) = "chainID"
];
// nonce corresponds to the account nonce (transaction sequence).
uint64 nonce = 2;
// gas price defines the value for each gas unit
string gas_price = 3
[ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ];
string gas_price = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"];
// gas defines the gas limit defined for the transaction.
uint64 gas = 4 [ (gogoproto.customname) = "GasLimit" ];
uint64 gas = 4 [(gogoproto.customname) = "GasLimit"];
// hex formatted address of the recipient
string to = 5;
// value defines the unsigned integer value of the transaction amount.
string value = 6 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.customname) = "Amount"
];
string value = 6
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "Amount"];
// input defines the data payload bytes of the transaction.
bytes data = 7;
repeated AccessTuple accesses = 8 [
(gogoproto.castrepeated) = "AccessList",
(gogoproto.jsontag) = "accessList",
(gogoproto.nullable) = false
];
bytes data = 7;
repeated AccessTuple accesses = 8
[(gogoproto.castrepeated) = "AccessList", (gogoproto.jsontag) = "accessList", (gogoproto.nullable) = false];
// v defines the signature value
bytes v = 9;
// r defines the signature value
@@ -106,39 +99,32 @@ message AccessListTx {
// DynamicFeeTx is the data of EIP-1559 dinamic fee transactions.
message DynamicFeeTx {
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_getters) = false;
option (cosmos_proto.implements_interface) = "TxData";
// destination EVM chain ID
string chain_id = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.customname) = "ChainID",
(gogoproto.jsontag) = "chainID"
(gogoproto.jsontag) = "chainID"
];
// nonce corresponds to the account nonce (transaction sequence).
uint64 nonce = 2;
// gas tip cap defines the max value for the gas tip
string gas_tip_cap = 3
[ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ];
string gas_tip_cap = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"];
// gas fee cap defines the max value for the gas fee
string gas_fee_cap = 4
[ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ];
string gas_fee_cap = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"];
// gas defines the gas limit defined for the transaction.
uint64 gas = 5 [ (gogoproto.customname) = "GasLimit" ];
uint64 gas = 5 [(gogoproto.customname) = "GasLimit"];
// hex formatted address of the recipient
string to = 6;
// value defines the the transaction amount.
string value = 7 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.customname) = "Amount"
];
string value = 7
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "Amount"];
// input defines the data payload bytes of the transaction.
bytes data = 8;
repeated AccessTuple accesses = 9 [
(gogoproto.castrepeated) = "AccessList",
(gogoproto.jsontag) = "accessList",
(gogoproto.nullable) = false
];
bytes data = 8;
repeated AccessTuple accesses = 9
[(gogoproto.castrepeated) = "AccessList", (gogoproto.jsontag) = "accessList", (gogoproto.nullable) = false];
// v defines the signature value
bytes v = 10;
// r defines the signature value
+11 -7
View File
@@ -3,7 +3,7 @@ package ethermint.feemarket.v1;
import "gogoproto/gogo.proto";
option go_package = "github.com/cerc-io/laconicd/x/feemarket/types";
option go_package = "github.com/evmos/ethermint/x/feemarket/types";
// Params defines the EVM module parameters
message Params {
@@ -16,13 +16,17 @@ message Params {
// have.
uint32 elasticity_multiplier = 3;
// DEPRECATED: initial base fee for EIP-1559 blocks.
reserved 4;
reserved 4;
reserved "initial_base_fee";
// height at which the base fee calculation is enabled.
int64 enable_height = 5;
// base fee for EIP-1559 blocks.
string base_fee = 6 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
}
string base_fee = 6 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
// min_gas_price defines the minimum gas price value for cosmos and eth transactions
string min_gas_price = 7
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
// min gas denominator bounds the minimum gasUsed to be charged
// to senders based on GasLimit
string min_gas_multiplier = 8
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
}
+3 -3
View File
@@ -4,17 +4,17 @@ package ethermint.feemarket.v1;
import "gogoproto/gogo.proto";
import "ethermint/feemarket/v1/feemarket.proto";
option go_package = "github.com/cerc-io/laconicd/x/feemarket/types";
option go_package = "github.com/evmos/ethermint/x/feemarket/types";
// GenesisState defines the feemarket module's genesis state.
message GenesisState {
// params defines all the paramaters of the module.
Params params = 1 [ (gogoproto.nullable) = false ];
Params params = 1 [(gogoproto.nullable) = false];
// DEPRECATED: base fee is the exported value from previous software version.
// Zero by default.
reserved 2;
reserved "base_fee";
// block gas is the amount of gas used on the last block before the upgrade.
// block gas is the amount of gas wanted on the last block before the upgrade.
// Zero by default.
uint64 block_gas = 3;
}
+9 -8
View File
@@ -6,23 +6,23 @@ import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "ethermint/feemarket/v1/feemarket.proto";
option go_package = "github.com/cerc-io/laconicd/x/feemarket/types";
option go_package = "github.com/evmos/ethermint/x/feemarket/types";
// Query defines the gRPC querier service.
service Query {
// Params queries the parameters of x/feemarket module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/feemarket/evm/v1/params";
option (google.api.http).get = "/ethermint/feemarket/v1/params";
}
// BaseFee queries the base fee of the parent block of the current block.
rpc BaseFee(QueryBaseFeeRequest) returns (QueryBaseFeeResponse) {
option (google.api.http).get = "/feemarket/evm/v1/base_fee";
option (google.api.http).get = "/ethermint/feemarket/v1/base_fee";
}
// BlockGas queries the gas used at a given block height
rpc BlockGas(QueryBlockGasRequest) returns (QueryBlockGasResponse) {
option (google.api.http).get = "/feemarket/evm/v1/block_gas";
option (google.api.http).get = "/ethermint/feemarket/v1/block_gas";
}
}
@@ -32,7 +32,7 @@ message QueryParamsRequest {}
// QueryParamsResponse defines the response type for querying x/evm parameters.
message QueryParamsResponse {
// params define the evm module parameters.
Params params = 1 [ (gogoproto.nullable) = false ];
Params params = 1 [(gogoproto.nullable) = false];
}
// QueryBaseFeeRequest defines the request type for querying the EIP1559 base
@@ -41,8 +41,7 @@ message QueryBaseFeeRequest {}
// BaseFeeResponse returns the EIP1559 base fee.
message QueryBaseFeeResponse {
string base_fee = 1
[ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ];
string base_fee = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"];
}
// QueryBlockGasRequest defines the request type for querying the EIP1559 base
@@ -50,4 +49,6 @@ message QueryBaseFeeResponse {
message QueryBlockGasRequest {}
// QueryBlockGasResponse returns block gas used for a given height.
message QueryBlockGasResponse { int64 gas = 1; }
message QueryBlockGasResponse {
int64 gas = 1;
}
+7 -10
View File
@@ -5,21 +5,18 @@ import "cosmos/auth/v1beta1/auth.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
option go_package = "github.com/cerc-io/laconicd/types";
option go_package = "github.com/evmos/ethermint/types";
// EthAccount implements the authtypes.AccountI interface and embeds an
// authtypes.BaseAccount type. It is compatible with the auth AccountKeeper.
message EthAccount {
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;
option (gogoproto.equal) = false;
option (gogoproto.equal) = false;
option (cosmos_proto.implements_interface) =
"github.com/cosmos/cosmos-sdk/x/auth/types.AccountI";
option (cosmos_proto.implements_interface) = "github.com/cosmos/cosmos-sdk/x/auth/types.AccountI";
cosmos.auth.v1beta1.BaseAccount base_account = 1 [
(gogoproto.embed) = true,
(gogoproto.moretags) = "yaml:\"base_account\""
];
string code_hash = 2 [ (gogoproto.moretags) = "yaml:\"code_hash\"" ];
cosmos.auth.v1beta1.BaseAccount base_account = 1
[(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""];
string code_hash = 2 [(gogoproto.moretags) = "yaml:\"code_hash\""];
}
@@ -0,0 +1,13 @@
syntax = "proto3";
package ethermint.types.v1;
import "gogoproto/gogo.proto";
option go_package = "github.com/evmos/ethermint/types";
// ExtensionOptionDynamicFeeTx is an extension option that specify the maxPrioPrice for cosmos tx
message ExtensionOptionDynamicFeeTx {
// the same as `max_priority_fee_per_gas` in eip-1559 spec
string max_priority_price = 1
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
}
+29
View File
@@ -0,0 +1,29 @@
syntax = "proto3";
package ethermint.types.v1;
import "gogoproto/gogo.proto";
option go_package = "github.com/evmos/ethermint/types";
// TxResult is the value stored in eth tx indexer
message TxResult {
option (gogoproto.goproto_getters) = false;
// the block height
int64 height = 1;
// cosmos tx index
uint32 tx_index = 2;
// the msg index in a batch tx
uint32 msg_index = 3;
// eth tx index, the index in the list of valid eth tx in the block,
// aka. the transaction list returned by eth_getBlock api.
int32 eth_tx_index = 4;
// if the eth tx is failed
bool failed = 5;
// gas used by tx, if exceeds block gas limit,
// it's set to gas limit which is what's actually deducted by ante handler.
uint64 gas_used = 6;
// the cumulative gas used within current batch tx
uint64 cumulative_gas_used = 7;
}
+5 -7
View File
@@ -3,23 +3,21 @@ package ethermint.types.v1;
import "gogoproto/gogo.proto";
option go_package = "github.com/cerc-io/laconicd/types";
option go_package = "github.com/evmos/ethermint/types";
message ExtensionOptionsWeb3Tx {
option (gogoproto.goproto_getters) = false;
// typed data chain id used only in EIP712 Domain and should match
// Ethereum network ID in a Web3 provider (e.g. Metamask).
uint64 typed_data_chain_id = 1 [
(gogoproto.jsontag) = "typedDataChainID,omitempty",
(gogoproto.customname) = "TypedDataChainID"
];
uint64 typed_data_chain_id = 1
[(gogoproto.jsontag) = "typedDataChainID,omitempty", (gogoproto.customname) = "TypedDataChainID"];
// fee payer is an account address for the fee payer. It will be validated
// during EIP712 signature checking.
string fee_payer = 2 [ (gogoproto.jsontag) = "feePayer,omitempty" ];
string fee_payer = 2 [(gogoproto.jsontag) = "feePayer,omitempty"];
// fee payer sig is a signature data from the fee paying account,
// allows to perform fee delegation when using EIP712 Domain.
bytes fee_payer_sig = 3 [ (gogoproto.jsontag) = "feePayerSig,omitempty" ];
bytes fee_payer_sig = 3 [(gogoproto.jsontag) = "feePayerSig,omitempty"];
}
@@ -8,8 +8,6 @@ option go_package = "github.com/cerc-io/laconicd/x/auction/types";
// GenesisState defines the genesis state of the auction module
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
repeated Auction auctions = 2 [
(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""
];
Params params = 1 [(gogoproto.nullable) = false];
repeated Auction auctions = 2 [(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""];
}
+3 -7
View File
@@ -86,8 +86,7 @@ message AuctionsByOwnerResponse {
}
// QueryParamsRequest is the format to query the parameters of the auction module
message QueryParamsRequest {
}
message QueryParamsRequest {}
// QueryParamsResponse returns parameters of the auction module
message QueryParamsResponse {
@@ -95,14 +94,11 @@ message QueryParamsResponse {
}
// BalanceRequest is the format to fetch all balances
message BalanceRequest {
}
message BalanceRequest {}
message BalanceResponse {
// Set of all balances within the auction
repeated cosmos.base.v1beta1.Coin balance = 1 [
(gogoproto.nullable) = false
];
repeated cosmos.base.v1beta1.Coin balance = 1 [(gogoproto.nullable) = false];
}
// Query defines the gRPC querier interface for the auction module
+21 -48
View File
@@ -14,44 +14,34 @@ message MsgCreateAuction {
// Duration of the commits phase in seconds
google.protobuf.Duration commits_duration = 1 [
(gogoproto.nullable) = false,
(gogoproto.nullable) = false,
(gogoproto.stdduration) = true,
(gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
(gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
];
// Duration of the reveals phase in seconds
google.protobuf.Duration reveals_duration = 2 [
(gogoproto.nullable) = false,
(gogoproto.nullable) = false,
(gogoproto.stdduration) = true,
(gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
(gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
];
// Commit fees
cosmos.base.v1beta1.Coin commit_fee = 3 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
];
cosmos.base.v1beta1.Coin commit_fee = 3
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""];
// Reveal fees
cosmos.base.v1beta1.Coin reveal_fee = 4 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
];
cosmos.base.v1beta1.Coin reveal_fee = 4
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""];
// Minimum acceptable bid amount
cosmos.base.v1beta1.Coin minimum_bid = 5 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
];
cosmos.base.v1beta1.Coin minimum_bid = 5
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""];
// Address of the signer
string signer = 6 [
(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""
];
string signer = 6 [(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""];
}
// MsgCreateAuctionResponse returns the details of the created auction
message MsgCreateAuctionResponse {
option (gogoproto.goproto_getters) = false;
// Auction details
Auction auction = 1 [
(gogoproto.moretags) = "json:\"auction\" yaml:\"auction\""
];
Auction auction = 1 [(gogoproto.moretags) = "json:\"auction\" yaml:\"auction\""];
}
// CommitBid defines the message to commit a bid
@@ -59,17 +49,11 @@ message MsgCommitBid {
option (gogoproto.goproto_getters) = false;
// Auction ID
string auction_id = 1 [
(gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""
];
string auction_id = 1 [(gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""];
// Commit Hash
string commit_hash = 2 [
(gogoproto.moretags) = "json:\"commit_hash\" yaml:\"commit_hash\""
];
string commit_hash = 2 [(gogoproto.moretags) = "json:\"commit_hash\" yaml:\"commit_hash\""];
// Address of the signer
string signer = 3 [
(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""
];
string signer = 3 [(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""];
}
// RevealBid defines the message to reveal a bid
@@ -77,35 +61,25 @@ message MsgRevealBid {
option (gogoproto.goproto_getters) = false;
// Auction ID
string auction_id = 1 [
(gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""
];
string auction_id = 1 [(gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""];
// Commit Hash
string reveal = 2 [
(gogoproto.moretags) = "json:\"reveal\" yaml:\"reveal\""
];
string reveal = 2 [(gogoproto.moretags) = "json:\"reveal\" yaml:\"reveal\""];
// Address of the signer
string signer = 3 [
(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""
];
string signer = 3 [(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""];
}
// MsgCommitBidResponse returns the state of the auction after the bid creation
message MsgCommitBidResponse {
option (gogoproto.goproto_getters) = false;
// Auction details
Bid bid = 1 [
(gogoproto.moretags) = "json:\"bid\" yaml:\"bid\""
];
Bid bid = 1 [(gogoproto.moretags) = "json:\"bid\" yaml:\"bid\""];
}
// MsgRevealBidResponse returns the state of the auction after the bid reveal
message MsgRevealBidResponse {
option (gogoproto.goproto_getters) = false;
// Auction details
Auction auction = 1 [
(gogoproto.moretags) = "json:\"auction\" yaml:\"auction\""
];
Auction auction = 1 [(gogoproto.moretags) = "json:\"auction\" yaml:\"auction\""];
}
// Tx defines the gRPC tx interface
@@ -116,7 +90,6 @@ service Msg {
// CommitBid is the command for committing a bid
rpc CommitBid(MsgCommitBid) returns (MsgCommitBidResponse);
//RevealBid is the command for revealing a bid
// RevealBid is the command for revealing a bid
rpc RevealBid(MsgRevealBid) returns (MsgRevealBidResponse);
}
+38 -59
View File
@@ -14,86 +14,70 @@ message Params {
// Duration of the commits phase in seconds
google.protobuf.Duration commits_duration = 1 [
(gogoproto.nullable) = false,
(gogoproto.nullable) = false,
(gogoproto.stdduration) = true,
(gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
(gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
];
// Duration of the reveals phase in seconds
google.protobuf.Duration reveals_duration = 2 [
(gogoproto.nullable) = false,
(gogoproto.nullable) = false,
(gogoproto.stdduration) = true,
(gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
(gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
];
// Commit fees
cosmos.base.v1beta1.Coin commit_fee = 3 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
];
cosmos.base.v1beta1.Coin commit_fee = 3
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""];
// Reveal fees
cosmos.base.v1beta1.Coin reveal_fee = 4 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
];
cosmos.base.v1beta1.Coin reveal_fee = 4
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""];
// Minimum acceptable bid amount
cosmos.base.v1beta1.Coin minimum_bid = 5 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
];
cosmos.base.v1beta1.Coin minimum_bid = 5
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""];
}
// Auction represents a sealed-bid on-chain auction
message Auction {
option (gogoproto.goproto_getters) = false;
string id = 1;
string id = 1;
string status = 2;
// Address of the creator of the auction
string owner_address = 3;
// Timestamp at which the auction was created
google.protobuf.Timestamp create_time = 4 [
(gogoproto.stdtime) = true,
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"create_time\" yaml:\"create_time\""
];
// Timestamp at which the commits phase concluded
google.protobuf.Timestamp commits_end_time = 5 [
(gogoproto.stdtime) = true,
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"commits_end_time\" yaml:\"commits_end_time\""
];
// Timestamp at which the reveals phase concluded
google.protobuf.Timestamp reveals_end_time = 6 [
(gogoproto.stdtime) = true,
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"reveals_end_time\" yaml:\"reveals_end_time\""
];
// Commit and reveal fees must both be paid when committing a bid
// Reveal fee is returned only if the bid is revealed
cosmos.base.v1beta1.Coin commit_fee = 7 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
];
cosmos.base.v1beta1.Coin reveal_fee = 8 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
];
cosmos.base.v1beta1.Coin commit_fee = 7
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""];
cosmos.base.v1beta1.Coin reveal_fee = 8
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""];
// Minimum acceptable bid amount for a valid commit
cosmos.base.v1beta1.Coin minimum_bid = 9 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
];
cosmos.base.v1beta1.Coin minimum_bid = 9
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""];
// Address of the winner
string winner_address = 10;
// Winning bid, i.e., the highest bid
cosmos.base.v1beta1.Coin winning_bid = 11 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"winning_bid\" yaml:\"winning_bid\""
];
cosmos.base.v1beta1.Coin winning_bid = 11
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"winning_bid\" yaml:\"winning_bid\""];
// Amount the winner pays, i.e. the second highest auction
cosmos.base.v1beta1.Coin winning_price = 12 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"winning_price\" yaml:\"winning_price\""
];
cosmos.base.v1beta1.Coin winning_price = 12
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"winning_price\" yaml:\"winning_price\""];
}
message Auctions {
@@ -106,30 +90,25 @@ message Auctions {
message Bid {
option (gogoproto.goproto_getters) = false;
string auction_id = 1;
string bidder_address = 2;
string status = 3;
string commit_hash = 4;
google.protobuf.Timestamp commit_time = 5 [
(gogoproto.stdtime) = true,
string auction_id = 1;
string bidder_address = 2;
string status = 3;
string commit_hash = 4;
google.protobuf.Timestamp commit_time = 5 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"commit_time\" yaml:\"commit_time\""
];
cosmos.base.v1beta1.Coin commit_fee = 6 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
];
cosmos.base.v1beta1.Coin commit_fee = 6
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""];
google.protobuf.Timestamp reveal_time = 7 [
(gogoproto.stdtime) = true,
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"reveal_time\" yaml:\"reveal_time\""
];
cosmos.base.v1beta1.Coin reveal_fee = 8 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
];
cosmos.base.v1beta1.Coin bid_amount = 9 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"bid_amount\" yaml:\"bid_amount\""
];;
cosmos.base.v1beta1.Coin reveal_fee = 8
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""];
cosmos.base.v1beta1.Coin bid_amount = 9
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"bid_amount\" yaml:\"bid_amount\""];
;
}
+5 -6
View File
@@ -9,10 +9,8 @@ import "cosmos/base/v1beta1/coin.proto";
// Params defines the bond module parameters
message Params {
// max_bond_amount is maximum amount to bond
cosmos.base.v1beta1.Coin max_bond_amount = 1 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"max_bond_amount\" yaml:\"max_bond_amount\""
];
cosmos.base.v1beta1.Coin max_bond_amount = 1
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"max_bond_amount\" yaml:\"max_bond_amount\""];
}
// Bond represents funds deposited by an account for record rent payments.
@@ -23,7 +21,8 @@ message Bond {
string owner = 2;
// balance of the bond
repeated cosmos.base.v1beta1.Coin balance = 3 [
(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(gogoproto.moretags) = "json:\"balance\" yaml:\"balance\""
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(gogoproto.moretags) = "json:\"balance\" yaml:\"balance\""
];
}
+1 -3
View File
@@ -12,7 +12,5 @@ message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
// bonds defines all the bonds
repeated Bond bonds = 2 [
(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""
];
repeated Bond bonds = 2 [(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""];
}
+19 -33
View File
@@ -22,63 +22,54 @@ service Query {
}
// GetBondById
rpc GetBondById(QueryGetBondByIdRequest) returns (QueryGetBondByIdResponse){
rpc GetBondById(QueryGetBondByIdRequest) returns (QueryGetBondByIdResponse) {
option (google.api.http).get = "/vulcanize/bond/v1beta1/bonds/{id}";
}
// Get Bonds List by Owner
rpc GetBondsByOwner(QueryGetBondsByOwnerRequest) returns (QueryGetBondsByOwnerResponse){
rpc GetBondsByOwner(QueryGetBondsByOwnerRequest) returns (QueryGetBondsByOwnerResponse) {
option (google.api.http).get = "/vulcanize/bond/v1beta1/by-owner/{owner}";
}
// Get Bonds module balance
rpc GetBondsModuleBalance(QueryGetBondModuleBalanceRequest) returns (QueryGetBondModuleBalanceResponse){
rpc GetBondsModuleBalance(QueryGetBondModuleBalanceRequest) returns (QueryGetBondModuleBalanceResponse) {
option (google.api.http).get = "/vulcanize/bond/v1beta1/balance";
}
}
// QueryParamsRequest is request for query the bond module params
message QueryParamsRequest{
}
message QueryParamsRequest {}
// QueryParamsResponse returns response type of bond module params
message QueryParamsResponse{
Params params = 1 [
(gogoproto.moretags) = "json:\"params\" yaml:\"params\""
];
message QueryParamsResponse {
Params params = 1 [(gogoproto.moretags) = "json:\"params\" yaml:\"params\""];
}
// QueryGetBondById queries a bond by bond-id.
message QueryGetBondsRequest{
message QueryGetBondsRequest {
// pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}
// QueryGetBondsResponse is response type for get the bonds by bond-id
message QueryGetBondsResponse{
repeated Bond bonds = 1 [
(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""
];
message QueryGetBondsResponse {
repeated Bond bonds = 1 [(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""];
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
// QueryGetBondById
message QueryGetBondByIdRequest{
string id = 1 [
(gogoproto.moretags) = "json:\"id\" yaml:\"id\""
];
message QueryGetBondByIdRequest {
string id = 1 [(gogoproto.moretags) = "json:\"id\" yaml:\"id\""];
}
// QueryGetBondByIdResponse returns QueryGetBondById query response
message QueryGetBondByIdResponse{
Bond bond = 1 [
(gogoproto.moretags) = "json:\"bond\" yaml:\"bond\""
];
message QueryGetBondByIdResponse {
Bond bond = 1 [(gogoproto.moretags) = "json:\"bond\" yaml:\"bond\""];
}
// QueryGetBondsByOwnerRequest is request type for Query/GetBondsByOwner RPC Method
message QueryGetBondsByOwnerRequest{
message QueryGetBondsByOwnerRequest {
string owner = 1;
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
@@ -86,24 +77,19 @@ message QueryGetBondsByOwnerRequest{
// QueryGetBondsByOwnerResponse is response type for Query/GetBondsByOwner RPC Method
message QueryGetBondsByOwnerResponse {
repeated Bond bonds = 1 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""
];
repeated Bond bonds = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""];
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
// QueryGetBondModuleBalanceRequest is request type for bond module balance rpc method
message QueryGetBondModuleBalanceRequest{
}
message QueryGetBondModuleBalanceRequest {}
// QueryGetBondModuleBalanceResponse is the response type for bond module balance rpc method
message QueryGetBondModuleBalanceResponse{
message QueryGetBondModuleBalanceResponse {
repeated cosmos.base.v1beta1.Coin balance = 2 [
(gogoproto.nullable) = false,
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
];
}
+19 -22
View File
@@ -22,56 +22,53 @@ service Msg {
}
// MsgCreateBond defines a SDK message for creating a new bond.
message MsgCreateBond{
string signer = 1;
message MsgCreateBond {
string signer = 1;
repeated cosmos.base.v1beta1.Coin coins = 2 [
(gogoproto.nullable) = false,
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
];
}
// MsgCreateBondResponse defines the Msg/CreateBond response type.
message MsgCreateBondResponse{
message MsgCreateBondResponse {
string id = 1;
}
// MsgRefillBond defines a SDK message for refill the amount for bond.
message MsgRefillBond{
string id = 1;
string signer = 2;
message MsgRefillBond {
string id = 1;
string signer = 2;
repeated cosmos.base.v1beta1.Coin coins = 3 [
(gogoproto.nullable) = false,
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
];
}
// MsgRefillBondResponse defines the Msg/RefillBond response type.
message MsgRefillBondResponse{
}
message MsgRefillBondResponse {}
// MsgWithdrawBond defines a SDK message for withdrawing amount from bond.
message MsgWithdrawBond {
string id = 1;
string signer = 2;
string id = 1;
string signer = 2;
repeated cosmos.base.v1beta1.Coin coins = 3 [
(gogoproto.nullable) = false,
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
];
}
// MsgWithdrawBondResponse defines the Msg/WithdrawBond response type.
message MsgWithdrawBondResponse{
}
message MsgWithdrawBondResponse {}
// MsgCancelBond defines a SDK message for the cancel the bond.
message MsgCancelBond{
string id = 1;
message MsgCancelBond {
string id = 1;
string signer = 2;
}
// MsgCancelBondResponse defines the Msg/CancelBond response type.
message MsgCancelBondResponse{
}
message MsgCancelBondResponse {}
@@ -9,22 +9,13 @@ option go_package = "github.com/cerc-io/laconicd/x/nameservice/types";
// GenesisState defines the nameservice module's genesis state.
message GenesisState {
// params defines all the params of nameservice module.
Params params = 1 [
(gogoproto.nullable) = false
];
Params params = 1 [(gogoproto.nullable) = false];
// records
repeated Record records = 2 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"records\" yaml:\"records\""
];
repeated Record records = 2
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"records\" yaml:\"records\""];
// authorities
repeated AuthorityEntry authorities = 3 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"authorities\" yaml:\"authorities\""
];
repeated AuthorityEntry authorities = 3
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"authorities\" yaml:\"authorities\""];
// names
repeated NameEntry names = 4 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"names\" yaml:\"names\""
];
repeated NameEntry names = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"names\" yaml:\"names\""];
}
@@ -10,41 +10,36 @@ option go_package = "github.com/cerc-io/laconicd/x/nameservice/types";
// Params defines the nameservice module parameters
message Params {
cosmos.base.v1beta1.Coin record_rent = 1 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"record_rent\" yaml:\"record_rent\""
];
cosmos.base.v1beta1.Coin record_rent = 1
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"record_rent\" yaml:\"record_rent\""];
google.protobuf.Duration record_rent_duration = 2 [
(gogoproto.nullable) = false,
(gogoproto.nullable) = false,
(gogoproto.stdduration) = true,
(gogoproto.moretags) = "json:\"record_rent_duration\" yaml:\"record_rent_duration\""
];
cosmos.base.v1beta1.Coin authority_rent = 3 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"authority_rent\" yaml:\"authority_rent\""
(gogoproto.moretags) = "json:\"record_rent_duration\" yaml:\"record_rent_duration\""
];
cosmos.base.v1beta1.Coin authority_rent = 3
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"authority_rent\" yaml:\"authority_rent\""];
google.protobuf.Duration authority_rent_duration = 4 [
(gogoproto.nullable) = false,
(gogoproto.nullable) = false,
(gogoproto.stdduration) = true,
(gogoproto.moretags) = "json:\"authority_rent_duration\" yaml:\"authority_rent_duration\""
(gogoproto.moretags) = "json:\"authority_rent_duration\" yaml:\"authority_rent_duration\""
];
google.protobuf.Duration authority_grace_period = 5 [
(gogoproto.nullable) = false,
(gogoproto.nullable) = false,
(gogoproto.stdduration) = true,
(gogoproto.moretags) = "json:\"authority_grace_period\" yaml:\"authority_grace_period\""
];
bool authority_auction_enabled = 6 [
(gogoproto.moretags) = "json:\"authority_auction_enabled\" yaml:\"authority_auction_enabled\""
(gogoproto.moretags) = "json:\"authority_grace_period\" yaml:\"authority_grace_period\""
];
bool authority_auction_enabled = 6
[(gogoproto.moretags) = "json:\"authority_auction_enabled\" yaml:\"authority_auction_enabled\""];
google.protobuf.Duration authority_auction_commits_duration = 7 [
(gogoproto.nullable) = false,
(gogoproto.nullable) = false,
(gogoproto.stdduration) = true,
(gogoproto.moretags) = "json:\"authority_auction_commits_duration\" yaml:\"authority_auction_commits_duration\""
(gogoproto.moretags) = "json:\"authority_auction_commits_duration\" yaml:\"authority_auction_commits_duration\""
];
google.protobuf.Duration authority_auction_reveals_duration = 8 [
(gogoproto.nullable) = false,
(gogoproto.nullable) = false,
(gogoproto.stdduration) = true,
(gogoproto.moretags) = "json:\"authority_auction_reveals_duration\" yaml:\"authority_auction_reveals_duration\""
(gogoproto.moretags) = "json:\"authority_auction_reveals_duration\" yaml:\"authority_auction_reveals_duration\""
];
cosmos.base.v1beta1.Coin authority_auction_commit_fee = 9 [
(gogoproto.nullable) = false,
@@ -54,7 +49,7 @@ message Params {
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"authority_auction_reveal_fee\" yaml:\"authority_auction_reveal_fee\""
];
cosmos.base.v1beta1.Coin authority_auction_minimum_bid = 11 [
cosmos.base.v1beta1.Coin authority_auction_minimum_bid = 11 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"authority_auction_minimum_bid\" yaml:\"authority_auction_minimum_bid\""
];
@@ -62,108 +57,76 @@ message Params {
// Params defines the nameservice module records
message Record {
string id = 1 [
(gogoproto.moretags) = "json:\"id\" yaml:\"id\""
];
string bond_id = 2 [
(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""
];
string create_time = 3 [
(gogoproto.moretags) = "json:\"createTime\" yaml:\"createTime\""
];
string expiry_time = 4 [
(gogoproto.moretags) = "json:\"expiryTime\" yaml:\"expiryTime\""
];
bool deleted = 5;
repeated string owners = 6 [
(gogoproto.moretags) = "json:\"owners\" yaml:\"owners\""
];
string attributes = 7 [
(gogoproto.moretags) = "json:\"attributes\" yaml:\"attributes\""
];
repeated string names = 8 [
(gogoproto.moretags) = "json:\"names\" yaml:\"names\""
];
string id = 1 [(gogoproto.moretags) = "json:\"id\" yaml:\"id\""];
string bond_id = 2 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
string create_time = 3 [(gogoproto.moretags) = "json:\"createTime\" yaml:\"createTime\""];
string expiry_time = 4 [(gogoproto.moretags) = "json:\"expiryTime\" yaml:\"expiryTime\""];
bool deleted = 5;
repeated string owners = 6 [(gogoproto.moretags) = "json:\"owners\" yaml:\"owners\""];
string attributes = 7 [(gogoproto.moretags) = "json:\"attributes\" yaml:\"attributes\""];
repeated string names = 8 [(gogoproto.moretags) = "json:\"names\" yaml:\"names\""];
}
// AuthorityEntry defines the nameservice module AuthorityEntries
message AuthorityEntry{
string name = 1;
message AuthorityEntry {
string name = 1;
NameAuthority entry = 2;
}
// NameAuthority
message NameAuthority {
// Owner public key.
string owner_public_key = 1 [
(gogoproto.moretags) = "json:\"ownerPublicKey\" yaml:\"ownerPublicKey\""
];
string owner_public_key = 1 [(gogoproto.moretags) = "json:\"ownerPublicKey\" yaml:\"ownerPublicKey\""];
// Owner address.
string owner_address = 2 [
(gogoproto.moretags) = "json:\"ownerAddress\" yaml:\"ownerAddress\""
];
string owner_address = 2 [(gogoproto.moretags) = "json:\"ownerAddress\" yaml:\"ownerAddress\""];
// height at which name/authority was created.
uint64 height = 3;
string status = 4;
string auction_id = 5 [
(gogoproto.moretags) = "json:\"auctionID\" yaml:\"auctionID\""
];
string bond_id = 6 [
(gogoproto.moretags) = "json:\"bondID\" yaml:\"bondID\""
];
uint64 height = 3;
string status = 4;
string auction_id = 5 [(gogoproto.moretags) = "json:\"auctionID\" yaml:\"auctionID\""];
string bond_id = 6 [(gogoproto.moretags) = "json:\"bondID\" yaml:\"bondID\""];
google.protobuf.Timestamp expiry_time = 7 [
(gogoproto.nullable) = false,
(gogoproto.stdtime) = true,
(gogoproto.stdtime) = true,
(gogoproto.moretags) = "json:\"expiryTime\" yaml:\"expiryTime\""
];
}
// NameEntry
message NameEntry{
string name = 1;
message NameEntry {
string name = 1;
NameRecord entry = 2;
}
// NameRecord
message NameRecord {
NameRecordEntry latest = 1;
NameRecordEntry latest = 1;
repeated NameRecordEntry history = 2;
}
// NameRecordEntry
message NameRecordEntry{
string id = 1;
message NameRecordEntry {
string id = 1;
uint64 height = 2;
}
// Signature
message Signature{
string sig = 1 [
(gogoproto.moretags) = "json:\"sig\" yaml:\"sig\""
];
string pub_key = 2 [
(gogoproto.moretags) = "json:\"pubKey\" yaml:\"pubKey\""
];
message Signature {
string sig = 1 [(gogoproto.moretags) = "json:\"sig\" yaml:\"sig\""];
string pub_key = 2 [(gogoproto.moretags) = "json:\"pubKey\" yaml:\"pubKey\""];
}
// BlockChangeSet
message BlockChangeSet{
int64 height = 1;
repeated string records = 2;
repeated string auctions = 3;
repeated AuctionBidInfo auction_bids = 4 [
(gogoproto.moretags) = "json:\"auctionBids\" yaml:\"auctionBids\""
];
repeated string authorities = 5;
repeated string names = 6;
message BlockChangeSet {
int64 height = 1;
repeated string records = 2;
repeated string auctions = 3;
repeated AuctionBidInfo auction_bids = 4 [(gogoproto.moretags) = "json:\"auctionBids\" yaml:\"auctionBids\""];
repeated string authorities = 5;
repeated string names = 6;
}
// AuctionBidInfo
message AuctionBidInfo {
string auction_id = 1 [
(gogoproto.moretags) = "json:\"auctionID\" yaml:\"auctionID\""
];
string bidder_address = 2 [
(gogoproto.moretags) = "json:\"bidderAddress\" yaml:\"bidderAddress\""
];
string auction_id = 1 [(gogoproto.moretags) = "json:\"auctionID\" yaml:\"auctionID\""];
string bidder_address = 2 [(gogoproto.moretags) = "json:\"bidderAddress\" yaml:\"bidderAddress\""];
}
+53 -67
View File
@@ -16,72 +16,71 @@ service Query {
option (google.api.http).get = "/vulcanize/nameservice/v1beta1/params";
}
// List records
rpc ListRecords(QueryListRecordsRequest) returns (QueryListRecordsResponse){
rpc ListRecords(QueryListRecordsRequest) returns (QueryListRecordsResponse) {
option (google.api.http).get = "/vulcanize/nameservice/v1beta1/records";
}
// Get record by id
rpc GetRecord(QueryRecordByIdRequest) returns (QueryRecordByIdResponse){
rpc GetRecord(QueryRecordByIdRequest) returns (QueryRecordByIdResponse) {
option (google.api.http).get = "/vulcanize/nameservice/v1beta1/records/{id}";
}
// Get records by bond id
rpc GetRecordByBondId(QueryRecordByBondIdRequest) returns (QueryRecordByBondIdResponse){
rpc GetRecordByBondId(QueryRecordByBondIdRequest) returns (QueryRecordByBondIdResponse) {
option (google.api.http).get = "/vulcanize/nameservice/v1beta1/records-by-bond-id/{id}";
}
// Get nameservice module balance
rpc GetNameServiceModuleBalance(GetNameServiceModuleBalanceRequest) returns (GetNameServiceModuleBalanceResponse){
rpc GetNameServiceModuleBalance(GetNameServiceModuleBalanceRequest) returns (GetNameServiceModuleBalanceResponse) {
option (google.api.http).get = "/vulcanize/nameservice/v1beta1/balance";
}
// List name records
rpc ListNameRecords(QueryListNameRecordsRequest) returns (QueryListNameRecordsResponse){
rpc ListNameRecords(QueryListNameRecordsRequest) returns (QueryListNameRecordsResponse) {
option (google.api.http).get = "/vulcanize/nameservice/v1beta1/names";
}
// Whois method retrieve the name authority info
rpc Whois(QueryWhoisRequest) returns (QueryWhoisResponse){
rpc Whois(QueryWhoisRequest) returns (QueryWhoisResponse) {
option (google.api.http).get = "/vulcanize/nameservice/v1beta1/whois/{name}";
}
// LookupCrn
rpc LookupCrn(QueryLookupCrn) returns (QueryLookupCrnResponse){
rpc LookupCrn(QueryLookupCrn) returns (QueryLookupCrnResponse) {
option (google.api.http).get = "/vulcanize/nameservice/v1beta1/lookup";
}
// ResolveCrn
rpc ResolveCrn(QueryResolveCrn) returns (QueryResolveCrnResponse){
rpc ResolveCrn(QueryResolveCrn) returns (QueryResolveCrnResponse) {
option (google.api.http).get = "/vulcanize/nameservice/v1beta1/resolve";
}
// GetRecordExpiryQueue
rpc GetRecordExpiryQueue(QueryGetRecordExpiryQueue) returns (QueryGetRecordExpiryQueueResponse){
rpc GetRecordExpiryQueue(QueryGetRecordExpiryQueue) returns (QueryGetRecordExpiryQueueResponse) {
option (google.api.http).get = "/vulcanize/nameservice/v1beta1/record-expiry";
}
// GetAuthorityExpiryQueue
rpc GetAuthorityExpiryQueue(QueryGetAuthorityExpiryQueue) returns (QueryGetAuthorityExpiryQueueResponse){
rpc GetAuthorityExpiryQueue(QueryGetAuthorityExpiryQueue) returns (QueryGetAuthorityExpiryQueueResponse) {
option (google.api.http).get = "/vulcanize/nameservice/v1beta1/authority-expiry";
}
}
// QueryParamsRequest is request type for nameservice params
message QueryParamsRequest{
}
message QueryParamsRequest {}
// QueryParamsResponse is response type for nameservice params
message QueryParamsResponse{
message QueryParamsResponse {
Params params = 1;
}
// QueryListRecordsRequest is request type for nameservice records list
message QueryListRecordsRequest{
message QueryListRecordsRequest {
message ReferenceInput {
string id = 1;
}
message ValueInput {
string type = 1;
string string = 2;
int64 int = 3;
double float = 4;
bool boolean = 5;
ReferenceInput reference = 6;
repeated ValueInput values = 7;
string type = 1;
string string = 2;
int64 int = 3;
double float = 4;
bool boolean = 5;
ReferenceInput reference = 6;
repeated ValueInput values = 7;
}
message KeyValueInput {
string key = 1;
string key = 1;
ValueInput value = 2;
}
repeated KeyValueInput attributes = 1;
@@ -93,138 +92,125 @@ message QueryListRecordsRequest{
}
// QueryListRecordsResponse is response type for nameservice records list
message QueryListRecordsResponse{
repeated Record records = 1 [
(gogoproto.nullable) = false
];
message QueryListRecordsResponse {
repeated Record records = 1 [(gogoproto.nullable) = false];
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
//QueryRecordByIdRequest is request type for nameservice records by id
message QueryRecordByIdRequest{
string id = 1 ;
// QueryRecordByIdRequest is request type for nameservice records by id
message QueryRecordByIdRequest {
string id = 1;
}
// QueryRecordByIdResponse is response type for nameservice records by id
message QueryRecordByIdResponse{
Record record = 1[
(gogoproto.nullable) = false
];
message QueryRecordByIdResponse {
Record record = 1 [(gogoproto.nullable) = false];
}
// QueryRecordByBondIdRequest is request type for get the records by bond-id
message QueryRecordByBondIdRequest{
message QueryRecordByBondIdRequest {
string id = 1;
// pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 2;
}
// QueryRecordByBondIdResponse is response type for records list by bond-id
message QueryRecordByBondIdResponse{
repeated Record records = 1 [
(gogoproto.nullable) = false
];
message QueryRecordByBondIdResponse {
repeated Record records = 1 [(gogoproto.nullable) = false];
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
// GetNameServiceModuleBalanceRequest is request type for nameservice module accounts balance
message GetNameServiceModuleBalanceRequest{
}
message GetNameServiceModuleBalanceRequest {}
// GetNameServiceModuleBalanceResponse is response type for nameservice module accounts balance
message GetNameServiceModuleBalanceResponse{
message GetNameServiceModuleBalanceResponse {
repeated AccountBalance balances = 1;
}
// AccountBalance is nameservice module account balance
message AccountBalance {
string account_name = 1 [
(gogoproto.moretags) = "json:\"accountName\" yaml:\"accountName\""
];
string account_name = 1 [(gogoproto.moretags) = "json:\"accountName\" yaml:\"accountName\""];
repeated cosmos.base.v1beta1.Coin balance = 3 [
(gogoproto.nullable) = false,
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(gogoproto.moretags) = "json:\"balance\" yaml:\"balance\""
(gogoproto.moretags) = "json:\"balance\" yaml:\"balance\""
];
}
// QueryListNameRecordsRequest is request type for nameservice names records
message QueryListNameRecordsRequest{
message QueryListNameRecordsRequest {
// pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}
// QueryListNameRecordsResponse is response type for nameservice names records
message QueryListNameRecordsResponse{
repeated NameEntry names = 1 [
(gogoproto.nullable) = false
];
message QueryListNameRecordsResponse {
repeated NameEntry names = 1 [(gogoproto.nullable) = false];
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
// QueryWhoisRequest is request type for Get NameAuthority
message QueryWhoisRequest{
message QueryWhoisRequest {
string name = 1;
}
// QueryWhoisResponse is response type for whois request
message QueryWhoisResponse{
NameAuthority name_authority = 1 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"nameAuthority\" yaml:\"nameAuthority\""
];
message QueryWhoisResponse {
NameAuthority name_authority = 1
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"nameAuthority\" yaml:\"nameAuthority\""];
}
// QueryLookupCrn is request type for LookupCrn
message QueryLookupCrn{
message QueryLookupCrn {
string crn = 1;
}
// QueryLookupCrnResponse is response type for QueryLookupCrn
message QueryLookupCrnResponse{
message QueryLookupCrnResponse {
NameRecord name = 1;
}
// QueryResolveCrn is request type for ResolveCrn
message QueryResolveCrn{
message QueryResolveCrn {
string crn = 1;
}
// QueryResolveCrnResponse is response type for QueryResolveCrn
message QueryResolveCrnResponse{
message QueryResolveCrnResponse {
Record record = 1;
}
// QueryGetRecordExpiryQueue
message QueryGetRecordExpiryQueue{
message QueryGetRecordExpiryQueue {
// pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}
// QueryGetRecordExpiryQueueResponse
message QueryGetRecordExpiryQueueResponse{
message QueryGetRecordExpiryQueueResponse {
repeated ExpiryQueueRecord records = 1;
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
// ExpiryQueueRecord
message ExpiryQueueRecord{
string id = 1;
message ExpiryQueueRecord {
string id = 1;
repeated string value = 2;
}
// QueryGetAuthorityExpiryQueue
message QueryGetAuthorityExpiryQueue{
message QueryGetAuthorityExpiryQueue {
// pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}
// QueryGetAuthorityExpiryQueueResponse
message QueryGetAuthorityExpiryQueueResponse{
message QueryGetAuthorityExpiryQueueResponse {
repeated ExpiryQueueRecord authorities = 1;
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
+56 -87
View File
@@ -9,160 +9,129 @@ option go_package = "github.com/cerc-io/laconicd/x/nameservice/types";
// Msg
service Msg {
// SetRecord will records a new record with given payload and bond id
rpc SetRecord(MsgSetRecord) returns(MsgSetRecordResponse){}
rpc SetRecord(MsgSetRecord) returns (MsgSetRecordResponse) {}
// Renew Record will renew the expire record
rpc RenewRecord(MsgRenewRecord) returns (MsgRenewRecordResponse){}
rpc RenewRecord(MsgRenewRecord) returns (MsgRenewRecordResponse) {}
// AssociateBond
rpc AssociateBond(MsgAssociateBond) returns (MsgAssociateBondResponse){}
rpc AssociateBond(MsgAssociateBond) returns (MsgAssociateBondResponse) {}
// DissociateBond
rpc DissociateBond(MsgDissociateBond) returns (MsgDissociateBondResponse){}
rpc DissociateBond(MsgDissociateBond) returns (MsgDissociateBondResponse) {}
// DissociateRecords
rpc DissociateRecords(MsgDissociateRecords) returns (MsgDissociateRecordsResponse){}
rpc DissociateRecords(MsgDissociateRecords) returns (MsgDissociateRecordsResponse) {}
// ReAssociateRecords
rpc ReAssociateRecords(MsgReAssociateRecords) returns (MsgReAssociateRecordsResponse){}
rpc ReAssociateRecords(MsgReAssociateRecords) returns (MsgReAssociateRecordsResponse) {}
// SetName will store the name with given crn and name
rpc SetName(MsgSetName) returns (MsgSetNameResponse){}
rpc SetName(MsgSetName) returns (MsgSetNameResponse) {}
// Reserve name
rpc ReserveName(MsgReserveAuthority) returns (MsgReserveAuthorityResponse){}
rpc ReserveName(MsgReserveAuthority) returns (MsgReserveAuthorityResponse) {}
// Delete Name method will remove authority name
rpc DeleteName(MsgDeleteNameAuthority) returns (MsgDeleteNameAuthorityResponse){}
rpc DeleteName(MsgDeleteNameAuthority) returns (MsgDeleteNameAuthorityResponse) {}
// SetAuthorityBond
rpc SetAuthorityBond(MsgSetAuthorityBond) returns (MsgSetAuthorityBondResponse){}
rpc SetAuthorityBond(MsgSetAuthorityBond) returns (MsgSetAuthorityBondResponse) {}
}
// MsgSetRecord
message MsgSetRecord{
string bond_id = 1 [
(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""
];
string signer = 2;
Payload payload = 3 [
(gogoproto.nullable) = false
];
message MsgSetRecord {
string bond_id = 1 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
string signer = 2;
Payload payload = 3 [(gogoproto.nullable) = false];
}
// MsgSetRecordResponse
message MsgSetRecordResponse{
message MsgSetRecordResponse {
string id = 1;
}
// Payload
message Payload {
Record record = 1;
repeated Signature signatures = 2 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"signatures\" yaml:\"signatures\""
];
Record record = 1;
repeated Signature signatures = 2
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"signatures\" yaml:\"signatures\""];
}
// MsgSetName
message MsgSetName{
string crn = 1;
string cid = 2;
message MsgSetName {
string crn = 1;
string cid = 2;
string signer = 3;
}
// MsgSetNameResponse
message MsgSetNameResponse{
}
message MsgSetNameResponse {}
// MsgReserveName
message MsgReserveAuthority{
string name = 1;
message MsgReserveAuthority {
string name = 1;
string signer = 2;
// if creating a sub-authority.
string owner = 3;
}
// MsgReserveNameResponse
message MsgReserveAuthorityResponse{
}
message MsgReserveAuthorityResponse {}
// MsgSetAuthorityBond is SDK message for SetAuthorityBond
message MsgSetAuthorityBond{
string name = 1;
string bond_id = 2 [
(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""
];
string signer = 3;
message MsgSetAuthorityBond {
string name = 1;
string bond_id = 2 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
string signer = 3;
}
// MsgSetAuthorityBondResponse
message MsgSetAuthorityBondResponse{
}
message MsgSetAuthorityBondResponse {}
// MsgDeleteNameAuthority is SDK message for DeleteNameAuthority
message MsgDeleteNameAuthority{
string crn = 1;
message MsgDeleteNameAuthority {
string crn = 1;
string signer = 2;
}
// MsgDeleteNameAuthorityResponse
message MsgDeleteNameAuthorityResponse{
}
message MsgDeleteNameAuthorityResponse {}
//MsgRenewRecord is SDK message for Renew a record
message MsgRenewRecord{
string record_id = 1 [
(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""
];
string signer = 2;
// MsgRenewRecord is SDK message for Renew a record
message MsgRenewRecord {
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
string signer = 2;
}
// MsgRenewRecordResponse
message MsgRenewRecordResponse{
}
message MsgRenewRecordResponse {}
// MsgAssociateBond
message MsgAssociateBond{
string record_id = 1 [
(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""
];
string bond_id = 2 [
(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""
];
string signer = 3;
message MsgAssociateBond {
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
string bond_id = 2 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
string signer = 3;
}
// MsgAssociateBondResponse
message MsgAssociateBondResponse{
}
message MsgAssociateBondResponse {}
// MsgDissociateBond is SDK message for Msg/DissociateBond
message MsgDissociateBond{
string record_id = 1 [
(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""
];
string signer = 2;
message MsgDissociateBond {
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
string signer = 2;
}
// MsgDissociateBondResponse is response type for MsgDissociateBond
message MsgDissociateBondResponse{
}
message MsgDissociateBondResponse {}
// MsgDissociateRecords is SDK message for Msg/DissociateRecords
message MsgDissociateRecords{
string bond_id = 1 [
(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""
];
string signer = 2;
message MsgDissociateRecords {
string bond_id = 1 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
string signer = 2;
}
// MsgDissociateRecordsResponse is response type for MsgDissociateRecords
message MsgDissociateRecordsResponse{
}
message MsgDissociateRecordsResponse {}
// MsgReAssociateRecords is SDK message for Msg/ReAssociateRecords
message MsgReAssociateRecords{
string new_bond_id = 1 [
(gogoproto.moretags) = "json:\"newBondId\" yaml:\"newBondId\""
];
string old_bond_id = 2 [
(gogoproto.moretags) = "json:\"oldBondId\" yaml:\"oldBondId\""
];
string signer = 3;
message MsgReAssociateRecords {
string new_bond_id = 1 [(gogoproto.moretags) = "json:\"newBondId\" yaml:\"newBondId\""];
string old_bond_id = 2 [(gogoproto.moretags) = "json:\"oldBondId\" yaml:\"oldBondId\""];
string signer = 3;
}
// MsgReAssociateRecordsResponse is response type for MsgReAssociateRecords
message MsgReAssociateRecordsResponse{
}
message MsgReAssociateRecordsResponse {}