Commit Graph

46 Commits

Author SHA1 Message Date
Ethan Frey
27d30513b2 Add a few more tests as requested in review 2022-05-10 16:25:11 +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
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
Simon Warta
72062f160e Upgrade wasmvm to v1.0.0-beta10 2022-04-06 14:02:49 +02:00
Ethan Frey
feeccb666b Mark a whole lot of tests to skip on m1 as they core dump 2022-03-07 22:09:39 +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
Alexander Peters
dfba1395d9 Fix message representation for signing (#658)
* Introduce RawContractMessage type

* Add json signbytes test for proposals

* No assumptions on MsgIBCSend.data content

* Smart query uses RawContractMessage

* Revert method signature change to be consistent

* Review comment

* Update after discussions
2021-10-25 15:23:19 +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
Alexander Peters
bc7a52260d Update gas costs (#636)
* Update gas costs

* Review feedback

* Review comments
2021-10-08 14:34:44 +02:00
Alexander Peters
62e976a551 Upgrade wasmvm-v1.0.0-soon2 (#628)
* Upgrade wasmvm-v1.0.0-soon2

* Improve comment on DefaultGasMultiplier

Co-authored-by: Simon Warta <simon@warta.it>
2021-10-07 14:11:37 +02:00
Alexander Peters
58f3776f6e Implement tx counter for transaction info (#621)
* Implement tx counter for transaction info

* Count tx before pre-conditions

* Doc update
2021-09-27 21:53:01 +02:00
Ethan Frey
5c42c10b71 Adjust gas prices for new contracts 2021-09-22 19:19:58 +02:00
Ethan Frey
f5dc720926 Important: add iterator feature support 2021-09-22 19:11:49 +02:00
Alexander Peters
a447ee0c12 Ensure query isolation (#611)
* Ensure query isolation

* Review feedback
2021-09-14 17:25:05 +02: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
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
Ethan Frey
12b6eb4fa8 Update gas price 2021-07-28 23:05:05 +02:00
Ethan Frey
b34290772b Adjust gas prices in tests 2021-07-28 13:06:09 +02:00
Ethan Frey
c9360f63d1 keeper and types pass tests 2021-07-28 11:24:44 +02:00
Ethan Frey
6bde321974 x/wasm/keeper compiled 2021-07-28 11:24:44 +02:00
Ethan Frey
92850081f0 Fix last tests 2021-07-28 11:18:58 +02:00
Ethan Frey
b8b0f209b2 Update tests (new default contract addr) 2021-07-28 11:18:21 +02:00
Ethan Frey
81c46ae567 Use _contract_address attribute in emitted events 2021-07-21 22:15:49 +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
Alex Peters
0dd695c126 Cleanup keeper result types 2021-06-11 12:38:30 +02:00
Alex Peters
470b2dacc7 Test Pinned contract does not loop forever 2021-06-07 11:28:10 +02:00
Alex Peters
2f2d59a151 Allow access to contract address builder 2021-06-01 10:42:07 +02:00
Alexander Peters
3d4b3d184f Upgrade to wasmvm v0.14.0-rc1 (#508)
* Upgrade to wasmvm v0.14.0-rc1

* Update contracts from cosmwasm#910, re-enable test

* Fix parsing in query type

Co-authored-by: Ethan Frey <ethanfrey@users.noreply.github.com>
2021-04-30 08:26:41 +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
8c7967e5b4 Review feedback 2021-04-27 09:04:58 +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
Alex Peters
9ec97b5de9 Handle wasmvm Burn message 2021-04-13 10:27:23 +02:00
Ethan Frey
84a6c4d7f4 Fix gas prices 2021-04-12 21:49:43 +02:00
Ethan Frey
6189e17271 Add ReplyOn fields to SubMsg, state is bech32 not canonical addresses 2021-04-12 21:39:19 +02:00
Alex Peters
408bba14a5 Extract contract keeper 2021-03-24 14:11:42 +01:00
Alexander Peters
d9142662c1 Remove internal package (#464)
* Move internal subfolders up

* Fix broken imports and fmt
2021-03-19 09:52:01 +01:00