Skip to content

Feature - #6

Merged
lalitcap23 merged 2 commits into
mainfrom
feature
Jun 22, 2026
Merged

lalitcap23 merged 2 commits into
mainfrom
feature

Conversation

@lalitcap23

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings June 22, 2026 23:11
@lalitcap23
lalitcap23 merged commit 24d63e7 into main Jun 22, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces an off-chain “relayer/guardian” TypeScript app for the Intentra protocol, expands Anchor tests to cover protocol initialization / solver registration / intent posting + paused behavior, and updates project configuration + dependencies to support SPL token usage and newer toolchain versions.

Changes:

  • Added a new app/ relayer package that polls for Claimed intents, watches destination-chain ERC20 transfers, and submits settle_intent.
  • Replaced the placeholder Anchor test with integration-style tests for protocol config, solver registration, intent posting/escrow locking, and paused enforcement.
  • Updated configs and lockfiles (Anchor toolchain version, localnet program id, Cargo.lock crate bumps, SPL token dependency/lockfile updates).

Reviewed changes

Copilot reviewed 14 out of 17 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
yarn.lock Dependency graph changes from adding SPL token support and related transitive packages.
txtx.yml Renames project metadata (name/id) to intentra.
tests/intentra.ts Adds protocol/solver/intent/paused test coverage using SPL token mints and escrow assertions.
programs/intentra/src/instructions/register_solver.rs Minor formatting-only change (trailing newline).
package.json Adds @solana/spl-token dependency to support token ops in tests.
Cargo.lock Updates several Rust crate versions (borsh/bytes/log/quote, etc.).
app/tsconfig.json New TS config for building the relayer package.
app/src/types.ts New shared types/constants for intents and delivery proofs.
app/src/solana.ts Builds Anchor provider/program, PDA helpers, and on-chain Claimed intent fetch.
app/src/settler.ts Submits settle_intent transactions with retries.
app/src/index.ts Implements the relayer main loop and dispatch logic.
app/src/evm-watcher.ts Watches EVM ERC20 Transfer logs to confirm delivery.
app/src/config.ts Loads env/config and sets up logging.
app/package.json New relayer package manifest (scripts + deps).
app/.env.example Example environment configuration for the relayer.
Anchor.toml Pins anchor version and updates localnet program id.
.gitignore Adds ignores for /runbooks, .surfpool, /doc.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/package.json
Comment on lines +12 to +20
"dependencies": {
"@coral-xyz/anchor": "^0.31.0",
"@solana/web3.js": "^1.98.0",
"@solana/spl-token": "^0.4.9",
"dotenv": "^16.4.5",
"ethers": "^6.13.2",
"pino": "^9.3.2",
"pino-pretty": "^11.2.2"
},
Comment thread app/src/settler.ts
Comment on lines +47 to +50
const solverInputAta = getAssociatedTokenAddressSync(
intent.inputMint,
solver
);
Comment thread app/src/settler.ts
Comment on lines +6 to +10
import {
getOrCreateAssociatedTokenAccount,
getAssociatedTokenAddressSync,
} from "@solana/spl-token";
import { Program, BN } from "@coral-xyz/anchor";
Comment thread app/src/settler.ts
Comment on lines +68 to +70
feeVault,
tokenProgram: new PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),
systemProgram: SystemProgram.programId,
Comment thread app/src/solana.ts
Comment on lines +1 to +6
import {
Connection,
Keypair,
PublicKey,
clusterApiUrl,
} from "@solana/web3.js";
Comment thread app/src/solana.ts
Comment on lines +33 to +36
signAllTransactions: async (txs: any[]) => {
txs.forEach((tx) => tx.sign(guardian));
return txs;
},
Comment thread app/src/solana.ts
Comment on lines +11 to +12
import type { Intentra } from "../../target/types/intentra";
import idl from "../../target/idl/intentra.json";
Comment thread app/src/evm-watcher.ts
Comment on lines +34 to +37
const fromBlock = this.lastCheckedBlock > 0
? this.lastCheckedBlock + 1
: latestBlock - 20;
if (fromBlock > latestBlock) return deliveries;
Comment thread app/src/index.ts
Comment on lines +102 to +103
const TOKEN_REGISTRY: Record<string, string> = {
};
Comment thread app/.env.example
Comment on lines +8 to +12
PROGRAM_ID=GuEj8Dv2U2v6byeLCzTuEMLKSJQ3YN9RmUHY4gx8ZNGc


# Ethereum (chain 2)
EVM_CHAIN_2_RPC=https://eth-mainnet.g.alchemy.com/v2/<your-key>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants