|
@@ -468,6 +468,7 @@ pub(super) fn solana_deploy(
|
|
|
|
|
|
|
|
// seeds
|
|
// seeds
|
|
|
let mut seeds = Vec::new();
|
|
let mut seeds = Vec::new();
|
|
|
|
|
+ let mut declared_bump = None;
|
|
|
|
|
|
|
|
for note in &func.annotations {
|
|
for note in &func.annotations {
|
|
|
match note {
|
|
match note {
|
|
@@ -486,13 +487,16 @@ pub(super) fn solana_deploy(
|
|
|
}
|
|
}
|
|
|
.into(),
|
|
.into(),
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
- seeds.push(expression(&expr, cfg, contract_no, None, ns, vartab, opt));
|
|
|
|
|
|
|
+ declared_bump = Some(expr);
|
|
|
}
|
|
}
|
|
|
_ => (),
|
|
_ => (),
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if let Some(bump) = declared_bump {
|
|
|
|
|
+ seeds.push(expression(&bump, cfg, contract_no, None, ns, vartab, opt));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
let seeds = if !seeds.is_empty() {
|
|
let seeds = if !seeds.is_empty() {
|
|
|
let ty = Type::Array(
|
|
let ty = Type::Array(
|
|
|
Box::new(Type::Slice(Box::new(Type::Bytes(1)))),
|
|
Box::new(Type::Slice(Box::new(Type::Bytes(1)))),
|