Skip to content

Commit

Permalink
fix: change depending cosmwasm and remove unused functions on libwasmvm
Browse files Browse the repository at this point in the history
- change depnding cosmwasm
- remove unused functions on libwasmvm after solving Finschia/cosmwasm#273
loloicci committed Apr 17, 2023
1 parent cd1be91 commit 9717fb3
Showing 9 changed files with 32 additions and 513 deletions.
25 changes: 12 additions & 13 deletions internal/api/bindings.h
Original file line number Diff line number Diff line change
@@ -280,6 +280,18 @@ typedef struct api_t {
uint8_t _private[0];
} 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*);
} GoApi_vtable;

typedef struct GoApi {
const struct api_t *state;
struct GoApi_vtable vtable;
} GoApi;

typedef struct querier_t {
uint8_t _private[0];
} querier_t;
@@ -293,19 +305,6 @@ typedef struct GoQuerier {
struct Querier_vtable vtable;
} GoQuerier;

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 (*get_contract_env)(const struct api_t*, struct U8SliceView, uint64_t, struct UnmanagedVector*, struct cache_t**, struct Db*, struct GoQuerier*, struct UnmanagedVector*, struct UnmanagedVector*, uint64_t*, 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 {
const struct api_t *state;
struct GoApi_vtable vtable;
} GoApi;

struct cache_t *init_cache(struct ByteSliceView data_dir,
struct ByteSliceView available_capabilities,
uint32_t cache_size,
Binary file modified internal/api/libwasmvm.aarch64.so
Binary file not shown.
Binary file modified internal/api/libwasmvm.dylib
Binary file not shown.
Binary file modified internal/api/libwasmvm.x86_64.so
Binary file not shown.
Binary file modified internal/api/wasmvm.dll
Binary file not shown.
8 changes: 4 additions & 4 deletions libwasmvm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions libwasmvm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -30,8 +30,8 @@ default = []
backtraces = []

[dependencies]
cosmwasm-std = { git = "https://github.com/line/cosmwasm", rev = "6ce2d990af376f58b64235620b3e5fa85793726d", features = ["iterator","staking","stargate"] }
cosmwasm-vm = { git = "https://github.com/line/cosmwasm", rev = "6ce2d990af376f58b64235620b3e5fa85793726d", features = ["iterator","staking","stargate"] }
cosmwasm-std = { git = "https://github.com/line/cosmwasm", rev = "cb1a355d0da35e36a5822df52b69ff8471e81377", features = ["iterator","staking","stargate"] }
cosmwasm-vm = { git = "https://github.com/line/cosmwasm", rev = "cb1a355d0da35e36a5822df52b69ff8471e81377", features = ["iterator","staking","stargate"] }
errno = "0.2"
serde_json = "1.0"
thiserror = "1.0"
25 changes: 12 additions & 13 deletions libwasmvm/bindings.h
Original file line number Diff line number Diff line change
@@ -280,6 +280,18 @@ typedef struct api_t {
uint8_t _private[0];
} 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*);
} GoApi_vtable;

typedef struct GoApi {
const struct api_t *state;
struct GoApi_vtable vtable;
} GoApi;

typedef struct querier_t {
uint8_t _private[0];
} querier_t;
@@ -293,19 +305,6 @@ typedef struct GoQuerier {
struct Querier_vtable vtable;
} GoQuerier;

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 (*get_contract_env)(const struct api_t*, struct U8SliceView, uint64_t, struct UnmanagedVector*, struct cache_t**, struct Db*, struct GoQuerier*, struct UnmanagedVector*, struct UnmanagedVector*, uint64_t*, 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 {
const struct api_t *state;
struct GoApi_vtable vtable;
} GoApi;

struct cache_t *init_cache(struct ByteSliceView data_dir,
struct ByteSliceView available_capabilities,
uint32_t cache_size,
Loading

0 comments on commit 9717fb3

Please sign in to comment.