CHAINLINK FILES:
CCIP: https://github.com/RobItu/BLINK/blob/main/backend/ccip-scripts/evm/router/1_token-transfer.ts
CCIP + DATA FEEDS: https://github.com/RobItu/BLINK/blob/main/contracts/ccipSwapandSend.sol
- Transactions
- Wallets Used
- Smart Contracts (not all verified)
- Qt code USDC Swaps
- Bank Transactions
- REAL SWAPS
- Smart Send (Mock Swaps)
- Solana
- Installation
- Prerequisites
- Get Started (Frontend)
- Get Started (Backend)
- Troubleshooting
- OpenSSL Error on Xcode 15
Transactions seen in the video listed in chronological order.
The direction sometimes changed but for the most part:
- Sender: 0x377Cc3297251812561157d421c6faC7C76c51d4E
- Receiver: 0x0dFBbF93b833f8e89d5cb355c3dEe9d599E3Ac78
- BLINK CONTRACT ON SEPOLIA: https://sepolia.etherscan.io/address/0x5b735434C671c4D1121Bd375437D8BFA5E8bFC5a#code
- BLINK CONTRACT OF FUJI: https://testnet.snowtrace.io/address/0x545DaAecb776F74b997b92Fc1505EAe5AC944685/contract/43113/code
- BLINK CONTRACT ON BASE: https://sepolia.basescan.org/address/0xD8ddB7Ed906D38C20F488085d61E52833E979Cf0#code
- Avax to ETH for Lemonade for $1.99 Lemonade
- Sepolia Eth to USDC Swap for $1.99 Lemonade:
- Base to Ethereum Sepolia for $1.99 Lemonade
- Sepolia to Avalanche for $2.99 USDC
- Circle's Custodial Wallet receiving $2.99 USDC (viewable on terminal)
Swaps made using Uniswap routers and LFJ (formerly known as Trader Joe)
- 50 USDC on Avalanche For 0.0002286 Eth Sepolia:
- 0.000317 USDC For 0.026371 WAVAX --> 0.000317 USDC to Sepolia
- 0.00092 USDC For 0.05211 WAVAX -> 0.00092 USDC Sepolia ETH
- 20 USDC For 0.0001653 Sepolia Eth -https://sepolia.etherscan.io/tx/0xabe88c086274c413db24d701387ef7661bf4f0228b89d7d23f20ab2f854fe606
Swaps made with Chainlink Price Feeds
- $2.50 Base USDC For 0.143706 AVAX
- 0.008334 Sepolia ETH For 0.00823912 Base ETH -CCIP: https://ccip.chain.link/tx/0x17157c3aa24dd4c909d471cdb9813456bd84ff0ae24913b65e6b443c2573024f#/side-drawer/msg/0x393fde2218f366238ffed4bdaa6eb3fe6b638d4e1d81524166a1350471953384
- 0.23000 AVAX For 0.001675 Sepolia ETH: -CCIP: https://ccip.chain.link/tx/0xeaf024f6003b18d276e1d8732bd781967f9237e3547c6ab61deb473d55e3cddb#/side-drawer/msg/0x4b0d5c52b0ceef06414e4a1651bf5c36845df680c92a535dedbda01e063896aa
- 0.0020000000 SOL transfer to EVM
Github shows multiple contributors, but this is because I forked the Thirdweb wallet example repo and never started a clean git tree. I want to emphasize that I only used Thirdwallet for sending and receiving transactions and basic scaffold of tabs layout. All functionality, UX, UI, QR Code generator, scanner, Smart Contracts, CCIP integration, Solana integration, Smart Swap, Transaction details, webhooks and sockets, and much more was done by me and solely me. You can see the evidence in the commits here that work started by me on June 3rd and never received assistance, it was merely a fork for their thirdwallet function!
Since we have the front-end and back-end there will be TWO env files and yarn installations, in addition to multiple API keys needed and Webhook connections.
- Thirdweb Client ID
- NGROK API Key
- NodeJS Version at least 20.18.1
To run this app, you'll need either:
- Install dependencies
On root:
yarn install
-
Fill .env.example with Thirdweb Client ID and NGROK API Key This is extremely important for thirdweb wallet to work and for your app to communicate with the backend.
-
Start the app
npx expo start --tunnel
- Navigate to
/backend
- run:
yarn install
- Fill in env.example. Make sure to have Circle's SANDBOX API key and use the same NGROK URL you used for frontend env.
PORT=3000
NODE_ENV=development
- Setup webhooks for Circle's deposit, wire transfer and payout notifications (optional)
- Navigate to Circle's SANDBOX dashboard -> Subscriptions -> Make sure the URL Endpoint is:
your-ngrok-url/api/webhooks/circle
Make sure to click the ALL AWS links they send you, otherwise the webhook will never be setup and be forever stuck in pending!!!
- Setup Alchemy Webhook for USDC payments notifications (optional)
- Navigate to https://dashboard.alchemy.com/webhooks/create
- Make your URL endpoint:
your-ngrok-URL/webhook/usdc-transfer
and add address of wallet you want to monitor.
- Run these two on seperate terminals
ngrok http 3000 (connects your app to backend)
npm run dev (starts server)
These two terminals must be running at all times along with npx expo start --tunnel
on a seperate terminal for full functionality.
Solana files are located in /backend
folder.
- I have added multiple logs, so keep your eye out on your terminal.
- Keep your eye out for your ngrok http URL it always changes when you restart it.
Problem | Solution |
---|---|
App randomly reloads | Currently none. I believe this is because there's too much load on the app while being hosted locally. Offloading to other services can help. |
Websocket keeps disconnecting | Adding pings and interacting with the app helps keep it connected longer, but it will always disconnect after some time. |
From Thirdwallet's repo (I never encountered this issue but just in case):
If using xcode 16, you may encounter a OpenSSL error when trying to build the app. This is because xcode 16 requires a newer version of OpenSSL than the one specified in the current app.json.
To fix this, change the version of OpenSSL specified in the app.json
file to 3.3.2000
.
- Open the
app.json
file - Find the
ios
>extraPods
section - Set
"version": "3.3.2000"
for theOpenSSL-Universal
pod - Save the file
Then run npx expo prebuild
to update the native modules with the new OpenSSL version and run the app again.