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: merge wasmd v0.27.0 #570

Merged
merged 144 commits into from
Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
8e5f86d
Important: add iterator feature support
ethanfrey Sep 22, 2021
51db87b
Fix inconsistent return of contractAddress from keeper/init()
assafmo Sep 22, 2021
5eaa33d
Handle contract info query
alpe Sep 27, 2021
7596bc4
Implement tx counter for transaction info
alpe Sep 27, 2021
eba1387
Treat all contracts as pinned for gas costs in reply
ethanfrey Oct 7, 2021
40a4f52
Adjust gas prices in tests
ethanfrey Oct 7, 2021
566713c
Query all pinned code ids
alpe Oct 7, 2021
a488fab
Upgrade wasmvm-v1.0.0-soon2
alpe Oct 7, 2021
f985d50
Benchmarks for gas pricing
ethanfrey Oct 8, 2021
c1d2cb5
Update gas costs
alpe Oct 8, 2021
4e90a9b
fix: fix build error
shiki-tak Jun 8, 2022
7ff106e
remove unused flags from cmd prompt
fkneeland-figure Oct 14, 2021
43d8345
Add golangci lint check on pull requests
fkneeland-figure Oct 25, 2021
5e4eb96
Fix message representation for signing
alpe Oct 25, 2021
d247e9c
Add linter name and minor golint related updates
alpe Oct 25, 2021
763762e
Fixed wrong error message when lastCodeID value is incorrect
fkneeland-figure Oct 26, 2021
c62d0d9
Disable false positive
alpe Oct 26, 2021
c2b8b3c
Open read access to sequences
alpe Nov 5, 2021
aa6e12a
Limit simulation gas
alpe Nov 17, 2021
95f7d37
fix: build error
shiki-tak Jun 9, 2022
ac0957c
Return NoSuchContract system error instead of sdk error in ContractIn…
maurolacy Dec 16, 2021
0aa7bff
Implement PinCode and UnpinCode proposal client handlers (#707)
orkunkl Dec 23, 2021
dbf864e
Upgrade wasmvm to v1.0.0-beta5
alpe Jan 4, 2022
68a1a39
Upgrade to cosmos-sdk v0.45.0
alpe Jan 20, 2022
06c83fe
Proper systemerror follow-up
maurolacy Jan 20, 2022
86d0a86
Failing test showing it was not currently pinned
ethanfrey Jan 20, 2022
c2c461e
And properly pin it on governance vote
ethanfrey Jan 20, 2022
fa95a2f
Require --no-admin flag if no admin set
ethanfrey Jan 20, 2022
e1d1e12
Fix tests, handle genesis init as well
ethanfrey Jan 20, 2022
0fb3d3e
Fixed error message capitalization
ethanfrey Jan 21, 2022
d1e6f74
Add new proto types for the sudo an execute proposals
ethanfrey Jan 21, 2022
dde48d8
Compile proto files
shiki-tak Jun 14, 2022
a539857
Registered new proposal types
ethanfrey Jan 21, 2022
c612791
fix: remove unnecessary print
shiki-tak Jun 14, 2022
b3ec5ec
Wire up proposal handlers
ethanfrey Jan 21, 2022
ee96128
Wire up cli for exec and sudo proposal
ethanfrey Jan 21, 2022
ba93d96
Add rest routes for proposals;
ethanfrey Jan 24, 2022
72266ee
Add tests for Rest client
ethanfrey Jan 24, 2022
f9be9b2
Test execute and sudo proposal handlers
ethanfrey Jan 24, 2022
12faa2d
Remove RunAs from Migrate proposal
ethanfrey Jan 24, 2022
d13503b
fix tests
ethanfrey Jan 24, 2022
21163d8
Allow sending tokens along with governance wasm_execute proposal
ethanfrey Jan 24, 2022
5b639c7
Update documentation
ethanfrey Jan 24, 2022
275e1c5
Minor integration support
alpe Jan 28, 2022
0ccbd77
add missing colons in String of some proposals
loloicci Feb 10, 2022
a8c5282
Replace custom codec with sdk codec
alpe Feb 21, 2022
a5acf9f
Redact errors returned in reply
ethanfrey Feb 23, 2022
d672287
Fix lint error, failing test
ethanfrey Feb 23, 2022
abc8088
Fix submessage tests
ethanfrey Feb 23, 2022
fe5cf17
Adjust error string
ethanfrey Mar 2, 2022
3308c2d
Handle nil logger again
ethanfrey Mar 2, 2022
1e77542
Revert "Handle nil logger again"
alpe Mar 2, 2022
e485eb5
Fix test setup and assertions
alpe Mar 2, 2022
6225729
Add no admin flag for gov
alpe Mar 2, 2022
809883d
Relaxed address strength restrictions for legacy 20 byte addresses
iramiller Mar 3, 2022
ee91fa3
Make utils methods public
pinosu Mar 3, 2022
62e2ba7
Mark a whole lot of tests to skip on m1 as they core dump
ethanfrey Mar 7, 2022
b5362ba
Redact query errors
ethanfrey Mar 7, 2022
7684efc
Add deny list for some grpc queries
ethanfrey Mar 7, 2022
e24b4c4
fix: build error
shiki-tak Jun 15, 2022
e395e2f
Make type conversion helpers public
alpe Mar 9, 2022
cd78988
cleanup from PR comments
ethanfrey Mar 9, 2022
3a7a96e
fix: rename path
shiki-tak Jun 15, 2022
324b727
Improve how we redact query errors
ethanfrey Mar 9, 2022
ce654a8
Skip a few more tests on m1
ethanfrey Mar 9, 2022
d21ed2a
Ensure SystemError is consistently unredacted
ethanfrey Mar 9, 2022
cebe17d
fix: close iterators
albertchon Mar 22, 2022
7ca8673
Use callback pattern for contract state iterator
alpe Mar 25, 2022
b689f00
Add more tests for event edge cases
alpe Apr 6, 2022
35e17c4
fix: build error
shiki-tak Jun 16, 2022
596bf38
Unpack contract details from genesis
alpe Apr 12, 2022
1672d37
Revisit gov params doc and tests
alpe Apr 13, 2022
9beb9db
Add missing sudo and execute to codec
the-frey Apr 17, 2022
e874cf6
Add a basic validation test
the-frey Apr 17, 2022
5d9946d
Disable stargate queries
webmaster128 Apr 14, 2022
aca49b5
Remove dead code to make linter happy
webmaster128 Apr 21, 2022
e4a9894
Add ExecuteContractProposal test
the-frey Apr 21, 2022
6be179a
Make MaxLabelSize a var not const
ethanfrey Apr 27, 2022
606ba24
Add and test JSON object matcher
webmaster128 Apr 27, 2022
64da1eb
fix: fix import
shiki-tak Jun 16, 2022
81823ed
Make IsJSONObjectWithTopLevelKey public
webmaster128 Apr 27, 2022
930c4c0
Add WasmSnapshotter
assafmo Apr 25, 2022
1e31d3c
Make snapshot from keeper
ethanfrey Apr 27, 2022
de4689a
Rough draft of the restore method using multistore
ethanfrey Apr 27, 2022
4e2e7c4
properly register the snapshot manager
ethanfrey Apr 27, 2022
a8ce0cc
Move snapshotter to keeper and implement
ethanfrey Apr 27, 2022
69cd2b3
Add compression to snapshot wasm bytecode
ethanfrey Apr 27, 2022
713a951
Put GzipIt and Uncompress logic in a common folder
ethanfrey Apr 27, 2022
0f3fb97
Fix linting errors
ethanfrey Apr 27, 2022
6c33a30
Avoid sending duplicate wasm codes over the wire
ethanfrey Apr 27, 2022
1689a19
Properly handle when a message not for this extension arrives
ethanfrey Apr 27, 2022
34df544
Start testing snapshots
ethanfrey Apr 27, 2022
a3c98e1
Basic tend to end test for no errors
ethanfrey Apr 27, 2022
516d24d
Address @giansalex PR comments
ethanfrey Apr 27, 2022
e0ea888
Updates inspired by @giansalex branch
ethanfrey Apr 28, 2022
6cc82c5
Cannot commit in my test cases to load from proper height
ethanfrey Apr 28, 2022
8432d2b
SRemove loading history until I can fix tests here
ethanfrey Apr 28, 2022
100e4b6
Cleanup from Simon's comments
ethanfrey Apr 28, 2022
a974edd
Consolidate MaxWasmSize constraints into a single var
alpe Apr 29, 2022
febb194
fix: allow no admin in instantiation through proposal
jhernandezb May 2, 2022
5eb0a99
Add instantiate-nobody flag to cli store cmd (#827)
jhernandezb May 3, 2022
9359d65
Add MsgStoreCode and MsgInstantiateContract support to simulations
pinosu May 3, 2022
1a93cf4
Add snapshotter integration tests and minor cleanup
alpe May 3, 2022
de133ca
Minor test update
alpe May 3, 2022
01030e6
Fix linter warnings
alpe May 3, 2022
e4ed0e6
Delete duplicate testdata from simulation
pinosu May 3, 2022
0abdd6a
fix: build error
shiki-tak Jun 17, 2022
fef78a9
Fix contract path in simulations
alpe May 4, 2022
364346e
Add instantiate permission to CodeInfoResponse
jhernandezb May 5, 2022
d2c0bf8
chore: comment out snapshotter
shiki-tak Jun 17, 2022
f9573e6
Minor godoc update
alpe May 6, 2022
bd104e1
Bump wasmvm to v1.0.0-rc.0
alpe May 6, 2022
f2fc24a
Add libwasm-version query command
jhernandezb May 9, 2022
44e8e5d
add UpdateInstantiateConfig gov proposal
jhernandezb Apr 1, 2022
e8a1a61
update UpdateInstantiateConfigProposal proto definition
jhernandezb May 4, 2022
9456862
add to EnableAllProposals
jhernandezb May 5, 2022
a85ff59
add tests
jhernandezb May 5, 2022
feea968
fix: fix test error
shiki-tak Jun 17, 2022
2894e75
Add handlers
jhernandezb May 5, 2022
83cdcc3
add code-info query command
jhernandezb May 6, 2022
4e8029e
fix missing gov registration type
jhernandezb May 6, 2022
8e0ef5c
address code review comments
jhernandezb May 6, 2022
b360591
fix error message
jhernandezb May 6, 2022
f7f39aa
update proto field name
jhernandezb May 9, 2022
e003aae
Add compare logic for stricter AccessConfig
ethanfrey May 9, 2022
3e4ba9b
Enforce permission less permissive than default
ethanfrey May 9, 2022
cb271f2
Add a few more tests as requested in review
ethanfrey May 10, 2022
f4bb19c
Use LibwasmvmVersion from wasmvm root
webmaster128 May 16, 2022
78dcab0
Adapt codebase to new IBC3ChannelOpenResponse return value
webmaster128 May 16, 2022
bae4439
fix: test error
shiki-tak Jun 17, 2022
8544575
Use wasmvm import consistently
webmaster128 May 16, 2022
85751fa
Prepare release notes for 0.27
ethanfrey May 17, 2022
77cc9aa
Create query stack size limit
webmaster128 May 19, 2022
73ea0c2
fix: fix test error
shiki-tak Jun 21, 2022
f4f534a
fix: lint error
shiki-tak Jun 21, 2022
8fe027e
chore: update wasmvm version
shiki-tak Jun 21, 2022
a5775f3
Merge branch 'main' of github.com:line/lbm-sdk into issues/555
shiki-tak Jun 21, 2022
f38b645
chore: coverage up
shiki-tak Jun 27, 2022
cce1ef5
fix: change ContractAddrLen
shiki-tak Jul 7, 2022
c1d3995
fix: fix protobuf path
shiki-tak Jul 7, 2022
18ae5e2
fix: apply review
shiki-tak Jul 7, 2022
d704996
fix: fix typo & missing commit
shiki-tak Jul 7, 2022
7955f0b
chore: adjust gas
shiki-tak Jul 7, 2022
dba039e
chore: update go.mod
shiki-tak Jul 8, 2022
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased](https://github.com/line/lbm-sdk/compare/v0.45.0-rc0...HEAD)

### Features
* (x/wasm) [\#570](https://github.com/line/lbm-sdk/pull/570) Merge wasmd 0.27.0
* (x/wasm) [\#470](https://github.com/line/lbm-sdk/pull/470) remove contract activation control by actor
* (x/wasm) [\#513](https://github.com/line/lbm-sdk/pull/513) fix message representation for signing
* (x/foundation) [\#518](https://github.com/line/lbm-sdk/pull/518) add foundation treasury feature to x/foundation
Expand Down
120 changes: 117 additions & 3 deletions docs/core/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1017,14 +1017,18 @@
- [MsgIBCSend](#lbm.wasm.v1.MsgIBCSend)

- [lbm/wasm/v1/proposal.proto](#lbm/wasm/v1/proposal.proto)
- [AccessConfigUpdate](#lbm.wasm.v1.AccessConfigUpdate)
- [ClearAdminProposal](#lbm.wasm.v1.ClearAdminProposal)
- [ExecuteContractProposal](#lbm.wasm.v1.ExecuteContractProposal)
- [InstantiateContractProposal](#lbm.wasm.v1.InstantiateContractProposal)
- [MigrateContractProposal](#lbm.wasm.v1.MigrateContractProposal)
- [PinCodesProposal](#lbm.wasm.v1.PinCodesProposal)
- [StoreCodeProposal](#lbm.wasm.v1.StoreCodeProposal)
- [SudoContractProposal](#lbm.wasm.v1.SudoContractProposal)
- [UnpinCodesProposal](#lbm.wasm.v1.UnpinCodesProposal)
- [UpdateAdminProposal](#lbm.wasm.v1.UpdateAdminProposal)
- [UpdateContractStatusProposal](#lbm.wasm.v1.UpdateContractStatusProposal)
- [UpdateInstantiateConfigProposal](#lbm.wasm.v1.UpdateInstantiateConfigProposal)

- [lbm/wasm/v1/query.proto](#lbm/wasm/v1/query.proto)
- [CodeInfoResponse](#lbm.wasm.v1.CodeInfoResponse)
Expand All @@ -1040,6 +1044,8 @@
- [QueryContractInfoResponse](#lbm.wasm.v1.QueryContractInfoResponse)
- [QueryContractsByCodeRequest](#lbm.wasm.v1.QueryContractsByCodeRequest)
- [QueryContractsByCodeResponse](#lbm.wasm.v1.QueryContractsByCodeResponse)
- [QueryPinnedCodesRequest](#lbm.wasm.v1.QueryPinnedCodesRequest)
- [QueryPinnedCodesResponse](#lbm.wasm.v1.QueryPinnedCodesResponse)
- [QueryRawContractStateRequest](#lbm.wasm.v1.QueryRawContractStateRequest)
- [QueryRawContractStateResponse](#lbm.wasm.v1.QueryRawContractStateResponse)
- [QuerySmartContractStateRequest](#lbm.wasm.v1.QuerySmartContractStateRequest)
Expand Down Expand Up @@ -14312,7 +14318,6 @@ Params defines the set of wasm parameters.
| ----- | ---- | ----- | ----------- |
| `code_upload_access` | [AccessConfig](#lbm.wasm.v1.AccessConfig) | | |
| `instantiate_default_permission` | [AccessType](#lbm.wasm.v1.AccessType) | | |
| `max_wasm_code_size` | [uint64](#uint64) | | |
| `gas_multiplier` | [uint64](#uint64) | | |
| `instance_cost` | [uint64](#uint64) | | |
| `compile_cost` | [uint64](#uint64) | | |
Expand Down Expand Up @@ -14790,6 +14795,23 @@ MsgIBCSend



<a name="lbm.wasm.v1.AccessConfigUpdate"></a>

### AccessConfigUpdate
AccessConfigUpdate contains the code id and the access config to be
applied.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `code_id` | [uint64](#uint64) | | CodeID is the reference to the stored WASM code to be updated |
| `instantiate_permission` | [AccessConfig](#lbm.wasm.v1.AccessConfig) | | InstantiatePermission to apply to the set of code ids |






<a name="lbm.wasm.v1.ClearAdminProposal"></a>

### ClearAdminProposal
Expand All @@ -14807,6 +14829,27 @@ ClearAdminProposal gov proposal content type to clear the admin of a contract.



<a name="lbm.wasm.v1.ExecuteContractProposal"></a>

### ExecuteContractProposal
ExecuteContractProposal gov proposal content type to call execute on a
contract.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `title` | [string](#string) | | Title is a short summary |
| `description` | [string](#string) | | Description is a human readable text |
| `run_as` | [string](#string) | | RunAs is the address that is passed to the contract's environment as sender |
| `contract` | [string](#string) | | Contract is the address of the smart contract |
| `msg` | [bytes](#bytes) | | Msg json encoded message to be passed to the contract as execute |
| `funds` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | Funds coins that are transferred to the contract on instantiation |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the protobuf path (maybe it comes from from another file)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is correct because it is the based cosmos proto file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I suggested changing cosmos -> lbm. Is it ok still to be "cosmos.base.v1beta1.Coin"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @zemyblue nim commented below, this place should have been changed to cosmos(#564), right?







<a name="lbm.wasm.v1.InstantiateContractProposal"></a>

### InstantiateContractProposal
Expand Down Expand Up @@ -14838,8 +14881,9 @@ MigrateContractProposal gov proposal content type to migrate a contract.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `title` | [string](#string) | | Title is a short summary |
| `description` | [string](#string) | | Description is a human readable text |
| `run_as` | [string](#string) | | RunAs is the address that is passed to the contract's environment as sender |
| `description` | [string](#string) | | Description is a human readable text

Note: skipping 3 as this was previously used for unneeded run_as |
| `contract` | [string](#string) | | Contract is the address of the smart contract |
| `code_id` | [uint64](#uint64) | | CodeID references the new WASM code |
| `msg` | [bytes](#bytes) | | Msg json encoded message to be passed to the contract on migration |
Expand Down Expand Up @@ -14885,6 +14929,24 @@ StoreCodeProposal gov proposal content type to submit WASM code to the system



<a name="lbm.wasm.v1.SudoContractProposal"></a>

### SudoContractProposal
SudoContractProposal gov proposal content type to call sudo on a contract.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `title` | [string](#string) | | Title is a short summary |
| `description` | [string](#string) | | Description is a human readable text |
| `contract` | [string](#string) | | Contract is the address of the smart contract |
| `msg` | [bytes](#bytes) | | Msg json encoded message to be passed to the contract as sudo |






<a name="lbm.wasm.v1.UnpinCodesProposal"></a>

### UnpinCodesProposal
Expand Down Expand Up @@ -14937,6 +14999,24 @@ UpdateStatusProposal gov proposal content type to update the contract status.




<a name="lbm.wasm.v1.UpdateInstantiateConfigProposal"></a>

### UpdateInstantiateConfigProposal
UpdateInstantiateConfigProposal gov proposal content type to update
instantiate config to a set of code ids.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `title` | [string](#string) | | Title is a short summary |
| `description` | [string](#string) | | Description is a human readable text |
| `access_config_updates` | [AccessConfigUpdate](#lbm.wasm.v1.AccessConfigUpdate) | repeated | AccessConfigUpdate contains the list of code ids and the access config to be applied. |





<!-- end messages -->

<!-- end enums -->
Expand Down Expand Up @@ -15163,6 +15243,39 @@ Query/ContractsByCode RPC method



<a name="lbm.wasm.v1.QueryPinnedCodesRequest"></a>

### QueryPinnedCodesRequest
QueryPinnedCodesRequest is the request type for the Query/PinnedCodes
RPC method


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the protobuf path (maybe it comes from from another file)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is correct because it is the based cosmos proto file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.







<a name="lbm.wasm.v1.QueryPinnedCodesResponse"></a>

### QueryPinnedCodesResponse
QueryPinnedCodesResponse is the response type for the
Query/PinnedCodes RPC method


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `code_ids` | [uint64](#uint64) | repeated | |
| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the protobuf path (maybe it comes from from another file)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is correct because it is the based cosmos proto file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.







<a name="lbm.wasm.v1.QueryRawContractStateRequest"></a>

### QueryRawContractStateRequest
Expand Down Expand Up @@ -15250,6 +15363,7 @@ Query provides defines the gRPC querier service
| `SmartContractState` | [QuerySmartContractStateRequest](#lbm.wasm.v1.QuerySmartContractStateRequest) | [QuerySmartContractStateResponse](#lbm.wasm.v1.QuerySmartContractStateResponse) | SmartContractState get smart query result from the contract | GET|/lbm/wasm/v1/contract/{address}/smart/{query_data}|
| `Code` | [QueryCodeRequest](#lbm.wasm.v1.QueryCodeRequest) | [QueryCodeResponse](#lbm.wasm.v1.QueryCodeResponse) | Code gets the binary code and metadata for a singe wasm code | GET|/lbm/wasm/v1/code/{code_id}|
| `Codes` | [QueryCodesRequest](#lbm.wasm.v1.QueryCodesRequest) | [QueryCodesResponse](#lbm.wasm.v1.QueryCodesResponse) | Codes gets the metadata for all stored wasm codes | GET|/lbm/wasm/v1/code|
| `PinnedCodes` | [QueryPinnedCodesRequest](#lbm.wasm.v1.QueryPinnedCodesRequest) | [QueryPinnedCodesResponse](#lbm.wasm.v1.QueryPinnedCodesResponse) | PinnedCodes gets the pinned code ids | GET|/lbm/wasm/v1/codes/pinned|

<!-- end services -->

Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ require (
github.com/line/iavl/v2 v2.0.0-init.1.0.20220215225951-cb11c91d8857
github.com/line/ostracon v1.0.6-0.20220614053335-f9d9fa2cc779
github.com/line/tm-db/v2 v2.0.0-init.1.0.20220121012851-61d2bc1d9486
github.com/line/wasmvm v0.16.3-0.9.0
github.com/line/wasmvm v1.0.0-0.10.0
github.com/magiconair/properties v1.8.6
github.com/mailru/easyjson v0.7.7
github.com/mattn/go-isatty v0.0.14
Expand All @@ -42,6 +42,7 @@ require (
github.com/prometheus/common v0.34.0
github.com/rakyll/statik v0.1.7
github.com/regen-network/cosmos-proto v0.3.1
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/rs/zerolog v1.27.0
github.com/spf13/cast v1.5.0
github.com/spf13/cobra v1.4.0
Expand All @@ -62,5 +63,6 @@ require (
replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

google.golang.org/grpc => google.golang.org/grpc v1.33.2
)
15 changes: 5 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,10 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/ethereum/go-ethereum v1.10.18/go.mod h1:RD3NhcSBjZpj3k+SnQq24wBrmnmie78P5R/P62iNBD8=
github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64=
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0=
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64=
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A=
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg=
github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0=
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk=
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
Expand Down Expand Up @@ -721,8 +719,8 @@ github.com/line/ostracon v1.0.6-0.20220614053335-f9d9fa2cc779/go.mod h1:SGNYNMSs
github.com/line/tm-db/v2 v2.0.0-init.1.0.20210413083915-5bb60e117524/go.mod h1:wmkyPabXjtVZ1dvRofmurjaceghywtCSYGqFuFS+TbI=
github.com/line/tm-db/v2 v2.0.0-init.1.0.20220121012851-61d2bc1d9486 h1:uvXQdcWaUyNsgkXBz375FpQ285WEJaLXhQ5HtoNK/GU=
github.com/line/tm-db/v2 v2.0.0-init.1.0.20220121012851-61d2bc1d9486/go.mod h1:wmkyPabXjtVZ1dvRofmurjaceghywtCSYGqFuFS+TbI=
github.com/line/wasmvm v0.16.3-0.9.0 h1:snRk3T3mJV+7HTjCIhHKmeYUEN9uRbyRVhmuhele/jM=
github.com/line/wasmvm v0.16.3-0.9.0/go.mod h1:cgsILoCDigfQ2XplFI4rOo2ImOLEZH/OM8sulxGoKUA=
github.com/line/wasmvm v1.0.0-0.10.0 h1:lxKdyNrRug/Sk7h2pb0aBsbTMNTesQU+TM/edSS9cg0=
github.com/line/wasmvm v1.0.0-0.10.0/go.mod h1:86gNsXbobrNQccER5XbU5j6qN0P/C1JML0iSKIgLYho=
github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
Expand Down Expand Up @@ -889,6 +887,7 @@ github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand Down Expand Up @@ -963,8 +962,9 @@ github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRr
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U=
github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
Expand Down Expand Up @@ -1052,20 +1052,15 @@ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69
github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI=
github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA=
github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM=
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok=
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8=
github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s=
github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U=
github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI=
github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk=
github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E=
github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME=
github.com/tendermint/tm-db v0.6.0 h1:Us30k7H1UDcdqoSPhmP8ztAW/SWV6c6OfsfeCiboTC4=
github.com/tendermint/tm-db v0.6.0/go.mod h1:xj3AWJ08kBDlCHKijnhJ7mTcDMOikT1r8Poxy2pJn7Q=
github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/gjson v1.14.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
Expand Down
2 changes: 1 addition & 1 deletion proto/lbm/wasm/v1/ibc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ message MsgIBCSend {

// Data is the payload to transfer. We must not make assumption what format or
// content is in here.
bytes data = 6 [(gogoproto.casttype) = "encoding/json.RawMessage"];
bytes data = 6;
}

// MsgIBCCloseChannel port and channel need to be owned by the contract
Expand Down
55 changes: 53 additions & 2 deletions proto/lbm/wasm/v1/proposal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ message MigrateContractProposal {
string title = 1;
// Description is a human readable text
string description = 2;
// RunAs is the address that is passed to the contract's environment as sender
string run_as = 3;
// Note: skipping 3 as this was previously used for unneeded run_as

// Contract is the address of the smart contract
string contract = 4;
// CodeID references the new WASM code
Expand All @@ -63,6 +63,36 @@ message MigrateContractProposal {
bytes msg = 6 [(gogoproto.casttype) = "RawContractMessage"];
}

// SudoContractProposal gov proposal content type to call sudo on a contract.
message SudoContractProposal {
// Title is a short summary
string title = 1;
// Description is a human readable text
string description = 2;
// Contract is the address of the smart contract
string contract = 3;
// Msg json encoded message to be passed to the contract as sudo
bytes msg = 4 [(gogoproto.casttype) = "RawContractMessage"];
}

// ExecuteContractProposal gov proposal content type to call execute on a
// contract.
message ExecuteContractProposal {
// Title is a short summary
string title = 1;
// Description is a human readable text
string description = 2;
// RunAs is the address that is passed to the contract's environment as sender
string run_as = 3;
// Contract is the address of the smart contract
string contract = 4;
// Msg json encoded message to be passed to the contract as execute
bytes msg = 5 [(gogoproto.casttype) = "RawContractMessage"];
// Funds coins that are transferred to the contract on instantiation
repeated cosmos.base.v1beta1.Coin funds = 6
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/line/lbm-sdk/types.Coins"];
}

// UpdateAdminProposal gov proposal content type to set an admin for a contract.
message UpdateAdminProposal {
// Title is a short summary
Expand Down Expand Up @@ -116,3 +146,24 @@ message UpdateContractStatusProposal {
// Status to be set
ContractStatus status = 4;
}

// AccessConfigUpdate contains the code id and the access config to be
// applied.
message AccessConfigUpdate {
// CodeID is the reference to the stored WASM code to be updated
uint64 code_id = 1 [(gogoproto.customname) = "CodeID"];
// InstantiatePermission to apply to the set of code ids
AccessConfig instantiate_permission = 2 [(gogoproto.nullable) = false];
}

// UpdateInstantiateConfigProposal gov proposal content type to update
// instantiate config to a set of code ids.
message UpdateInstantiateConfigProposal {
// Title is a short summary
string title = 1 [(gogoproto.moretags) = "yaml:\"title\""];
// Description is a human readable text
string description = 2 [(gogoproto.moretags) = "yaml:\"description\""];
// AccessConfigUpdate contains the list of code ids and the access config
// to be applied.
repeated AccessConfigUpdate access_config_updates = 3 [(gogoproto.nullable) = false];
}
Loading