Commit Graph

32 Commits

Author SHA1 Message Date
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
Alex Peters
03bf7b0adf Introduce new interfaces for extendability 2021-03-24 14:11:42 +01:00
loloicci
85173c69d5 fix a typo in comment 2021-03-23 16:18:07 +09: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