-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the Move library to the latest version from the upstream. #1222
Update the Move library to the latest version from the upstream. #1222
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@@ -2,7 +2,7 @@ | |||
// SPDX-License-Identifier: Apache-2.0 | |||
|
|||
use clap::Parser; | |||
use clap::__macro_refs::once_cell::sync::Lazy; | |||
use clap::__derive_refs::once_cell::sync::Lazy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be use once_cell::sync::Lazy
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deal with this later.
.transpose(); | ||
|
||
match result { | ||
Ok(opt) => { | ||
if let Some(data) = opt { | ||
Ok((Some(data), 0)) | ||
} else { | ||
Ok((None, 0)) | ||
} | ||
} | ||
Err(err) => Err(err), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplify it by map?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deal with this later.
@@ -345,7 +346,9 @@ impl<'a> ExtendedChecker<'a> { | |||
impl<'a> ExtendedChecker<'a> { | |||
fn check_init_module(&mut self, module: &ModuleEnv) { | |||
for ref fun in module.get_functions() { | |||
if fun.get_identifier().as_ident_str() != INIT_FN_NAME_IDENTIFIER.as_ident_str() { | |||
if fun.get_identifier().unwrap().as_ident_str() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful unwrap
; if it occurs in runtime, it will be a security bug.
} | ||
} | ||
|
||
impl<R> ModuleResolver for MoveOSResolverProxy<R> | ||
where | ||
R: StateResolver, | ||
{ | ||
type Error = anyhow::Error; | ||
fn get_module_metadata(&self, _module_id: &ModuleId) -> Vec<Metadata> { | ||
vec![] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just return an empty array? Do we use the get_module_metadata
in the VM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the metadata for the module is manually read from the VM and the function is not invoked.
@@ -362,6 +362,41 @@ impl FromStr for FunctionArg { | |||
} | |||
} | |||
|
|||
pub fn parse_function_arg(s: &str) -> Result<FunctionArg, RoochError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not directly use from_str
?
let s = value.as_str().unwrap(); | ||
let ret = serde_json::from_str(s); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which change affects the RPC response?
@@ -102,7 +102,7 @@ module moveos_std::type_info { | |||
//assert!(type_name<TypeInfo>() == string::utf8(b"0x1::type_info::TypeInfo"), 9); | |||
assert!(type_name<TypeInfo>() == string::utf8(b"0000000000000000000000000000000000000000000000000000000000000002::type_info::TypeInfo"), 9); | |||
|
|||
assert!(type_name<TestMultiGenerics<u8, u64, vector<u8>>>() == string::utf8(b"0000000000000000000000000000000000000000000000000000000000000002::type_info::TestMultiGenerics<u8,u64,vector<u8>>"), 10); | |||
assert!(type_name<TestMultiGenerics<u8, u64, vector<u8>>>() == string::utf8(b"0000000000000000000000000000000000000000000000000000000000000002::type_info::TestMultiGenerics<u8u64vector<u8>>"), 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which change affects this? The original format is right.
@@ -150,7 +150,7 @@ Feature: Rooch CLI integration tests | |||
Given a server for kv_store | |||
Then cmd: "move publish -p ../../examples/kv_store --named-addresses rooch_examples=default" | |||
Then assert: "{{$.move[-1].execution_info.status.type}} == executed" | |||
Then cmd: "move run --function default::kv_store::add_value --args string:key1 string:value1" | |||
Then cmd: "move run --function default::kv_store::add_value --args string:key1 --args string:value1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we not support splitting the args with blank?
No description provided.