Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
ffe3ad5
chore: wip async mint
JuampiRombola Apr 30, 2025
a8e3e78
chore: integrate sign, submit and get status of async mint
JuampiRombola May 2, 2025
d446634
chore: wip redirect to manual mint when collaterals are acquired
JuampiRombola May 2, 2025
cef56ff
feat: add automated sub navigation menu
JuampiRombola May 5, 2025
992cc54
chore: restore zap-mint/index
JuampiRombola May 5, 2025
d7dc7da
chore: restore zap-mint/atom.ts
JuampiRombola May 5, 2025
c0f2341
chore: split automated swaps
JuampiRombola May 5, 2025
9dc4281
feat: add gnosis safe required modal
JuampiRombola May 5, 2025
045e43b
chore: change navigation side panel
JuampiRombola May 5, 2025
6d401fe
chore: change gnosis safe required component
JuampiRombola May 5, 2025
7db6fea
chore: change async mint styles
JuampiRombola May 6, 2025
603edd4
chore: add approve & mint button
JuampiRombola May 7, 2025
c9b85ea
chore: add success msg to async mint
JuampiRombola May 8, 2025
bfc51f7
fix: collaterals height
JuampiRombola May 8, 2025
fde1488
chore: wip async redeem
JuampiRombola May 9, 2025
547f691
feat: async redeem
JuampiRombola May 12, 2025
bc3af87
chore: restore constant
JuampiRombola May 12, 2025
6a9351d
chore: refactor swap component
JuampiRombola May 12, 2025
068397e
chore: add variants to Switch
JuampiRombola May 16, 2025
ea89a33
chore: refactor useAsyncSwap
JuampiRombola May 16, 2025
ad39bfb
chore: remove asyncSwapEndpointAtom
JuampiRombola May 16, 2025
98d8980
chore: add commonAnalytics
JuampiRombola May 16, 2025
ba07a9f
chore: clear timeouts on unmount
JuampiRombola May 16, 2025
c20657c
chore: add cowswap component
JuampiRombola May 16, 2025
689e3ac
chore: add OrderStatus component
JuampiRombola May 16, 2025
5fea105
chore: refactor success component
JuampiRombola May 16, 2025
ee5aeed
fix: collaterals height
JuampiRombola May 19, 2025
fe2cd30
wip: integration
JuampiRombola May 22, 2025
857347f
chore: fix build
JuampiRombola May 22, 2025
4a9f1f6
chore: working multi signature
JuampiRombola May 22, 2025
689a03c
chore: wip async mint integration
JuampiRombola May 22, 2025
47eee9e
fix: success component
JuampiRombola May 22, 2025
e04f445
chore: working async mint w/ safe
JuampiRombola May 22, 2025
3f195f4
chore: async redeem
JuampiRombola May 23, 2025
597cf57
chore: clean atoms
JuampiRombola May 26, 2025
af40250
feat: add insufficient balance
JuampiRombola May 26, 2025
85b6dd6
fix: redeem success msg
JuampiRombola May 26, 2025
5e1277e
chore: reset atoms
JuampiRombola May 26, 2025
32df7d5
feat: add failed order retry
JuampiRombola May 28, 2025
3eba5dd
chore: quote config update
JuampiRombola May 28, 2025
9f40936
chore: cowswap link always visible
JuampiRombola May 29, 2025
2dbf247
fix: redeem output and cowswap component
JuampiRombola May 29, 2025
bfc722c
chore: handle USDC edge case
JuampiRombola May 29, 2025
52b6150
feat: add async swap settings
JuampiRombola May 29, 2025
547529e
chore: add use wallet balance config
JuampiRombola May 29, 2025
54c1cc3
chore: add async mint details
JuampiRombola May 29, 2025
799a14a
chore: universal useQuote
JuampiRombola Jun 16, 2025
3b962a2
chore: universal useQuoteSignature
JuampiRombola Jun 18, 2025
b15efdf
chore: refactor
JuampiRombola Jun 18, 2025
7a68bc2
chore: refactor
JuampiRombola Jun 18, 2025
6121cf1
chore: add rate limit and universal statuses
JuampiRombola Jun 23, 2025
0f6291b
fix: collaterals view
JuampiRombola Jun 23, 2025
006f212
chore: working universal mint
JuampiRombola Jun 23, 2025
1d88d48
chore: universal refresh
JuampiRombola Jun 24, 2025
2fe6350
fix: refresh
JuampiRombola Jun 24, 2025
a5ae5bd
chore: refactor async mint/redeem
JuampiRombola Jun 24, 2025
f399e78
chore: failed universal orders
JuampiRombola Jun 25, 2025
d7a9955
chore: remove universal failed order component
JuampiRombola Jun 25, 2025
a829a0e
fix: styles
JuampiRombola Jun 25, 2025
f922e68
chore: redeem
JuampiRombola Jun 25, 2025
b3319b7
fix: unintentional refersh
JuampiRombola Jun 25, 2025
f4b394d
fix: unintentional refersh & icons
JuampiRombola Jun 25, 2025
f2d5d63
fix: flaky mint event listening
JuampiRombola Jun 25, 2025
ccf2f14
chore: adjust styles
JuampiRombola Jun 25, 2025
4aef284
chore: add retries
JuampiRombola Jun 25, 2025
e0cdb76
chore: add info and warning msg
JuampiRombola Jun 26, 2025
e56142b
Merge branch 'master' into feature/async-zap
JuampiRombola Jun 26, 2025
cd4952d
fix: add missing key on map
JuampiRombola Jun 26, 2025
c44684d
chore: update package-lock.json
JuampiRombola Jun 26, 2025
73440fd
chore: pick best quote between cowswap & universal
JuampiRombola Jun 26, 2025
cf6a8a2
chore: improve build
JuampiRombola Jun 26, 2025
4b0b7be
chore: improve balance after and before
JuampiRombola Jun 26, 2025
c969f29
chore: add appData and appDataHex to cowswap
JuampiRombola Jul 2, 2025
35f6480
chore: move universal to reserver-api
JuampiRombola Jul 24, 2025
4f48035
chore: change success view styles
JuampiRombola Jul 24, 2025
4065d49
chore: increase buffer
JuampiRombola Jul 24, 2025
3601d76
fix: rerenders
JuampiRombola Jul 24, 2025
82d9620
chore: change gnosis safe required to atomic batch required
JuampiRombola Jul 24, 2025
7035c12
chore: change universal api base url
JuampiRombola Jul 24, 2025
0b1edd9
Merge branch 'master' into feature/async-zap
JuampiRombola Jul 24, 2025
eed8c2e
chore: remove unused file
JuampiRombola Jul 24, 2025
72f14c2
chore: change build command
JuampiRombola Jul 24, 2025
834a763
chore: update package.json
JuampiRombola Jul 24, 2025
e44b9e1
chore: add useAtomicBatch hook
JuampiRombola Jul 24, 2025
4898b41
chore: update cowswap packages
JuampiRombola Oct 9, 2025
c57ca0d
Merge branch 'master' into feature/async-zap
JuampiRombola Oct 9, 2025
ba5696a
fix: atomic support
JuampiRombola Oct 9, 2025
7d5706a
chore: improve wallet connection
JuampiRombola Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,028 changes: 2,843 additions & 185 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"type": "module",
"dependencies": {
"@binance/w3w-rainbow-connector-v2": "^1.0.2",
"@cowprotocol/cow-sdk": "^7.0.8",
"@cowprotocol/sdk-app-data": "^4.1.1",
"@cowprotocol/sdk-viem-adapter": "^0.1.2",
"@dnd-kit/core": "^6.0.5",
"@dnd-kit/sortable": "^7.0.1",
"@dnd-kit/utilities": "^3.2.0",
Expand Down Expand Up @@ -32,7 +35,7 @@
"@radix-ui/react-toggle": "^1.1.1",
"@radix-ui/react-toggle-group": "^1.1.1",
"@radix-ui/react-tooltip": "^1.1.8",
"@rainbow-me/rainbowkit": "2.2.8",
"@rainbow-me/rainbowkit": "2.2.9",
"@react-spring/web": "^9.7.1",
"@reserve-protocol/dtf-rebalance-lib": "2.6.3",
"@reserve-protocol/react-zapper": "^1.4.0",
Expand All @@ -58,6 +61,7 @@
"lucide-react": "^0.461.0",
"mixpanel-browser": "2.56.0",
"next-themes": "^0.4.4",
"p-limit": "^6.2.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-dropzone": "^14.3.5",
Expand All @@ -80,14 +84,15 @@
"tailwind-merge": "^2.5.5",
"tailwindcss-animate": "^1.0.7",
"theme-ui": "0.17.1",
"universal-sdk": "^0.1.34",
"vaul": "^1.1.1",
"viem": "2.37.9",
"wagmi": "2.17.5",
"zod": "^3.23.8"
},
"scripts": {
"start": "vite",
"build": "tsc && vite build",
"build": "tsc && node --max-old-space-size=8192 ./node_modules/.bin/vite build",
"serve": "vite preview",
"analyze": "vite-bundle-visualizer 'build/static/js/*.js'",
"test": "vite test",
Expand Down Expand Up @@ -138,6 +143,7 @@
"typescript": "5.6.3",
"vite": "5.4.8",
"vite-bundle-visualizer": "1.2.1",
"vite-plugin-node-polyfills": "^0.23.0",
"vite-plugin-static-copy": "^2.1.0",
"vite-tsconfig-paths": "^4.2.0",
"vitest": "^3.1.3"
Expand Down
329 changes: 329 additions & 0 deletions src/abis/CowSwapSettlement.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,329 @@
export default [
{
inputs: [
{
internalType: 'contract GPv2Authentication',
name: 'authenticator_',
type: 'address',
},
{ internalType: 'contract IVault', name: 'vault_', type: 'address' },
],
stateMutability: 'nonpayable',
type: 'constructor',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'target',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256',
},
{
indexed: false,
internalType: 'bytes4',
name: 'selector',
type: 'bytes4',
},
],
name: 'Interaction',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'owner',
type: 'address',
},
{
indexed: false,
internalType: 'bytes',
name: 'orderUid',
type: 'bytes',
},
],
name: 'OrderInvalidated',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'owner',
type: 'address',
},
{
indexed: false,
internalType: 'bytes',
name: 'orderUid',
type: 'bytes',
},
{ indexed: false, internalType: 'bool', name: 'signed', type: 'bool' },
],
name: 'PreSignature',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'solver',
type: 'address',
},
],
name: 'Settlement',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'owner',
type: 'address',
},
{
indexed: false,
internalType: 'contract IERC20',
name: 'sellToken',
type: 'address',
},
{
indexed: false,
internalType: 'contract IERC20',
name: 'buyToken',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'sellAmount',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint256',
name: 'buyAmount',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint256',
name: 'feeAmount',
type: 'uint256',
},
{
indexed: false,
internalType: 'bytes',
name: 'orderUid',
type: 'bytes',
},
],
name: 'Trade',
type: 'event',
},
{
inputs: [],
name: 'authenticator',
outputs: [
{
internalType: 'contract GPv2Authentication',
name: '',
type: 'address',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'domainSeparator',
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'bytes', name: '', type: 'bytes' }],
name: 'filledAmount',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'bytes[]', name: 'orderUids', type: 'bytes[]' }],
name: 'freeFilledAmountStorage',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'bytes[]', name: 'orderUids', type: 'bytes[]' }],
name: 'freePreSignatureStorage',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'uint256', name: 'offset', type: 'uint256' },
{ internalType: 'uint256', name: 'length', type: 'uint256' },
],
name: 'getStorageAt',
outputs: [{ internalType: 'bytes', name: '', type: 'bytes' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'bytes', name: 'orderUid', type: 'bytes' }],
name: 'invalidateOrder',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'bytes', name: '', type: 'bytes' }],
name: 'preSignature',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'bytes', name: 'orderUid', type: 'bytes' },
{ internalType: 'bool', name: 'signed', type: 'bool' },
],
name: 'setPreSignature',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20[]', name: 'tokens', type: 'address[]' },
{ internalType: 'uint256[]', name: 'clearingPrices', type: 'uint256[]' },
{
components: [
{ internalType: 'uint256', name: 'sellTokenIndex', type: 'uint256' },
{ internalType: 'uint256', name: 'buyTokenIndex', type: 'uint256' },
{ internalType: 'address', name: 'receiver', type: 'address' },
{ internalType: 'uint256', name: 'sellAmount', type: 'uint256' },
{ internalType: 'uint256', name: 'buyAmount', type: 'uint256' },
{ internalType: 'uint32', name: 'validTo', type: 'uint32' },
{ internalType: 'bytes32', name: 'appData', type: 'bytes32' },
{ internalType: 'uint256', name: 'feeAmount', type: 'uint256' },
{ internalType: 'uint256', name: 'flags', type: 'uint256' },
{ internalType: 'uint256', name: 'executedAmount', type: 'uint256' },
{ internalType: 'bytes', name: 'signature', type: 'bytes' },
],
internalType: 'struct GPv2Trade.Data[]',
name: 'trades',
type: 'tuple[]',
},
{
components: [
{ internalType: 'address', name: 'target', type: 'address' },
{ internalType: 'uint256', name: 'value', type: 'uint256' },
{ internalType: 'bytes', name: 'callData', type: 'bytes' },
],
internalType: 'struct GPv2Interaction.Data[][3]',
name: 'interactions',
type: 'tuple[][3]',
},
],
name: 'settle',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'targetContract', type: 'address' },
{ internalType: 'bytes', name: 'calldataPayload', type: 'bytes' },
],
name: 'simulateDelegatecall',
outputs: [{ internalType: 'bytes', name: 'response', type: 'bytes' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'targetContract', type: 'address' },
{ internalType: 'bytes', name: 'calldataPayload', type: 'bytes' },
],
name: 'simulateDelegatecallInternal',
outputs: [{ internalType: 'bytes', name: 'response', type: 'bytes' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
components: [
{ internalType: 'bytes32', name: 'poolId', type: 'bytes32' },
{ internalType: 'uint256', name: 'assetInIndex', type: 'uint256' },
{ internalType: 'uint256', name: 'assetOutIndex', type: 'uint256' },
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
{ internalType: 'bytes', name: 'userData', type: 'bytes' },
],
internalType: 'struct IVault.BatchSwapStep[]',
name: 'swaps',
type: 'tuple[]',
},
{ internalType: 'contract IERC20[]', name: 'tokens', type: 'address[]' },
{
components: [
{ internalType: 'uint256', name: 'sellTokenIndex', type: 'uint256' },
{ internalType: 'uint256', name: 'buyTokenIndex', type: 'uint256' },
{ internalType: 'address', name: 'receiver', type: 'address' },
{ internalType: 'uint256', name: 'sellAmount', type: 'uint256' },
{ internalType: 'uint256', name: 'buyAmount', type: 'uint256' },
{ internalType: 'uint32', name: 'validTo', type: 'uint32' },
{ internalType: 'bytes32', name: 'appData', type: 'bytes32' },
{ internalType: 'uint256', name: 'feeAmount', type: 'uint256' },
{ internalType: 'uint256', name: 'flags', type: 'uint256' },
{ internalType: 'uint256', name: 'executedAmount', type: 'uint256' },
{ internalType: 'bytes', name: 'signature', type: 'bytes' },
],
internalType: 'struct GPv2Trade.Data',
name: 'trade',
type: 'tuple',
},
],
name: 'swap',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'vault',
outputs: [{ internalType: 'contract IVault', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'vaultRelayer',
outputs: [
{ internalType: 'contract GPv2VaultRelayer', name: '', type: 'address' },
],
stateMutability: 'view',
type: 'function',
},
{ stateMutability: 'payable', type: 'receive' },
] as const
Loading