Commit Graph

53 Commits

Author SHA1 Message Date
Alex Lynham
393f49e5cb Fix imports 2022-07-29 08:31:56 +02:00
Alex Lynham
e08c8a37c8 Add sorting fix from terra devs 2022-07-29 08:31:56 +02:00
Simon Warta
2390ea15a0 Create query stack size limit 2022-05-19 10:35:27 +02:00
Ethan Frey
a67dae70b7 Enforce permission less permissive than default 2022-05-10 16:09:35 +02:00
Ethan Frey
bff3aff95b Run new "make format" 2022-05-09 22:34:26 +02:00
jhernandezb
72710effca add UpdateInstantiateConfig gov proposal 2022-05-09 11:35:37 -06:00
Ethan Frey
1253c8e360 Merge branch 'main' into add-state-sync 2022-05-04 10:18:53 +02:00
Alexander Peters
bfb4d31fca Consolidate MaxWasmSize constraints into a single var (#826)
* Convert MaxWasmSize to var

Also removes redundant maxWasmSize param

* Convert MaxWasmSize to int

* Update CHANGELOG

* Complete max wasm size changes

* Update compile flags

Co-authored-by: Cole Brown <bigswim@gmail.com>
2022-04-29 18:54:06 +02:00
Ethan Frey
4cccddbb37 Put GzipIt and Uncompress logic in a common folder 2022-04-27 21:01:28 +02:00
Alexander Peters
68b4908b78 Unpack contract details from genesis (#802)
* Unpack contract details from genesis

* Address linter warnings
2022-04-12 17:46:44 +02:00
Alex Peters
a543aa53a1 Use callback pattern for contract state iterator 2022-03-25 10:56:21 +01:00
Albert Chon
1c9a1e11b6 fix: close iterators 2022-03-22 19:38:34 -04:00
Ethan Frey
20ed020fa7 Update documentation 2022-01-24 21:25:48 +01:00
Ethan Frey
3acc8c960c Expose SetParams as I will need that for migration code outside of this package 2022-01-24 13:46:18 +01:00
Alexander Peters
b8319aa334 Upgrade to cosmos-sdk v0.45.0 (#717)
* Upgrade to cosmos-sdk v0.44.5

* Upgrade to sdk v0.45.0-rc1

* Fix local test deploy scripts

* Bump to v0.45.0 final release

* Fixed replace to 0.45.0 not rc1

* Fix changed import path since rc1

Co-authored-by: Ethan Frey <ethanfrey@users.noreply.github.com>
2022-01-20 12:47:01 +01:00
Alex Peters
445fbb7564 Open read access to sequences 2021-11-05 15:07:12 +01:00
Alexander Peters
c18bc4b00e Add linter name and minor golint related updates (#663) 2021-10-25 15:33:21 +02:00
fkneeland-figure
57517b0c33 Add golangci lint check on pull requests (#645)
* added golangci lint check on pull requests

* changelog update

* updated to use circleci instead of github actions

* testing a golang change

* added workflow

* updated how we find the golangci command in the make file

* using orb for golangci

* Added golangci install make command

* use docker image for golangci

* stop using make in circleci

* reverted golang change to trigger ci

* gofmt

* make fmt

* fixed a few things

* updated version on golintci

* fixed all the lint errors

* check version

* skipped wrongly failing lint

* Revert generated file changes

* fix import grouping, return errors on failures, initialization of arrays revert

* fixed a few lint errors

* addressed more code review comments

* updated with error check

* increased timeout for golangci-lint

* dont format autogenerated files

Co-authored-by: Carlton Hanna <channa@figure.com>
2021-10-25 09:09:47 +02:00
fkneeland-figure
dd390d7f5f Go Formatting update (#648)
* make fmt

* changelog update
2021-10-21 14:54:16 +02:00
Ethan Frey
e5dc6fe583 Treat all contracts as pinned for gas costs in reply 2021-10-07 11:23:58 +02:00
Assaf Morami
ed96573c53 Fix inconsistent return of contractAddress from keeper/init()
This will not affect functionality whatsoever, it just makes for a more consistent code, as discussed in issue #616.
2021-09-22 21:59:47 +03:00
Alex Peters
2fe56bffaf Fix query handler instantiation 2021-09-13 09:48:31 +02:00
Piotr Husiatyński
b2fc913398 Keeper tests (#590)
* More keeper tests

x/wasm/keeper tests are extended to test various input validation.
Keeper input is validated before passing to the keeper method when used
within wasmd application. We cannot ensure such validation when this
keeper is used outside of wasmd application. To keep it safe, fully
validate keeper methods input.

hackatom.wasm is loaded into memory during initialization to avoid
reading file in each test separately. Once migrated to go 1.16, embed
package should be used instead.

Run goimport on certain files.

Some comments fixed or removed.

* ensure that creator address is not nil
2021-08-27 15:37:07 +02:00
Ethan Frey
f51ec67099 Remove (now-unneeded) filtering in DefaultWasmVMContractResponseHandler.Handle 2021-08-12 13:36:22 +02:00
Ethan Frey
35cc9027d8 Add failing testcase showing messages make it into reply block 2021-08-12 13:15:29 +02:00
Alex Peters
7b2cfa48ed Strip message events and reorder 2021-08-11 14:08:56 +02:00
Alex Peters
7bc048e1ed Add tests for events 2021-08-11 13:12:46 +02:00
Alex Peters
e9156be200 Refactor events 2021-08-10 18:19:16 +02:00
Alex Peters
4f22421404 Add contract features to debug logging
(cherry picked from commit ccd075200f704c39ae619d36be781092711bbd41)
2021-08-05 15:45:08 +02:00
Ethan Frey
6bde321974 x/wasm/keeper compiled 2021-07-28 11:24:44 +02:00
Ethan Frey
6f720a4c88 PR Comment: move where truncating address length to 20 2021-07-28 11:18:58 +02:00
Ethan Frey
1330b115d6 Update hash algorithm 2021-07-28 11:18:21 +02:00
Ethan Frey
166f9dc78e Tests compile and pass 2021-07-26 22:11:29 +02:00
Alex Peters
b0b1fa88bc Upgrade wasmvm v0.15.x 2021-07-07 09:53:03 +02:00
Alexander Peters
c05df881fb Charge gas for custom event attributes and messages (#539)
* Charge gas for custom event attributes

* Introduce gas register for gas costs

* Review feedback

* Tests and minor updates

* Godoc
2021-06-25 10:00:46 +02:00
Alexander Peters
f8e39bf5cd Merge pull request #534 from CosmWasm/response_428
Cleanup keeper result types
2021-06-14 08:56:05 +02:00
Alex Peters
0dd695c126 Cleanup keeper result types 2021-06-11 12:38:30 +02:00
Alex Peters
7f5200b9dd Add cost and api cost options 2021-06-11 11:46:49 +02:00
Alex Peters
c637add01c Remove max gas limit 2021-06-07 10:46:26 +02:00
Alex Peters
2f2d59a151 Allow access to contract address builder 2021-06-01 10:42:07 +02:00
Alex Peters
ed60864bf2 Use interface for better decoupling 2021-06-01 08:39:06 +02:00
Alexander Peters
305f13cc0a Submessage reply can overwrite caller response (#502)
* Reply may overwrite result data

* Fix interface name

* Refacting for tests

* Test response handler

* Fix naked error
2021-04-27 14:00:42 +02:00
Alex Peters
c377d7110e List contract address without other data 2021-04-23 15:15:54 +02:00
Alex Peters
8ef2d2695b Persist last code update with contract lookup index 2021-04-23 13:29:14 +02:00
Alex Peters
aabc575ff4 Fix InitializePinnedCodes 2021-04-16 13:39:15 +02:00
Alexander Peters
d90bf6ec3f Extend ContractInfo for custom data (#492)
* Extend ContractInfo with custom data

* Review comments
2021-04-16 13:38:21 +02:00
Alex Peters
1a355dcb26 Continue wasmvm version upgrade 2021-04-13 10:27:05 +02:00
Ethan Frey
42ca87d161 Handle ReplySuccess + ReplyError properly 2021-04-12 22:14:43 +02:00
Alex Peters
55ac19bc7e Public CoinTransferrer interface 2021-03-24 14:11:43 +01:00
Alex Peters
408bba14a5 Extract contract keeper 2021-03-24 14:11:42 +01:00