I was trying to use a bump as a signer. When trying to recreate the issue with the minimum reproducible code, I noticed that this program that I would expect to compile, wouldn't
Source code:
# bugreport
# Built with Seahorse v0.2.5
from seahorse.prelude import *
declare_id("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS")
class Protocol:
bump: u8
@instruction
def init_protocol(signer: Signer, protocol: Empty[Protocol]) -> Program:
protocol = protocol.init(payer=signer, seeds=["protocol"])
protocol.bump = u8(0)
Error message on seahorse build
seahorse build
⠋ Compiling bugreport...thread 'main' panicked at 'explicit panic', src/core/compile/build/mod.rs:248:18
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
⠙ Compiling bugreport...%
Hi, sorry for missing this! This isn't a compiler bug, but there is an unreported reason behind the error. You need to make Protocol inherit from Account:
I was trying to use a bump as a signer. When trying to recreate the issue with the minimum reproducible code, I noticed that this program that I would expect to compile, wouldn't
Source code:
Error message on seahorse build
seahorse build ⠋ Compiling bugreport...thread 'main' panicked at 'explicit panic', src/core/compile/build/mod.rs:248:18 note: run with
RUST_BACKTRACE=1
environment variable to display a backtrace ⠙ Compiling bugreport...%