Skip to content

please delete (eth-solana-atomic-swap) #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 19 commits into from

Conversation

bioharz
Copy link

@bioharz bioharz commented Jun 1, 2025

EDIT: PLEASE DELETE.
preparing for non EVM atomic swap (sha 256, address schema)

byshape and others added 19 commits March 28, 2025 18:19
…tion

- CLAUDE.md: Solidity contract modifications and test updates
- SOLANA_IMPLEMENTATION.md: Complete Anchor program specification
- CLI_TOOL_DESIGN.md: TypeScript CLI tool architecture
- ATOMIC_SWAP_FLOW.md: Detailed swap flow and security analysis
- TEST_MODIFICATIONS.md: Guide for updating tests to SHA-256
- PROJECT_SUMMARY.md: High-level project overview

Key decisions:
- Switch from Keccak-256 to SHA-256 for cross-chain compatibility
- Add dstRecipient field for 32-byte Solana addresses
- Comprehensive error handling and monitoring
- Replace Node.js with Deno runtime for better TypeScript support
- Switch from ethers.js v6 to viem for improved type safety
- Replace LevelDB with Deno KV for native persistence
- Update all code examples to use new libraries
- Add TECH_STACK_UPDATE.md documenting all changes
- Maintain same functionality with modern tooling
- Analyzed Bitcoin-Solana atomic swap implementation
- Confirmed SHA-256 usage for HTLC verification
- Documented meta transaction pattern for gas optimization
- Captured security deposit and bounty mechanisms
- Identified cooperative cancellation pattern
- Extracted PDA structure and state machine design
- Validated our architectural decisions

Key takeaways:
- SHA-256 is standard for cross-chain HTLC
- 32-byte secrets are standard
- Unix timestamps for cross-chain compatibility
- Security deposits incentivize proper execution
- Complete 4-week development plan
- Detailed phase breakdown with daily tasks
- Critical implementation details and checklists
- Security considerations and success metrics
- Common pitfalls and next steps

This roadmap ties together all documentation and provides
a clear path to production-ready ETH-Solana atomic swaps.
Essential information for immediate reference:
- Critical constants and chain IDs
- Hash function implementations
- Key data structures
- Time windows and CLI commands
- Important reminders

This serves as a cheat sheet during implementation.
- Fix receiver logic to use receiver.get() instead of receiver
- Add missing SRC_IMMUTABLES_LENGTH constant update (160 to 192)
- Enhance postInteraction logic for better non-EVM chain handling
- Add test helper function updates for buidDynamicData
- Clarify integration with existing validation logic
- Change _keccakBytes32 to _sha256Bytes32 using sha256(abi.encode(secret))
- Update onlyValidSecret modifier to use SHA-256
- Update function documentation to reflect SHA-256 usage
- Add bytes32 dstRecipient field to store full 32-byte addresses for non-EVM chains
- This enables support for Solana addresses in atomic swaps
- Increase by 32 bytes to accommodate the new dstRecipient field
- This ensures proper extraData parsing in BaseEscrowFactory
- Add validation for dstRecipient field when destination is non-EVM
- Set maker to zero address in DstImmutablesComplement for non-EVM chains
- Add NonEVMRecipient event emission for cross-chain monitoring
- Enhanced validation ensures dstRecipient is provided for non-EVM chains
- Update BaseSetup.sol SECRET and HASHED_SECRET constants
- Update all test files to use sha256(abi.encode(secret))
- Maintain compatibility with merkle tree operations
- Update MerkleStorageInvalidator tests for SHA-256 secrets
- Add dstRecipient parameter to buidDynamicData function
- Create buidDynamicDataWithRecipient for explicit recipient handling
- Default to bytes32(0) for EVM chains to maintain backward compatibility
- Mark Ethereum/Solidity changes as completed in CLAUDE.md
- Update IMPLEMENTATION_ROADMAP.md with completion status
- Update PROJECT_SUMMARY.md to reflect completed work
- Add STATUS.md for detailed progress tracking
- Add ETH-Solana support notice to README.md

All contract changes for ETH-Solana atomic swaps are complete and tested.
- Reflect gas usage changes across multiple test cases
- Adjust gas costs for EscrowFactoryTest, EscrowTest, IntegrationResolverMockTest, MerkleStorageInvalidator, and others
- Add explicit FOUNDRY_PROFILE=default requirement to all test commands
- Add note about environment variable error without profile
- Update test commands in CLAUDE.md, TEST_MODIFICATIONS.md, and STATUS.md
- Create DeployEscrowFactoryLocal.s.sol for Anvil deployment
- Direct deployment without CREATE3 to avoid ownership issues
- Uses Anvil's default account and Base mainnet fork addresses
- Properly casts addresses to IERC20 interfaces
@bioharz
Copy link
Author

bioharz commented Jun 11, 2025

SRY, wrong REPO. PLS DELETE

@bioharz bioharz closed this Jun 11, 2025
@bioharz bioharz changed the title Feature/eth solana atomic swap please delete Jun 11, 2025
@bioharz bioharz changed the title please delete please delete (eth-solana-atomic-swap) Jun 11, 2025
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