Commit Graph

912 Commits

Author SHA1 Message Date
Christoph Otter
6d7c91c145 Remove unnecessary conversion 2024-02-15 14:42:07 +01:00
Christoph Otter
dd992b0deb Use different tempdir for each test run 2024-02-15 14:30:37 +01:00
Christoph Otter
ec2c70bf72 Fix address validation 2024-02-15 14:30:37 +01:00
Christoph Otter
244c55a4ba Reduce gas factor 2024-02-15 14:30:37 +01:00
Christoph Otter
cca0005c71 Fix lint 2024-02-15 14:30:37 +01:00
Christoph Otter
54670c4990 Add ValidateAddress impl 2024-02-15 14:30:37 +01:00
Christoph Otter
e4d95c2453 Fix StoreCode gas usage 2024-02-15 14:30:37 +01:00
Christoph Otter
d4e6417dc7 Adjust to nested results 2024-02-15 14:30:37 +01:00
Christoph Otter
c7ba88f81d Adjust to type changes and renamings 2024-02-15 14:30:37 +01:00
Christoph Otter
b1c5bfb230 Update to wasmvm 2.0.0-rc.1 2024-02-15 14:30:37 +01:00
Simon Warta
3206540319 Adapt tests to gas value changes 2024-01-27 16:12:03 +01:00
Simon Warta
315bf5ca18 Generalize "pinned" to "discount" for cases where contract is in memory 2024-01-26 17:18:28 +01:00
Simon Warta
ce0dafad39 Remove NewContractInstanceCosts
We do not have entry-point specific gas metering and
NewContractInstanceCosts is just an alias for setup cost. No need to
maintain it. If we really need it, we should better explain why.
2024-01-25 10:09:40 +01:00
Simon Warta
18ff23339a Rename InstantiateContractCosts -> SetupContractCost 2024-01-25 10:02:20 +01:00
pinosu
64b80740e5 Fix grant cli (#1792) 2024-01-24 10:35:04 +01:00
Not Jeremy Liu
651abcff89 Add Build Address gRPC Query (#1753)
* add and generate build address query protos

* change init args to bytes

* implement BuildAddress grpc query

* Add unit tests

* Update x/wasm/keeper/querier_test.go

Co-authored-by: pinosu <95283998+pinosu@users.noreply.github.com>

* more verbose error messages

* make CmdBuildAddress use query client instead of keeper

* src instead of srcQuery in tests

* add more test cases

* add test for invalid init args

---------

Co-authored-by: pinosu <95283998+pinosu@users.noreply.github.com>
2024-01-09 10:48:16 +01:00
Alexander Peters
dffa3212fc Fix migrate legacy params (#1729)
* Fix migrate legacy params

* Better tests

* Handle upgrade from wasmd 33 chains
2023-11-21 08:56:41 +01:00
Alex Peters
f31351fea0 Pass empty attribute value through stack 2023-11-15 10:22:33 +01:00
FengFeng
4e7316e97b Allow empty attribute values (#1618)
* remove event value judgment

* remove event value judgment

* fix cosmwasm events test
2023-11-15 10:15:58 +01:00
Alexander Peters
2a82e35243 Fix gov v1beta1 support for legacy propsals (#1715)
* Revert "Remove gov v1beta1 dependencies and deprecated proposals (#1646)"

This reverts commit e0da419409.

* Rename legacy propsal files

* Ensure gov store support for v1beta1 types

* Linter

* Cleanup alias
2023-11-15 08:29:33 +01:00
pinosu
4313d7f3ee Upgrade to SDK v0.50.1 (#1696)
* Upgrade to SDK v0.50.1

* Update dependencies

* Upgrade ibc-go

* Remove GetSigners() method

* Update deps
2023-11-13 12:31:36 +01:00
Alex Peters
fc549d46c4 Prevent empty channel version 2023-11-08 09:24:04 +01:00
Simon Warta
a6fe36d574 Rename some more "features" to "capabilities" (#1679)
* Format code

* Rename {Reflect,Cyberpunk}Features -> {Reflect,Cyberpunk}Capabilities
2023-10-20 18:04:59 +02:00
Alex Peters
bb2beb8d9f Fix test code
(cherry picked from commit 8bb5b82bad97339e78aa1e349b95d68ebc758767)
2023-10-16 15:27:44 +00:00
Alexander Peters
cd7837680b Add system tests for chain upgrade (#1643)
* Start chain upgrade tests

* Fix stakeunstake test

* Make test pass

* Better stop chain

* Test chain upgrade

* Set upgrade handler order

* Fix app for chain upgrade

* Minor cleanup

* Check contract state

* Updates

* Gov constitution migration will be handled by the sdk

* Deactivate upgrade test

* Helper

* Better upgrade structure an minor updates

(cherry picked from commit 32a01da4563b52df6167929f3535d111ad18a1b7)

* Updates

* Gci formatting

* Updates

* Testnet commit timeout

* Update

* Store artifacts on system test failure

* Better circleci setup

* Artifact path

* x

* Fix upgrade

* Generic upgrade handler

* Fix imports

* Update tests/system/cli.go

Co-authored-by: pinosu <95283998+pinosu@users.noreply.github.com>

---------

Co-authored-by: Pino' Surace <pino.surace@live.it>
Co-authored-by: pinosu <95283998+pinosu@users.noreply.github.com>
2023-10-13 14:16:31 +02:00
Dariusz Depta
257cd7e0bc Made cleanup function private. 2023-10-13 09:41:29 +02:00
Dariusz Depta
76f6f3d548 Refactoring. 2023-10-12 18:58:17 +02:00
Dariusz Depta
3af3036a79 Refactoring. 2023-10-12 17:42:42 +02:00
Dariusz Depta
9394faf3be Maybe this will fix the problem. 2023-10-12 17:21:39 +02:00
Dariusz Depta
99ade09b37 Refactoring. 2023-10-12 16:21:31 +02:00
Dariusz Depta
29d10f3af2 Fixes. 2023-10-12 16:15:30 +02:00
Dariusz Depta
f79a694bbd Fixes. 2023-10-12 15:42:42 +02:00
Dariusz Depta
d8fe3f9467 Used another prefix. 2023-10-12 15:31:27 +02:00
Dariusz Depta
1445baa490 Added tests for classic addresses. 2023-10-12 15:03:09 +02:00
pinosu
1a22c29ea4 Add label validation for non printable chars (#1650)
* Add label validation for non printable chars

* Fix printable chars check
2023-10-09 11:36:09 +02:00
Augusto Elesbão
6b8b45c32b fix: propagate funds validation errors
The validation functions on the `tx` type masquerade the root error
message for the `Funds` validation. Having the original error helps to
save time when debugging the cause for a failed tx.

One example is if someone sends multiple funds to a contract execution
without sorting the denoms, which is one of the validations in the
`Coins.Validate` method. With the error propagation, the developer can
quickly determine why the tx failed.
2023-10-04 11:36:22 +02:00
pinosu
e0da419409 Remove gov v1beta1 dependencies and deprecated proposals (#1646) 2023-10-04 09:31:48 +02:00
dependabot[bot]
b845e14491 Bump github.com/cosmos/ibc-go/v8 from 8.0.0-beta.0 to 8.0.0-beta.1 (#1648)
* Bump github.com/cosmos/ibc-go/v8 from 8.0.0-beta.0 to 8.0.0-beta.1

Bumps [github.com/cosmos/ibc-go/v8](https://github.com/cosmos/ibc-go) from 8.0.0-beta.0 to 8.0.0-beta.1.
- [Release notes](https://github.com/cosmos/ibc-go/releases)
- [Changelog](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/cosmos/ibc-go/compare/v8.0.0-beta.0...v8.0.0-beta.1)

---
updated-dependencies:
- dependency-name: github.com/cosmos/ibc-go/v8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix conflicts

* Fix lint

* Make lint pass

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pino' Surace <pino.surace@live.it>
2023-10-03 14:13:19 +02:00
dependabot[bot]
ca682c085e Bump github.com/docker/distribution from 2.8.2+incompatible to 2.8.3+incompatible (#1647)
* Bump github.com/docker/distribution

Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.2+incompatible to 2.8.3+incompatible.
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](https://github.com/docker/distribution/compare/v2.8.2...v2.8.3)

---
updated-dependencies:
- dependency-name: github.com/docker/distribution
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix lint

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pino' Surace <pino.surace@live.it>
2023-10-03 13:04:54 +02:00
pinosu
e65480838a Add msg update contract label (#1640)
* Add msg update contract label

* fix tests
2023-09-28 10:49:44 +02:00
Alexander Peters
cd66f786b2 SDK upgrade to v0.50 (branch) (#1611)
* Start implementation

* Add implementation + some e2e test

* Fix lint

* Squashed: sdk upgrade to v0.50

* rebuild protos with newer proto builder

(cherry picked from commit fd8f4c1d0d2163f0a504356c16cd2d250f6218f3)

* update ibc-go

(cherry picked from commit fb8667960fbeedb7d242baa644572986a154d4b6)

* bump cosmos-sdk and ibc in the v50 branch (#1616)

* tidy

* upgade ibc

* remove the toolchain command

* Bump sdk version

* Use correct bech32 prefix

* Bump SDK

* Enable fraud system test again

* Fix genesis param name

* Fix import/export simulations

* set log level for benchmarks

(cherry picked from commit 1cfb93008c596db62d22aba882f37a469546bfb9)

* Apply review comments

* Remove gov beta1 helpers

* Bump sdk version to latest in branch

* Fix linter

* Setup mergify for main

* Update mergify for better branch name

---------

Co-authored-by: Pino' Surace <pino.surace@live.it>
Co-authored-by: Jacob Gadikian <jacobgadikian@gmail.com>
2023-09-25 10:42:35 +02:00
Alexander Peters
afa85da3f4 Set default query limit and ensure constraints (#1632)
* Set default query limit and ensure constraints

* Update x/wasm/client/cli/query.go

Co-authored-by: pinosu <95283998+pinosu@users.noreply.github.com>

---------

Co-authored-by: pinosu <95283998+pinosu@users.noreply.github.com>
2023-09-18 11:25:01 +02:00
Alex Peters
7dc2d0cfbc Fix genesis import with predictable addresses 2023-09-18 06:26:19 +02:00
Alexander Peters
7dba5c7c73 Merge pull request #1624 from CosmWasm/upper_limit
Ensure some contraints and limits on pin/unpin code ids
2023-09-18 05:23:55 +02:00
pinosu
6a2bffd479 Add grant system tests (#1626)
* Add grant system tests

* Add unpermissioned chain test case

* Fix tests

* Update cli and fix feedbacks

* Revisit CLI and system tests (#1627)

* Restructure CLI; fix system test

* Review feedback

---------

Co-authored-by: Alexander Peters <alpe@users.noreply.github.com>
2023-09-15 16:59:27 +02:00
Alex Peters
b72d182d2a Ensure some contraints and limits on pin/unpin code ids 2023-09-15 11:11:01 +02:00
Alexander Peters
e0bfaa5231 Merge pull request #1620 from CosmWasm/channel_query
Start rework channel query
2023-09-14 15:09:52 +02:00
pinosu
dd22204644 Add store code authz (#1591)
* Start implementation

* Add implementation + some e2e test

* Fix lint

* Fix comments

* Add ante handler

* Add cli cmd + more test cases

* Add cli tests

* Add ante handler test

* Add more tests

* Fix comments

* Enable empty permissions for the grant

* Fix lint

* Update version
2023-09-14 13:28:57 +02:00
Alex Peters
d5fa2780c1 Handle query for non ibc contracts 2023-09-13 16:31:41 +02:00
Alex Peters
177c0a9218 Test channels query 2023-09-13 15:28:16 +02:00