Skip to content

Commit

Permalink
[4/x][programmable transactions] Added MoveCall execution (#8406)
Browse files Browse the repository at this point in the history
- Basically had to rewrite the Move Adapter. I wouldn't worry about the
lack of code sharing as I think the current adapter can die once we
migrate everything.
  • Loading branch information
tnowacki authored Feb 21, 2023
1 parent 315e188 commit 9ad77a9
Show file tree
Hide file tree
Showing 4 changed files with 945 additions and 132 deletions.
10 changes: 9 additions & 1 deletion crates/sui-adapter/src/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,15 @@ fn validate_primitive_arg(

// we already checked the type above and struct layout for this type is guaranteed to exist
let string_struct_layout = type_layout.unwrap();
validate_primitive_arg_string(arg, idx, string_struct, string_struct_layout)
}

pub fn validate_primitive_arg_string(
arg: &[u8],
idx: LocalIndex,
string_struct: (&AccountAddress, &IdentStr, &IdentStr),
string_struct_layout: MoveTypeLayout,
) -> Result<(), ExecutionError> {
let string_move_value =
MoveValue::simple_deserialize(arg, &string_struct_layout).map_err(|_| {
ExecutionError::new_with_source(
Expand Down Expand Up @@ -1458,7 +1466,7 @@ fn missing_unwrapped_msg(id: &ObjectID) -> String {
)
}

fn convert_type_argument_error<
pub fn convert_type_argument_error<
'r,
E: Debug,
S: ResourceResolver<Error = E> + ModuleResolver<Error = E>,
Expand Down
Loading

4 comments on commit 9ad77a9

@vercel
Copy link

@vercel vercel bot commented on 9ad77a9 Feb 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

explorer – ./apps/explorer

explorer.sui.io
explorer-topaz.vercel.app
explorer-mysten-labs.vercel.app
explorer-git-main-mysten-labs.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 9ad77a9 Feb 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

frenemies – ./dapps/frenemies

frenemies-git-main-mysten-labs.vercel.app
frenemies.vercel.app
frenemies-mysten-labs.vercel.app
frenemies.sui.io

@vercel
Copy link

@vercel vercel bot commented on 9ad77a9 Feb 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 9ad77a9 Feb 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wallet-adapter – ./sdk/wallet-adapter/example

Please sign in to comment.