Description
The main branch currently fails to compile out of the box. Running cargo check or cargo test in the root or inside the escrow directory yields over 800 compilation errors (specifically in escrow/src/lib.rs).
The failures primarily stem from two structural issues in the contract codebase:
1. Missing Enum Variants (E0599)
Several variants used throughout the contract logic are completely missing from their respective enum definitions (DataKey and EscrowError).
- Missing
EscrowError variants: LegalHoldBlocksCancelFunding, CancelFundingNotOpen, RefundNotCancelled, NoContributionToRefund
- Missing
DataKey variants: InvestorRefunded, DistributedPrincipal
Someone likely added the logic for refunds and cancellations but forgot to declare the corresponding enum keys at the top of the file.
2. Duplicate Implementations / Macro Conflicts (E0034)
The Soroban #[contractimpl] macro throws multiple multiple applicable items in scope errors for generated XDR specifications (e.g., spec_xdr_get_escrow, spec_xdr_fund, spec_xdr_is_settleable).
This indicates that LiquifactEscrow likely has duplicate methods defined across multiple impl blocks, or there is a structural macro conflict in how #[contractimpl] is applied.
Steps to Reproduce
- Clone the repository and checkout
main.
- Run
cargo check inside the escrow crate or workspace root.
Snippet of the errors:
```rust
error[E0599]: no variant, associated function, or constant named RefundNotCancelled found for enum EscrowError in the current scope
error[E0599]: no variant, associated function, or constant named InvestorRefunded found for enum DataKey in the current scope
error[E0034]: multiple applicable items in scope for spec_xdr_fund
```
Expected Behavior
The base main branch should compile and pass cargo check successfully without cascading syntax and scoping errors. It needs a quick structural fix to declare the missing enums and remove duplicate implementations.
Description
The
mainbranch currently fails to compile out of the box. Runningcargo checkorcargo testin the root or inside theescrowdirectory yields over 800 compilation errors (specifically inescrow/src/lib.rs).The failures primarily stem from two structural issues in the contract codebase:
1. Missing Enum Variants (
E0599)Several variants used throughout the contract logic are completely missing from their respective enum definitions (
DataKeyandEscrowError).EscrowErrorvariants:LegalHoldBlocksCancelFunding,CancelFundingNotOpen,RefundNotCancelled,NoContributionToRefundDataKeyvariants:InvestorRefunded,DistributedPrincipalSomeone likely added the logic for refunds and cancellations but forgot to declare the corresponding enum keys at the top of the file.
2. Duplicate Implementations / Macro Conflicts (
E0034)The Soroban
#[contractimpl]macro throws multiplemultiple applicable items in scopeerrors for generated XDR specifications (e.g.,spec_xdr_get_escrow,spec_xdr_fund,spec_xdr_is_settleable).This indicates that
LiquifactEscrowlikely has duplicate methods defined across multipleimplblocks, or there is a structural macro conflict in how#[contractimpl]is applied.Steps to Reproduce
main.cargo checkinside theescrowcrate or workspace root.Snippet of the errors:
```rust
error[E0599]: no variant, associated function, or constant named
RefundNotCancelledfound for enumEscrowErrorin the current scopeerror[E0599]: no variant, associated function, or constant named
InvestorRefundedfound for enumDataKeyin the current scopeerror[E0034]: multiple applicable items in scope for
spec_xdr_fund```
Expected Behavior
The base
mainbranch should compile and passcargo checksuccessfully without cascading syntax and scoping errors. It needs a quick structural fix to declare the missing enums and remove duplicate implementations.