Skip to content

Commit

Permalink
chore: go fmt and add comments to rust
Browse files Browse the repository at this point in the history
  • Loading branch information
loloicci committed Mar 29, 2023
1 parent 65e55aa commit 9eb6459
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
12 changes: 6 additions & 6 deletions api/lib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1425,11 +1425,11 @@ func TestCallCallablePoint(t *testing.T) {
Type: "ty1",
Attributes: types.EventAttributes{
types.EventAttribute{
Key: "alice",
Key: "alice",
Value: "101010",
},
types.EventAttribute{
Key: "bob",
Key: "bob",
Value: "42",
},
},
Expand All @@ -1438,11 +1438,11 @@ func TestCallCallablePoint(t *testing.T) {
Type: "ty2",
Attributes: types.EventAttributes{
types.EventAttribute{
Key: "ALICE",
Key: "ALICE",
Value: "42",
},
types.EventAttribute{
Key: "BOB",
Key: "BOB",
Value: "101010",
},
},
Expand Down Expand Up @@ -1484,11 +1484,11 @@ func TestCallCallablePoint(t *testing.T) {
require.NoError(t, err)
attrsIn := types.EventAttributes{
types.EventAttribute{
Key: "alice",
Key: "alice",
Value: "42",
},
types.EventAttribute{
Key: "bob",
Key: "bob",
Value: "101010",
},
}
Expand Down
12 changes: 6 additions & 6 deletions lib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,11 @@ func TestCallCallablePoint(t *testing.T) {
Type: "ty1",
Attributes: types.EventAttributes{
types.EventAttribute{
Key: "alice",
Key: "alice",
Value: "101010",
},
types.EventAttribute{
Key: "bob",
Key: "bob",
Value: "42",
},
},
Expand All @@ -326,11 +326,11 @@ func TestCallCallablePoint(t *testing.T) {
Type: "ty2",
Attributes: types.EventAttributes{
types.EventAttribute{
Key: "ALICE",
Key: "ALICE",
Value: "42",
},
types.EventAttribute{
Key: "BOB",
Key: "BOB",
Value: "101010",
},
},
Expand Down Expand Up @@ -359,11 +359,11 @@ func TestCallCallablePoint(t *testing.T) {
require.NoError(t, err)
attrsIn := types.EventAttributes{
types.EventAttribute{
Key: "alice",
Key: "alice",
Value: "42",
},
types.EventAttribute{
Key: "bob",
Key: "bob",
Value: "101010",
},
}
Expand Down
5 changes: 5 additions & 0 deletions libwasmvm/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const MAX_REGIONS_LENGTH_OUTPUT: usize = 64 * MI;
pub struct api_t {
_private: [u8; 0],
}

// TODO: will be removed after solving cosmwasm#273
// This contains property about the function of callee
#[derive(Serialize, Deserialize)]
struct CalleeProperty {
Expand Down Expand Up @@ -150,6 +152,7 @@ impl BackendApi for GoApi {
(result, gas_info)
}

// TODO: will be removed after solving cosmwasm#273
fn contract_call<A, S, Q>(
&self,
caller_env: &Environment<A, S, Q>,
Expand Down Expand Up @@ -330,6 +333,7 @@ impl BackendApi for GoApi {
(call_ret, gas_info)
}

// TODO: will be removed after solving cosmwasm#273
fn get_wasmer_module(&self, contract_addr: &str) -> BackendResult<Module> {
let cache_t_null_ptr: *mut cache_t = std::ptr::null_mut();
let mut error_msg = UnmanagedVector::default();
Expand Down Expand Up @@ -399,6 +403,7 @@ fn into_backend(db: Db, api: GoApi, querier: GoQuerier) -> Backend<GoApi, GoStor
}
}

// TODO: will be removed after solving cosmwasm#273
fn get_read_write_permission(
callee_instance: &mut Instance<GoApi, GoStorage, GoQuerier>,
is_caller_permission: bool,
Expand Down

0 comments on commit 9eb6459

Please sign in to comment.