Commit Graph

70 Commits

Author SHA1 Message Date
Alex Peters 67a2ef1650
Validate incoming messages 2022-10-10 15:01:48 +02:00
Alexander Peters 9c5ebbbc4c
Implement improvements to new address generation (#1014)
* Revert default instance address generation to classic sequence based method

 Please enter the commit message for your changes. Lines starting

* Start re-adding classic address generator

* Extract address generation to file; minor updates

* Review comments

* Set max salt size

* Support predictable address on instantiation

* Switch attribute order for backwards compatiblity

* Fix salt param check in CLI

* Enable tests

* Add more tests

* Minor fix

* Remove migration

* Better cli description

* Fix init message length prefix

* Add sanity checks to address generation and minor updates

* Reduce max length in tests for CI

* CLI and address generation updates

* Add test vectors

* Minor updates

* Fix cli long doc
2022-09-22 18:22:35 +02:00
Alex Peters ccb2fdd0b6
Make contract addresses predictable 2022-09-09 12:42:41 +02:00
Alexander Peters 0e41c8cc1c
Better wasmvm 1.1 integration test (#988)
* Add cosmwasm_1_1 cability, bump reflect contract, supply query integration test

* Review feedback
2022-09-09 08:36:00 +02:00
Jacob Gadikian 4875db2055
depracte-ioutil (#934) 2022-08-24 10:21:16 +02:00
Alexander Peters 2a9c5c1ea5
Fix wasm simulations (#870)
* Fix wasm simulations + make functions compatible with tgrade

* Fix lint issues

* Fix simulation setup

* Make simulations store msg pass

* Use default values params to make operations succeed

* Normalize wasm store

* Add simulations to circleci config

* Run simulation in temp dir

* Store sim logs

* Increase circleci machine type

* Extract reflect contract api into helper

* Add execute msg to simulations

* Embed refect wasm contract

Co-authored-by: Pino' Surace <pino.surace@live.it>
2022-05-31 10:07:16 +02:00
Ethan Frey bff3aff95b Run new "make format" 2022-05-09 22:34:26 +02:00
pinosu 23c75b18b8
Add MsgStoreCode and MsgInstantiateContract support to simulations (#831)
* Add MsgStoreCode and MsgInstantiateContract support to simulations

* Check for permissions in codeInfo
2022-05-03 13:46:18 +02: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
fkneeland-figure dd390d7f5f
Go Formatting update (#648)
* make fmt

* changelog update
2021-10-21 14:54:16 +02:00
Ethan Frey f5dc720926 Important: add iterator feature support 2021-09-22 19:11:49 +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
Alex Peters 7b2cfa48ed
Strip message events and reorder 2021-08-11 14:08:56 +02:00
Alex Peters e9156be200
Refactor events 2021-08-10 18:19:16 +02:00
Ethan Frey 477c794913 Almost all tests pass 2021-07-28 11:18:21 +02:00
Ethan Frey 699fbbc215 Changed references in code - 2 broken tests 2021-07-27 14:25:33 +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
Alex Peters c377d7110e
List contract address without other data 2021-04-23 15:15:54 +02:00
Ethan Frey 6189e17271 Add ReplyOn fields to SubMsg, state is bech32 not canonical addresses 2021-04-12 21:39:19 +02: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
Alexander Peters 8e35dc260b
Refactor wasm message handlers and query plugin (#460)
* Refactor wasm message handlers

* Add handler plugin tests

* Review feedback

* Add handler and query tests
2021-03-18 15:31:12 +01:00
Alex Peters 7583340d82
Rename to funds in msgs 2021-03-03 13:59:03 +01:00
Leonardo Bragagnolo d0befd973d
Added randomized simulation parameters generation (#389)
* added simulation params

* fixed return types

* implemented full sim test on wasmd

* removed wrong committed github action

* switched to a import export test since i'm introducing params and genesis simulations

* fixed makefile

* Fixed sim test flags not working

* fixed some errors on sim test

* fixed conflicts
still a failure to be solved

* fixed wasm params error

* added missing codec

* Update params.go

removed unused import

* fixed intellij cache errors

* added full app simulation test that pass

* added README.md for sims credits
added me into contributors list

Co-authored-by: riccardo.montagnin <riccardo.montagnin@gmail.com>
2021-02-05 13:19:14 +01:00
Alexander Peters 0f46dee0c4
Implement IBC contract support (#394)
* Implement IBC contract support

* Update changelog

* Adjust tests for new event logic

* Review comment
2021-01-29 11:11:15 +01:00
Ethan Frey 013491aa9d Pull out some test helpers for genesis_test 2021-01-08 17:51:44 +01:00
Alex Peters c64d5d54ba
Refactor to grpc message server 2021-01-08 15:06:51 +01:00
Alex Peters 57999b26b7
Start with wasm msg in genesis 2021-01-07 14:19:18 +01:00
Alex Peters 6a920852bf
Replace sdk.AccAddress with bech32 string 2020-11-17 13:19:54 +01:00
Alexander Peters 93761eac33
Upgrade wasmvm aka go-cosmwasm (#311)
* Upgrade wasmvm aka go-cosmwasm

* Update x/wasm/README.md

Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>

* Review feedback

* CircleCI: export GORACE

Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
2020-11-17 12:53:31 +01:00
Alexander Peters 4fb3a50fa7
Support self calling contract on instantiation (#300)
* Support self calling contract on instantiation

* Review feedback

* Review feedback
2020-11-09 09:16:41 +01:00
Alex Peters e54fbb9eb8
Better test setup 2020-10-27 15:01:22 +01:00
Alex Peters bcb00d6017
Upgrade to Stargate commits 2020-10-27 15:01:22 +01:00
Ethan Frey 3b479c3235
Merge pull request #254 from gustavohmsilva/master
Closes #10 Implemented files called general_consts.go to all modules that heavly relied on  the duplicated "ClientID : 1"
2020-10-06 08:36:50 +02:00
Ethan Frey 989830e073 Fix old contract naming in integration tests 2020-10-05 22:31:39 +02:00
Gustavo H. M. Silva fd2f51cb12 Closes #10 Implemented files called general_consts.go to all modules that heavly relied on the duplicated "ClientID : 1" 2020-09-06 09:16:20 +01:00
Gustavo H. M. Silva 23ce8e84c9 Implemented files called general_consts.go to all modules that heavly relied on the duplicated "CLientID : 1"
Future duplicated variables across the entire module can also be added to it, centralizing therefore all os those kind of values.
2020-08-19 12:30:38 +01:00
Ethan Frey 45ef2f331e
Merge pull request #201 from CosmWasm/polish_handler
Polish types in message handler
2020-07-20 10:58:24 +02:00
Alex Peters db464d891b
Rename ambiguous Code attribute 2020-07-17 17:02:21 +02:00
Alex Peters 437f0237ba
Polish types in message handler 2020-07-17 15:39:26 +02:00
Ethan Frey e0f9319624 Fix test cases 2020-06-23 15:59:36 +02:00
Ethan Frey eed809c22f Reinvest tests pass! 2020-05-18 21:49:11 +02:00
Ethan Frey c4c1f9cf35 Test scaffolding for staking, test init and query callbacks 2020-05-18 15:45:10 +02:00
Ethan Frey c829fcff5a Rename import from cosmwasm/wasmd to CosmWasm/wasmd 2020-05-13 22:15:40 +02:00
Ethan Frey 945067f5c0 Update to 0.8.0-alpha2 2020-05-13 21:16:18 +02:00
Ethan Frey 0ca2ff6702 Make QueryPlugins configurable for keeper 2020-05-07 11:08:20 +02:00
Ethan Frey 7b7a293835 Allow configuring custom message handlers in wasm 2020-05-07 10:20:18 +02:00
Ethan Frey 3f3eb3ef5c Fix up module level tests, only 2 skipped 2020-05-06 20:00:35 +02:00
Ethan Frey 03ad1fb1a0 Update to CosmWasm/go-cosmwasm master 2020-05-06 11:21:15 +02:00
Ethan Frey fee390d8f4 Return all info with GetCode, not just wasm 2020-03-01 21:20:34 +01:00