Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wasm): merge wasmd 0.17.0 #249

Merged
merged 79 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
60b5100
Fix blocklist
alpe Mar 11, 2021
0370397
Merge pull request #456 from CosmWasm/blocklist_addr
alpe Mar 11, 2021
ffb7c29
Upgrade relayer-test for rly latest (cf49cb4) (#458)
alpe Mar 12, 2021
2eb45fc
Handle nil in grpc querier
alpe Mar 15, 2021
356d786
Merge pull request #459 from CosmWasm/grpc_query_nil_416
alpe Mar 16, 2021
293c96d
Bump github.com/golang/protobuf from 1.4.3 to 1.5.1
dependabot-preview[bot] Mar 18, 2021
8e35dc2
Refactor wasm message handlers and query plugin (#460)
alpe Mar 18, 2021
6996f72
Handle non default ibc tranfer port
alpe Mar 18, 2021
75d5fcb
Add telemetry
alpe Mar 18, 2021
e3b5a6e
Merge pull request #462 from CosmWasm/transfer_portid_396
alpe Mar 18, 2021
63fe568
Merge pull request #463 from CosmWasm/telemetry_387
alpe Mar 19, 2021
d914266
Remove internal package (#464)
alpe Mar 19, 2021
28f7316
Remove deprecated build targets
alpe Mar 19, 2021
547fed5
Merge pull request #467 from CosmWasm/cleanups_341
ethanfrey Mar 19, 2021
cfcfa64
Restructure protobuf files (#466)
alpe Mar 22, 2021
60e97ff
Upgrade cosmos-sdk to v0.42.2
alpe Mar 22, 2021
bfe886c
Fix contact address in code of conduct (#470)
alpe Mar 22, 2021
dd26417
Merge pull request #469 from CosmWasm/upgrade_sdk
alpe Mar 22, 2021
85173c6
fix a typo in comment
loloicci Mar 23, 2021
388469c
Merge pull request #472 from loloicci/fix-typo
alpe Mar 23, 2021
03bf7b0
Introduce new interfaces for extendability
alpe Mar 22, 2021
408bba1
Extract contract keeper
alpe Mar 23, 2021
55ac19b
Public CoinTransferrer interface
alpe Mar 23, 2021
337611f
Bump github.com/rs/zerolog from 1.20.0 to 1.21.0
dependabot-preview[bot] Mar 25, 2021
5298ce4
Merge pull request #461 from CosmWasm/dependabot/go_modules/github.co…
alpe Mar 25, 2021
5af89b8
Merge pull request #473 from CosmWasm/dependabot/go_modules/github.co…
alpe Mar 25, 2021
f185de9
Bump github.com/cosmos/cosmos-sdk from 0.42.2 to 0.42.3
dependabot-preview[bot] Mar 25, 2021
2abf3f5
Merge pull request #474 from CosmWasm/dependabot/go_modules/github.co…
alpe Mar 25, 2021
48df71f
Review comment
alpe Mar 29, 2021
d9ca5d8
Merge pull request #471 from CosmWasm/extendable_keeper
ethanfrey Mar 29, 2021
5b8e225
Bump github.com/golang/protobuf from 1.5.1 to 1.5.2
dependabot-preview[bot] Mar 30, 2021
8109bba
Add extension points to the CLI (#477)
alpe Mar 31, 2021
aefd42e
Bump cosmos sdk and tendermint versions
ethanfrey Apr 9, 2021
f8fe581
Merge pull request #484 from CosmWasm/update-cosmos-sdk-0.42.4
ethanfrey Apr 9, 2021
2536242
Bump github.com/CosmWasm/wasmvm from 0.14.0-beta1 to 0.14.0-beta2
dependabot-preview[bot] Apr 9, 2021
39856bf
Deps and contracts to v0.14.0-beta3
ethanfrey Apr 9, 2021
6189e17
Add ReplyOn fields to SubMsg, state is bech32 not canonical addresses
ethanfrey Apr 12, 2021
84a6c4d
Fix gas prices
ethanfrey Apr 12, 2021
1bec925
Test to show conditional replies not implemented
ethanfrey Apr 12, 2021
42ca87d
Handle ReplySuccess + ReplyError properly
ethanfrey Apr 12, 2021
1a355dc
Continue wasmvm version upgrade
alpe Apr 13, 2021
9ec97b5
Handle wasmvm Burn message
alpe Apr 13, 2021
39eed79
Better interface name
alpe Apr 13, 2021
7029368
Merge pull request #489 from CosmWasm/msg_burn_479
ethanfrey Apr 13, 2021
4b8d024
Merge pull request #487 from CosmWasm/wasmvm-0.14.0-beta3
ethanfrey Apr 13, 2021
3b16f57
Go mod tidy
alpe Apr 13, 2021
d90bf6e
Extend ContractInfo for custom data (#492)
alpe Apr 16, 2021
aabc575
Fix InitializePinnedCodes
alpe Apr 16, 2021
69e59fe
Merge pull request #493 from CosmWasm/pin_codes_fix
ethanfrey Apr 16, 2021
c76c07c
Remove build-linux from PHONY
ethanfrey Apr 16, 2021
602881f
Clean up docs, point to CosmWasm repo for contract details
ethanfrey Apr 20, 2021
144a85a
Merge pull request #494 from CosmWasm/update-ibc-docs
alpe Apr 23, 2021
8ef2d26
Persist last code update with contract lookup index
alpe Apr 23, 2021
c377d71
List contract address without other data
alpe Apr 23, 2021
c74a17b
Merge pull request #476 from CosmWasm/dependabot/go_modules/github.co…
alpe Apr 26, 2021
9ebeb85
Update to wasmvm 0.14.0-beta4 (#499)
ethanfrey Apr 27, 2021
8c7967e
Review feedback
alpe Apr 27, 2021
c67cf14
Merge pull request #497 from CosmWasm/list_contract_323
ethanfrey Apr 27, 2021
305f13c
Submessage reply can overwrite caller response (#502)
alpe Apr 27, 2021
846611b
Update to wasmvm v0.14.0-beta5 (#504)
ethanfrey Apr 28, 2021
70dedad
Monitor WasmVM cache metrics (#503)
alpe Apr 28, 2021
9264176
Fix *.a sha hash
ethanfrey Apr 28, 2021
3d4b3d1
Upgrade to wasmvm v0.14.0-rc1 (#508)
alpe Apr 30, 2021
d1588ae
Release v0.16.0 changelog (#510)
alpe Apr 30, 2021
0576bab
Update deps, contracts, and Dockerfile to v0.14.0
ethanfrey May 3, 2021
d9cc2da
Update versions in README
ethanfrey May 3, 2021
5eb3ae7
Merge pull request #512 from CosmWasm/update-cw-0.14-final
ethanfrey May 3, 2021
4631658
Bump github.com/cosmos/cosmos-sdk from 0.42.4 to 0.42.5 (#519)
dependabot-preview[bot] May 21, 2021
98431c6
Remove json type cast for contract msgs
alpe May 21, 2021
407b965
Merge pull request #520 from CosmWasm/contract_msg_cast
alpe May 25, 2021
e4ab8aa
Update changelog for v0.17.0
alpe May 26, 2021
0e9f249
Added compatibilitys
alpe May 27, 2021
d2e35c2
Merge pull request #521 from CosmWasm/changelog_v0.17
ethanfrey May 27, 2021
e1550a9
Merge tag 'v0.17.0' into shiki_tak/feat/merge-wasmd-0.17.0
shiki-tak Jun 29, 2021
1730ddd
fix: fix build error
shiki-tak Jun 29, 2021
5601ab9
Merge branch 'main' of github.com:line/lfb-sdk into shiki_tak/feat/me…
shiki-tak Jul 20, 2021
51ccedc
fix: apply review
shiki-tak Jul 15, 2021
44f7140
fix: move proto file to proto/cosmwasm/wasm/v1beta1
shiki-tak Jul 20, 2021
577c2c0
fix: fix lint error
shiki-tak Jul 20, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,55 +13,70 @@ require (
github.com/confio/ics23/go v0.6.6
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/ledger-cosmos-go v0.11.1
github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de
github.com/dgraph-io/ristretto v0.0.3
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b
github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25
github.com/go-kit/kit v0.11.0
github.com/go-lintpack/lintpack v0.5.2 // indirect
github.com/gogo/gateway v1.1.0
github.com/gogo/protobuf v1.3.3
github.com/golang/mock v1.4.4
github.com/golang/protobuf v1.5.2
github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6 // indirect
github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3 // indirect
github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee // indirect
github.com/golangci/golangci-lint v1.41.1 // indirect
github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc // indirect
github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 // indirect
github.com/google/gofuzz v1.2.0
github.com/gorilla/handlers v1.5.1
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5 // indirect
github.com/klauspost/cpuid v1.2.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/line/iavl/v2 v2.0.0-init.1.0.20210602045707-fddfe1f85001
github.com/line/ostracon v0.34.9-0.20210610071151-a52812ac9add
github.com/line/tm-db/v2 v2.0.0-init.1.0.20210413083915-5bb60e117524
github.com/line/wasmvm v0.14.0-0.5.0
github.com/line/wasmvm v0.14.0-0.6.1
github.com/magiconair/properties v1.8.5
github.com/mailru/easyjson v0.7.7
github.com/mattn/go-isatty v0.0.12
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/onsi/ginkgo v1.15.0 // indirect
github.com/onsi/gomega v1.10.5 // indirect
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/onsi/ginkgo v1.16.1 // indirect
github.com/onsi/gomega v1.11.0 // indirect
github.com/pelletier/go-toml v1.8.1 // indirect
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.11.0
github.com/prometheus/common v0.29.0
github.com/rakyll/statik v0.1.7
github.com/regen-network/cosmos-proto v0.3.1
github.com/rs/zerolog v1.23.0
github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada // indirect
github.com/spf13/afero v1.3.4 // indirect
github.com/spf13/cast v1.3.1
github.com/spf13/cobra v1.1.3
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.7.0
github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca
github.com/tendermint/btcd v0.1.1
github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15
github.com/tendermint/go-amino v0.16.0
github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa // indirect
github.com/ugorji/go v1.1.4 // indirect
golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c
google.golang.org/grpc v1.39.0
google.golang.org/protobuf v1.27.1
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v2 v2.4.0
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4 // indirect
)

replace (
Expand Down
420 changes: 408 additions & 12 deletions go.sum

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ syntax = "proto3";
package cosmwasm.wasm.v1beta1;

import "gogoproto/gogo.proto";
import "types.proto";
import "tx.proto";
import "cosmwasm/wasm/v1beta1/types.proto";
import "cosmwasm/wasm/v1beta1/tx.proto";

option go_package = "github.com/line/lfb-sdk/x/wasm/internal/types";
option go_package = "github.com/line/lfb-sdk/x/wasm/types";

// GenesisState - genesis state of x/wasm
message GenesisState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cosmwasm.wasm.v1beta1;

import "gogoproto/gogo.proto";

option go_package = "github.com/line/lfb-sdk/x/wasm/internal/types";
option go_package = "github.com/line/lfb-sdk/x/wasm/types";
option (gogoproto.goproto_getters_all) = false;

// MsgIBCSend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package cosmwasm.wasm.v1beta1;

import "gogoproto/gogo.proto";
import "lfb/base/v1beta1/coin.proto";
import "types.proto";
import "cosmwasm/wasm/v1beta1/types.proto";

option go_package = "github.com/line/lfb-sdk/x/wasm/internal/types";
option go_package = "github.com/line/lfb-sdk/x/wasm/types";
option (gogoproto.goproto_stringer_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = true;
Expand Down Expand Up @@ -43,7 +43,7 @@ message InstantiateContractProposal {
// Label is optional metadata to be stored with a constract instance.
string label = 6;
// InitMsg json encoded message to be passed to the contract on instantiation
bytes init_msg = 7 [(gogoproto.casttype) = "encoding/json.RawMessage"];
bytes init_msg = 7;
// Funds coins that are transferred to the contract on instantiation
repeated lfb.base.v1beta1.Coin funds = 8
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/line/lfb-sdk/types.Coins"];
Expand All @@ -62,7 +62,7 @@ message MigrateContractProposal {
// CodeID references the new WASM code
uint64 code_id = 5 [(gogoproto.customname) = "CodeID"];
// MigrateMsg json encoded message to be passed to the contract on migration
bytes migrate_msg = 6 [(gogoproto.casttype) = "encoding/json.RawMessage"];
bytes migrate_msg = 6;
}

// UpdateAdminProposal gov proposal content type to set an admin for a contract.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ syntax = "proto3";
package cosmwasm.wasm.v1beta1;

import "gogoproto/gogo.proto";
import "types.proto";
import "cosmwasm/wasm/v1beta1/types.proto";
import "google/api/annotations.proto";
import "lfb/base/query/v1beta1/pagination.proto";

option go_package = "github.com/line/lfb-sdk/x/wasm/internal/types";
option go_package = "github.com/line/lfb-sdk/x/wasm/types";
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = false;

Expand Down Expand Up @@ -57,7 +57,7 @@ message QueryContractInfoResponse {

// address is the address of the contract
string address = 1;
ContractInfo contract_info = 2 [(gogoproto.embed) = true, (gogoproto.jsontag) = ""];
ContractInfo contract_info = 2 [(gogoproto.embed) = true, (gogoproto.nullable) = false, (gogoproto.jsontag) = ""];
}

// QueryContractHistoryRequest is the request type for the Query/ContractHistory RPC method
Expand All @@ -82,16 +82,12 @@ message QueryContractsByCodeRequest {
lfb.base.query.v1beta1.PageRequest pagination = 2;
}

// ContractInfoWithAddress adds the address (key) to the ContractInfo representation
message ContractInfoWithAddress {
option (gogoproto.equal) = true;

string address = 1;
ContractInfo contract_info = 2 [(gogoproto.embed) = true, (gogoproto.jsontag) = ""];
}
// QueryContractsByCodeResponse is the response type for the Query/ContractsByCode RPC method
// QueryContractsByCodeResponse is the response type for the
// Query/ContractsByCode RPC method
message QueryContractsByCodeResponse {
repeated ContractInfoWithAddress contract_infos = 1 [(gogoproto.nullable) = false];
// contracts are a set of contract addresses
repeated string contracts = 1;

// pagination defines the pagination in the response.
lfb.base.query.v1beta1.PageResponse pagination = 2;
}
Expand All @@ -104,35 +100,40 @@ message QueryAllContractStateRequest {
lfb.base.query.v1beta1.PageRequest pagination = 2;
}

// QueryAllContractStateResponse is the response type for the Query/AllContractState RPC method
// QueryAllContractStateResponse is the response type for the
// Query/AllContractState RPC method
message QueryAllContractStateResponse {
repeated Model models = 1 [(gogoproto.nullable) = false];
// pagination defines the pagination in the response.
lfb.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryRawContractStateRequest is the request type for the Query/RawContractState RPC method
// QueryRawContractStateRequest is the request type for the
// Query/RawContractState RPC method
message QueryRawContractStateRequest {
// address is the address of the contract
string address = 1;
bytes query_data = 2;
}

// QueryRawContractStateResponse is the response type for the Query/RawContractState RPC method
// QueryRawContractStateResponse is the response type for the
// Query/RawContractState RPC method
message QueryRawContractStateResponse {
// Data contains the raw store data
bytes data = 1;
}

// QuerySmartContractStateRequest is the request type for the Query/SmartContractState RPC method
// QuerySmartContractStateRequest is the request type for the
// Query/SmartContractState RPC method
message QuerySmartContractStateRequest {
// address is the address of the contract
string address = 1;
// QueryData contains the query data passed to the contract
bytes query_data = 2;
}

// QuerySmartContractStateResponse is the response type for the Query/SmartContractState RPC method
// QuerySmartContractStateResponse is the response type for the
// Query/SmartContractState RPC method
message QuerySmartContractStateResponse {
// Data contains the json data returned from the smart contract
bytes data = 1 [(gogoproto.casttype) = "encoding/json.RawMessage"];
Expand All @@ -147,7 +148,8 @@ message QueryCodeRequest {
message CodeInfoResponse {
option (gogoproto.equal) = true;

uint64 code_id = 1 [(gogoproto.customname) = "CodeID", (gogoproto.jsontag) = "id"]; // id for legacy support
uint64 code_id = 1 [(gogoproto.customname) = "CodeID",
(gogoproto.jsontag) = "id"]; // id for legacy support
string creator = 2;
bytes data_hash = 3 [(gogoproto.casttype) = "github.com/line/ostracon/libs/bytes.HexBytes"];
string source = 4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package cosmwasm.wasm.v1beta1;

import "lfb/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";
import "types.proto";
import "cosmwasm/wasm/v1beta1/types.proto";

option go_package = "github.com/line/lfb-sdk/x/wasm/internal/types";
option go_package = "github.com/line/lfb-sdk/x/wasm/types";
option (gogoproto.goproto_getters_all) = false;

// Msg defines the wasm Msg service.
Expand All @@ -14,7 +14,7 @@ service Msg {
rpc StoreCode(MsgStoreCode) returns (MsgStoreCodeResponse);
// Instantiate creates a new smart contract instance for the given code id.
rpc InstantiateContract(MsgInstantiateContract) returns (MsgInstantiateContractResponse);
// Store Wasm code and Instantiate a new contract
// StoreCodeAndInstantiatecontract upload code and instantiate a contract using it.
rpc StoreCodeAndInstantiateContract(MsgStoreCodeAndInstantiateContract)
returns (MsgStoreCodeAndInstantiateContractResponse);
// Execute submits the given message data to a smart contract
Expand All @@ -35,11 +35,13 @@ message MsgStoreCode {
string sender = 1;
// WASMByteCode can be raw or gzip compressed
bytes wasm_byte_code = 2 [(gogoproto.customname) = "WASMByteCode"];
// Source is a valid absolute HTTPS URI to the contract's source code, optional
// Source is a valid absolute HTTPS URI to the contract's source code,
// optional
string source = 3;
// Builder is a valid docker image name with tag, optional
string builder = 4;
// InstantiatePermission access control to apply on contract creation, optional
// InstantiatePermission access control to apply on contract creation,
// optional
AccessConfig instantiate_permission = 5;
}
// MsgStoreCodeResponse returns store result data.
Expand All @@ -48,7 +50,8 @@ message MsgStoreCodeResponse {
uint64 code_id = 1 [(gogoproto.customname) = "CodeID"];
}

// MsgInstantiateContract create a new smart contract instance for the given code id.
// MsgInstantiateContract create a new smart contract instance for the given
// code id.
message MsgInstantiateContract {
// Sender is the that actor that signed the messages
string sender = 1;
Expand All @@ -59,7 +62,7 @@ message MsgInstantiateContract {
// Label is optional metadata to be stored with a contract instance.
string label = 4;
// InitMsg json encoded message to be passed to the contract on instantiation
bytes init_msg = 5 [(gogoproto.casttype) = "encoding/json.RawMessage"];
bytes init_msg = 5;
// Funds coins that are transferred to the contract on instantiation
repeated lfb.base.v1beta1.Coin funds = 6
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/line/lfb-sdk/types.Coins"];
Expand Down Expand Up @@ -111,9 +114,9 @@ message MsgExecuteContract {
// Contract is the address of the smart contract
string contract = 2;
// Msg json encoded message to be passed to the contract
bytes msg = 3 [(gogoproto.casttype) = "encoding/json.RawMessage"];
bytes msg = 3;
// Funds coins that are transferred to the contract on execution
repeated lfb.base.v1beta1.Coin funds = 5
repeated lfb.base.v1beta1.Coin funds = 4
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/line/lfb-sdk/types.Coins"];
}

Expand All @@ -132,7 +135,7 @@ message MsgMigrateContract {
// CodeID references the new WASM code
uint64 code_id = 3 [(gogoproto.customname) = "CodeID"];
// MigrateMsg json encoded message to be passed to the contract on migration
bytes migrate_msg = 4 [(gogoproto.casttype) = "encoding/json.RawMessage"];
bytes migrate_msg = 4;
}

// MsgMigrateContractResponse returns contract migration result data.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
syntax = "proto3";
package cosmwasm.wasm.v1beta1;

import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";

option go_package = "github.com/line/lfb-sdk/x/wasm/internal/types";
option go_package = "github.com/line/lfb-sdk/x/wasm/types";
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = true;

Expand Down Expand Up @@ -67,7 +69,8 @@ message CodeInfo {
bytes code_hash = 1;
// Creator address who initially stored the code
string creator = 2;
// Source is a valid absolute HTTPS URI to the contract's source code, optional
// Source is a valid absolute HTTPS URI to the contract's source code,
// optional
string source = 3;
// Builder is a valid docker image name with tag, optional
string builder = 4;
Expand All @@ -88,11 +91,15 @@ message ContractInfo {
// Label is optional metadata to be stored with a contract instance.
string label = 4;
// Created Tx position when the contract was instantiated.
// This data should kept internal and not be exposed via query results. Just use for sorting
// This data should kept internal and not be exposed via query results. Just
// use for sorting
AbsoluteTxPosition created = 5;
string ibc_port_id = 6 [(gogoproto.customname) = "IBCPortID"];
// Status is a status of a contract
ContractStatus status = 7;
// Extension is an extension point to store custom metadata within the
// persistence model.
google.protobuf.Any extension = 8 [(cosmos_proto.accepts_interface) = "ContractInfoExtension"];
}

// ContractCodeHistoryOperationType actions that caused a code change
Expand Down Expand Up @@ -122,11 +129,13 @@ message ContractCodeHistoryEntry {
bytes msg = 4 [(gogoproto.casttype) = "encoding/json.RawMessage"];
}

// AbsoluteTxPosition is a unique transaction position that allows for global ordering of transactions.
// AbsoluteTxPosition is a unique transaction position that allows for global
// ordering of transactions.
message AbsoluteTxPosition {
// BlockHeight is the block the contract was created at
uint64 block_height = 1;
// TxIndex is a monotonic counter within the block (actual transaction index, or gas consumed)
// TxIndex is a monotonic counter within the block (actual transaction index,
// or gas consumed)
uint64 tx_index = 2;
}

Expand All @@ -136,4 +145,4 @@ message Model {
bytes key = 1 [(gogoproto.casttype) = "github.com/line/ostracon/libs/bytes.HexBytes"];
// base64-encode raw value
bytes value = 2;
}
}
3 changes: 1 addition & 2 deletions scripts/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ protoc_gen_gocosmos() {

protoc_gen_gocosmos

proto_dirs=$(find ./proto ./x/wasm/internal/types -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
for dir in $proto_dirs; do
buf protoc \
-I "proto" \
-I "third_party/proto" \
-I "x/wasm/internal/types" \
--gocosmos_out=plugins=interfacetype+grpc,\
Mgoogle/protobuf/any.proto=github.com/line/lfb-sdk/codec/types:. \
--grpc-gateway_out=logtostderr=true:. \
Expand Down
Loading