Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

() is encoded as a SC_SPEC_TYPE_TUPLE instead of SC_SPEC_TYPE_VOID #1215

Open
wildework opened this issue Jan 29, 2024 · 0 comments
Open

() is encoded as a SC_SPEC_TYPE_TUPLE instead of SC_SPEC_TYPE_VOID #1215

wildework opened this issue Jan 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@wildework
Copy link

What version are you using?

soroban-sdk: 20.2.0

What did you do?

#![no_std]
use soroban_sdk::{contract, contractimpl, Env};

#[contract]
pub struct Contract;

#[contractimpl]
impl Contract {
    pub fn void_fn(env: Env, void_argument: ()) -> () {
        void_argument
    }
}

What did you expect to see?

I expected to see void_fn specification in the compiled .wasm to have the argument void_argument typed as SC_SPEC_TYPE_VOID and the return value typed as SC_SPEC_TYPE_VOID.

What did you see instead?

Both were typed as SC_SPEC_TYPE_TUPLE.

@wildework wildework added the bug Something isn't working label Jan 29, 2024
@leighmcculloch leighmcculloch self-assigned this Jan 29, 2024
@leighmcculloch leighmcculloch removed their assignment Mar 20, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@leighmcculloch @wildework and others