-
Notifications
You must be signed in to change notification settings - Fork 70
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
Stack overflow error when interacting with testnet contract #1588
Labels
bug
Something isn't working
Comments
Inspecting the contract, it appears to have a recursive
pub const WASM: &[u8] = soroban_sdk::contractfile!(
file = "CASQBSZXLPBXKAS7B556ARFKZI4UNVJKGM4SBZMRUS4OCXVDILOUVHMC.wasm", sha256 =
"4858768f584c661d9a839bf84d75f12bcf1705ef031fdbec5becd0ab367af0f6"
);
#[soroban_sdk::contractclient(name = "Client")]
pub trait Contract {
fn init(
env: soroban_sdk::Env,
wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>;
fn deploy(
env: soroban_sdk::Env,
salt: soroban_sdk::BytesN<32>,
id: Signer,
) -> Result<soroban_sdk::Address, soroban_sdk::Error>;
}
#[soroban_sdk::contracttype(export = false)]
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd)]
pub struct Policy(pub soroban_sdk::Address);
#[soroban_sdk::contracttype(export = false)]
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd)]
pub struct Ed25519PublicKey(pub soroban_sdk::BytesN<32>);
#[soroban_sdk::contracttype(export = false)]
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd)]
pub struct Secp256r1Id(pub soroban_sdk::Bytes);
#[soroban_sdk::contracttype(export = false)]
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd)]
pub enum Signer {
Policy(Policy, soroban_sdk::Vec<Signer>),
Ed25519(Ed25519PublicKey),
Secp256r1(Secp256r1Id, soroban_sdk::BytesN<65>),
}
#[soroban_sdk::contracterror(export = false)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
pub enum Error {
NotInitialized = 1,
AlreadyInitialized = 2,
} Specifically the pub enum Signer {
Policy(Policy, soroban_sdk::Vec<Signer>), |
Removing this recursion definitely cleared up this issue fwiw |
Looking into it here: #1593 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version are you using?
v21.4.1
What did you do?
What did you expect to see?
Help output for the contract.
What did you see instead?
Reported by @kalepail in Discord:
The text was updated successfully, but these errors were encountered: