Caelus - AI Suite for Smart Contracts Caelus
Network:

Generate Smart Contract

Refresh Contract

Contract Preview

Contract Code

No contract code available. Please generate contract.

Terminal

Success and Errors

                    
Error generating contract:

error[E0308]: mismatched types
  --> src/lib.rs:13:33
   |
13 |         mint.freeze_authority = Some(ctx.accounts.authority.key());
   |         ---------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum \`COption\`, found enum \`Option\`
   |
Fix: Add .into() to convert Option to COption


error[E0308]: mismatched types
  --> src/lib.rs:14:31
   |
14 |         mint.mint_authority = Some(ctx.accounts.authority.key());
   |         -------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum \`COption\`, found enum \`Option\`
   |
Fix: Add .into() to convert Option to COption


error[E0609]: no field \`authority\`
  --> src/lib.rs:71:30
   |
71 |     #[account(mut, has_one = authority)]
   |                              ^^^^^^^^^ unknown field
Fix: Remove has_one check


For more information about errors:
rustc --explain E0308
rustc --explain E0609
                  

Deployment Status

Contract on Solana Devnet

Pending Deployment

// Contract Details

Network: Solana Devnet

Contract Address: No Data Available

Compiler Version: Compiling solpg v0.1.0

Deployment Statistics

View your contract deployment metrics

Gas Used
0.00
Time
00 Sec
Balance
Not Available
Success Rate
99.9%

Coming Soon...

Test Scenarios

Verify contract functionality with test cases

Initial Value

Should return 0 as initial value

Passed
it("should return 0 as initial value", async () => {
  const storage = await SimpleStorage.deploy();
  const value = await storage.getValue();
  expect(value).to.equal(0);
});

Set Value

Should set and emit new value

Pending
it("should set and emit new value", async () => {
  const storage = await SimpleStorage.deploy();
  const tx = await storage.setValue(42);
  await expect(tx)
    .to.emit(storage, "ValueChanged")
    .withArgs(42);
  const value = await storage.getValue();
  expect(value).to.equal(42);
});

Test Cases

Unit tests for contract functionality

Contract Deployment

Contract should deploy successfully

Passed

Initial State

Should initialize with correct state

Passed

Value Update

Should update value correctly

Pending

Event Emission

Should emit ValueChanged event

Pending