Commit Graph

562 Commits

Author SHA1 Message Date
Alexander Peters
c18bc4b00e Add linter name and minor golint related updates (#663) 2021-10-25 15:33:21 +02: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
Mojtaba
0984acaf7e Handle error on Address not found
If we use a wallet address which does not exist, it gives the following error: 
```
Error: empty address string is not allowed
```
which is coming from the SDK and confusing to the user. 
The reason is because one error is not handled properly, in the new proposal, the error is handled which returns the following error if the address does not exist:

```
Error: The specified item could not be found in the keyring
```
2021-10-21 16:09:26 +02:00
fkneeland-figure
dd390d7f5f Go Formatting update (#648)
* make fmt

* changelog update
2021-10-21 14:54:16 +02:00
fkneeland
193f517739 remove unused flags from cmd prompt 2021-10-14 16:38:13 -06:00
Simon Warta
2afcdb4ae9 Upgrade wasmvm to v1.0.0-beta 2021-10-11 16:40:45 +02:00
Alexander Peters
bc7a52260d Update gas costs (#636)
* Update gas costs

* Review feedback

* Review comments
2021-10-08 14:34:44 +02:00
Ethan Frey
08ee11d405 Benchmarks for gas pricing (#634)
* Run benchmarks on circle CI

* Add benchmark for secp256k1 verification

* Add compilation benchmark

* Move parallelism back to 1 for benchmarks

* Review comments

Co-authored-by: Alex Peters <alpe@users.noreply.github.com>
2021-10-08 12:21:03 +02:00
Ethan Frey
53a6476676 Merge pull request #633 from CosmWasm/596-query-pinned-contracts
Query all pinned code ids
2021-10-07 15:27:55 +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
Alex Peters
b7a99e69ee Query all pinned code ids 2021-10-07 13:52:06 +02:00
Ethan Frey
61bf2353cb Last gas fix 2021-10-07 12:34:16 +02:00
Ethan Frey
e878842136 Adjust gas prices in tests 2021-10-07 12:26:25 +02:00
Ethan Frey
e5dc6fe583 Treat all contracts as pinned for gas costs in reply 2021-10-07 11:23:58 +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
Alex Peters
bc785a4f01 Handle contract info query 2021-09-27 12:55:51 +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
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
Ethan Frey
f93461daf4 Use v1.0.0-soon contracts 2021-09-22 19:09:59 +02:00
Alexander Peters
a447ee0c12 Ensure query isolation (#611)
* Ensure query isolation

* Review feedback
2021-09-14 17:25:05 +02:00
Alex Peters
0589f38ad3 Optimize BalanceQuery 2021-09-13 14:51:14 +02:00
Alex Peters
2fe56bffaf Fix query handler instantiation 2021-09-13 09:48:31 +02:00
Alex Peters
8f0707a985 Add decorator options 2021-08-30 14:31:46 +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
7fbf513d71 Simplify filter method 2021-08-12 14:49:43 +02:00
Ethan Frey
f51ec67099 Remove (now-unneeded) filtering in DefaultWasmVMContractResponseHandler.Handle 2021-08-12 13:36:22 +02:00
Ethan Frey
514985c4f1 Update tests to not expect message event 2021-08-12 13:33:23 +02:00
Ethan Frey
f547bf6630 Filter messages, fix new tests, break older ones 2021-08-12 13:28:58 +02:00
Ethan Frey
29d5e29dc0 One more test for message event without reply 2021-08-12 13:22:36 +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
0e4916996e Download cosmwasm contracts 2021-08-11 14:25:43 +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
Ethan Frey
a579455fdb Update ibc reflect contract from CosmWasm PR 1046 2021-08-11 11:00:39 +02:00
Alex Peters
e9156be200 Refactor events 2021-08-10 18:19:16 +02:00
Ethan Frey
095ba8cb2f update test contracts to cosmwasm v0.16.0 2021-08-05 18:53:07 +02:00
Alex Peters
4f22421404 Add contract features to debug logging
(cherry picked from commit ccd075200f704c39ae619d36be781092711bbd41)
2021-08-05 15:45:08 +02:00
Alex Peters
7ea8cd788d Add organisation to grpc gateway path 2021-08-04 17:00:04 +02:00
Alex Peters
49bed8952f Remove obsolete cli params 2021-08-02 14:55:42 +02:00
Ethan Frey
0f6f437b38 Merge pull request #570 from CosmWasm/561-better-ibc-contract-interface
Better ibc contract interface
2021-07-29 09:13:59 +02:00
Ethan Frey
12b6eb4fa8 Update gas price 2021-07-28 23:05:05 +02:00
Ethan Frey
b25956d0a1 Use v0.16.0-rc5 contracts 2021-07-28 23:04:02 +02:00
Ethan Frey
0fe0b6223a Fix relay tests 2021-07-28 22:15:31 +02:00
Ethan Frey
cf854947e9 Change IBCContractKeeper interface, code builds 2021-07-28 22:11:27 +02:00
Ethan Frey
103285337c Update comments 2021-07-28 13:08:50 +02:00
Ethan Frey
b34290772b Adjust gas prices in tests 2021-07-28 13:06:09 +02:00
Ethan Frey
774034f862 Make gas register tests more flexible, fix counting bug 2021-07-28 13:04:47 +02:00
Ethan Frey
5149372e53 Change default message size cost to 0 2021-07-28 13:04:47 +02:00