2021-04-18 16:39:15 +00:00
|
|
|
swagger: '2.0'
|
|
|
|
info:
|
2021-04-19 07:10:57 +00:00
|
|
|
title: Ethermint Chain - Legacy REST and gRPC Gateway docs
|
2022-07-18 20:21:04 +00:00
|
|
|
description: A REST interface for state queries, legacy transactions
|
2021-04-18 16:39:15 +00:00
|
|
|
version: 1.0.0
|
|
|
|
paths:
|
2022-07-18 20:21:04 +00:00
|
|
|
/ethermint/evm/v1/account/{address}:
|
2021-04-18 16:39:15 +00:00
|
|
|
get:
|
2021-04-19 07:10:57 +00:00
|
|
|
summary: Account queries an Ethereum account.
|
|
|
|
operationId: Account
|
2021-04-18 16:39:15 +00:00
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: A successful response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2021-04-19 07:10:57 +00:00
|
|
|
balance:
|
|
|
|
type: string
|
|
|
|
description: balance is the balance of the EVM denomination.
|
|
|
|
code_hash:
|
|
|
|
type: string
|
2021-06-25 09:18:37 +00:00
|
|
|
description: code hash is the hex-formatted code bytes from the EOA.
|
2021-04-19 07:10:57 +00:00
|
|
|
nonce:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
description: nonce is the account's sequence number.
|
|
|
|
description: >-
|
|
|
|
QueryAccountResponse is the response type for the Query/Account
|
|
|
|
RPC method.
|
2021-04-18 16:39:15 +00:00
|
|
|
default:
|
2021-08-17 15:30:35 +00:00
|
|
|
description: An unexpected error response.
|
2021-04-18 16:39:15 +00:00
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
error:
|
|
|
|
type: string
|
|
|
|
code:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
details:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type_url:
|
|
|
|
type: string
|
2021-07-09 09:04:46 +00:00
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of
|
|
|
|
the serialized
|
|
|
|
|
|
|
|
protocol buffer message. This string must contain at
|
|
|
|
least
|
|
|
|
|
|
|
|
one "/" character. The last segment of the URL's path
|
|
|
|
must represent
|
|
|
|
|
|
|
|
the fully qualified name of the type (as in
|
|
|
|
|
|
|
|
`path/google.protobuf.Duration`). The name should be in
|
|
|
|
a canonical form
|
|
|
|
|
|
|
|
(e.g., leading "." is not accepted).
|
|
|
|
|
|
|
|
|
|
|
|
In practice, teams usually precompile into the binary
|
|
|
|
all types that they
|
|
|
|
|
|
|
|
expect it to use in the context of Any. However, for
|
|
|
|
URLs which use the
|
|
|
|
|
|
|
|
scheme `http`, `https`, or no scheme, one can optionally
|
|
|
|
set up a type
|
|
|
|
|
|
|
|
server that maps type URLs to message definitions as
|
|
|
|
follows:
|
|
|
|
|
|
|
|
|
|
|
|
* If no scheme is provided, `https` is assumed.
|
|
|
|
|
|
|
|
* An HTTP GET on the URL must yield a
|
|
|
|
[google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based
|
|
|
|
on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
|
|
|
|
|
|
|
Note: this functionality is not currently available in
|
|
|
|
the official
|
|
|
|
|
|
|
|
protobuf release, and it is not used for type URLs
|
|
|
|
beginning with
|
|
|
|
|
|
|
|
type.googleapis.com.
|
|
|
|
|
|
|
|
|
|
|
|
Schemes other than `http`, `https` (or the empty scheme)
|
|
|
|
might be
|
|
|
|
|
|
|
|
used with implementation specific semantics.
|
2021-04-18 16:39:15 +00:00
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
2021-07-09 09:04:46 +00:00
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above
|
|
|
|
specified type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer
|
|
|
|
message along with a
|
|
|
|
|
|
|
|
URL that describes the type of the serialized message.
|
|
|
|
|
|
|
|
|
|
|
|
Protobuf library provides support to pack/unpack Any values
|
|
|
|
in the form
|
|
|
|
|
|
|
|
of utility functions or additional generated methods of the
|
|
|
|
Any type.
|
|
|
|
|
|
|
|
|
|
|
|
Example 1: Pack and unpack a message in C++.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 2: Pack and unpack a message in Java.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 3: Pack and unpack a message in Python.
|
|
|
|
|
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
|
|
|
|
|
|
|
Example 4: Pack and unpack a message in Go
|
|
|
|
|
|
|
|
foo := &pb.Foo{...}
|
2022-11-17 11:35:54 +00:00
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
2022-11-17 11:35:54 +00:00
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
The pack methods provided by protobuf library will by
|
|
|
|
default use
|
|
|
|
|
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the
|
|
|
|
unpack
|
|
|
|
|
|
|
|
methods only use the fully qualified type name after the
|
|
|
|
last '/'
|
|
|
|
|
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield
|
|
|
|
type
|
|
|
|
|
|
|
|
name "y.z".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSON
|
|
|
|
|
|
|
|
====
|
|
|
|
|
|
|
|
The JSON representation of an `Any` value uses the regular
|
|
|
|
|
|
|
|
representation of the deserialized, embedded message, with
|
|
|
|
an
|
|
|
|
|
|
|
|
additional field `@type` which contains the type URL.
|
|
|
|
Example:
|
|
|
|
|
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
|
|
|
|
|
|
|
If the embedded message type is well-known and has a custom
|
|
|
|
JSON
|
|
|
|
|
|
|
|
representation, that representation will be embedded adding
|
|
|
|
a field
|
|
|
|
|
|
|
|
`value` which holds the custom JSON in addition to the
|
|
|
|
`@type`
|
|
|
|
|
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|
2021-04-18 16:39:15 +00:00
|
|
|
parameters:
|
2021-04-19 07:10:57 +00:00
|
|
|
- name: address
|
|
|
|
description: address is the ethereum hex address to query the account for.
|
|
|
|
in: path
|
|
|
|
required: true
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
|
|
|
tags:
|
|
|
|
- Query
|
2022-07-18 20:21:04 +00:00
|
|
|
/ethermint/evm/v1/balances/{address}:
|
2021-04-18 16:39:15 +00:00
|
|
|
get:
|
2021-04-19 07:10:57 +00:00
|
|
|
summary: |-
|
|
|
|
Balance queries the balance of a the EVM denomination for a single
|
|
|
|
EthAccount.
|
|
|
|
operationId: Balance
|
2021-04-18 16:39:15 +00:00
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: A successful response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2021-04-19 07:10:57 +00:00
|
|
|
balance:
|
|
|
|
type: string
|
|
|
|
description: balance is the balance of the EVM denomination.
|
|
|
|
description: >-
|
|
|
|
QueryBalanceResponse is the response type for the Query/Balance
|
|
|
|
RPC method.
|
2021-04-18 16:39:15 +00:00
|
|
|
default:
|
2021-08-17 15:30:35 +00:00
|
|
|
description: An unexpected error response.
|
2021-04-18 16:39:15 +00:00
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
error:
|
|
|
|
type: string
|
|
|
|
code:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
details:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type_url:
|
|
|
|
type: string
|
2021-07-09 09:04:46 +00:00
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of
|
|
|
|
the serialized
|
|
|
|
|
|
|
|
protocol buffer message. This string must contain at
|
|
|
|
least
|
|
|
|
|
|
|
|
one "/" character. The last segment of the URL's path
|
|
|
|
must represent
|
|
|
|
|
|
|
|
the fully qualified name of the type (as in
|
|
|
|
|
|
|
|
`path/google.protobuf.Duration`). The name should be in
|
|
|
|
a canonical form
|
|
|
|
|
|
|
|
(e.g., leading "." is not accepted).
|
|
|
|
|
|
|
|
|
|
|
|
In practice, teams usually precompile into the binary
|
|
|
|
all types that they
|
|
|
|
|
|
|
|
expect it to use in the context of Any. However, for
|
|
|
|
URLs which use the
|
|
|
|
|
|
|
|
scheme `http`, `https`, or no scheme, one can optionally
|
|
|
|
set up a type
|
|
|
|
|
|
|
|
server that maps type URLs to message definitions as
|
|
|
|
follows:
|
|
|
|
|
|
|
|
|
|
|
|
* If no scheme is provided, `https` is assumed.
|
|
|
|
|
|
|
|
* An HTTP GET on the URL must yield a
|
|
|
|
[google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based
|
|
|
|
on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
|
|
|
|
|
|
|
Note: this functionality is not currently available in
|
|
|
|
the official
|
|
|
|
|
|
|
|
protobuf release, and it is not used for type URLs
|
|
|
|
beginning with
|
|
|
|
|
|
|
|
type.googleapis.com.
|
|
|
|
|
|
|
|
|
|
|
|
Schemes other than `http`, `https` (or the empty scheme)
|
|
|
|
might be
|
|
|
|
|
|
|
|
used with implementation specific semantics.
|
2021-04-18 16:39:15 +00:00
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
2021-07-09 09:04:46 +00:00
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above
|
|
|
|
specified type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer
|
|
|
|
message along with a
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
URL that describes the type of the serialized message.
|
|
|
|
|
|
|
|
|
|
|
|
Protobuf library provides support to pack/unpack Any values
|
|
|
|
in the form
|
|
|
|
|
|
|
|
of utility functions or additional generated methods of the
|
|
|
|
Any type.
|
|
|
|
|
|
|
|
|
|
|
|
Example 1: Pack and unpack a message in C++.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 2: Pack and unpack a message in Java.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 3: Pack and unpack a message in Python.
|
|
|
|
|
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
|
|
|
|
|
|
|
Example 4: Pack and unpack a message in Go
|
|
|
|
|
|
|
|
foo := &pb.Foo{...}
|
2022-11-17 11:35:54 +00:00
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
2022-11-17 11:35:54 +00:00
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
The pack methods provided by protobuf library will by
|
|
|
|
default use
|
|
|
|
|
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the
|
|
|
|
unpack
|
|
|
|
|
|
|
|
methods only use the fully qualified type name after the
|
|
|
|
last '/'
|
|
|
|
|
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield
|
|
|
|
type
|
|
|
|
|
|
|
|
name "y.z".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSON
|
|
|
|
|
|
|
|
====
|
|
|
|
|
|
|
|
The JSON representation of an `Any` value uses the regular
|
|
|
|
|
|
|
|
representation of the deserialized, embedded message, with
|
|
|
|
an
|
|
|
|
|
|
|
|
additional field `@type` which contains the type URL.
|
|
|
|
Example:
|
|
|
|
|
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
|
|
|
|
|
|
|
If the embedded message type is well-known and has a custom
|
|
|
|
JSON
|
|
|
|
|
|
|
|
representation, that representation will be embedded adding
|
|
|
|
a field
|
|
|
|
|
|
|
|
`value` which holds the custom JSON in addition to the
|
|
|
|
`@type`
|
|
|
|
|
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|
|
|
|
parameters:
|
|
|
|
- name: address
|
|
|
|
description: address is the ethereum hex address to query the balance for.
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
tags:
|
|
|
|
- Query
|
2022-04-30 16:11:28 +00:00
|
|
|
/ethermint/evm/v1/base_fee:
|
|
|
|
get:
|
|
|
|
summary: >-
|
|
|
|
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.
|
|
|
|
operationId: BaseFee
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: A successful response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
base_fee:
|
|
|
|
type: string
|
|
|
|
description: BaseFeeResponse returns the EIP1559 base fee.
|
|
|
|
default:
|
|
|
|
description: An unexpected error response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
error:
|
|
|
|
type: string
|
|
|
|
code:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
details:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type_url:
|
|
|
|
type: string
|
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of
|
|
|
|
the serialized
|
|
|
|
|
|
|
|
protocol buffer message. This string must contain at
|
|
|
|
least
|
|
|
|
|
|
|
|
one "/" character. The last segment of the URL's path
|
|
|
|
must represent
|
|
|
|
|
|
|
|
the fully qualified name of the type (as in
|
|
|
|
|
|
|
|
`path/google.protobuf.Duration`). The name should be in
|
|
|
|
a canonical form
|
|
|
|
|
|
|
|
(e.g., leading "." is not accepted).
|
|
|
|
|
|
|
|
|
|
|
|
In practice, teams usually precompile into the binary
|
|
|
|
all types that they
|
|
|
|
|
|
|
|
expect it to use in the context of Any. However, for
|
|
|
|
URLs which use the
|
|
|
|
|
|
|
|
scheme `http`, `https`, or no scheme, one can optionally
|
|
|
|
set up a type
|
|
|
|
|
|
|
|
server that maps type URLs to message definitions as
|
|
|
|
follows:
|
|
|
|
|
|
|
|
|
|
|
|
* If no scheme is provided, `https` is assumed.
|
|
|
|
|
|
|
|
* An HTTP GET on the URL must yield a
|
|
|
|
[google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based
|
|
|
|
on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
|
|
|
|
|
|
|
Note: this functionality is not currently available in
|
|
|
|
the official
|
|
|
|
|
|
|
|
protobuf release, and it is not used for type URLs
|
|
|
|
beginning with
|
|
|
|
|
|
|
|
type.googleapis.com.
|
|
|
|
|
|
|
|
|
|
|
|
Schemes other than `http`, `https` (or the empty scheme)
|
|
|
|
might be
|
|
|
|
|
|
|
|
used with implementation specific semantics.
|
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above
|
|
|
|
specified type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer
|
|
|
|
message along with a
|
|
|
|
|
|
|
|
URL that describes the type of the serialized message.
|
|
|
|
|
|
|
|
|
|
|
|
Protobuf library provides support to pack/unpack Any values
|
|
|
|
in the form
|
|
|
|
|
|
|
|
of utility functions or additional generated methods of the
|
|
|
|
Any type.
|
|
|
|
|
|
|
|
|
|
|
|
Example 1: Pack and unpack a message in C++.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 2: Pack and unpack a message in Java.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 3: Pack and unpack a message in Python.
|
|
|
|
|
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
|
|
|
|
|
|
|
Example 4: Pack and unpack a message in Go
|
|
|
|
|
|
|
|
foo := &pb.Foo{...}
|
2022-11-17 11:35:54 +00:00
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
2022-04-30 16:11:28 +00:00
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
2022-11-17 11:35:54 +00:00
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
2022-04-30 16:11:28 +00:00
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
The pack methods provided by protobuf library will by
|
|
|
|
default use
|
|
|
|
|
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the
|
|
|
|
unpack
|
|
|
|
|
|
|
|
methods only use the fully qualified type name after the
|
|
|
|
last '/'
|
|
|
|
|
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield
|
|
|
|
type
|
|
|
|
|
|
|
|
name "y.z".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSON
|
|
|
|
|
|
|
|
====
|
|
|
|
|
|
|
|
The JSON representation of an `Any` value uses the regular
|
|
|
|
|
|
|
|
representation of the deserialized, embedded message, with
|
|
|
|
an
|
|
|
|
|
|
|
|
additional field `@type` which contains the type URL.
|
|
|
|
Example:
|
|
|
|
|
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
|
|
|
|
|
|
|
If the embedded message type is well-known and has a custom
|
|
|
|
JSON
|
|
|
|
|
|
|
|
representation, that representation will be embedded adding
|
|
|
|
a field
|
|
|
|
|
|
|
|
`value` which holds the custom JSON in addition to the
|
|
|
|
`@type`
|
|
|
|
|
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|
|
|
|
tags:
|
|
|
|
- Query
|
2022-07-18 20:21:04 +00:00
|
|
|
/ethermint/evm/v1/codes/{address}:
|
2021-07-09 09:04:46 +00:00
|
|
|
get:
|
2021-09-15 09:45:03 +00:00
|
|
|
summary: Code queries the balance of all coins for a single account.
|
|
|
|
operationId: Code
|
2021-07-09 09:04:46 +00:00
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: A successful response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2021-09-15 09:45:03 +00:00
|
|
|
code:
|
2021-07-09 09:04:46 +00:00
|
|
|
type: string
|
|
|
|
format: byte
|
2021-09-15 09:45:03 +00:00
|
|
|
description: code represents the code bytes from an ethereum address.
|
|
|
|
description: |-
|
|
|
|
QueryCodeResponse is the response type for the Query/Code RPC
|
2021-07-09 09:04:46 +00:00
|
|
|
method.
|
|
|
|
default:
|
2021-08-17 15:30:35 +00:00
|
|
|
description: An unexpected error response.
|
2021-04-18 16:39:15 +00:00
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
error:
|
|
|
|
type: string
|
|
|
|
code:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
details:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type_url:
|
|
|
|
type: string
|
2021-07-09 09:04:46 +00:00
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of
|
|
|
|
the serialized
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
protocol buffer message. This string must contain at
|
|
|
|
least
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
one "/" character. The last segment of the URL's path
|
|
|
|
must represent
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
the fully qualified name of the type (as in
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
`path/google.protobuf.Duration`). The name should be in
|
|
|
|
a canonical form
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
(e.g., leading "." is not accepted).
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
In practice, teams usually precompile into the binary
|
|
|
|
all types that they
|
|
|
|
|
|
|
|
expect it to use in the context of Any. However, for
|
|
|
|
URLs which use the
|
|
|
|
|
|
|
|
scheme `http`, `https`, or no scheme, one can optionally
|
|
|
|
set up a type
|
|
|
|
|
|
|
|
server that maps type URLs to message definitions as
|
|
|
|
follows:
|
|
|
|
|
|
|
|
|
|
|
|
* If no scheme is provided, `https` is assumed.
|
|
|
|
|
|
|
|
* An HTTP GET on the URL must yield a
|
|
|
|
[google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based
|
|
|
|
on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
|
|
|
|
|
|
|
Note: this functionality is not currently available in
|
|
|
|
the official
|
|
|
|
|
|
|
|
protobuf release, and it is not used for type URLs
|
|
|
|
beginning with
|
|
|
|
|
|
|
|
type.googleapis.com.
|
|
|
|
|
|
|
|
|
|
|
|
Schemes other than `http`, `https` (or the empty scheme)
|
|
|
|
might be
|
|
|
|
|
|
|
|
used with implementation specific semantics.
|
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above
|
|
|
|
specified type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer
|
|
|
|
message along with a
|
|
|
|
|
|
|
|
URL that describes the type of the serialized message.
|
|
|
|
|
|
|
|
|
|
|
|
Protobuf library provides support to pack/unpack Any values
|
|
|
|
in the form
|
|
|
|
|
|
|
|
of utility functions or additional generated methods of the
|
|
|
|
Any type.
|
|
|
|
|
|
|
|
|
|
|
|
Example 1: Pack and unpack a message in C++.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 2: Pack and unpack a message in Java.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 3: Pack and unpack a message in Python.
|
|
|
|
|
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
|
|
|
|
|
|
|
Example 4: Pack and unpack a message in Go
|
|
|
|
|
|
|
|
foo := &pb.Foo{...}
|
2022-11-17 11:35:54 +00:00
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
2022-11-17 11:35:54 +00:00
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
The pack methods provided by protobuf library will by
|
|
|
|
default use
|
|
|
|
|
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the
|
|
|
|
unpack
|
|
|
|
|
|
|
|
methods only use the fully qualified type name after the
|
|
|
|
last '/'
|
|
|
|
|
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield
|
|
|
|
type
|
|
|
|
|
|
|
|
name "y.z".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSON
|
|
|
|
|
|
|
|
====
|
|
|
|
|
|
|
|
The JSON representation of an `Any` value uses the regular
|
|
|
|
|
|
|
|
representation of the deserialized, embedded message, with
|
|
|
|
an
|
|
|
|
|
|
|
|
additional field `@type` which contains the type URL.
|
|
|
|
Example:
|
|
|
|
|
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
|
|
|
|
|
|
|
If the embedded message type is well-known and has a custom
|
|
|
|
JSON
|
|
|
|
|
|
|
|
representation, that representation will be embedded adding
|
|
|
|
a field
|
|
|
|
|
|
|
|
`value` which holds the custom JSON in addition to the
|
|
|
|
`@type`
|
|
|
|
|
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|
2021-08-17 15:30:35 +00:00
|
|
|
parameters:
|
2021-09-15 09:45:03 +00:00
|
|
|
- name: address
|
|
|
|
description: address is the ethereum hex address to query the code for.
|
|
|
|
in: path
|
|
|
|
required: true
|
2021-08-17 15:30:35 +00:00
|
|
|
type: string
|
2021-07-09 09:04:46 +00:00
|
|
|
tags:
|
|
|
|
- Query
|
2022-07-18 20:21:04 +00:00
|
|
|
/ethermint/evm/v1/cosmos_account/{address}:
|
2021-07-09 09:04:46 +00:00
|
|
|
get:
|
2021-09-15 09:45:03 +00:00
|
|
|
summary: CosmosAccount queries an Ethereum account's Cosmos Address.
|
|
|
|
operationId: CosmosAccount
|
2021-07-09 09:04:46 +00:00
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: A successful response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2021-09-15 09:45:03 +00:00
|
|
|
cosmos_address:
|
|
|
|
type: string
|
|
|
|
description: cosmos_address is the cosmos address of the account.
|
|
|
|
sequence:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
description: sequence is the account's sequence number.
|
|
|
|
account_number:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: account_number is the account numbert
|
2021-07-09 09:04:46 +00:00
|
|
|
description: >-
|
2021-09-15 09:45:03 +00:00
|
|
|
QueryCosmosAccountResponse is the response type for the
|
|
|
|
Query/CosmosAccount
|
|
|
|
|
|
|
|
RPC method.
|
2021-07-09 09:04:46 +00:00
|
|
|
default:
|
2021-08-17 15:30:35 +00:00
|
|
|
description: An unexpected error response.
|
2021-07-09 09:04:46 +00:00
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
error:
|
|
|
|
type: string
|
|
|
|
code:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
details:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type_url:
|
|
|
|
type: string
|
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of
|
|
|
|
the serialized
|
|
|
|
|
|
|
|
protocol buffer message. This string must contain at
|
|
|
|
least
|
|
|
|
|
|
|
|
one "/" character. The last segment of the URL's path
|
|
|
|
must represent
|
|
|
|
|
|
|
|
the fully qualified name of the type (as in
|
|
|
|
|
|
|
|
`path/google.protobuf.Duration`). The name should be in
|
|
|
|
a canonical form
|
|
|
|
|
|
|
|
(e.g., leading "." is not accepted).
|
|
|
|
|
|
|
|
|
|
|
|
In practice, teams usually precompile into the binary
|
|
|
|
all types that they
|
|
|
|
|
|
|
|
expect it to use in the context of Any. However, for
|
|
|
|
URLs which use the
|
|
|
|
|
|
|
|
scheme `http`, `https`, or no scheme, one can optionally
|
|
|
|
set up a type
|
|
|
|
|
|
|
|
server that maps type URLs to message definitions as
|
|
|
|
follows:
|
|
|
|
|
|
|
|
|
|
|
|
* If no scheme is provided, `https` is assumed.
|
|
|
|
|
|
|
|
* An HTTP GET on the URL must yield a
|
|
|
|
[google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based
|
|
|
|
on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
|
|
|
|
|
|
|
Note: this functionality is not currently available in
|
|
|
|
the official
|
|
|
|
|
|
|
|
protobuf release, and it is not used for type URLs
|
|
|
|
beginning with
|
|
|
|
|
|
|
|
type.googleapis.com.
|
|
|
|
|
|
|
|
|
|
|
|
Schemes other than `http`, `https` (or the empty scheme)
|
|
|
|
might be
|
|
|
|
|
|
|
|
used with implementation specific semantics.
|
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above
|
|
|
|
specified type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer
|
|
|
|
message along with a
|
|
|
|
|
|
|
|
URL that describes the type of the serialized message.
|
|
|
|
|
|
|
|
|
|
|
|
Protobuf library provides support to pack/unpack Any values
|
|
|
|
in the form
|
|
|
|
|
|
|
|
of utility functions or additional generated methods of the
|
|
|
|
Any type.
|
|
|
|
|
|
|
|
|
|
|
|
Example 1: Pack and unpack a message in C++.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 2: Pack and unpack a message in Java.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 3: Pack and unpack a message in Python.
|
|
|
|
|
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
|
|
|
|
|
|
|
Example 4: Pack and unpack a message in Go
|
|
|
|
|
|
|
|
foo := &pb.Foo{...}
|
2022-11-17 11:35:54 +00:00
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
2022-11-17 11:35:54 +00:00
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
The pack methods provided by protobuf library will by
|
|
|
|
default use
|
|
|
|
|
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the
|
|
|
|
unpack
|
|
|
|
|
|
|
|
methods only use the fully qualified type name after the
|
|
|
|
last '/'
|
|
|
|
|
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield
|
|
|
|
type
|
|
|
|
|
|
|
|
name "y.z".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSON
|
|
|
|
|
|
|
|
====
|
|
|
|
|
|
|
|
The JSON representation of an `Any` value uses the regular
|
|
|
|
|
|
|
|
representation of the deserialized, embedded message, with
|
|
|
|
an
|
|
|
|
|
|
|
|
additional field `@type` which contains the type URL.
|
|
|
|
Example:
|
|
|
|
|
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
|
|
|
|
|
|
|
If the embedded message type is well-known and has a custom
|
|
|
|
JSON
|
|
|
|
|
|
|
|
representation, that representation will be embedded adding
|
|
|
|
a field
|
|
|
|
|
|
|
|
`value` which holds the custom JSON in addition to the
|
|
|
|
`@type`
|
|
|
|
|
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|
|
|
|
parameters:
|
2021-09-15 09:45:03 +00:00
|
|
|
- name: address
|
|
|
|
description: address is the ethereum hex address to query the account for.
|
2021-07-09 09:04:46 +00:00
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
tags:
|
|
|
|
- Query
|
2021-09-15 09:45:03 +00:00
|
|
|
/ethermint/evm/v1/estimate_gas:
|
2021-07-09 09:04:46 +00:00
|
|
|
get:
|
2021-09-15 09:45:03 +00:00
|
|
|
summary: EstimateGas implements the `eth_estimateGas` rpc api
|
|
|
|
operationId: EstimateGas
|
2021-07-09 09:04:46 +00:00
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: A successful response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2021-09-15 09:45:03 +00:00
|
|
|
gas:
|
2021-07-09 09:04:46 +00:00
|
|
|
type: string
|
2021-09-15 09:45:03 +00:00
|
|
|
format: uint64
|
|
|
|
title: the estimated gas
|
|
|
|
title: EstimateGasResponse defines EstimateGas response
|
2021-07-09 09:04:46 +00:00
|
|
|
default:
|
2021-08-17 15:30:35 +00:00
|
|
|
description: An unexpected error response.
|
2021-07-09 09:04:46 +00:00
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
error:
|
|
|
|
type: string
|
|
|
|
code:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
details:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type_url:
|
|
|
|
type: string
|
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of
|
|
|
|
the serialized
|
|
|
|
|
|
|
|
protocol buffer message. This string must contain at
|
|
|
|
least
|
|
|
|
|
|
|
|
one "/" character. The last segment of the URL's path
|
|
|
|
must represent
|
|
|
|
|
|
|
|
the fully qualified name of the type (as in
|
|
|
|
|
|
|
|
`path/google.protobuf.Duration`). The name should be in
|
|
|
|
a canonical form
|
|
|
|
|
|
|
|
(e.g., leading "." is not accepted).
|
|
|
|
|
|
|
|
|
|
|
|
In practice, teams usually precompile into the binary
|
|
|
|
all types that they
|
|
|
|
|
|
|
|
expect it to use in the context of Any. However, for
|
|
|
|
URLs which use the
|
|
|
|
|
|
|
|
scheme `http`, `https`, or no scheme, one can optionally
|
|
|
|
set up a type
|
|
|
|
|
|
|
|
server that maps type URLs to message definitions as
|
|
|
|
follows:
|
|
|
|
|
|
|
|
|
|
|
|
* If no scheme is provided, `https` is assumed.
|
|
|
|
|
|
|
|
* An HTTP GET on the URL must yield a
|
|
|
|
[google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based
|
|
|
|
on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
|
|
|
|
|
|
|
Note: this functionality is not currently available in
|
|
|
|
the official
|
|
|
|
|
|
|
|
protobuf release, and it is not used for type URLs
|
|
|
|
beginning with
|
|
|
|
|
|
|
|
type.googleapis.com.
|
|
|
|
|
|
|
|
|
|
|
|
Schemes other than `http`, `https` (or the empty scheme)
|
|
|
|
might be
|
|
|
|
|
|
|
|
used with implementation specific semantics.
|
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above
|
|
|
|
specified type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer
|
|
|
|
message along with a
|
|
|
|
|
|
|
|
URL that describes the type of the serialized message.
|
|
|
|
|
|
|
|
|
|
|
|
Protobuf library provides support to pack/unpack Any values
|
|
|
|
in the form
|
|
|
|
|
|
|
|
of utility functions or additional generated methods of the
|
|
|
|
Any type.
|
|
|
|
|
|
|
|
|
|
|
|
Example 1: Pack and unpack a message in C++.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 2: Pack and unpack a message in Java.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 3: Pack and unpack a message in Python.
|
|
|
|
|
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
|
|
|
|
|
|
|
Example 4: Pack and unpack a message in Go
|
|
|
|
|
|
|
|
foo := &pb.Foo{...}
|
2022-11-17 11:35:54 +00:00
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
2022-11-17 11:35:54 +00:00
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
The pack methods provided by protobuf library will by
|
|
|
|
default use
|
|
|
|
|
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the
|
|
|
|
unpack
|
|
|
|
|
|
|
|
methods only use the fully qualified type name after the
|
|
|
|
last '/'
|
|
|
|
|
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield
|
|
|
|
type
|
|
|
|
|
|
|
|
name "y.z".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSON
|
|
|
|
|
|
|
|
====
|
|
|
|
|
|
|
|
The JSON representation of an `Any` value uses the regular
|
|
|
|
|
|
|
|
representation of the deserialized, embedded message, with
|
|
|
|
an
|
|
|
|
|
|
|
|
additional field `@type` which contains the type URL.
|
|
|
|
Example:
|
|
|
|
|
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
|
|
|
|
|
|
|
If the embedded message type is well-known and has a custom
|
|
|
|
JSON
|
|
|
|
|
|
|
|
representation, that representation will be embedded adding
|
|
|
|
a field
|
|
|
|
|
|
|
|
`value` which holds the custom JSON in addition to the
|
|
|
|
`@type`
|
|
|
|
|
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|
|
|
|
parameters:
|
2021-09-15 09:45:03 +00:00
|
|
|
- name: args
|
|
|
|
description: same json format as the json rpc api.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
- name: gas_cap
|
|
|
|
description: the default gas cap to be used.
|
|
|
|
in: query
|
|
|
|
required: false
|
2021-07-09 09:04:46 +00:00
|
|
|
type: string
|
2021-09-15 09:45:03 +00:00
|
|
|
format: uint64
|
2022-11-17 11:35:54 +00:00
|
|
|
- name: proposer_address
|
|
|
|
description: the proposer of the requested block.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: byte
|
2022-11-18 18:19:09 +00:00
|
|
|
- name: chain_id
|
|
|
|
description: the eip155 chain id parsed from the requested block header.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: int64
|
2021-07-09 09:04:46 +00:00
|
|
|
tags:
|
|
|
|
- Query
|
2021-09-15 09:45:03 +00:00
|
|
|
/ethermint/evm/v1/eth_call:
|
2021-07-09 09:04:46 +00:00
|
|
|
get:
|
2021-09-15 09:45:03 +00:00
|
|
|
summary: EthCall implements the `eth_call` rpc api
|
|
|
|
operationId: EthCall
|
2021-07-09 09:04:46 +00:00
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: A successful response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2021-09-15 09:45:03 +00:00
|
|
|
hash:
|
2021-07-09 09:04:46 +00:00
|
|
|
type: string
|
2021-09-15 09:45:03 +00:00
|
|
|
title: >-
|
|
|
|
ethereum transaction hash in hex format. This hash differs
|
|
|
|
from the
|
2021-08-17 15:30:35 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
Tendermint sha256 hash of the transaction bytes. See
|
|
|
|
|
|
|
|
https://github.com/tendermint/tendermint/issues/6539 for
|
|
|
|
reference
|
|
|
|
logs:
|
2021-07-09 09:04:46 +00:00
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
2021-09-15 09:45:03 +00:00
|
|
|
address:
|
|
|
|
type: string
|
|
|
|
title: address of the contract that generated the event
|
|
|
|
topics:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
description: list of topics provided by the contract.
|
|
|
|
data:
|
|
|
|
type: string
|
|
|
|
format: byte
|
2022-07-18 20:21:04 +00:00
|
|
|
title: supplied by the contract, usually ABI-encoded
|
2021-09-15 09:45:03 +00:00
|
|
|
block_number:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: block in which the transaction was included
|
|
|
|
tx_hash:
|
|
|
|
type: string
|
|
|
|
title: hash of the transaction
|
|
|
|
tx_index:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: index of the transaction in the block
|
|
|
|
block_hash:
|
|
|
|
type: string
|
|
|
|
title: hash of the block in which the transaction was included
|
|
|
|
index:
|
2021-07-09 09:04:46 +00:00
|
|
|
type: string
|
2021-09-15 09:45:03 +00:00
|
|
|
format: uint64
|
|
|
|
title: index of the log in the block
|
|
|
|
removed:
|
|
|
|
type: boolean
|
2021-07-09 09:04:46 +00:00
|
|
|
description: >-
|
2021-09-15 09:45:03 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
through a filter query.
|
|
|
|
description: >-
|
|
|
|
Log represents an protobuf compatible Ethereum Log that
|
|
|
|
defines a contract
|
|
|
|
|
|
|
|
log event. These events are generated by the LOG opcode and
|
|
|
|
stored/indexed by
|
|
|
|
|
|
|
|
the node.
|
|
|
|
description: >-
|
|
|
|
logs contains the transaction hash and the proto-compatible
|
|
|
|
ethereum
|
|
|
|
|
|
|
|
logs.
|
|
|
|
ret:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
title: >-
|
|
|
|
returned data from evm function (result or data supplied with
|
|
|
|
revert
|
|
|
|
|
|
|
|
opcode)
|
|
|
|
vm_error:
|
|
|
|
type: string
|
|
|
|
title: vm error is the error returned by vm execution
|
|
|
|
gas_used:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: gas consumed by the transaction
|
|
|
|
description: MsgEthereumTxResponse defines the Msg/EthereumTx response type.
|
|
|
|
default:
|
|
|
|
description: An unexpected error response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
error:
|
|
|
|
type: string
|
|
|
|
code:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
details:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type_url:
|
|
|
|
type: string
|
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of
|
|
|
|
the serialized
|
2021-07-09 09:04:46 +00:00
|
|
|
|
|
|
|
protocol buffer message. This string must contain at
|
|
|
|
least
|
|
|
|
|
|
|
|
one "/" character. The last segment of the URL's path
|
|
|
|
must represent
|
|
|
|
|
|
|
|
the fully qualified name of the type (as in
|
|
|
|
|
|
|
|
`path/google.protobuf.Duration`). The name should be in
|
|
|
|
a canonical form
|
|
|
|
|
|
|
|
(e.g., leading "." is not accepted).
|
|
|
|
|
|
|
|
|
|
|
|
In practice, teams usually precompile into the binary
|
|
|
|
all types that they
|
|
|
|
|
|
|
|
expect it to use in the context of Any. However, for
|
|
|
|
URLs which use the
|
|
|
|
|
|
|
|
scheme `http`, `https`, or no scheme, one can optionally
|
|
|
|
set up a type
|
|
|
|
|
|
|
|
server that maps type URLs to message definitions as
|
|
|
|
follows:
|
|
|
|
|
|
|
|
|
|
|
|
* If no scheme is provided, `https` is assumed.
|
|
|
|
|
|
|
|
* An HTTP GET on the URL must yield a
|
|
|
|
[google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based
|
|
|
|
on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
|
|
|
|
|
|
|
Note: this functionality is not currently available in
|
|
|
|
the official
|
|
|
|
|
|
|
|
protobuf release, and it is not used for type URLs
|
|
|
|
beginning with
|
|
|
|
|
|
|
|
type.googleapis.com.
|
|
|
|
|
|
|
|
|
|
|
|
Schemes other than `http`, `https` (or the empty scheme)
|
|
|
|
might be
|
|
|
|
|
|
|
|
used with implementation specific semantics.
|
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above
|
|
|
|
specified type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer
|
|
|
|
message along with a
|
|
|
|
|
|
|
|
URL that describes the type of the serialized message.
|
|
|
|
|
|
|
|
|
|
|
|
Protobuf library provides support to pack/unpack Any values
|
|
|
|
in the form
|
|
|
|
|
|
|
|
of utility functions or additional generated methods of the
|
|
|
|
Any type.
|
|
|
|
|
|
|
|
|
|
|
|
Example 1: Pack and unpack a message in C++.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 2: Pack and unpack a message in Java.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 3: Pack and unpack a message in Python.
|
|
|
|
|
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
|
|
|
|
|
|
|
Example 4: Pack and unpack a message in Go
|
|
|
|
|
|
|
|
foo := &pb.Foo{...}
|
2022-11-17 11:35:54 +00:00
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
2022-11-17 11:35:54 +00:00
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
The pack methods provided by protobuf library will by
|
|
|
|
default use
|
|
|
|
|
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the
|
|
|
|
unpack
|
|
|
|
|
|
|
|
methods only use the fully qualified type name after the
|
|
|
|
last '/'
|
|
|
|
|
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield
|
|
|
|
type
|
|
|
|
|
|
|
|
name "y.z".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSON
|
|
|
|
|
|
|
|
====
|
|
|
|
|
|
|
|
The JSON representation of an `Any` value uses the regular
|
|
|
|
|
|
|
|
representation of the deserialized, embedded message, with
|
|
|
|
an
|
|
|
|
|
|
|
|
additional field `@type` which contains the type URL.
|
|
|
|
Example:
|
|
|
|
|
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
|
|
|
|
|
|
|
If the embedded message type is well-known and has a custom
|
|
|
|
JSON
|
|
|
|
|
|
|
|
representation, that representation will be embedded adding
|
|
|
|
a field
|
|
|
|
|
|
|
|
`value` which holds the custom JSON in addition to the
|
|
|
|
`@type`
|
|
|
|
|
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|
|
|
|
parameters:
|
2021-09-15 09:45:03 +00:00
|
|
|
- name: args
|
|
|
|
description: same json format as the json rpc api.
|
|
|
|
in: query
|
|
|
|
required: false
|
2021-07-09 09:04:46 +00:00
|
|
|
type: string
|
2021-09-15 09:45:03 +00:00
|
|
|
format: byte
|
|
|
|
- name: gas_cap
|
|
|
|
description: the default gas cap to be used.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: uint64
|
2022-11-17 11:35:54 +00:00
|
|
|
- name: proposer_address
|
|
|
|
description: the proposer of the requested block.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: byte
|
2022-11-18 18:19:09 +00:00
|
|
|
- name: chain_id
|
|
|
|
description: the eip155 chain id parsed from the requested block header.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: int64
|
2021-07-09 09:04:46 +00:00
|
|
|
tags:
|
|
|
|
- Query
|
2021-09-15 09:45:03 +00:00
|
|
|
/ethermint/evm/v1/params:
|
2021-07-19 15:19:23 +00:00
|
|
|
get:
|
2021-09-15 09:45:03 +00:00
|
|
|
summary: Params queries the parameters of x/evm module.
|
|
|
|
operationId: EvmParams
|
2021-07-19 15:19:23 +00:00
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: A successful response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2021-09-15 09:45:03 +00:00
|
|
|
params:
|
|
|
|
description: params define the evm module parameters.
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
evm_denom:
|
|
|
|
type: string
|
|
|
|
description: >-
|
|
|
|
evm denom represents the token denomination used to run
|
|
|
|
the EVM state
|
|
|
|
|
|
|
|
transitions.
|
|
|
|
enable_create:
|
|
|
|
type: boolean
|
|
|
|
title: >-
|
|
|
|
enable create toggles state transitions that use the
|
|
|
|
vm.Create function
|
|
|
|
enable_call:
|
|
|
|
type: boolean
|
|
|
|
title: >-
|
|
|
|
enable call toggles state transitions that use the vm.Call
|
|
|
|
function
|
|
|
|
extra_eips:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
format: int64
|
|
|
|
title: extra eips defines the additional EIPs for the vm.Config
|
|
|
|
chain_config:
|
|
|
|
title: >-
|
|
|
|
chain config defines the EVM chain configuration
|
|
|
|
parameters
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
homestead_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Homestead switch block (nil no fork, 0 = already
|
|
|
|
homestead)
|
|
|
|
dao_fork_block:
|
|
|
|
type: string
|
|
|
|
title: TheDAO hard-fork switch block (nil no fork)
|
|
|
|
dao_fork_support:
|
|
|
|
type: boolean
|
|
|
|
title: >-
|
|
|
|
Whether the nodes supports or opposes the DAO
|
|
|
|
hard-fork
|
|
|
|
eip150_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
EIP150 implements the Gas price changes
|
|
|
|
|
|
|
|
(https://github.com/ethereum/EIPs/issues/150) EIP150
|
|
|
|
HF block (nil no fork)
|
|
|
|
eip150_hash:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
EIP150 HF hash (needed for header only clients as only
|
|
|
|
gas pricing changed)
|
|
|
|
eip155_block:
|
|
|
|
type: string
|
|
|
|
title: EIP155Block HF block
|
|
|
|
eip158_block:
|
|
|
|
type: string
|
|
|
|
title: EIP158 HF block
|
|
|
|
byzantium_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Byzantium switch block (nil no fork, 0 = already on
|
|
|
|
byzantium)
|
|
|
|
constantinople_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Constantinople switch block (nil no fork, 0 = already
|
|
|
|
activated)
|
|
|
|
petersburg_block:
|
|
|
|
type: string
|
|
|
|
title: Petersburg switch block (nil same as Constantinople)
|
|
|
|
istanbul_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Istanbul switch block (nil no fork, 0 = already on
|
|
|
|
istanbul)
|
|
|
|
muir_glacier_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Eip-2384 (bomb delay) switch block (nil no fork, 0 =
|
|
|
|
already activated)
|
|
|
|
berlin_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Berlin switch block (nil = no fork, 0 = already on
|
|
|
|
berlin)
|
|
|
|
london_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
London switch block (nil = no fork, 0 = already on
|
|
|
|
london)
|
2022-04-04 13:00:26 +00:00
|
|
|
arrow_glacier_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Eip-4345 (bomb delay) switch block (nil = no fork, 0 =
|
|
|
|
already activated)
|
2022-11-17 11:35:54 +00:00
|
|
|
gray_glacier_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
EIP-5133 (bomb delay) switch block (nil = no fork, 0 =
|
|
|
|
already activated)
|
|
|
|
merge_netsplit_block:
|
2022-04-04 13:00:26 +00:00
|
|
|
type: string
|
|
|
|
title: >-
|
2022-11-17 11:35:54 +00:00
|
|
|
Virtual fork after The Merge to use as a network
|
|
|
|
splitter
|
2021-09-15 09:45:03 +00:00
|
|
|
description: >-
|
|
|
|
ChainConfig defines the Ethereum ChainConfig parameters
|
|
|
|
using *sdk.Int values
|
|
|
|
|
|
|
|
instead of *big.Int.
|
2022-06-22 10:51:14 +00:00
|
|
|
allow_unprotected_txs:
|
|
|
|
type: boolean
|
|
|
|
description: >-
|
|
|
|
Allow unprotected transactions defines if replay-protected
|
2022-11-17 11:35:54 +00:00
|
|
|
(i.e non EIP155
|
2022-06-22 10:51:14 +00:00
|
|
|
|
|
|
|
signed) transactions can be executed on the state machine.
|
2021-09-15 09:45:03 +00:00
|
|
|
title: Params defines the EVM module parameters
|
|
|
|
description: >-
|
|
|
|
QueryParamsResponse defines the response type for querying x/evm
|
|
|
|
parameters.
|
2021-07-19 15:19:23 +00:00
|
|
|
default:
|
2021-08-17 15:30:35 +00:00
|
|
|
description: An unexpected error response.
|
2021-07-19 15:19:23 +00:00
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
error:
|
|
|
|
type: string
|
|
|
|
code:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
details:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type_url:
|
|
|
|
type: string
|
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of
|
|
|
|
the serialized
|
|
|
|
|
|
|
|
protocol buffer message. This string must contain at
|
|
|
|
least
|
|
|
|
|
|
|
|
one "/" character. The last segment of the URL's path
|
|
|
|
must represent
|
|
|
|
|
|
|
|
the fully qualified name of the type (as in
|
|
|
|
|
|
|
|
`path/google.protobuf.Duration`). The name should be in
|
|
|
|
a canonical form
|
|
|
|
|
|
|
|
(e.g., leading "." is not accepted).
|
|
|
|
|
|
|
|
|
|
|
|
In practice, teams usually precompile into the binary
|
|
|
|
all types that they
|
|
|
|
|
|
|
|
expect it to use in the context of Any. However, for
|
|
|
|
URLs which use the
|
|
|
|
|
|
|
|
scheme `http`, `https`, or no scheme, one can optionally
|
|
|
|
set up a type
|
|
|
|
|
|
|
|
server that maps type URLs to message definitions as
|
|
|
|
follows:
|
|
|
|
|
|
|
|
|
|
|
|
* If no scheme is provided, `https` is assumed.
|
|
|
|
|
|
|
|
* An HTTP GET on the URL must yield a
|
|
|
|
[google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based
|
|
|
|
on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
|
|
|
|
|
|
|
Note: this functionality is not currently available in
|
|
|
|
the official
|
|
|
|
|
|
|
|
protobuf release, and it is not used for type URLs
|
|
|
|
beginning with
|
|
|
|
|
|
|
|
type.googleapis.com.
|
|
|
|
|
|
|
|
|
|
|
|
Schemes other than `http`, `https` (or the empty scheme)
|
|
|
|
might be
|
|
|
|
|
|
|
|
used with implementation specific semantics.
|
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above
|
|
|
|
specified type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer
|
|
|
|
message along with a
|
|
|
|
|
|
|
|
URL that describes the type of the serialized message.
|
|
|
|
|
|
|
|
|
|
|
|
Protobuf library provides support to pack/unpack Any values
|
|
|
|
in the form
|
|
|
|
|
|
|
|
of utility functions or additional generated methods of the
|
|
|
|
Any type.
|
|
|
|
|
|
|
|
|
|
|
|
Example 1: Pack and unpack a message in C++.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 2: Pack and unpack a message in Java.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 3: Pack and unpack a message in Python.
|
|
|
|
|
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
|
|
|
|
|
|
|
Example 4: Pack and unpack a message in Go
|
|
|
|
|
|
|
|
foo := &pb.Foo{...}
|
2022-11-17 11:35:54 +00:00
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
2021-07-19 15:19:23 +00:00
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
2022-11-17 11:35:54 +00:00
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
2021-07-19 15:19:23 +00:00
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
The pack methods provided by protobuf library will by
|
|
|
|
default use
|
|
|
|
|
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the
|
|
|
|
unpack
|
|
|
|
|
|
|
|
methods only use the fully qualified type name after the
|
|
|
|
last '/'
|
|
|
|
|
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield
|
|
|
|
type
|
|
|
|
|
|
|
|
name "y.z".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSON
|
|
|
|
|
|
|
|
====
|
|
|
|
|
|
|
|
The JSON representation of an `Any` value uses the regular
|
|
|
|
|
|
|
|
representation of the deserialized, embedded message, with
|
|
|
|
an
|
|
|
|
|
|
|
|
additional field `@type` which contains the type URL.
|
|
|
|
Example:
|
|
|
|
|
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
|
|
|
|
|
|
|
If the embedded message type is well-known and has a custom
|
|
|
|
JSON
|
|
|
|
|
|
|
|
representation, that representation will be embedded adding
|
|
|
|
a field
|
|
|
|
|
|
|
|
`value` which holds the custom JSON in addition to the
|
|
|
|
`@type`
|
|
|
|
|
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|
|
|
|
tags:
|
|
|
|
- Query
|
2022-07-18 20:21:04 +00:00
|
|
|
/ethermint/evm/v1/storage/{address}/{key}:
|
2021-07-09 09:04:46 +00:00
|
|
|
get:
|
2021-09-15 09:45:03 +00:00
|
|
|
summary: Storage queries the balance of all coins for a single account.
|
|
|
|
operationId: Storage
|
2021-07-09 09:04:46 +00:00
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: A successful response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2021-09-15 09:45:03 +00:00
|
|
|
value:
|
2021-07-09 09:04:46 +00:00
|
|
|
type: string
|
2021-09-15 09:45:03 +00:00
|
|
|
description: >-
|
|
|
|
key defines the storage state value hash associated with the
|
|
|
|
given key.
|
|
|
|
description: >-
|
|
|
|
QueryStorageResponse is the response type for the Query/Storage
|
|
|
|
RPC
|
2021-07-09 09:04:46 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
method.
|
|
|
|
default:
|
|
|
|
description: An unexpected error response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
error:
|
|
|
|
type: string
|
|
|
|
code:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
details:
|
2021-07-09 09:04:46 +00:00
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
2021-09-15 09:45:03 +00:00
|
|
|
type_url:
|
2021-07-09 09:04:46 +00:00
|
|
|
type: string
|
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of
|
|
|
|
the serialized
|
|
|
|
|
|
|
|
protocol buffer message. This string must contain at
|
|
|
|
least
|
|
|
|
|
|
|
|
one "/" character. The last segment of the URL's path
|
|
|
|
must represent
|
|
|
|
|
|
|
|
the fully qualified name of the type (as in
|
|
|
|
|
|
|
|
`path/google.protobuf.Duration`). The name should be in
|
|
|
|
a canonical form
|
|
|
|
|
|
|
|
(e.g., leading "." is not accepted).
|
|
|
|
|
|
|
|
|
|
|
|
In practice, teams usually precompile into the binary
|
|
|
|
all types that they
|
|
|
|
|
|
|
|
expect it to use in the context of Any. However, for
|
|
|
|
URLs which use the
|
|
|
|
|
|
|
|
scheme `http`, `https`, or no scheme, one can optionally
|
|
|
|
set up a type
|
|
|
|
|
|
|
|
server that maps type URLs to message definitions as
|
|
|
|
follows:
|
|
|
|
|
|
|
|
|
|
|
|
* If no scheme is provided, `https` is assumed.
|
|
|
|
|
|
|
|
* An HTTP GET on the URL must yield a
|
|
|
|
[google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based
|
|
|
|
on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
|
|
|
|
|
|
|
Note: this functionality is not currently available in
|
|
|
|
the official
|
|
|
|
|
|
|
|
protobuf release, and it is not used for type URLs
|
|
|
|
beginning with
|
|
|
|
|
|
|
|
type.googleapis.com.
|
|
|
|
|
|
|
|
|
|
|
|
Schemes other than `http`, `https` (or the empty scheme)
|
|
|
|
might be
|
|
|
|
|
|
|
|
used with implementation specific semantics.
|
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above
|
|
|
|
specified type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer
|
|
|
|
message along with a
|
|
|
|
|
|
|
|
URL that describes the type of the serialized message.
|
|
|
|
|
|
|
|
|
|
|
|
Protobuf library provides support to pack/unpack Any values
|
|
|
|
in the form
|
|
|
|
|
|
|
|
of utility functions or additional generated methods of the
|
|
|
|
Any type.
|
|
|
|
|
|
|
|
|
|
|
|
Example 1: Pack and unpack a message in C++.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 2: Pack and unpack a message in Java.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 3: Pack and unpack a message in Python.
|
|
|
|
|
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
|
|
|
|
|
|
|
Example 4: Pack and unpack a message in Go
|
|
|
|
|
|
|
|
foo := &pb.Foo{...}
|
2022-11-17 11:35:54 +00:00
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
2022-11-17 11:35:54 +00:00
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
The pack methods provided by protobuf library will by
|
|
|
|
default use
|
|
|
|
|
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the
|
|
|
|
unpack
|
|
|
|
|
|
|
|
methods only use the fully qualified type name after the
|
|
|
|
last '/'
|
|
|
|
|
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield
|
|
|
|
type
|
|
|
|
|
|
|
|
name "y.z".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSON
|
|
|
|
|
|
|
|
====
|
|
|
|
|
|
|
|
The JSON representation of an `Any` value uses the regular
|
|
|
|
|
|
|
|
representation of the deserialized, embedded message, with
|
|
|
|
an
|
|
|
|
|
|
|
|
additional field `@type` which contains the type URL.
|
|
|
|
Example:
|
|
|
|
|
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
|
|
|
|
|
|
|
If the embedded message type is well-known and has a custom
|
|
|
|
JSON
|
|
|
|
|
|
|
|
representation, that representation will be embedded adding
|
|
|
|
a field
|
|
|
|
|
|
|
|
`value` which holds the custom JSON in addition to the
|
|
|
|
`@type`
|
|
|
|
|
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|
|
|
|
parameters:
|
2021-09-15 09:45:03 +00:00
|
|
|
- name: address
|
|
|
|
description: >-
|
|
|
|
/ address is the ethereum hex address to query the storage state
|
|
|
|
for.
|
|
|
|
in: path
|
|
|
|
required: true
|
2021-07-09 09:04:46 +00:00
|
|
|
type: string
|
2021-09-15 09:45:03 +00:00
|
|
|
- name: key
|
|
|
|
description: key defines the key of the storage state
|
|
|
|
in: path
|
|
|
|
required: true
|
2021-07-19 15:19:23 +00:00
|
|
|
type: string
|
2021-07-09 09:04:46 +00:00
|
|
|
tags:
|
|
|
|
- Query
|
2021-11-17 13:32:05 +00:00
|
|
|
/ethermint/evm/v1/trace_block:
|
|
|
|
get:
|
|
|
|
summary: >-
|
|
|
|
TraceBlock implements the `debug_traceBlockByNumber` and
|
|
|
|
`debug_traceBlockByHash` rpc api
|
|
|
|
operationId: TraceBlock
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: A successful response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
title: QueryTraceBlockResponse defines TraceBlock response
|
|
|
|
default:
|
|
|
|
description: An unexpected error response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
error:
|
|
|
|
type: string
|
|
|
|
code:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
details:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type_url:
|
|
|
|
type: string
|
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of
|
|
|
|
the serialized
|
|
|
|
|
|
|
|
protocol buffer message. This string must contain at
|
|
|
|
least
|
|
|
|
|
|
|
|
one "/" character. The last segment of the URL's path
|
|
|
|
must represent
|
|
|
|
|
|
|
|
the fully qualified name of the type (as in
|
|
|
|
|
|
|
|
`path/google.protobuf.Duration`). The name should be in
|
|
|
|
a canonical form
|
|
|
|
|
|
|
|
(e.g., leading "." is not accepted).
|
|
|
|
|
|
|
|
|
|
|
|
In practice, teams usually precompile into the binary
|
|
|
|
all types that they
|
|
|
|
|
|
|
|
expect it to use in the context of Any. However, for
|
|
|
|
URLs which use the
|
|
|
|
|
|
|
|
scheme `http`, `https`, or no scheme, one can optionally
|
|
|
|
set up a type
|
|
|
|
|
|
|
|
server that maps type URLs to message definitions as
|
|
|
|
follows:
|
|
|
|
|
|
|
|
|
|
|
|
* If no scheme is provided, `https` is assumed.
|
|
|
|
|
|
|
|
* An HTTP GET on the URL must yield a
|
|
|
|
[google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based
|
|
|
|
on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
|
|
|
|
|
|
|
Note: this functionality is not currently available in
|
|
|
|
the official
|
|
|
|
|
|
|
|
protobuf release, and it is not used for type URLs
|
|
|
|
beginning with
|
|
|
|
|
|
|
|
type.googleapis.com.
|
|
|
|
|
|
|
|
|
|
|
|
Schemes other than `http`, `https` (or the empty scheme)
|
|
|
|
might be
|
|
|
|
|
|
|
|
used with implementation specific semantics.
|
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above
|
|
|
|
specified type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer
|
|
|
|
message along with a
|
|
|
|
|
|
|
|
URL that describes the type of the serialized message.
|
|
|
|
|
|
|
|
|
|
|
|
Protobuf library provides support to pack/unpack Any values
|
|
|
|
in the form
|
|
|
|
|
|
|
|
of utility functions or additional generated methods of the
|
|
|
|
Any type.
|
|
|
|
|
|
|
|
|
|
|
|
Example 1: Pack and unpack a message in C++.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 2: Pack and unpack a message in Java.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 3: Pack and unpack a message in Python.
|
|
|
|
|
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
|
|
|
|
|
|
|
Example 4: Pack and unpack a message in Go
|
|
|
|
|
|
|
|
foo := &pb.Foo{...}
|
2022-11-17 11:35:54 +00:00
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
2021-11-17 13:32:05 +00:00
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
2022-11-17 11:35:54 +00:00
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
2021-11-17 13:32:05 +00:00
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
The pack methods provided by protobuf library will by
|
|
|
|
default use
|
|
|
|
|
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the
|
|
|
|
unpack
|
|
|
|
|
|
|
|
methods only use the fully qualified type name after the
|
|
|
|
last '/'
|
|
|
|
|
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield
|
|
|
|
type
|
|
|
|
|
|
|
|
name "y.z".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSON
|
|
|
|
|
|
|
|
====
|
|
|
|
|
|
|
|
The JSON representation of an `Any` value uses the regular
|
|
|
|
|
|
|
|
representation of the deserialized, embedded message, with
|
|
|
|
an
|
|
|
|
|
|
|
|
additional field `@type` which contains the type URL.
|
|
|
|
Example:
|
|
|
|
|
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
|
|
|
|
|
|
|
If the embedded message type is well-known and has a custom
|
|
|
|
JSON
|
|
|
|
|
|
|
|
representation, that representation will be embedded adding
|
|
|
|
a field
|
|
|
|
|
|
|
|
`value` which holds the custom JSON in addition to the
|
|
|
|
`@type`
|
|
|
|
|
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|
|
|
|
parameters:
|
|
|
|
- name: trace_config.tracer
|
|
|
|
description: custom javascript tracer.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.timeout
|
|
|
|
description: >-
|
|
|
|
overrides the default timeout of 5 seconds for JavaScript-based
|
|
|
|
tracing
|
|
|
|
|
|
|
|
calls.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.reexec
|
|
|
|
description: number of blocks the tracer is willing to go back.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
- name: trace_config.disable_stack
|
|
|
|
description: disable stack capture.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: boolean
|
|
|
|
- name: trace_config.disable_storage
|
|
|
|
description: disable storage capture.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: boolean
|
|
|
|
- name: trace_config.debug
|
|
|
|
description: print output during capture end.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: boolean
|
|
|
|
- name: trace_config.limit
|
2022-07-18 20:21:04 +00:00
|
|
|
description: maximum length of output, but zero means unlimited.
|
2021-11-17 13:32:05 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
- name: trace_config.overrides.homestead_block
|
2022-07-18 20:21:04 +00:00
|
|
|
description: Homestead switch block (nil no fork, 0 = already homestead).
|
2021-11-17 13:32:05 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.overrides.dao_fork_block
|
|
|
|
description: TheDAO hard-fork switch block (nil no fork).
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.overrides.dao_fork_support
|
|
|
|
description: Whether the nodes supports or opposes the DAO hard-fork.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: boolean
|
|
|
|
- name: trace_config.overrides.eip150_block
|
|
|
|
description: >-
|
|
|
|
EIP150 implements the Gas price changes
|
|
|
|
|
|
|
|
(https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil
|
|
|
|
no fork).
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.overrides.eip150_hash
|
|
|
|
description: >-
|
|
|
|
EIP150 HF hash (needed for header only clients as only gas pricing
|
|
|
|
changed).
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.overrides.eip155_block
|
|
|
|
description: EIP155Block HF block.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.overrides.eip158_block
|
|
|
|
description: EIP158 HF block.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.overrides.byzantium_block
|
2022-07-18 20:21:04 +00:00
|
|
|
description: Byzantium switch block (nil no fork, 0 = already on byzantium).
|
2021-11-17 13:32:05 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.overrides.constantinople_block
|
2022-07-18 20:21:04 +00:00
|
|
|
description: Constantinople switch block (nil no fork, 0 = already activated).
|
2021-11-17 13:32:05 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.overrides.petersburg_block
|
|
|
|
description: Petersburg switch block (nil same as Constantinople).
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.overrides.istanbul_block
|
2022-07-18 20:21:04 +00:00
|
|
|
description: Istanbul switch block (nil no fork, 0 = already on istanbul).
|
2021-11-17 13:32:05 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.overrides.muir_glacier_block
|
|
|
|
description: >-
|
|
|
|
Eip-2384 (bomb delay) switch block (nil no fork, 0 = already
|
|
|
|
activated).
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.overrides.berlin_block
|
2022-07-18 20:21:04 +00:00
|
|
|
description: Berlin switch block (nil = no fork, 0 = already on berlin).
|
2021-11-17 13:32:05 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.overrides.london_block
|
2022-07-18 20:21:04 +00:00
|
|
|
description: London switch block (nil = no fork, 0 = already on london).
|
2021-11-17 13:32:05 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2022-04-04 13:00:26 +00:00
|
|
|
- name: trace_config.overrides.arrow_glacier_block
|
|
|
|
description: >-
|
|
|
|
Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already
|
|
|
|
activated).
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2022-11-17 11:35:54 +00:00
|
|
|
- name: trace_config.overrides.gray_glacier_block
|
2022-04-04 13:00:26 +00:00
|
|
|
description: >-
|
2022-11-17 11:35:54 +00:00
|
|
|
EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already
|
|
|
|
activated).
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.overrides.merge_netsplit_block
|
|
|
|
description: Virtual fork after The Merge to use as a network splitter.
|
2022-04-04 13:00:26 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-11-17 13:32:05 +00:00
|
|
|
- name: trace_config.enable_memory
|
|
|
|
description: enable memory capture.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: boolean
|
|
|
|
- name: trace_config.enable_return_data
|
|
|
|
description: enable return data capture.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: boolean
|
2022-11-20 12:33:58 +00:00
|
|
|
- name: trace_config.tracer_json_config
|
|
|
|
description: tracer config.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-11-17 13:32:05 +00:00
|
|
|
- name: block_number
|
|
|
|
description: block number.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: int64
|
|
|
|
- name: block_hash
|
|
|
|
description: block hex hash.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: block_time
|
|
|
|
description: block time.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: date-time
|
2022-11-17 11:35:54 +00:00
|
|
|
- name: proposer_address
|
|
|
|
description: the proposer of the requested block.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: byte
|
2022-11-18 18:19:09 +00:00
|
|
|
- name: chain_id
|
|
|
|
description: the eip155 chain id parsed from the requested block header.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: int64
|
2021-11-17 13:32:05 +00:00
|
|
|
tags:
|
|
|
|
- Query
|
2021-09-15 09:45:03 +00:00
|
|
|
/ethermint/evm/v1/trace_tx:
|
2021-07-09 09:04:46 +00:00
|
|
|
get:
|
2021-09-15 09:45:03 +00:00
|
|
|
summary: TraceTx implements the `debug_traceTransaction` rpc api
|
|
|
|
operationId: TraceTx
|
2021-07-09 09:04:46 +00:00
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: A successful response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2021-09-15 09:45:03 +00:00
|
|
|
data:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
title: response serialized in bytes
|
|
|
|
title: QueryTraceTxResponse defines TraceTx response
|
2021-04-18 16:39:15 +00:00
|
|
|
default:
|
2021-08-17 15:30:35 +00:00
|
|
|
description: An unexpected error response.
|
2021-04-18 16:39:15 +00:00
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
error:
|
|
|
|
type: string
|
|
|
|
code:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
details:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type_url:
|
|
|
|
type: string
|
2021-07-09 09:04:46 +00:00
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of
|
|
|
|
the serialized
|
|
|
|
|
|
|
|
protocol buffer message. This string must contain at
|
|
|
|
least
|
|
|
|
|
|
|
|
one "/" character. The last segment of the URL's path
|
|
|
|
must represent
|
|
|
|
|
|
|
|
the fully qualified name of the type (as in
|
|
|
|
|
|
|
|
`path/google.protobuf.Duration`). The name should be in
|
|
|
|
a canonical form
|
|
|
|
|
|
|
|
(e.g., leading "." is not accepted).
|
|
|
|
|
|
|
|
|
|
|
|
In practice, teams usually precompile into the binary
|
|
|
|
all types that they
|
|
|
|
|
|
|
|
expect it to use in the context of Any. However, for
|
|
|
|
URLs which use the
|
|
|
|
|
|
|
|
scheme `http`, `https`, or no scheme, one can optionally
|
|
|
|
set up a type
|
|
|
|
|
|
|
|
server that maps type URLs to message definitions as
|
|
|
|
follows:
|
|
|
|
|
|
|
|
|
|
|
|
* If no scheme is provided, `https` is assumed.
|
|
|
|
|
|
|
|
* An HTTP GET on the URL must yield a
|
|
|
|
[google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based
|
|
|
|
on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
|
|
|
|
|
|
|
Note: this functionality is not currently available in
|
|
|
|
the official
|
|
|
|
|
|
|
|
protobuf release, and it is not used for type URLs
|
|
|
|
beginning with
|
|
|
|
|
|
|
|
type.googleapis.com.
|
|
|
|
|
|
|
|
|
|
|
|
Schemes other than `http`, `https` (or the empty scheme)
|
|
|
|
might be
|
|
|
|
|
|
|
|
used with implementation specific semantics.
|
2021-04-18 16:39:15 +00:00
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
2021-07-09 09:04:46 +00:00
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above
|
|
|
|
specified type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer
|
|
|
|
message along with a
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
URL that describes the type of the serialized message.
|
2021-06-25 09:18:37 +00:00
|
|
|
|
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
Protobuf library provides support to pack/unpack Any values
|
|
|
|
in the form
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
of utility functions or additional generated methods of the
|
|
|
|
Any type.
|
2021-06-25 09:18:37 +00:00
|
|
|
|
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
Example 1: Pack and unpack a message in C++.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 2: Pack and unpack a message in Java.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 3: Pack and unpack a message in Python.
|
|
|
|
|
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
|
|
|
|
|
|
|
Example 4: Pack and unpack a message in Go
|
|
|
|
|
|
|
|
foo := &pb.Foo{...}
|
2022-11-17 11:35:54 +00:00
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
2022-11-17 11:35:54 +00:00
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
The pack methods provided by protobuf library will by
|
|
|
|
default use
|
|
|
|
|
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the
|
|
|
|
unpack
|
|
|
|
|
|
|
|
methods only use the fully qualified type name after the
|
|
|
|
last '/'
|
|
|
|
|
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield
|
|
|
|
type
|
|
|
|
|
|
|
|
name "y.z".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSON
|
|
|
|
|
|
|
|
====
|
|
|
|
|
|
|
|
The JSON representation of an `Any` value uses the regular
|
|
|
|
|
|
|
|
representation of the deserialized, embedded message, with
|
|
|
|
an
|
|
|
|
|
|
|
|
additional field `@type` which contains the type URL.
|
|
|
|
Example:
|
|
|
|
|
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
|
|
|
|
|
|
|
If the embedded message type is well-known and has a custom
|
|
|
|
JSON
|
|
|
|
|
|
|
|
representation, that representation will be embedded adding
|
|
|
|
a field
|
|
|
|
|
|
|
|
`value` which holds the custom JSON in addition to the
|
|
|
|
`@type`
|
2021-07-08 14:46:42 +00:00
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|
2021-09-15 09:45:03 +00:00
|
|
|
parameters:
|
|
|
|
- name: msg.data.type_url
|
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of the
|
|
|
|
serialized
|
2021-07-09 09:04:46 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
protocol buffer message. This string must contain at least
|
2021-07-09 09:04:46 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
one "/" character. The last segment of the URL's path must represent
|
2021-07-09 09:04:46 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
the fully qualified name of the type (as in
|
2021-07-09 09:04:46 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
`path/google.protobuf.Duration`). The name should be in a canonical
|
|
|
|
form
|
2021-07-09 09:04:46 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
(e.g., leading "." is not accepted).
|
2021-07-09 09:04:46 +00:00
|
|
|
|
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
In practice, teams usually precompile into the binary all types that
|
|
|
|
they
|
2021-07-09 09:04:46 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
expect it to use in the context of Any. However, for URLs which use
|
|
|
|
the
|
2021-07-09 09:04:46 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
scheme `http`, `https`, or no scheme, one can optionally set up a
|
|
|
|
type
|
2021-07-09 09:04:46 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
server that maps type URLs to message definitions as follows:
|
2021-07-09 09:04:46 +00:00
|
|
|
|
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
* If no scheme is provided, `https` is assumed.
|
2021-07-09 09:04:46 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
* An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
2021-07-09 09:04:46 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
Note: this functionality is not currently available in the official
|
2021-07-09 09:04:46 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
protobuf release, and it is not used for type URLs beginning with
|
2021-07-09 09:04:46 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
type.googleapis.com.
|
2021-07-09 09:04:46 +00:00
|
|
|
|
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
Schemes other than `http`, `https` (or the empty scheme) might be
|
2021-07-09 09:04:46 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
used with implementation specific semantics.
|
|
|
|
in: query
|
|
|
|
required: false
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
2021-09-15 09:45:03 +00:00
|
|
|
- name: msg.data.value
|
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above specified
|
|
|
|
type.
|
2021-09-09 14:26:30 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: byte
|
2021-09-15 09:45:03 +00:00
|
|
|
- name: msg.size
|
2022-11-17 11:35:54 +00:00
|
|
|
description: 'DEPRECATED: encoded storage size of the transaction.'
|
2021-09-15 09:45:03 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: number
|
|
|
|
format: double
|
|
|
|
- name: msg.hash
|
|
|
|
description: transaction hash in hex format.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: msg.from
|
|
|
|
description: |-
|
|
|
|
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.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.tracer
|
|
|
|
description: custom javascript tracer.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.timeout
|
2021-09-09 14:26:30 +00:00
|
|
|
description: >-
|
2021-09-15 09:45:03 +00:00
|
|
|
overrides the default timeout of 5 seconds for JavaScript-based
|
2021-10-07 11:02:31 +00:00
|
|
|
tracing
|
|
|
|
|
|
|
|
calls.
|
2021-09-15 09:45:03 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.reexec
|
|
|
|
description: number of blocks the tracer is willing to go back.
|
2021-09-09 14:26:30 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: uint64
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.disable_stack
|
2021-09-15 09:45:03 +00:00
|
|
|
description: disable stack capture.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: boolean
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.disable_storage
|
2021-09-15 09:45:03 +00:00
|
|
|
description: disable storage capture.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: boolean
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.debug
|
2021-09-15 09:45:03 +00:00
|
|
|
description: print output during capture end.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: boolean
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.limit
|
2022-07-18 20:21:04 +00:00
|
|
|
description: maximum length of output, but zero means unlimited.
|
2021-09-15 09:45:03 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: integer
|
|
|
|
format: int32
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.overrides.homestead_block
|
2022-07-18 20:21:04 +00:00
|
|
|
description: Homestead switch block (nil no fork, 0 = already homestead).
|
2021-09-15 09:45:03 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.overrides.dao_fork_block
|
2021-09-15 09:45:03 +00:00
|
|
|
description: TheDAO hard-fork switch block (nil no fork).
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.overrides.dao_fork_support
|
2021-09-15 09:45:03 +00:00
|
|
|
description: Whether the nodes supports or opposes the DAO hard-fork.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: boolean
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.overrides.eip150_block
|
2021-09-09 14:26:30 +00:00
|
|
|
description: >-
|
2021-09-15 09:45:03 +00:00
|
|
|
EIP150 implements the Gas price changes
|
2021-09-09 14:26:30 +00:00
|
|
|
|
2021-09-15 09:45:03 +00:00
|
|
|
(https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil
|
|
|
|
no fork).
|
2021-09-09 14:26:30 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.overrides.eip150_hash
|
2021-09-09 14:26:30 +00:00
|
|
|
description: >-
|
2021-09-15 09:45:03 +00:00
|
|
|
EIP150 HF hash (needed for header only clients as only gas pricing
|
|
|
|
changed).
|
2021-09-09 14:26:30 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
2021-09-15 09:45:03 +00:00
|
|
|
type: string
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.overrides.eip155_block
|
2021-09-15 09:45:03 +00:00
|
|
|
description: EIP155Block HF block.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.overrides.eip158_block
|
2021-09-15 09:45:03 +00:00
|
|
|
description: EIP158 HF block.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.overrides.byzantium_block
|
2022-07-18 20:21:04 +00:00
|
|
|
description: Byzantium switch block (nil no fork, 0 = already on byzantium).
|
2021-09-15 09:45:03 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.overrides.constantinople_block
|
2022-07-18 20:21:04 +00:00
|
|
|
description: Constantinople switch block (nil no fork, 0 = already activated).
|
2021-09-15 09:45:03 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.overrides.petersburg_block
|
2021-09-15 09:45:03 +00:00
|
|
|
description: Petersburg switch block (nil same as Constantinople).
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.overrides.istanbul_block
|
2022-07-18 20:21:04 +00:00
|
|
|
description: Istanbul switch block (nil no fork, 0 = already on istanbul).
|
2021-09-15 09:45:03 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.overrides.muir_glacier_block
|
2021-09-09 14:26:30 +00:00
|
|
|
description: >-
|
2021-09-15 09:45:03 +00:00
|
|
|
Eip-2384 (bomb delay) switch block (nil no fork, 0 = already
|
|
|
|
activated).
|
2021-09-09 14:26:30 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
2021-09-15 09:45:03 +00:00
|
|
|
type: string
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.overrides.berlin_block
|
2022-07-18 20:21:04 +00:00
|
|
|
description: Berlin switch block (nil = no fork, 0 = already on berlin).
|
2021-09-15 09:45:03 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.overrides.london_block
|
2022-07-18 20:21:04 +00:00
|
|
|
description: London switch block (nil = no fork, 0 = already on london).
|
2021-09-15 09:45:03 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2022-04-04 13:00:26 +00:00
|
|
|
- name: trace_config.overrides.arrow_glacier_block
|
|
|
|
description: >-
|
|
|
|
Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already
|
|
|
|
activated).
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2022-11-17 11:35:54 +00:00
|
|
|
- name: trace_config.overrides.gray_glacier_block
|
2022-04-04 13:00:26 +00:00
|
|
|
description: >-
|
2022-11-17 11:35:54 +00:00
|
|
|
EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already
|
|
|
|
activated).
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: trace_config.overrides.merge_netsplit_block
|
|
|
|
description: Virtual fork after The Merge to use as a network splitter.
|
2022-04-04 13:00:26 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-10-05 15:38:20 +00:00
|
|
|
- name: trace_config.enable_memory
|
|
|
|
description: enable memory capture.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: boolean
|
|
|
|
- name: trace_config.enable_return_data
|
|
|
|
description: enable return data capture.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: boolean
|
2022-11-20 12:33:58 +00:00
|
|
|
- name: trace_config.tracer_json_config
|
|
|
|
description: tracer config.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-11-09 18:38:22 +00:00
|
|
|
- name: block_number
|
2021-11-17 13:32:05 +00:00
|
|
|
description: block number of requested transaction.
|
2021-11-09 18:38:22 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: int64
|
|
|
|
- name: block_hash
|
2021-11-17 13:32:05 +00:00
|
|
|
description: block hex hash of requested transaction.
|
2021-11-09 18:38:22 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
- name: block_time
|
2021-11-17 13:32:05 +00:00
|
|
|
description: block time of requested transaction.
|
2021-11-09 18:38:22 +00:00
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
2021-11-17 13:32:05 +00:00
|
|
|
format: date-time
|
2022-11-17 11:35:54 +00:00
|
|
|
- name: proposer_address
|
|
|
|
description: the proposer of the requested block.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: byte
|
2022-11-18 18:19:09 +00:00
|
|
|
- name: chain_id
|
|
|
|
description: the eip155 chain id parsed from the requested block header.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
format: int64
|
2021-04-18 16:39:15 +00:00
|
|
|
tags:
|
|
|
|
- Query
|
2022-07-18 20:21:04 +00:00
|
|
|
/ethermint/evm/v1/validator_account/{cons_address}:
|
2021-04-18 16:39:15 +00:00
|
|
|
get:
|
2021-07-09 09:04:46 +00:00
|
|
|
summary: >-
|
|
|
|
ValidatorAccount queries an Ethereum account's from a validator
|
2021-08-17 15:30:35 +00:00
|
|
|
consensus
|
|
|
|
|
|
|
|
Address.
|
2021-07-09 09:04:46 +00:00
|
|
|
operationId: ValidatorAccount
|
2021-04-18 16:39:15 +00:00
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: A successful response.
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2021-07-09 09:04:46 +00:00
|
|
|
account_address:
|
2021-04-19 07:10:57 +00:00
|
|
|
type: string
|
|
|
|
description: >-
|
2021-07-09 09:04:46 +00:00
|
|
|
account_address is the cosmos address of the account in bech32
|
|
|
|
format.
|
|
|
|
sequence:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
description: sequence is the account's sequence number.
|
|
|
|
account_number:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: account_number is the account number
|
2021-08-17 15:30:35 +00:00
|
|
|
description: |-
|
2021-07-09 09:04:46 +00:00
|
|
|
QueryValidatorAccountResponse is the response type for the
|
|
|
|
Query/ValidatorAccount RPC method.
|
2021-04-18 16:39:15 +00:00
|
|
|
default:
|
2021-08-17 15:30:35 +00:00
|
|
|
description: An unexpected error response.
|
2021-04-18 16:39:15 +00:00
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
error:
|
|
|
|
type: string
|
|
|
|
code:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
details:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type_url:
|
|
|
|
type: string
|
2021-07-09 09:04:46 +00:00
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of
|
|
|
|
the serialized
|
|
|
|
|
|
|
|
protocol buffer message. This string must contain at
|
|
|
|
least
|
|
|
|
|
|
|
|
one "/" character. The last segment of the URL's path
|
|
|
|
must represent
|
|
|
|
|
|
|
|
the fully qualified name of the type (as in
|
|
|
|
|
|
|
|
`path/google.protobuf.Duration`). The name should be in
|
|
|
|
a canonical form
|
|
|
|
|
|
|
|
(e.g., leading "." is not accepted).
|
|
|
|
|
|
|
|
|
|
|
|
In practice, teams usually precompile into the binary
|
|
|
|
all types that they
|
|
|
|
|
|
|
|
expect it to use in the context of Any. However, for
|
|
|
|
URLs which use the
|
|
|
|
|
|
|
|
scheme `http`, `https`, or no scheme, one can optionally
|
|
|
|
set up a type
|
|
|
|
|
|
|
|
server that maps type URLs to message definitions as
|
|
|
|
follows:
|
|
|
|
|
|
|
|
|
|
|
|
* If no scheme is provided, `https` is assumed.
|
|
|
|
|
|
|
|
* An HTTP GET on the URL must yield a
|
|
|
|
[google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based
|
|
|
|
on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
|
|
|
|
|
|
|
Note: this functionality is not currently available in
|
|
|
|
the official
|
|
|
|
|
|
|
|
protobuf release, and it is not used for type URLs
|
|
|
|
beginning with
|
|
|
|
|
|
|
|
type.googleapis.com.
|
|
|
|
|
|
|
|
|
|
|
|
Schemes other than `http`, `https` (or the empty scheme)
|
|
|
|
might be
|
|
|
|
|
|
|
|
used with implementation specific semantics.
|
2021-04-18 16:39:15 +00:00
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
2021-04-19 07:10:57 +00:00
|
|
|
description: >-
|
2021-07-09 09:04:46 +00:00
|
|
|
Must be a valid serialized protocol buffer of the above
|
|
|
|
specified type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer
|
|
|
|
message along with a
|
|
|
|
|
|
|
|
URL that describes the type of the serialized message.
|
|
|
|
|
|
|
|
|
|
|
|
Protobuf library provides support to pack/unpack Any values
|
|
|
|
in the form
|
|
|
|
|
|
|
|
of utility functions or additional generated methods of the
|
|
|
|
Any type.
|
|
|
|
|
|
|
|
|
|
|
|
Example 1: Pack and unpack a message in C++.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 2: Pack and unpack a message in Java.
|
|
|
|
|
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
|
|
|
|
|
|
|
Example 3: Pack and unpack a message in Python.
|
|
|
|
|
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
|
|
|
|
|
|
|
Example 4: Pack and unpack a message in Go
|
|
|
|
|
|
|
|
foo := &pb.Foo{...}
|
2022-11-17 11:35:54 +00:00
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
2022-11-17 11:35:54 +00:00
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
2021-07-09 09:04:46 +00:00
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
The pack methods provided by protobuf library will by
|
|
|
|
default use
|
|
|
|
|
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the
|
|
|
|
unpack
|
|
|
|
|
|
|
|
methods only use the fully qualified type name after the
|
|
|
|
last '/'
|
|
|
|
|
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield
|
|
|
|
type
|
|
|
|
|
|
|
|
name "y.z".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSON
|
|
|
|
|
|
|
|
====
|
|
|
|
|
|
|
|
The JSON representation of an `Any` value uses the regular
|
|
|
|
|
|
|
|
representation of the deserialized, embedded message, with
|
|
|
|
an
|
|
|
|
|
|
|
|
additional field `@type` which contains the type URL.
|
|
|
|
Example:
|
|
|
|
|
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
If the embedded message type is well-known and has a custom
|
|
|
|
JSON
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
representation, that representation will be embedded adding
|
|
|
|
a field
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2021-07-09 09:04:46 +00:00
|
|
|
`value` which holds the custom JSON in addition to the
|
|
|
|
`@type`
|
|
|
|
|
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|
2021-04-18 16:39:15 +00:00
|
|
|
parameters:
|
2021-06-25 09:18:37 +00:00
|
|
|
- name: cons_address
|
|
|
|
description: cons_address is the validator cons address to query the account for.
|
2021-04-19 07:10:57 +00:00
|
|
|
in: path
|
|
|
|
required: true
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
|
|
|
tags:
|
|
|
|
- Query
|
2022-11-17 11:35:54 +00:00
|
|
|
definitions:
|
|
|
|
ethermint.evm.v1.ChainConfig:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
homestead_block:
|
|
|
|
type: string
|
|
|
|
title: Homestead switch block (nil no fork, 0 = already homestead)
|
|
|
|
dao_fork_block:
|
|
|
|
type: string
|
|
|
|
title: TheDAO hard-fork switch block (nil no fork)
|
|
|
|
dao_fork_support:
|
|
|
|
type: boolean
|
|
|
|
title: Whether the nodes supports or opposes the DAO hard-fork
|
|
|
|
eip150_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
EIP150 implements the Gas price changes
|
2021-04-19 07:10:57 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
(https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no
|
|
|
|
fork)
|
|
|
|
eip150_hash:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
EIP150 HF hash (needed for header only clients as only gas pricing
|
|
|
|
changed)
|
|
|
|
eip155_block:
|
|
|
|
type: string
|
|
|
|
title: EIP155Block HF block
|
|
|
|
eip158_block:
|
|
|
|
type: string
|
|
|
|
title: EIP158 HF block
|
|
|
|
byzantium_block:
|
|
|
|
type: string
|
|
|
|
title: Byzantium switch block (nil no fork, 0 = already on byzantium)
|
|
|
|
constantinople_block:
|
|
|
|
type: string
|
|
|
|
title: Constantinople switch block (nil no fork, 0 = already activated)
|
|
|
|
petersburg_block:
|
|
|
|
type: string
|
|
|
|
title: Petersburg switch block (nil same as Constantinople)
|
|
|
|
istanbul_block:
|
|
|
|
type: string
|
|
|
|
title: Istanbul switch block (nil no fork, 0 = already on istanbul)
|
|
|
|
muir_glacier_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Eip-2384 (bomb delay) switch block (nil no fork, 0 = already
|
|
|
|
activated)
|
|
|
|
berlin_block:
|
|
|
|
type: string
|
|
|
|
title: Berlin switch block (nil = no fork, 0 = already on berlin)
|
|
|
|
london_block:
|
|
|
|
type: string
|
|
|
|
title: London switch block (nil = no fork, 0 = already on london)
|
|
|
|
arrow_glacier_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already
|
|
|
|
activated)
|
|
|
|
gray_glacier_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already
|
|
|
|
activated)
|
|
|
|
merge_netsplit_block:
|
|
|
|
type: string
|
|
|
|
title: Virtual fork after The Merge to use as a network splitter
|
|
|
|
description: >-
|
|
|
|
ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int
|
|
|
|
values
|
2021-04-19 07:10:57 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
instead of *big.Int.
|
|
|
|
ethermint.evm.v1.EstimateGasResponse:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
gas:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: the estimated gas
|
|
|
|
title: EstimateGasResponse defines EstimateGas response
|
|
|
|
ethermint.evm.v1.Log:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
address:
|
|
|
|
type: string
|
|
|
|
title: address of the contract that generated the event
|
|
|
|
topics:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
description: list of topics provided by the contract.
|
|
|
|
data:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
title: supplied by the contract, usually ABI-encoded
|
|
|
|
block_number:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: block in which the transaction was included
|
|
|
|
tx_hash:
|
|
|
|
type: string
|
|
|
|
title: hash of the transaction
|
|
|
|
tx_index:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: index of the transaction in the block
|
|
|
|
block_hash:
|
|
|
|
type: string
|
|
|
|
title: hash of the block in which the transaction was included
|
|
|
|
index:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: index of the log in the block
|
|
|
|
removed:
|
|
|
|
type: boolean
|
|
|
|
description: >-
|
|
|
|
The Removed field is true if this log was reverted due to a chain
|
2021-04-19 07:10:57 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
reorganisation. You must pay attention to this field if you receive
|
|
|
|
logs
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
through a filter query.
|
|
|
|
description: >-
|
|
|
|
Log represents an protobuf compatible Ethereum Log that defines a contract
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
log event. These events are generated by the LOG opcode and stored/indexed
|
|
|
|
by
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
the node.
|
|
|
|
ethermint.evm.v1.MsgEthereumTx:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type_url:
|
|
|
|
type: string
|
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of the
|
|
|
|
serialized
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
protocol buffer message. This string must contain at least
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
one "/" character. The last segment of the URL's path must
|
|
|
|
represent
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
the fully qualified name of the type (as in
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
`path/google.protobuf.Duration`). The name should be in a
|
|
|
|
canonical form
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
(e.g., leading "." is not accepted).
|
2021-06-25 09:18:37 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
In practice, teams usually precompile into the binary all types
|
|
|
|
that they
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
expect it to use in the context of Any. However, for URLs which
|
|
|
|
use the
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
scheme `http`, `https`, or no scheme, one can optionally set up a
|
|
|
|
type
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
server that maps type URLs to message definitions as follows:
|
2021-06-25 09:18:37 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
* If no scheme is provided, `https` is assumed.
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
* An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Note: this functionality is not currently available in the
|
|
|
|
official
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
protobuf release, and it is not used for type URLs beginning with
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
type.googleapis.com.
|
2021-06-25 09:18:37 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Schemes other than `http`, `https` (or the empty scheme) might be
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
used with implementation specific semantics.
|
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above specified
|
|
|
|
type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer message along
|
|
|
|
with a
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
URL that describes the type of the serialized message.
|
2021-06-25 09:18:37 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Protobuf library provides support to pack/unpack Any values in the
|
|
|
|
form
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
of utility functions or additional generated methods of the Any type.
|
2021-06-25 09:18:37 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Example 1: Pack and unpack a message in C++.
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Example 2: Pack and unpack a message in Java.
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Example 3: Pack and unpack a message in Python.
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Example 4: Pack and unpack a message in Go
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
foo := &pb.Foo{...}
|
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
|
|
|
...
|
|
|
|
}
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
The pack methods provided by protobuf library will by default use
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the unpack
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
methods only use the fully qualified type name after the last '/'
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
name "y.z".
|
2021-06-25 09:18:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
JSON
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
====
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
The JSON representation of an `Any` value uses the regular
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
representation of the deserialized, embedded message, with an
|
2021-06-25 09:18:37 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
additional field `@type` which contains the type URL. Example:
|
2021-08-23 13:15:55 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
If the embedded message type is well-known and has a custom JSON
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
representation, that representation will be embedded adding a field
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
`value` which holds the custom JSON in addition to the `@type`
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|
|
|
|
title: inner transaction data
|
|
|
|
size:
|
|
|
|
type: number
|
|
|
|
format: double
|
|
|
|
title: 'DEPRECATED: encoded storage size of the transaction'
|
|
|
|
hash:
|
|
|
|
type: string
|
|
|
|
title: transaction hash in hex format
|
|
|
|
from:
|
|
|
|
type: string
|
|
|
|
title: |-
|
|
|
|
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
|
|
|
|
description: MsgEthereumTx encapsulates an Ethereum transaction as an SDK message.
|
|
|
|
ethermint.evm.v1.MsgEthereumTxResponse:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
hash:
|
|
|
|
type: string
|
|
|
|
title: |-
|
|
|
|
ethereum transaction hash in hex format. This hash differs from the
|
|
|
|
Tendermint sha256 hash of the transaction bytes. See
|
|
|
|
https://github.com/tendermint/tendermint/issues/6539 for reference
|
|
|
|
logs:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
address:
|
|
|
|
type: string
|
|
|
|
title: address of the contract that generated the event
|
|
|
|
topics:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
description: list of topics provided by the contract.
|
|
|
|
data:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
title: supplied by the contract, usually ABI-encoded
|
|
|
|
block_number:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: block in which the transaction was included
|
|
|
|
tx_hash:
|
|
|
|
type: string
|
|
|
|
title: hash of the transaction
|
|
|
|
tx_index:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: index of the transaction in the block
|
|
|
|
block_hash:
|
|
|
|
type: string
|
|
|
|
title: hash of the block in which the transaction was included
|
|
|
|
index:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: index of the log in the block
|
|
|
|
removed:
|
|
|
|
type: boolean
|
|
|
|
description: >-
|
|
|
|
The Removed field is true if this log was reverted due to a
|
|
|
|
chain
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
reorganisation. You must pay attention to this field if you
|
|
|
|
receive logs
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
through a filter query.
|
|
|
|
description: >-
|
|
|
|
Log represents an protobuf compatible Ethereum Log that defines a
|
|
|
|
contract
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
log event. These events are generated by the LOG opcode and
|
|
|
|
stored/indexed by
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
the node.
|
|
|
|
description: |-
|
|
|
|
logs contains the transaction hash and the proto-compatible ethereum
|
|
|
|
logs.
|
|
|
|
ret:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
title: |-
|
|
|
|
returned data from evm function (result or data supplied with revert
|
|
|
|
opcode)
|
|
|
|
vm_error:
|
|
|
|
type: string
|
|
|
|
title: vm error is the error returned by vm execution
|
|
|
|
gas_used:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: gas consumed by the transaction
|
|
|
|
description: MsgEthereumTxResponse defines the Msg/EthereumTx response type.
|
|
|
|
ethermint.evm.v1.Params:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
evm_denom:
|
|
|
|
type: string
|
|
|
|
description: |-
|
|
|
|
evm denom represents the token denomination used to run the EVM state
|
|
|
|
transitions.
|
|
|
|
enable_create:
|
|
|
|
type: boolean
|
|
|
|
title: >-
|
|
|
|
enable create toggles state transitions that use the vm.Create
|
|
|
|
function
|
|
|
|
enable_call:
|
|
|
|
type: boolean
|
|
|
|
title: enable call toggles state transitions that use the vm.Call function
|
|
|
|
extra_eips:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
format: int64
|
|
|
|
title: extra eips defines the additional EIPs for the vm.Config
|
|
|
|
chain_config:
|
|
|
|
title: chain config defines the EVM chain configuration parameters
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
homestead_block:
|
|
|
|
type: string
|
|
|
|
title: Homestead switch block (nil no fork, 0 = already homestead)
|
|
|
|
dao_fork_block:
|
|
|
|
type: string
|
|
|
|
title: TheDAO hard-fork switch block (nil no fork)
|
|
|
|
dao_fork_support:
|
|
|
|
type: boolean
|
|
|
|
title: Whether the nodes supports or opposes the DAO hard-fork
|
|
|
|
eip150_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
EIP150 implements the Gas price changes
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
(https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil
|
|
|
|
no fork)
|
|
|
|
eip150_hash:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
EIP150 HF hash (needed for header only clients as only gas pricing
|
|
|
|
changed)
|
|
|
|
eip155_block:
|
|
|
|
type: string
|
|
|
|
title: EIP155Block HF block
|
|
|
|
eip158_block:
|
|
|
|
type: string
|
|
|
|
title: EIP158 HF block
|
|
|
|
byzantium_block:
|
|
|
|
type: string
|
|
|
|
title: Byzantium switch block (nil no fork, 0 = already on byzantium)
|
|
|
|
constantinople_block:
|
|
|
|
type: string
|
|
|
|
title: Constantinople switch block (nil no fork, 0 = already activated)
|
|
|
|
petersburg_block:
|
|
|
|
type: string
|
|
|
|
title: Petersburg switch block (nil same as Constantinople)
|
|
|
|
istanbul_block:
|
|
|
|
type: string
|
|
|
|
title: Istanbul switch block (nil no fork, 0 = already on istanbul)
|
|
|
|
muir_glacier_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Eip-2384 (bomb delay) switch block (nil no fork, 0 = already
|
|
|
|
activated)
|
|
|
|
berlin_block:
|
|
|
|
type: string
|
|
|
|
title: Berlin switch block (nil = no fork, 0 = already on berlin)
|
|
|
|
london_block:
|
|
|
|
type: string
|
|
|
|
title: London switch block (nil = no fork, 0 = already on london)
|
|
|
|
arrow_glacier_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already
|
|
|
|
activated)
|
|
|
|
gray_glacier_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already
|
|
|
|
activated)
|
|
|
|
merge_netsplit_block:
|
|
|
|
type: string
|
|
|
|
title: Virtual fork after The Merge to use as a network splitter
|
|
|
|
description: >-
|
|
|
|
ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int
|
|
|
|
values
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
instead of *big.Int.
|
|
|
|
allow_unprotected_txs:
|
|
|
|
type: boolean
|
|
|
|
description: >-
|
|
|
|
Allow unprotected transactions defines if replay-protected (i.e non
|
|
|
|
EIP155
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
signed) transactions can be executed on the state machine.
|
|
|
|
title: Params defines the EVM module parameters
|
|
|
|
ethermint.evm.v1.QueryAccountResponse:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
balance:
|
|
|
|
type: string
|
|
|
|
description: balance is the balance of the EVM denomination.
|
|
|
|
code_hash:
|
|
|
|
type: string
|
|
|
|
description: code hash is the hex-formatted code bytes from the EOA.
|
|
|
|
nonce:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
description: nonce is the account's sequence number.
|
|
|
|
description: >-
|
|
|
|
QueryAccountResponse is the response type for the Query/Account RPC
|
|
|
|
method.
|
|
|
|
ethermint.evm.v1.QueryBalanceResponse:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
balance:
|
|
|
|
type: string
|
|
|
|
description: balance is the balance of the EVM denomination.
|
|
|
|
description: >-
|
|
|
|
QueryBalanceResponse is the response type for the Query/Balance RPC
|
|
|
|
method.
|
|
|
|
ethermint.evm.v1.QueryBaseFeeResponse:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
base_fee:
|
|
|
|
type: string
|
|
|
|
description: BaseFeeResponse returns the EIP1559 base fee.
|
|
|
|
ethermint.evm.v1.QueryCodeResponse:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
code:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
description: code represents the code bytes from an ethereum address.
|
|
|
|
description: |-
|
|
|
|
QueryCodeResponse is the response type for the Query/Code RPC
|
|
|
|
method.
|
|
|
|
ethermint.evm.v1.QueryCosmosAccountResponse:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
cosmos_address:
|
|
|
|
type: string
|
|
|
|
description: cosmos_address is the cosmos address of the account.
|
|
|
|
sequence:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
description: sequence is the account's sequence number.
|
|
|
|
account_number:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: account_number is the account numbert
|
2021-04-18 16:39:15 +00:00
|
|
|
description: >-
|
2022-11-17 11:35:54 +00:00
|
|
|
QueryCosmosAccountResponse is the response type for the
|
|
|
|
Query/CosmosAccount
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
RPC method.
|
|
|
|
ethermint.evm.v1.QueryParamsResponse:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
params:
|
2022-11-17 11:35:54 +00:00
|
|
|
description: params define the evm module parameters.
|
2021-04-18 16:39:15 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
2022-11-17 11:35:54 +00:00
|
|
|
evm_denom:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
2021-08-23 13:15:55 +00:00
|
|
|
description: >-
|
2022-11-17 11:35:54 +00:00
|
|
|
evm denom represents the token denomination used to run the EVM
|
|
|
|
state
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
transitions.
|
|
|
|
enable_create:
|
|
|
|
type: boolean
|
|
|
|
title: >-
|
|
|
|
enable create toggles state transitions that use the vm.Create
|
|
|
|
function
|
|
|
|
enable_call:
|
|
|
|
type: boolean
|
|
|
|
title: >-
|
|
|
|
enable call toggles state transitions that use the vm.Call
|
|
|
|
function
|
|
|
|
extra_eips:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
format: int64
|
|
|
|
title: extra eips defines the additional EIPs for the vm.Config
|
|
|
|
chain_config:
|
|
|
|
title: chain config defines the EVM chain configuration parameters
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
homestead_block:
|
|
|
|
type: string
|
|
|
|
title: Homestead switch block (nil no fork, 0 = already homestead)
|
|
|
|
dao_fork_block:
|
|
|
|
type: string
|
|
|
|
title: TheDAO hard-fork switch block (nil no fork)
|
|
|
|
dao_fork_support:
|
|
|
|
type: boolean
|
|
|
|
title: Whether the nodes supports or opposes the DAO hard-fork
|
|
|
|
eip150_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
EIP150 implements the Gas price changes
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
(https://github.com/ethereum/EIPs/issues/150) EIP150 HF block
|
|
|
|
(nil no fork)
|
|
|
|
eip150_hash:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
EIP150 HF hash (needed for header only clients as only gas
|
|
|
|
pricing changed)
|
|
|
|
eip155_block:
|
|
|
|
type: string
|
|
|
|
title: EIP155Block HF block
|
|
|
|
eip158_block:
|
|
|
|
type: string
|
|
|
|
title: EIP158 HF block
|
|
|
|
byzantium_block:
|
|
|
|
type: string
|
|
|
|
title: Byzantium switch block (nil no fork, 0 = already on byzantium)
|
|
|
|
constantinople_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Constantinople switch block (nil no fork, 0 = already
|
|
|
|
activated)
|
|
|
|
petersburg_block:
|
|
|
|
type: string
|
|
|
|
title: Petersburg switch block (nil same as Constantinople)
|
|
|
|
istanbul_block:
|
|
|
|
type: string
|
|
|
|
title: Istanbul switch block (nil no fork, 0 = already on istanbul)
|
|
|
|
muir_glacier_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Eip-2384 (bomb delay) switch block (nil no fork, 0 = already
|
|
|
|
activated)
|
|
|
|
berlin_block:
|
|
|
|
type: string
|
|
|
|
title: Berlin switch block (nil = no fork, 0 = already on berlin)
|
|
|
|
london_block:
|
|
|
|
type: string
|
|
|
|
title: London switch block (nil = no fork, 0 = already on london)
|
|
|
|
arrow_glacier_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already
|
|
|
|
activated)
|
|
|
|
gray_glacier_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already
|
|
|
|
activated)
|
|
|
|
merge_netsplit_block:
|
|
|
|
type: string
|
|
|
|
title: Virtual fork after The Merge to use as a network splitter
|
|
|
|
description: >-
|
|
|
|
ChainConfig defines the Ethereum ChainConfig parameters using
|
|
|
|
*sdk.Int values
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
instead of *big.Int.
|
|
|
|
allow_unprotected_txs:
|
|
|
|
type: boolean
|
|
|
|
description: >-
|
|
|
|
Allow unprotected transactions defines if replay-protected (i.e
|
|
|
|
non EIP155
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
signed) transactions can be executed on the state machine.
|
|
|
|
title: Params defines the EVM module parameters
|
2021-04-18 16:39:15 +00:00
|
|
|
description: >-
|
2022-11-17 11:35:54 +00:00
|
|
|
QueryParamsResponse defines the response type for querying x/evm
|
|
|
|
parameters.
|
|
|
|
ethermint.evm.v1.QueryStorageResponse:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
2022-11-17 11:35:54 +00:00
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
description: >-
|
|
|
|
key defines the storage state value hash associated with the given
|
|
|
|
key.
|
2021-04-18 16:39:15 +00:00
|
|
|
description: |-
|
2022-11-17 11:35:54 +00:00
|
|
|
QueryStorageResponse is the response type for the Query/Storage RPC
|
|
|
|
method.
|
|
|
|
ethermint.evm.v1.QueryTraceBlockResponse:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
2022-11-17 11:35:54 +00:00
|
|
|
data:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
title: QueryTraceBlockResponse defines TraceBlock response
|
|
|
|
ethermint.evm.v1.QueryTraceTxResponse:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
title: response serialized in bytes
|
|
|
|
title: QueryTraceTxResponse defines TraceTx response
|
|
|
|
ethermint.evm.v1.QueryValidatorAccountResponse:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
account_address:
|
|
|
|
type: string
|
|
|
|
description: account_address is the cosmos address of the account in bech32 format.
|
|
|
|
sequence:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
description: sequence is the account's sequence number.
|
|
|
|
account_number:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: account_number is the account number
|
|
|
|
description: |-
|
|
|
|
QueryValidatorAccountResponse is the response type for the
|
|
|
|
Query/ValidatorAccount RPC method.
|
|
|
|
ethermint.evm.v1.TraceConfig:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
2022-11-17 11:35:54 +00:00
|
|
|
tracer:
|
|
|
|
type: string
|
|
|
|
title: custom javascript tracer
|
|
|
|
timeout:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
overrides the default timeout of 5 seconds for JavaScript-based
|
|
|
|
tracing
|
|
|
|
|
|
|
|
calls
|
|
|
|
reexec:
|
|
|
|
type: string
|
|
|
|
format: uint64
|
|
|
|
title: number of blocks the tracer is willing to go back
|
|
|
|
disable_stack:
|
|
|
|
type: boolean
|
|
|
|
title: disable stack capture
|
|
|
|
disable_storage:
|
|
|
|
type: boolean
|
|
|
|
title: disable storage capture
|
|
|
|
debug:
|
|
|
|
type: boolean
|
|
|
|
title: print output during capture end
|
|
|
|
limit:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
title: maximum length of output, but zero means unlimited
|
|
|
|
overrides:
|
|
|
|
title: >-
|
|
|
|
Chain overrides, can be used to execute a trace using future fork
|
|
|
|
rules
|
2021-04-18 16:39:15 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
2022-11-17 11:35:54 +00:00
|
|
|
homestead_block:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
2022-11-17 11:35:54 +00:00
|
|
|
title: Homestead switch block (nil no fork, 0 = already homestead)
|
|
|
|
dao_fork_block:
|
|
|
|
type: string
|
|
|
|
title: TheDAO hard-fork switch block (nil no fork)
|
|
|
|
dao_fork_support:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: boolean
|
2022-11-17 11:35:54 +00:00
|
|
|
title: Whether the nodes supports or opposes the DAO hard-fork
|
|
|
|
eip150_block:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
2022-11-17 11:35:54 +00:00
|
|
|
title: >-
|
|
|
|
EIP150 implements the Gas price changes
|
|
|
|
|
|
|
|
(https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil
|
|
|
|
no fork)
|
|
|
|
eip150_hash:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
2022-11-17 11:35:54 +00:00
|
|
|
title: >-
|
|
|
|
EIP150 HF hash (needed for header only clients as only gas pricing
|
|
|
|
changed)
|
|
|
|
eip155_block:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
2022-11-17 11:35:54 +00:00
|
|
|
title: EIP155Block HF block
|
|
|
|
eip158_block:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
2022-11-17 11:35:54 +00:00
|
|
|
title: EIP158 HF block
|
|
|
|
byzantium_block:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
2022-11-17 11:35:54 +00:00
|
|
|
title: Byzantium switch block (nil no fork, 0 = already on byzantium)
|
|
|
|
constantinople_block:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
2022-11-17 11:35:54 +00:00
|
|
|
title: Constantinople switch block (nil no fork, 0 = already activated)
|
|
|
|
petersburg_block:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
2022-11-17 11:35:54 +00:00
|
|
|
title: Petersburg switch block (nil same as Constantinople)
|
|
|
|
istanbul_block:
|
|
|
|
type: string
|
|
|
|
title: Istanbul switch block (nil no fork, 0 = already on istanbul)
|
|
|
|
muir_glacier_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Eip-2384 (bomb delay) switch block (nil no fork, 0 = already
|
|
|
|
activated)
|
|
|
|
berlin_block:
|
|
|
|
type: string
|
|
|
|
title: Berlin switch block (nil = no fork, 0 = already on berlin)
|
|
|
|
london_block:
|
|
|
|
type: string
|
|
|
|
title: London switch block (nil = no fork, 0 = already on london)
|
|
|
|
arrow_glacier_block:
|
|
|
|
type: string
|
|
|
|
title: >-
|
|
|
|
Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already
|
|
|
|
activated)
|
|
|
|
gray_glacier_block:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
|
|
|
title: >-
|
2022-11-17 11:35:54 +00:00
|
|
|
EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already
|
|
|
|
activated)
|
|
|
|
merge_netsplit_block:
|
|
|
|
type: string
|
|
|
|
title: Virtual fork after The Merge to use as a network splitter
|
|
|
|
description: >-
|
|
|
|
ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int
|
|
|
|
values
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
instead of *big.Int.
|
|
|
|
enable_memory:
|
|
|
|
type: boolean
|
|
|
|
title: enable memory capture
|
|
|
|
enable_return_data:
|
|
|
|
type: boolean
|
|
|
|
title: enable return data capture
|
2022-11-20 12:33:58 +00:00
|
|
|
tracer_json_config:
|
|
|
|
type: string
|
|
|
|
title: tracer config
|
2022-11-17 11:35:54 +00:00
|
|
|
description: TraceConfig holds extra parameters to trace functions.
|
|
|
|
google.protobuf.Any:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
2022-11-17 11:35:54 +00:00
|
|
|
type_url:
|
|
|
|
type: string
|
|
|
|
description: >-
|
|
|
|
A URL/resource name that uniquely identifies the type of the
|
|
|
|
serialized
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
protocol buffer message. This string must contain at least
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
one "/" character. The last segment of the URL's path must represent
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
the fully qualified name of the type (as in
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
`path/google.protobuf.Duration`). The name should be in a canonical
|
|
|
|
form
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
(e.g., leading "." is not accepted).
|
2022-07-18 20:21:04 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
In practice, teams usually precompile into the binary all types that
|
|
|
|
they
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
expect it to use in the context of Any. However, for URLs which use
|
|
|
|
the
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
scheme `http`, `https`, or no scheme, one can optionally set up a type
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
server that maps type URLs to message definitions as follows:
|
2022-07-18 20:21:04 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
* If no scheme is provided, `https` is assumed.
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
* An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Note: this functionality is not currently available in the official
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
protobuf release, and it is not used for type URLs beginning with
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
type.googleapis.com.
|
2022-07-18 20:21:04 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Schemes other than `http`, `https` (or the empty scheme) might be
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
used with implementation specific semantics.
|
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above specified
|
|
|
|
type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer message along with
|
|
|
|
a
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
URL that describes the type of the serialized message.
|
2022-07-18 20:21:04 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Protobuf library provides support to pack/unpack Any values in the form
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
of utility functions or additional generated methods of the Any type.
|
2022-07-18 20:21:04 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Example 1: Pack and unpack a message in C++.
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Example 2: Pack and unpack a message in Java.
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Example 3: Pack and unpack a message in Python.
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Example 4: Pack and unpack a message in Go
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
foo := &pb.Foo{...}
|
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
|
|
|
...
|
|
|
|
}
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
The pack methods provided by protobuf library will by default use
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the unpack
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
methods only use the fully qualified type name after the last '/'
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
name "y.z".
|
2021-04-18 16:39:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
JSON
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
====
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
The JSON representation of an `Any` value uses the regular
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
representation of the deserialized, embedded message, with an
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
additional field `@type` which contains the type URL. Example:
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
If the embedded message type is well-known and has a custom JSON
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
representation, that representation will be embedded adding a field
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
`value` which holds the custom JSON in addition to the `@type`
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|
|
|
|
grpc.gateway.runtime.Error:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
2022-11-17 11:35:54 +00:00
|
|
|
error:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
2022-11-17 11:35:54 +00:00
|
|
|
code:
|
|
|
|
type: integer
|
|
|
|
format: int32
|
|
|
|
message:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
2022-11-17 11:35:54 +00:00
|
|
|
details:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
2022-11-17 11:35:54 +00:00
|
|
|
type_url:
|
2021-04-18 16:39:15 +00:00
|
|
|
type: string
|
2021-08-23 13:15:55 +00:00
|
|
|
description: >-
|
2022-11-17 11:35:54 +00:00
|
|
|
A URL/resource name that uniquely identifies the type of the
|
|
|
|
serialized
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
protocol buffer message. This string must contain at least
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
one "/" character. The last segment of the URL's path must
|
|
|
|
represent
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
the fully qualified name of the type (as in
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
`path/google.protobuf.Duration`). The name should be in a
|
|
|
|
canonical form
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
(e.g., leading "." is not accepted).
|
2022-07-18 20:21:04 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
In practice, teams usually precompile into the binary all types
|
|
|
|
that they
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
expect it to use in the context of Any. However, for URLs which
|
|
|
|
use the
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
scheme `http`, `https`, or no scheme, one can optionally set up
|
|
|
|
a type
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
server that maps type URLs to message definitions as follows:
|
2022-07-18 20:21:04 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
* If no scheme is provided, `https` is assumed.
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
* An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
|
|
|
value in binary format, or produce an error.
|
|
|
|
* Applications are allowed to cache lookup results based on the
|
|
|
|
URL, or have them precompiled into a binary to avoid any
|
|
|
|
lookup. Therefore, binary compatibility needs to be preserved
|
|
|
|
on changes to types. (Use versioned type names to manage
|
|
|
|
breaking changes.)
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Note: this functionality is not currently available in the
|
|
|
|
official
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
protobuf release, and it is not used for type URLs beginning
|
|
|
|
with
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
type.googleapis.com.
|
2022-07-18 20:21:04 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Schemes other than `http`, `https` (or the empty scheme) might
|
|
|
|
be
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
used with implementation specific semantics.
|
|
|
|
value:
|
|
|
|
type: string
|
|
|
|
format: byte
|
|
|
|
description: >-
|
|
|
|
Must be a valid serialized protocol buffer of the above
|
|
|
|
specified type.
|
|
|
|
description: >-
|
|
|
|
`Any` contains an arbitrary serialized protocol buffer message along
|
|
|
|
with a
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
URL that describes the type of the serialized message.
|
2022-07-18 20:21:04 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Protobuf library provides support to pack/unpack Any values in the
|
|
|
|
form
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
of utility functions or additional generated methods of the Any
|
|
|
|
type.
|
2022-07-18 20:21:04 +00:00
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Example 1: Pack and unpack a message in C++.
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Foo foo = ...;
|
|
|
|
Any any;
|
|
|
|
any.PackFrom(foo);
|
|
|
|
...
|
|
|
|
if (any.UnpackTo(&foo)) {
|
|
|
|
...
|
|
|
|
}
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Example 2: Pack and unpack a message in Java.
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Foo foo = ...;
|
|
|
|
Any any = Any.pack(foo);
|
|
|
|
...
|
|
|
|
if (any.is(Foo.class)) {
|
|
|
|
foo = any.unpack(Foo.class);
|
|
|
|
}
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Example 3: Pack and unpack a message in Python.
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
foo = Foo(...)
|
|
|
|
any = Any()
|
|
|
|
any.Pack(foo)
|
|
|
|
...
|
|
|
|
if any.Is(Foo.DESCRIPTOR):
|
|
|
|
any.Unpack(foo)
|
|
|
|
...
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
Example 4: Pack and unpack a message in Go
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
foo := &pb.Foo{...}
|
|
|
|
any, err := anypb.New(foo)
|
|
|
|
if err != nil {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
...
|
|
|
|
foo := &pb.Foo{}
|
|
|
|
if err := any.UnmarshalTo(foo); err != nil {
|
|
|
|
...
|
|
|
|
}
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
The pack methods provided by protobuf library will by default use
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
'type.googleapis.com/full.type.name' as the type URL and the unpack
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
methods only use the fully qualified type name after the last '/'
|
2022-07-18 20:21:04 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
name "y.z".
|
2021-04-18 16:39:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
JSON
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
====
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
The JSON representation of an `Any` value uses the regular
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
representation of the deserialized, embedded message, with an
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
additional field `@type` which contains the type URL. Example:
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
package google.profile;
|
|
|
|
message Person {
|
|
|
|
string first_name = 1;
|
|
|
|
string last_name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.profile.Person",
|
|
|
|
"firstName": <string>,
|
|
|
|
"lastName": <string>
|
|
|
|
}
|
|
|
|
|
|
|
|
If the embedded message type is well-known and has a custom JSON
|
|
|
|
|
|
|
|
representation, that representation will be embedded adding a field
|
|
|
|
|
|
|
|
`value` which holds the custom JSON in addition to the `@type`
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
field. Example (for message [google.protobuf.Duration][]):
|
2021-04-18 16:39:15 +00:00
|
|
|
|
2022-11-17 11:35:54 +00:00
|
|
|
{
|
|
|
|
"@type": "type.googleapis.com/google.protobuf.Duration",
|
|
|
|
"value": "1.212s"
|
|
|
|
}
|