Skip to content
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

[sui-verifier] Added support for characteristic types #3563

Merged
merged 9 commits into from
Aug 2, 2022
Prev Previous commit
Next Next commit
Fixed another problem plus adjusted more test outputs
  • Loading branch information
awelc committed Jul 28, 2022
commit 825a829ff592507efbbb17ac14f9de8600edfc1e
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ processed 4 tasks

task 0 'publish'. lines 4-11:
Error: Transaction Effects Status: Sui Move Bytecode Verification Error. Please run the Sui Move Verifier for more information.
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected parameter for _::m::init to be &mut sui::tx_context::TxContext, but found u64") } }
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected last parameter for _::m::init to be &mut sui::tx_context::TxContext, but found u64") } }

task 1 'publish'. lines 13-20:
Error: Transaction Effects Status: Sui Move Bytecode Verification Error. Please run the Sui Move Verifier for more information.
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected parameter for _::tx_context::init to be &mut sui::tx_context::TxContext, but found _::tx_context::TxContext") } }
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected last parameter for _::tx_context::init to be &mut sui::tx_context::TxContext, but found _::tx_context::TxContext") } }

task 2 'publish'. lines 22-29:
Error: Transaction Effects Status: Sui Move Bytecode Verification Error. Please run the Sui Move Verifier for more information.
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected parameter for _::m::init to be &mut sui::tx_context::TxContext, but found &sui::tx_context::TxContext") } }
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected last parameter for _::m::init to be &mut sui::tx_context::TxContext, but found &sui::tx_context::TxContext") } }

task 3 'publish'. lines 32-39:
Error: Transaction Effects Status: Sui Move Bytecode Verification Error. Please run the Sui Move Verifier for more information.
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected parameter for _::m::init to be &mut sui::tx_context::TxContext, but found sui::tx_context::TxContext") } }
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected last parameter for _::m::init to be &mut sui::tx_context::TxContext, but found sui::tx_context::TxContext") } }
2 changes: 1 addition & 1 deletion crates/sui-verifier/src/entry_points_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ fn verify_init_function(module: &CompiledModule, fdef: &FunctionDefinition) -> R
));
}

if is_tx_context(view, &parameters[parameters.len() - 1]) {
if parameters.len() == 0 || is_tx_context(view, &parameters[parameters.len() - 1]) {
Ok(())
} else {
Err(format!(
Expand Down