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

Remove TxContext from the check in the entry function. #360

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,18 @@ Error: error: type `&mut signer` is not supported as a parameter type
10 │ │ }
│ ╰─────^

error: type `&mut tx_context::TxContext` is not supported as a parameter type
┌─ /tmp/tempfile:17:5
17 │ ╭ entry public fun test_entry_function_valid_reference_mut_tx_context( _: &mut tx_context::TxContext ){
18 │ │ }
│ ╰─────^

error: type `&tx_context::TxContext` is not supported as a parameter type
┌─ /tmp/tempfile:15:5
15 │ ╭ entry public fun test_entry_function_valid_reference_tx_context( _: & tx_context::TxContext ){
16 │ │ }
│ ╰─────^


Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
processed 2 tasks

task 1 'publish'. lines 3-32:
status EXECUTED
Error: error: type `&mut tx_context::TxContext` is not supported as a parameter type
┌─ /tmp/tempfile:18:5
18 │ ╭ entry public fun test_entry_function_valid_struct_tx_context( _ctx: &mut tx_context::TxContext ){
19 │ │ }
│ ╰─────^


4 changes: 0 additions & 4 deletions crates/rooch-integration-test-runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@ impl<'a> MoveOSTestAdapter<'a> for MoveOSTestRunner<'a> {
if let Some(pre_compiled_lib) = pre_compiled_deps {
for c in &pre_compiled_lib.compiled {
if let CompiledUnitEnum::Module(m) = c {
println!(
"precompiled module: {:?}, {:?}, {:?}",
m.named_module.package_name, m.named_module.address, m.named_module.name
);
// update named_address_mapping
if let Some(named_address) = &m.address_name {
let name = named_address.value.to_string();
Expand Down
2 changes: 1 addition & 1 deletion moveos/moveos-stdlib/move-stdlib/doc/error.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ Construct a canonical error code from a category and a reason.


<pre><code><b>public</b> <b>fun</b> <a href="error.md#0x1_error_canonical">canonical</a>(category: u64, reason: u64): u64 {
(category * 10000) + reason
(category &lt;&lt; 16) + reason
}
</code></pre>

Expand Down
1 change: 0 additions & 1 deletion moveos/moveos-verifier/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ pub fn is_allowed_input_struct(name: String) -> bool {
| "0x1::ascii::String"
| "0x2::object_id::ObjectID"
| "0x2::storage_context::StorageContext"
| "0x2::tx_context::TxContext"
)
}

Expand Down
Loading