diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md index 5b98abb4..ef821302 100755 --- a/.chglog/CHANGELOG.tpl.md +++ b/.chglog/CHANGELOG.tpl.md @@ -6,7 +6,7 @@ {{ range .CommitGroups -}} ### {{ .Title }} -{{ range .Commits -}}{{ if regexMatch `^.+\(\[#[1-9][0-9]*\]\(https://github.com/line/wasmvm/issues/[1-9][0-9]*\)\)$` .Subject }} +{{ range .Commits -}}{{ if regexMatch `^.+\(\[#[1-9][0-9]*\]\(https://github.com/Finschia/wasmvm/issues/[1-9][0-9]*\)\)$` .Subject }} * {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ mustRegexReplaceAll `issues/([1-9][0-9]*)\)\)$` .Subject `pull/${1}))` }}{{ end }}{{ end }} {{ end -}} diff --git a/.chglog/config.yml b/.chglog/config.yml index 5aa2bb10..0198ef9a 100755 --- a/.chglog/config.yml +++ b/.chglog/config.yml @@ -2,7 +2,7 @@ style: github template: CHANGELOG.tpl.md info: title: CHANGELOG - repository_url: https://github.com/line/wasmvm + repository_url: https://github.com/Finschia/wasmvm options: tag_filter_pattern: '^v\d+\.\d+\.\d+-\d+\.\d+\.\d+' commits: diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..17f252b3 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @da1suk8 @dudong2 @loloicci @kokeshiM0chi diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9450715a..43ecddcc 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -21,7 +21,7 @@ Closes #0 -- [ ] I followed the [contributing guidelines](https://github.com/line/wasmvm/blob/main/CONTRIBUTING.md). +- [ ] I followed the [contributing guidelines](https://github.com/Finschia/wasmvm/blob/main/CONTRIBUTING.md). - [ ] I have updated the documentation accordingly. - [ ] I have added tests to cover my changes. - [ ] The PR title and commits are followed [conventional commit form](https://www.conventionalcommits.org/en/v1.0.0). diff --git a/.github/workflows/builds_and_tests.yml b/.github/workflows/builds_and_tests.yml index 25c0bde0..c8901798 100644 --- a/.github/workflows/builds_and_tests.yml +++ b/.github/workflows/builds_and_tests.yml @@ -107,6 +107,26 @@ jobs: - name: Run shellcheck run: ./devtools/check_shellscript_lint.sh + test_internal_shared_lib: + runs-on: ubuntu-latest + env: + GORACE: "halt_on_error=1" + BUILD_VERSION: $(echo $GITHUB_SHA | cut -c 1-10) + steps: + - name: set up + uses: actions/setup-go@v2 + with: + go-version: 1.17 + id: go + - name: Checkout + uses: actions/checkout@v2 + - name: Go integration tests + run: make test + - name: Go tests with cgo and race condition safety checks + run: make test-safety + - name: Make build-go + run: make build-go + build_shared_library: runs-on: ubuntu-latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 91fcc1d0..abc52826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,34 +1,49 @@ # Changelog +## [Unreleased](https://github.com/Finschia/wasmvm/compare/v1.1.1-0.11.2...HEAD) -## [[v1.1.1-0.11.1](https://github.com/line/wasmvm/compare/v1.1.1-0.11.0...v1.1.1-0.11.1)] - 2023-01-13 +### Features + +### Fixes + +### Changes +* chore: update libwasmvm cargo author ([#112](https://github.com/Finschia/wasmvm/pull/112)) + +## [[v1.1.1-0.11.2](https://github.com/Finschia/wasmvm/compare/v1.1.1-0.11.1...v1.1.1-0.11.2)] - 2023-03-13 + +The functional changes of this version same with v1.1.1-0.11.1, The only difference is that fix the import problem other service (like wasmd and finshia), because I think it seems to be problem to change the v1.1.1-0.11.1 tag commit. + +### Fixes +* fix: wrong tag reference (v1.1.1-0.11.2) ([#95](https://github.com/Finschia/wasmvm/pull/95)) + +## [[v1.1.1-0.11.1](https://github.com/Finschia/wasmvm/compare/v1.1.1-0.11.0...v1.1.1-0.11.1)] - 2023-01-13 ### Fixes -* add .so / .dylib file and modify Makefile ([#85](https://github.com/line/wasmvm/pull/85)) +* add .so / .dylib file and modify Makefile ([#85](https://github.com/Finschia/wasmvm/pull/85)) -## [[v1.1.1-0.11.0](https://github.com/line/wasmvm/compare/v1.0.0-0.10.0...v1.1.1-0.11.0)] - 2023-01-11 +## [[v1.1.1-0.11.0](https://github.com/Finschia/wasmvm/compare/v1.0.0-0.10.0...v1.1.1-0.11.0)] - 2023-01-11 ### Features -* merge upstream 1.1.1 ([#84](https://github.com/line/wasmvm/pull/84)) +* merge upstream 1.1.1 ([#84](https://github.com/Finschia/wasmvm/pull/84)) ### Fixes -* fix: getmetrics test due to this is environment-dependent test ([#80](https://github.com/line/wasmvm/pull/80)) +* fix: getmetrics test due to this is environment-dependent test ([#80](https://github.com/Finschia/wasmvm/pull/80)) ### Changes -* chore: remove the copied interface from tm-db ([#82](https://github.com/line/wasmvm/pull/82)) -* refactor: Revert using line/tm-db ([#77](https://github.com/line/wasmvm/pull/77)) -* ci: add release job ([#71](https://github.com/line/wasmvm/pull/71)) -* chore: Revert linux_static ([#70](https://github.com/line/wasmvm/pull/70)) +* chore: remove the copied interface from tm-db ([#82](https://github.com/Finschia/wasmvm/pull/82)) +* refactor: Revert using line/tm-db ([#77](https://github.com/Finschia/wasmvm/pull/77)) +* ci: add release job ([#71](https://github.com/Finschia/wasmvm/pull/71)) +* chore: Revert linux_static ([#70](https://github.com/Finschia/wasmvm/pull/70)) ## [v1.0.0-0.10.0] - 2022-06-21 ### Features -* merge upstream 1.0.0 ([#64](https://github.com/line/wasmvm/issues/64)) +* merge upstream 1.0.0 ([#64](https://github.com/Finschia/wasmvm/issues/64)) ### Fixes -* improve CHANGELOG's template and devtools/update_changlog.sh ([#60](https://github.com/line/wasmvm/pull/60)) +* improve CHANGELOG's template and devtools/update_changlog.sh ([#60](https://github.com/Finschia/wasmvm/pull/60)) ## [v0.16.3-0.9.0] - 2022-03-03 @@ -37,31 +52,31 @@ ### Features -* merge upstream 0.16.3 ([#54](https://github.com/line/wasmvm/issues/54)) +* merge upstream 0.16.3 ([#54](https://github.com/Finschia/wasmvm/issues/54)) ### Fixes -* fix Cargo.toml path in devtools/set_version.sh (part of [#59](https://github.com/line/wasmvm/issues/59)) +* fix Cargo.toml path in devtools/set_version.sh (part of [#59](https://github.com/Finschia/wasmvm/issues/59)) ## [v0.14.0-0.8.0] - 2021-10-01 ### Features -* change tag name for static build ([#49](https://github.com/line/wasmvm/issues/49)) +* change tag name for static build ([#49](https://github.com/Finschia/wasmvm/issues/49)) ## [v0.14.0-0.7.0] - 2021-09-30 ### Features -* add static linking of wasmvm ([#46](https://github.com/line/wasmvm/issues/46)) +* add static linking of wasmvm ([#46](https://github.com/Finschia/wasmvm/issues/46)) ## [v0.14.0-0.6.1] - 2021-07-15 ### Fixes -* rebuild shared libs to resolve compile error ([#44](https://github.com/line/wasmvm/issues/44)) +* rebuild shared libs to resolve compile error ([#44](https://github.com/Finschia/wasmvm/issues/44)) ## [v0.14.0-0.6.0] - 2021-07-12 @@ -76,19 +91,19 @@ ### Changes -* Change the module uri from github.com/CosmWasm/wasmvm to github.com/link/wasmvm ([#23](https://github.com/line/wasmvm/issues/23)) +* Change the module uri from github.com/CosmWasm/wasmvm to github.com/link/wasmvm ([#23](https://github.com/Finschia/wasmvm/issues/23)) ## [v0.14.0-0.4.0] - 2021-05-03 ### Changes -* change cargo use to tag from the version ([#17](https://github.com/line/wasmvm/issues/17)) +* change cargo use to tag from the version ([#17](https://github.com/Finschia/wasmvm/issues/17)) ### Code Refactoring -* add build tag 'mocks' ([#16](https://github.com/line/wasmvm/issues/16)) -* define own iterator interface spec ([#15](https://github.com/line/wasmvm/issues/15)) +* add build tag 'mocks' ([#16](https://github.com/Finschia/wasmvm/issues/16)) +* define own iterator interface spec ([#15](https://github.com/Finschia/wasmvm/issues/15)) **BREAKING CHANGE** @@ -122,14 +137,14 @@ Initial code is based on the wasmvm v0.12.0, cosmwasm v0.12.0 Please refer [CHANGELOG_OF_WASMVM_v0.12.0](https://github.com/CosmWasm/wasmvm/releases?after=v0.13.0) -[Unreleased]:https://github.com/line/wasmvm/compare/v1.0.0-0.10.0...HEAD -[v1.0.0-0.10.0]:https://github.com/line/wasmvm/compare/v0.16.3-0.9.0...v1.0.0-0.10.0 -[v0.16.3-0.9.0]:https://github.com/line/wasmvm/compare/v0.14.0-0.8.0...v0.16.3-0.9.0 -[v0.14.0-0.8.0]:https://github.com/line/wasmvm/compare/v0.14.0-0.7.0...v0.14.0-0.8.0 -[v0.14.0-0.7.0]:https://github.com/line/wasmvm/compare/v0.14.0-0.6.1...v0.14.0-0.7.0 -[v0.14.0-0.6.1]:https://github.com/line/wasmvm/compare/v0.14.0-0.6.0...v0.14.0-0.6.1 -[v0.14.0-0.6.0]:https://github.com/line/wasmvm/compare/v0.14.0-0.5.0...v0.14.0-0.6.0 -[v0.14.0-0.5.0]:https://github.com/line/wasmvm/compare/v0.14.0-0.4.0...v0.14.0-0.5.0 -[v0.14.0-0.4.0]:https://github.com/line/wasmvm/compare/v0.14.0-0.3.0...v0.14.0-0.4.0 -[v0.14.0-0.3.0]:https://github.com/line/wasmvm/compare/v0.12.0-0.1.0...v0.14.0-0.3.0 -[v0.12.0-0.1.0]:https://github.com/line/wasmvm/compare/v0.12.0...v0.12.0-0.1.0 +[Unreleased]:https://github.com/Finschia/wasmvm/compare/v1.0.0-0.10.0...HEAD +[v1.0.0-0.10.0]:https://github.com/Finschia/wasmvm/compare/v0.16.3-0.9.0...v1.0.0-0.10.0 +[v0.16.3-0.9.0]:https://github.com/Finschia/wasmvm/compare/v0.14.0-0.8.0...v0.16.3-0.9.0 +[v0.14.0-0.8.0]:https://github.com/Finschia/wasmvm/compare/v0.14.0-0.7.0...v0.14.0-0.8.0 +[v0.14.0-0.7.0]:https://github.com/Finschia/wasmvm/compare/v0.14.0-0.6.1...v0.14.0-0.7.0 +[v0.14.0-0.6.1]:https://github.com/Finschia/wasmvm/compare/v0.14.0-0.6.0...v0.14.0-0.6.1 +[v0.14.0-0.6.0]:https://github.com/Finschia/wasmvm/compare/v0.14.0-0.5.0...v0.14.0-0.6.0 +[v0.14.0-0.5.0]:https://github.com/Finschia/wasmvm/compare/v0.14.0-0.4.0...v0.14.0-0.5.0 +[v0.14.0-0.4.0]:https://github.com/Finschia/wasmvm/compare/v0.14.0-0.3.0...v0.14.0-0.4.0 +[v0.14.0-0.3.0]:https://github.com/Finschia/wasmvm/compare/v0.12.0-0.1.0...v0.14.0-0.3.0 +[v0.12.0-0.1.0]:https://github.com/Finschia/wasmvm/compare/v0.12.0...v0.12.0-0.1.0 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index bdb31303..8edb283b 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -60,7 +60,7 @@ representative at an online or offline event. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at -[dl_oss_dev@linecorp.com](mailto:dl_oss_dev@linecorp.com). +[dev@finschia.org](mailto:dev@finschia.org). All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e3066b64..18e9f69e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,19 +1,19 @@ -# How to contribute to `line/wasmvm` +# How to contribute to `Finschia/wasmvm` First of all, thank you so much for taking your time to contribute! It will be amazing if you could help us by doing any of the following: -- File an issue in [the issue tracker](https://github.com/line/wasmvm/issues) to report bugs and propose new features and +- File an issue in [the issue tracker](https://github.com/Finschia/wasmvm/issues) to report bugs and propose new features and improvements. -- Ask a question by creating a new issue in [the issue tracker](https://github.com/line/wasmvm/issues). - - Browse [the list of previously answered questions](https://github.com/line/wasmvm/issues?q=label%3Aquestion). -- Contribute your work by sending [a pull request](https://github.com/line/wasmvm/pulls). +- Ask a question by creating a new issue in [the issue tracker](https://github.com/Finschia/wasmvm/issues). + - Browse [the list of previously answered questions](https://github.com/Finschia/wasmvm/issues?q=label%3Aquestion). +- Contribute your work by sending [a pull request](https://github.com/Finschia/wasmvm/pulls). ## Contributor license agreement When you are sending a pull request and it's a non-trivial change beyond fixing typos, please sign the ICLA (individual contributor license agreement). Please -[contact us](mailto:dl_oss_dev@linecorp.com) if you need the CCLA (corporate contributor license agreement). +[contact us](mailto:dev@finschia.org) if you need the CCLA (corporate contributor license agreement). ## Code of conduct diff --git a/LICENSE b/LICENSE index 9a52d7bc..ff7fa4fb 100644 --- a/LICENSE +++ b/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2021 LINE Plus Corporation + Copyright 2023 Finschia Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Makefile b/Makefile index 4bec0f91..196ed8e4 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ .PHONY: all build build-rust build-go test # Builds the Rust library libwasmvm -BUILDERS_PREFIX := line/wasmvm-builder +BUILDERS_PREFIX := finschia/wasmvm-builder # Contains a full Go dev environment in order to run Go tests on the built library -ALPINE_TESTER := line/wasmvm-builder-alpine +ALPINE_TESTER := finschia/wasmvm-builder-alpine USER_ID := $(shell id -u) USER_GROUP = $(shell id -g) diff --git a/NOTICE b/NOTICE index 63aba584..2aab1f79 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,6 @@ Copyright 2019-2021 Confio OÜ Copyright 2021 LINE Plus Corporation +Copyright 2023 Finschia Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 2bf45c1e..4e6bb573 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # wasmvm -[![Tests](https://github.com/line/wasmvm/actions/workflows/tests.yml/badge.svg)](https://github.com/line/wasmvm/actions/workflows/tests.yml) +[![Tests](https://github.com/Finschia/wasmvm/actions/workflows/tests.yml/badge.svg)](https://github.com/Finschia/wasmvm/actions/workflows/tests.yml) This repository is forked from [CosmWasm/wasmvm](https://github.com/CosmWasm/wasmvm) -This is a wrapper around the [CosmWasm VM](https://github.com/line/cosmwasm/tree/main/packages/vm). +This is a wrapper around the [CosmWasm VM](https://github.com/Finschia/cosmwasm/tree/main/packages/vm). It allows you to compile, initialize and execute CosmWasm smart contracts -from Go applications, in particular from [x/wasm](https://github.com/line/lbm-sdk/tree/main/x/wasm). +from Go applications, in particular from [x/wasm](https://github.com/Finschia/finschia-sdk/tree/main/x/wasm). For more detail, see the [original document](https://github.com/CosmWasm/wasmvm#readme) diff --git a/builders/Makefile b/builders/Makefile index 81bec32d..b43b76a0 100644 --- a/builders/Makefile +++ b/builders/Makefile @@ -1,7 +1,7 @@ # Versioned by a simple counter that is not bound to a specific CosmWasm version # See builders/README.md #BUILDERS_PREFIX := cosmwasm/go-ext-builder:0013 -BUILDERS_PREFIX := line/wasmvm-builder +BUILDERS_PREFIX := finschia/wasmvm-builder .PHONY: docker-image-centos7 docker-image-centos7: diff --git a/cmd/demo/main.go b/cmd/demo/main.go index a72b9997..f526af6d 100644 --- a/cmd/demo/main.go +++ b/cmd/demo/main.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "os" - wasmvm "github.com/line/wasmvm" + wasmvm "github.com/Finschia/wasmvm" ) const ( diff --git a/go.mod b/go.mod index d745a38a..6da84d89 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/line/wasmvm +module github.com/Finschia/wasmvm go 1.17 diff --git a/ibc_test.go b/ibc_test.go index 723e87eb..1e8c3cc7 100644 --- a/ibc_test.go +++ b/ibc_test.go @@ -5,8 +5,8 @@ import ( "io/ioutil" "testing" - "github.com/line/wasmvm/internal/api" - "github.com/line/wasmvm/types" + "github.com/Finschia/wasmvm/internal/api" + "github.com/Finschia/wasmvm/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -28,19 +28,19 @@ func TestIBC(t *testing.T) { } // IBCInstantiateMsg is the Go version of -// https://github.com/line/cosmwasm/blob/v0.14.0-0.4.0/contracts/ibc-reflect/src/msg.rs#L9-L11 +// https://github.com/Finschia/cosmwasm/blob/v0.14.0-0.4.0/contracts/ibc-reflect/src/msg.rs#L9-L11 type IBCInstantiateMsg struct { ReflectCodeID uint64 `json:"reflect_code_id"` } // IBCExecuteMsg is the Go version of -// https://github.com/line/cosmwasm/blob/v0.14.0-0.4.0/contracts/ibc-reflect/src/msg.rs#L15 +// https://github.com/Finschia/cosmwasm/blob/v0.14.0-0.4.0/contracts/ibc-reflect/src/msg.rs#L15 type IBCExecuteMsg struct { InitCallback InitCallback `json:"init_callback"` } // InitCallback is the Go version of -// https://github.com/line/cosmwasm/blob/v0.14.0-0.4.0/contracts/ibc-reflect/src/msg.rs#L17-L22 +// https://github.com/Finschia/cosmwasm/blob/v0.14.0-0.4.0/contracts/ibc-reflect/src/msg.rs#L17-L22 type InitCallback struct { ID string `json:"id"` ContractAddr string `json:"contract_addr"` diff --git a/internal/api/api_test.go b/internal/api/api_test.go index a850fbc3..2afe8685 100644 --- a/internal/api/api_test.go +++ b/internal/api/api_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/line/wasmvm/types" + "github.com/Finschia/wasmvm/types" ) func TestValidateAddressFailure(t *testing.T) { diff --git a/internal/api/bindings.h b/internal/api/bindings.h index ab4eece2..20012f73 100644 --- a/internal/api/bindings.h +++ b/internal/api/bindings.h @@ -1,6 +1,6 @@ /* (c) 2019 Confio OÜ. Licensed under Apache-2.0 */ -/* Generated with cbindgen:0.24.3 */ +/* Generated with cbindgen:0.24.5 */ /* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */ @@ -254,7 +254,12 @@ typedef struct iterator_t { } iterator_t; typedef struct Iterator_vtable { - int32_t (*next_db)(struct iterator_t, struct gas_meter_t*, uint64_t*, struct UnmanagedVector*, struct UnmanagedVector*, struct UnmanagedVector*); + int32_t (*next_db)(struct iterator_t, + struct gas_meter_t*, + uint64_t*, + struct UnmanagedVector*, + struct UnmanagedVector*, + struct UnmanagedVector*); } Iterator_vtable; typedef struct GoIter { @@ -264,10 +269,31 @@ typedef struct GoIter { } GoIter; typedef struct Db_vtable { - int32_t (*read_db)(struct db_t*, struct gas_meter_t*, uint64_t*, struct U8SliceView, struct UnmanagedVector*, struct UnmanagedVector*); - int32_t (*write_db)(struct db_t*, struct gas_meter_t*, uint64_t*, struct U8SliceView, struct U8SliceView, struct UnmanagedVector*); - int32_t (*remove_db)(struct db_t*, struct gas_meter_t*, uint64_t*, struct U8SliceView, struct UnmanagedVector*); - int32_t (*scan_db)(struct db_t*, struct gas_meter_t*, uint64_t*, struct U8SliceView, struct U8SliceView, int32_t, struct GoIter*, struct UnmanagedVector*); + int32_t (*read_db)(struct db_t*, + struct gas_meter_t*, + uint64_t*, + struct U8SliceView, + struct UnmanagedVector*, + struct UnmanagedVector*); + int32_t (*write_db)(struct db_t*, + struct gas_meter_t*, + uint64_t*, + struct U8SliceView, + struct U8SliceView, + struct UnmanagedVector*); + int32_t (*remove_db)(struct db_t*, + struct gas_meter_t*, + uint64_t*, + struct U8SliceView, + struct UnmanagedVector*); + int32_t (*scan_db)(struct db_t*, + struct gas_meter_t*, + uint64_t*, + struct U8SliceView, + struct U8SliceView, + int32_t, + struct GoIter*, + struct UnmanagedVector*); } Db_vtable; typedef struct Db { @@ -281,10 +307,32 @@ typedef struct api_t { } api_t; typedef struct GoApi_vtable { - int32_t (*humanize_address)(const struct api_t*, struct U8SliceView, struct UnmanagedVector*, struct UnmanagedVector*, uint64_t*); - int32_t (*canonicalize_address)(const struct api_t*, struct U8SliceView, struct UnmanagedVector*, struct UnmanagedVector*, uint64_t*); - int32_t (*call_callable_point)(const struct api_t*, struct U8SliceView, struct U8SliceView, struct U8SliceView, bool, struct U8SliceView, uint64_t, struct UnmanagedVector*, struct UnmanagedVector*, uint64_t*); - int32_t (*validate_interface)(const struct api_t*, struct U8SliceView, struct U8SliceView, struct UnmanagedVector*, struct UnmanagedVector*, uint64_t*); + int32_t (*humanize_address)(const struct api_t*, + struct U8SliceView, + struct UnmanagedVector*, + struct UnmanagedVector*, + uint64_t*); + int32_t (*canonicalize_address)(const struct api_t*, + struct U8SliceView, + struct UnmanagedVector*, + struct UnmanagedVector*, + uint64_t*); + int32_t (*call_callable_point)(const struct api_t*, + struct U8SliceView, + struct U8SliceView, + struct U8SliceView, + bool, + struct U8SliceView, + uint64_t, + struct UnmanagedVector*, + struct UnmanagedVector*, + uint64_t*); + int32_t (*validate_interface)(const struct api_t*, + struct U8SliceView, + struct U8SliceView, + struct UnmanagedVector*, + struct UnmanagedVector*, + uint64_t*); } GoApi_vtable; typedef struct GoApi { @@ -297,7 +345,12 @@ typedef struct querier_t { } querier_t; typedef struct Querier_vtable { - int32_t (*query_external)(const struct querier_t*, uint64_t, uint64_t*, struct U8SliceView, struct UnmanagedVector*, struct UnmanagedVector*); + int32_t (*query_external)(const struct querier_t*, + uint64_t, + uint64_t*, + struct U8SliceView, + struct UnmanagedVector*, + struct UnmanagedVector*); } Querier_vtable; typedef struct GoQuerier { diff --git a/internal/api/callbacks.go b/internal/api/callbacks.go index 98ee912e..9b734fed 100644 --- a/internal/api/callbacks.go +++ b/internal/api/callbacks.go @@ -49,7 +49,7 @@ import ( dbm "github.com/tendermint/tm-db" - "github.com/line/wasmvm/types" + "github.com/Finschia/wasmvm/types" ) // Note: we have to include all exports in the same file (at least since they both import bindings.h), @@ -73,18 +73,18 @@ func recoverPanic(ret *C.GoError) { name := reflect.TypeOf(rec).Name() switch name { // These three types are "thrown" (which is not a thing in Go 🙃) in panics from the gas module - // (https://github.com/line/lbm-sdk/blob/main/store/types/gas.go): + // (https://github.com/Finschia/finschia-sdk/blob/main/store/types/gas.go): // 1. ErrorOutOfGas // 2. ErrorGasOverflow // 3. ErrorNegativeGasConsumed // // In the baseapp, ErrorOutOfGas gets special treatment: - // - https://github.com/line/lbm-sdk/blob/main/baseapp/baseapp.go#L647 - // - https://github.com/line/lbm-sdk/blob/main/baseapp/recovery.go#L50-L60 + // - https://github.com/Finschia/finschia-sdk/blob/main/baseapp/baseapp.go#L647 + // - https://github.com/Finschia/finschia-sdk/blob/main/baseapp/recovery.go#L50-L60 // This turns the panic into a regular error with a helpful error message. // // The other two gas related panic types indicate programming errors and are handled along - // with all other errors in https://github.com/line/lbm-sdk/blob/main/baseapp/recovery.go#L66-L77. + // with all other errors in https://github.com/Finschia/finschia-sdk/blob/main/baseapp/recovery.go#L66-L77. case "ErrorOutOfGas": // TODO: figure out how to pass the text in its `Descriptor` field through all the FFI *ret = C.GoError_OutOfGas @@ -98,17 +98,17 @@ func recoverPanic(ret *C.GoError) { type Gas = uint64 -// GasMeter is a copy of an interface declaration from lbm-sdk -// Defined in https://github.com/line/lbm-sdk/blob/main/store/types/gas.go +// GasMeter is a copy of an interface declaration from finschia-sdk +// Defined in https://github.com/Finschia/finschia-sdk/blob/main/store/types/gas.go type GasMeter interface { GasConsumed() Gas } /****** DB ********/ -// KVStore copies a subset of types from lbm-sdk +// KVStore copies a subset of types from finschia-sdk // We may wish to make this more generic sometime in the future, but not now -// Original KVStore is defined in https://github.com/line/lbm-sdk/blob/main/store/types/store.go +// Original KVStore is defined in https://github.com/Finschia/finschia-sdk/blob/main/store/types/store.go type KVStore interface { Get(key []byte) []byte Set(key, value []byte) @@ -205,7 +205,7 @@ func cGet(ptr *C.db_t, gasMeter *C.gas_meter_t, usedGas *cu64, key C.U8SliceView *usedGas = (cu64)(gasAfter - gasBefore) // v will equal nil when the key is missing - // https://github.com/line/lbm-sdk/blob/786df84b8e0aaa0a1aff79ffbab0541e597ee004/store/types/store.go#L203 + // https://github.com/Finschia/finschia-sdk/blob/786df84b8e0aaa0a1aff79ffbab0541e597ee004/store/types/store.go#L203 *val = newUnmanagedVector(v) return C.GoError_None diff --git a/internal/api/iterator_test.go b/internal/api/iterator_test.go index 3876a352..9d29568d 100644 --- a/internal/api/iterator_test.go +++ b/internal/api/iterator_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/line/wasmvm/types" + "github.com/Finschia/wasmvm/types" dbm "github.com/tendermint/tm-db" ) diff --git a/internal/api/lib.go b/internal/api/lib.go index 76375c9f..bef075ba 100644 --- a/internal/api/lib.go +++ b/internal/api/lib.go @@ -9,7 +9,7 @@ import ( "runtime" "syscall" - "github.com/line/wasmvm/types" + "github.com/Finschia/wasmvm/types" ) // Value types diff --git a/internal/api/lib_test.go b/internal/api/lib_test.go index 8ef73508..3318a417 100644 --- a/internal/api/lib_test.go +++ b/internal/api/lib_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/line/wasmvm/types" + "github.com/Finschia/wasmvm/types" ) const ( @@ -1070,7 +1070,7 @@ func TestCustomReflectQuerier(t *testing.T) { type QueryMsg struct { Capitalized *CapitalizedQuery `json:"capitalized,omitempty"` // There are more queries but we don't use them yet - // https://github.com/line/cosmwasm/blob/v0.14.0-0.4.0/contracts/reflect/src/msg.rs#L38-L57 + // https://github.com/Finschia/cosmwasm/blob/v0.14.0-0.4.0/contracts/reflect/src/msg.rs#L38-L57 } type CapitalizedResponse struct { diff --git a/internal/api/libwasmvm.aarch64.so b/internal/api/libwasmvm.aarch64.so index 347609e9..18719175 100755 Binary files a/internal/api/libwasmvm.aarch64.so and b/internal/api/libwasmvm.aarch64.so differ diff --git a/internal/api/libwasmvm.dylib b/internal/api/libwasmvm.dylib index 6ec316f6..0b0dbbfe 100755 Binary files a/internal/api/libwasmvm.dylib and b/internal/api/libwasmvm.dylib differ diff --git a/internal/api/libwasmvm.x86_64.so b/internal/api/libwasmvm.x86_64.so index 97c42673..2d23427d 100755 Binary files a/internal/api/libwasmvm.x86_64.so and b/internal/api/libwasmvm.x86_64.so differ diff --git a/internal/api/mocks.go b/internal/api/mocks.go index fe9a0275..e58bea0b 100644 --- a/internal/api/mocks.go +++ b/internal/api/mocks.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" dbm "github.com/tendermint/tm-db" - "github.com/line/wasmvm/types" + "github.com/Finschia/wasmvm/types" ) /** helper constructors **/ @@ -178,7 +178,7 @@ func MockIBCPacketTimeout(myChannel string, data []byte) types.IBCPacketTimeoutM } /*** Mock GasMeter ****/ -// This code is borrowed from lbm-sdk store/types/gas.go +// This code is borrowed from finschia-sdk store/types/gas.go // ErrorOutOfGas defines an error thrown when an action results in out of gas. type ErrorOutOfGas struct { @@ -241,7 +241,7 @@ func (g *mockGasMeter) ConsumeGas(amount Gas, descriptor string) { } /*** Mock KVStore ****/ -// Much of this code is borrowed from lbm-sdk store/transient.go +// Much of this code is borrowed from finschia-sdk store/transient.go // Note: these gas prices are all in *wasmer gas* and (sdk gas * 100) // diff --git a/internal/api/wasmvm.dll b/internal/api/wasmvm.dll index 506fcbc5..79645e25 100755 Binary files a/internal/api/wasmvm.dll and b/internal/api/wasmvm.dll differ diff --git a/lib.go b/lib.go index c996ccc9..b1c267ce 100644 --- a/lib.go +++ b/lib.go @@ -4,8 +4,8 @@ import ( "encoding/json" "fmt" - "github.com/line/wasmvm/internal/api" - "github.com/line/wasmvm/types" + "github.com/Finschia/wasmvm/internal/api" + "github.com/Finschia/wasmvm/types" ) // Checksum represents a hash of the Wasm bytecode that serves as an ID. Must be generated from this library. diff --git a/lib_test.go b/lib_test.go index 6c2b0c5e..59a79862 100644 --- a/lib_test.go +++ b/lib_test.go @@ -7,8 +7,8 @@ import ( "os" "testing" - "github.com/line/wasmvm/internal/api" - "github.com/line/wasmvm/types" + "github.com/Finschia/wasmvm/internal/api" + "github.com/Finschia/wasmvm/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -465,3 +465,9 @@ func TestValidateDynamicLinkInterafce(t *testing.T) { assert.Contains(t, string(res), `add_attributes`) }) } + +func TestLibwasmvmVersion(t *testing.T) { + version, err := LibwasmvmVersion() + require.NoError(t, err) + require.Equal(t, "1.1.1-0.11.2", version) +} diff --git a/libwasmvm/Cargo.lock b/libwasmvm/Cargo.lock index 8132961c..517369c8 100644 --- a/libwasmvm/Cargo.lock +++ b/libwasmvm/Cargo.lock @@ -56,7 +56,7 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object 0.30.3", + "object 0.30.4", "rustc-demangle", ] @@ -84,6 +84,18 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "block-buffer" version = "0.9.0" @@ -104,15 +116,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "bytecheck" -version = "0.6.10" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13fe11640a23eb24562225322cd3e452b93a3d4091d62fab69c70542fcd17d1f" +checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -121,9 +133,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.10" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31225543cb46f81a7e224762764f4a6a0f097b1db0b175f69e8065efaa42de5" +checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" dependencies = [ "proc-macro2", "quote", @@ -138,9 +150,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cbindgen" -version = "0.24.3" +version = "0.24.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6358dedf60f4d9b8db43ad187391afe959746101346fe51bb978126bec61dfb" +checksum = "4b922faaf31122819ec80c4047cc684c6979a087366c069611e33649bf98e18d" dependencies = [ "clap", "heck", @@ -169,9 +181,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.2.23" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "atty", "bitflags", @@ -227,7 +239,7 @@ name = "cosmwasm-crypto" version = "1.1.9-0.7.0" source = "git+https://github.com/Finschia/cosmwasm?tag=v1.1.9-0.7.0-dynamiclink1#d566925ec73592c51969f7fe1759302030e9dc2b" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "ed25519-zebra", "k256", "rand_core 0.6.4", @@ -296,9 +308,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" dependencies = [ "libc", ] @@ -394,22 +406,22 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.8.0", + "memoffset 0.9.0", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -457,9 +469,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.14.4" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" dependencies = [ "darling_core", "darling_macro", @@ -467,26 +479,26 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.4" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "darling_macro" -version = "0.14.4" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ "darling_core", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] @@ -521,9 +533,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", "crypto-common", @@ -604,7 +616,7 @@ dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.6", + "digest 0.10.7", "ff", "generic-array", "group", @@ -637,23 +649,23 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.12" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" +checksum = "e875f1719c16de097dee81ed675e2d9bb63096823ed3f0ca827b7dea3028bbbb" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.6.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" +checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" dependencies = [ "darling", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] @@ -725,6 +737,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "generic-array" version = "0.14.7" @@ -737,9 +755,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", @@ -834,7 +852,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -865,9 +883,9 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi 0.3.1", "libc", @@ -882,9 +900,9 @@ checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -915,9 +933,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.141" +version = "0.2.146" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" +checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" [[package]] name = "libloading" @@ -931,18 +949,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.3.1" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "log" -version = "0.4.17" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "loupe" @@ -1000,9 +1015,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -1046,18 +1061,18 @@ dependencies = [ [[package]] name = "object" -version = "0.30.3" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -1067,9 +1082,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "os_str_bytes" -version = "6.5.0" +version = "6.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" +checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" [[package]] name = "parity-wasm" @@ -1119,9 +1134,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" dependencies = [ "unicode-ident", ] @@ -1148,13 +1163,19 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + [[package]] name = "rand_core" version = "0.5.1" @@ -1246,23 +1267,26 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.41" +version = "0.7.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21499ed91807f07ae081880aabb2ccc0235e9d88011867d984525e9a4c3cfa3e" +checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" dependencies = [ + "bitvec", "bytecheck", "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", "seahash", + "tinyvec", + "uuid", ] [[package]] name = "rkyv_derive" -version = "0.7.41" +version = "0.7.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1c672430eb41556291981f45ca900a0239ad007242d1cb4b4167af842db666" +checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" dependencies = [ "proc-macro2", "quote", @@ -1271,9 +1295,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a36c42d1873f9a77c53bde094f9664d9891bc604a45b4798fd2c389ed12e5b" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" @@ -1283,9 +1307,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.37.11" +version = "0.37.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77" +checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" dependencies = [ "bitflags", "errno 0.3.1", @@ -1408,9 +1432,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.95" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", @@ -1457,7 +1481,7 @@ checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -1466,7 +1490,7 @@ version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "rand_core 0.6.4", ] @@ -1512,9 +1536,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" @@ -1529,32 +1553,39 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.14" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf316d5356ed6847742d036f8a39c3b8435cac10bd528a4bd461928a6ab34d5" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "target-lexicon" -version = "0.12.6" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" +checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" [[package]] name = "tempfile" -version = "3.5.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" dependencies = [ + "autocfg", "cfg-if", "fastrand", "redox_syscall", "rustix", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -1589,9 +1620,24 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.18", ] +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "toml" version = "0.5.11" @@ -1616,20 +1662,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", ] @@ -1654,9 +1700,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" [[package]] name = "unicode-width" @@ -1666,9 +1712,9 @@ checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "uuid" -version = "1.3.1" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b55a3fef2a1e3b3a00ce878640918820d3c51081576ac657d23af9fc7928fdb" +checksum = "0fa2982af2eec27de306107c027578ff7f423d65f7250e40ce0fea8f45248b81" dependencies = [ "serde", "sha1_smol", @@ -1688,9 +1734,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1698,24 +1744,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1723,28 +1769,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasm-encoder" -version = "0.25.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eff853c4f09eec94d76af527eddad4e9de13b11d6286a1ef7134bc30135a2b7" +checksum = "18c41dbd92eaebf3612a39be316540b8377c871cb9bde6b064af962984912881" dependencies = [ "leb128", ] @@ -2020,7 +2066,7 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "wasmvm" -version = "1.1.1-0.11.1" +version = "1.1.1-0.11.2" dependencies = [ "cbindgen", "cosmwasm-std", @@ -2036,9 +2082,9 @@ dependencies = [ [[package]] name = "wast" -version = "55.0.0" +version = "60.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4984d3e1406571f4930ba5cf79bd70f75f41d0e87e17506e0bd19b0e5d085f05" +checksum = "bd06cc744b536e30387e72a48fdd492105b9c938bb4f415c39c616a7a0a697ad" dependencies = [ "leb128", "memchr", @@ -2048,9 +2094,9 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.61" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2b53f4da14db05d32e70e9c617abdf6620c575bd5dd972b7400037b4df2091" +checksum = "5abe520f0ab205366e9ac7d3e6b2fc71de44e32a2b58f2ec871b6b575bdcea3b" dependencies = [ "wast", ] @@ -2110,37 +2156,13 @@ dependencies = [ "windows_x86_64_msvc 0.33.0", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets", ] [[package]] @@ -2149,21 +2171,15 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_gnullvm", "windows_aarch64_msvc 0.48.0", "windows_i686_gnu 0.48.0", "windows_i686_msvc 0.48.0", "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_gnullvm", "windows_x86_64_msvc 0.48.0", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" @@ -2176,12 +2192,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.0" @@ -2194,12 +2204,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.0" @@ -2212,12 +2216,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.0" @@ -2230,24 +2228,12 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" @@ -2262,15 +2248,18 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "windows_x86_64_msvc" -version = "0.42.2" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" +name = "wyz" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] [[package]] name = "zeroize" diff --git a/libwasmvm/Cargo.toml b/libwasmvm/Cargo.toml index 9926234b..f99ca741 100644 --- a/libwasmvm/Cargo.toml +++ b/libwasmvm/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "wasmvm" -version = "1.1.1-0.11.1" +version = "1.1.1-0.11.2" publish = false -authors = ["LINE Plus Corporation"] +authors = ["Finschia Foundation"] edition = "2021" description = "Go bindings for cosmwasm contracts" -repository = "https://github.com/line/wasmvm" +repository = "https://github.com/Finschia/wasmvm" license = "Apache-2.0" readme = "README.md" exclude = [".circleci/*", ".gitignore"] diff --git a/libwasmvm/bindings.h b/libwasmvm/bindings.h index ab4eece2..20012f73 100644 --- a/libwasmvm/bindings.h +++ b/libwasmvm/bindings.h @@ -1,6 +1,6 @@ /* (c) 2019 Confio OÜ. Licensed under Apache-2.0 */ -/* Generated with cbindgen:0.24.3 */ +/* Generated with cbindgen:0.24.5 */ /* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */ @@ -254,7 +254,12 @@ typedef struct iterator_t { } iterator_t; typedef struct Iterator_vtable { - int32_t (*next_db)(struct iterator_t, struct gas_meter_t*, uint64_t*, struct UnmanagedVector*, struct UnmanagedVector*, struct UnmanagedVector*); + int32_t (*next_db)(struct iterator_t, + struct gas_meter_t*, + uint64_t*, + struct UnmanagedVector*, + struct UnmanagedVector*, + struct UnmanagedVector*); } Iterator_vtable; typedef struct GoIter { @@ -264,10 +269,31 @@ typedef struct GoIter { } GoIter; typedef struct Db_vtable { - int32_t (*read_db)(struct db_t*, struct gas_meter_t*, uint64_t*, struct U8SliceView, struct UnmanagedVector*, struct UnmanagedVector*); - int32_t (*write_db)(struct db_t*, struct gas_meter_t*, uint64_t*, struct U8SliceView, struct U8SliceView, struct UnmanagedVector*); - int32_t (*remove_db)(struct db_t*, struct gas_meter_t*, uint64_t*, struct U8SliceView, struct UnmanagedVector*); - int32_t (*scan_db)(struct db_t*, struct gas_meter_t*, uint64_t*, struct U8SliceView, struct U8SliceView, int32_t, struct GoIter*, struct UnmanagedVector*); + int32_t (*read_db)(struct db_t*, + struct gas_meter_t*, + uint64_t*, + struct U8SliceView, + struct UnmanagedVector*, + struct UnmanagedVector*); + int32_t (*write_db)(struct db_t*, + struct gas_meter_t*, + uint64_t*, + struct U8SliceView, + struct U8SliceView, + struct UnmanagedVector*); + int32_t (*remove_db)(struct db_t*, + struct gas_meter_t*, + uint64_t*, + struct U8SliceView, + struct UnmanagedVector*); + int32_t (*scan_db)(struct db_t*, + struct gas_meter_t*, + uint64_t*, + struct U8SliceView, + struct U8SliceView, + int32_t, + struct GoIter*, + struct UnmanagedVector*); } Db_vtable; typedef struct Db { @@ -281,10 +307,32 @@ typedef struct api_t { } api_t; typedef struct GoApi_vtable { - int32_t (*humanize_address)(const struct api_t*, struct U8SliceView, struct UnmanagedVector*, struct UnmanagedVector*, uint64_t*); - int32_t (*canonicalize_address)(const struct api_t*, struct U8SliceView, struct UnmanagedVector*, struct UnmanagedVector*, uint64_t*); - int32_t (*call_callable_point)(const struct api_t*, struct U8SliceView, struct U8SliceView, struct U8SliceView, bool, struct U8SliceView, uint64_t, struct UnmanagedVector*, struct UnmanagedVector*, uint64_t*); - int32_t (*validate_interface)(const struct api_t*, struct U8SliceView, struct U8SliceView, struct UnmanagedVector*, struct UnmanagedVector*, uint64_t*); + int32_t (*humanize_address)(const struct api_t*, + struct U8SliceView, + struct UnmanagedVector*, + struct UnmanagedVector*, + uint64_t*); + int32_t (*canonicalize_address)(const struct api_t*, + struct U8SliceView, + struct UnmanagedVector*, + struct UnmanagedVector*, + uint64_t*); + int32_t (*call_callable_point)(const struct api_t*, + struct U8SliceView, + struct U8SliceView, + struct U8SliceView, + bool, + struct U8SliceView, + uint64_t, + struct UnmanagedVector*, + struct UnmanagedVector*, + uint64_t*); + int32_t (*validate_interface)(const struct api_t*, + struct U8SliceView, + struct U8SliceView, + struct UnmanagedVector*, + struct UnmanagedVector*, + uint64_t*); } GoApi_vtable; typedef struct GoApi { @@ -297,7 +345,12 @@ typedef struct querier_t { } querier_t; typedef struct Querier_vtable { - int32_t (*query_external)(const struct querier_t*, uint64_t, uint64_t*, struct U8SliceView, struct UnmanagedVector*, struct UnmanagedVector*); + int32_t (*query_external)(const struct querier_t*, + uint64_t, + uint64_t*, + struct U8SliceView, + struct UnmanagedVector*, + struct UnmanagedVector*); } Querier_vtable; typedef struct GoQuerier { diff --git a/libwasmvm/src/cache.rs b/libwasmvm/src/cache.rs index 93236114..f59c8150 100644 --- a/libwasmvm/src/cache.rs +++ b/libwasmvm/src/cache.rs @@ -372,7 +372,9 @@ mod tests { assert!(cache_ptr.is_null()); assert!(error_msg.is_some()); let msg = String::from_utf8(error_msg.consume().unwrap()).unwrap(); - assert_eq!(msg, "Error calling the VM: Cache error: Error creating directory broken\u{0}dir/state: data provided contains a nul byte"); + assert!(msg.starts_with( + "Error calling the VM: Cache error: Error creating directory broken\u{0}dir/state" + )); } #[test] diff --git a/testdata/README.md b/testdata/README.md index 59652b8b..49ed06cc 100644 --- a/testdata/README.md +++ b/testdata/README.md @@ -1,3 +1,3 @@ Current contracts manually generated from commit `v0.14.0-beta1` -of https://github.com/line/cosmwasm. Using -[these instructions](https://github.com/line/cosmwasm/tree/v0.14.0-0.4.0/contracts/README.md#optimized-builds). +of https://github.com/Finschia/cosmwasm. Using +[these instructions](https://github.com/Finschia/cosmwasm/tree/v0.14.0-0.4.0/contracts/README.md#optimized-builds). diff --git a/testdata/download_releases.sh b/testdata/download_releases.sh index ac05bfbe..8c4b47bb 100755 --- a/testdata/download_releases.sh +++ b/testdata/download_releases.sh @@ -10,7 +10,7 @@ fi tag="$1" for contract in cyberpunk hackatom queue reflect ibc_reflect; do - url="https://github.com/line/cosmwasm/releases/download/$tag/$contract.wasm" + url="https://github.com/Finschia/cosmwasm/releases/download/$tag/$contract.wasm" echo "Downloading $url ..." wget -O "$contract.wasm" "$url" done diff --git a/types/ibc.go b/types/ibc.go index 31d6d338..4d0ed6b0 100644 --- a/types/ibc.go +++ b/types/ibc.go @@ -149,8 +149,8 @@ type IBCPacketTimeoutMsg struct { } // TODO: test what the sdk Order.String() represents and how to parse back -// `Order` in Proto files: https://github.com/line/lbm-sdk/blob/main/proto/ibc/core/channel/v1/channel.proto -// `ORder` in Auto-gen code: https://github.com/line/lbm-sdk/blob/main/x/ibc/core/04-channel/types/channel.pb.go +// `Order` in Proto files: https://github.com/Finschia/finschia-sdk/blob/main/proto/ibc/core/channel/v1/channel.proto +// `ORder` in Auto-gen code: https://github.com/Finschia/finschia-sdk/blob/main/x/ibc/core/04-channel/types/channel.pb.go type IBCOrder = string // These are the only two valid values for IbcOrder @@ -221,7 +221,7 @@ type IBCBasicResult struct { } // IBCBasicResponse defines the return value on a successful processing. -// This is the counterpart of `IbcBasicResponse` in https://github.com/line/cosmwasm/blob/main/packages/std/src/ibc.rs . +// This is the counterpart of `IbcBasicResponse` in https://github.com/Finschia/cosmwasm/blob/main/packages/std/src/ibc.rs . type IBCBasicResponse struct { // Messages comes directly from the contract and is its request for action. // If the ReplyOn value matches the result, the runtime will invoke this @@ -252,7 +252,7 @@ type IBCReceiveResult struct { // Where the Acknowledgement bytes contain an encoded error message to be returned to // the calling chain. (Returning IBCReceiveResult::Err will abort processing of this packet // and not inform the calling chain). -// This is the counterpart of `IbcReceiveResponse` in https://github.com/line/cosmwasm/blob/main/packages/std/src/ibc.rs . +// This is the counterpart of `IbcReceiveResponse` in https://github.com/Finschia/cosmwasm/blob/main/packages/std/src/ibc.rs . type IBCReceiveResponse struct { // binary encoded data to be returned to calling chain as the acknowledgement Acknowledgement []byte `json:"acknowledgement"` diff --git a/types/msg.go b/types/msg.go index 74893e67..1dcb40f0 100644 --- a/types/msg.go +++ b/types/msg.go @@ -15,7 +15,7 @@ type ContractResult struct { } // Response defines the return value on a successful instantiate/execute/migrate. -// This is the counterpart of `Response` in https://github.com/line/cosmwasm/blob/main/packages/std/src/results/response.rs . +// This is the counterpart of `Response` in https://github.com/Finschia/cosmwasm/blob/main/packages/std/src/results/response.rs . type Response struct { // Messages comes directly from the contract and is its request for action. // If the ReplyOn value matches the result, the runtime will invoke this @@ -114,7 +114,7 @@ type BankMsg struct { Burn *BurnMsg `json:"burn,omitempty"` } -// SendMsg contains instructions for a lbm-sdk/SendMsg +// SendMsg contains instructions for a finschia-sdk/SendMsg // It has a fixed interface here and should be converted into the proper SDK format before dispatching type SendMsg struct { ToAddress string `json:"to_address"` @@ -284,7 +284,7 @@ type ExecuteMsg struct { // InstantiateMsg will create a new contract instance from a previously uploaded CodeID. // This allows one contract to spawn "sub-contracts". type InstantiateMsg struct { - // CodeID is the reference to the wasm byte code as used by the lbm-sdk + // CodeID is the reference to the wasm byte code as used by the finschia-sdk CodeID uint64 `json:"code_id"` // Msg is assumed to be a json-encoded message, which will be passed directly // as `userMsg` when calling `Init` on a new contract with the above-defined CodeID diff --git a/types/queries.go b/types/queries.go index e9d1aa09..58dd8240 100644 --- a/types/queries.go +++ b/types/queries.go @@ -124,7 +124,7 @@ type AllBalancesResponse struct { } // IBCQuery defines a query request from the contract into the chain. -// This is the counterpart of `IbcQuery` in https://github.com/line/cosmwasm/blob/main/packages/std/src/ibc.rs . +// This is the counterpart of `IbcQuery` in https://github.com/Finschia/cosmwasm/blob/main/packages/std/src/ibc.rs . type IBCQuery struct { PortID *PortIDQuery `json:"port_id,omitempty"` ListChannels *ListChannelsQuery `json:"list_channels,omitempty"` @@ -140,7 +140,7 @@ type PortIDResponse struct { // ListChannelsQuery is an IBCQuery that lists all channels that are bound to a given port. // If `PortID` is unset, this list all channels bound to the contract's port. // Returns a `ListChannelsResponse`. -// This is the counterpart of `IbcQuery::ListChannels` in https://github.com/line/cosmwasm/blob/main/packages/std/src/ibc.rs . +// This is the counterpart of `IbcQuery::ListChannels` in https://github.com/Finschia/cosmwasm/blob/main/packages/std/src/ibc.rs . type ListChannelsQuery struct { // optional argument PortID string `json:"port_id,omitempty"`