Skip to content

Commit

Permalink
🖥️ UI
Browse files Browse the repository at this point in the history
  • Loading branch information
z0r0z committed Jun 4, 2024
1 parent 035a318 commit b0475e5
Show file tree
Hide file tree
Showing 3 changed files with 292 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ui/components/version.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const versions: {
[key: number]: string;
} = {
1: "1.0.0",
42161: "1.2.0 (nightly)",
42161: "1.3.0 (nightly)",
};

export const Version = () => {
Expand Down
296 changes: 290 additions & 6 deletions ui/lib/abi/IntentsEngineAbiArb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@ export const IntentsEngineAbiArb = [
"type": "receive",
"stateMutability": "payable"
},
{
"type": "function",
"name": "aliases",
"inputs": [
{
"name": "token",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "name",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "checkPackedUserOp",
Expand Down Expand Up @@ -76,7 +95,7 @@ export const IntentsEngineAbiArb = [
],
"outputs": [
{
"name": "",
"name": "intentMatched",
"type": "bool",
"internalType": "bool"
}
Expand Down Expand Up @@ -157,7 +176,7 @@ export const IntentsEngineAbiArb = [
],
"outputs": [
{
"name": "",
"name": "intentMatched",
"type": "bool",
"internalType": "bool"
}
Expand Down Expand Up @@ -201,6 +220,30 @@ export const IntentsEngineAbiArb = [
],
"stateMutability": "view"
},
{
"type": "function",
"name": "previewBalanceChange",
"inputs": [
{
"name": "user",
"type": "address",
"internalType": "address"
},
{
"name": "intent",
"type": "string",
"internalType": "string"
}
],
"outputs": [
{
"name": "percentage",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "previewCommand",
Expand Down Expand Up @@ -343,6 +386,25 @@ export const IntentsEngineAbiArb = [
],
"stateMutability": "view"
},
{
"type": "function",
"name": "read",
"inputs": [
{
"name": "topic",
"type": "string",
"internalType": "string"
}
],
"outputs": [
{
"name": "about",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "send",
Expand All @@ -368,15 +430,15 @@ export const IntentsEngineAbiArb = [
},
{
"type": "function",
"name": "setName",
"name": "setAlias",
"inputs": [
{
"name": "token",
"type": "address",
"internalType": "address"
},
{
"name": "name",
"name": "_alias",
"type": "string",
"internalType": "string"
}
Expand All @@ -386,7 +448,7 @@ export const IntentsEngineAbiArb = [
},
{
"type": "function",
"name": "setNameAndTicker",
"name": "setAliasAndTicker",
"inputs": [
{
"name": "token",
Expand All @@ -397,6 +459,19 @@ export const IntentsEngineAbiArb = [
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "setNAMI",
"inputs": [
{
"name": "NAMI",
"type": "address",
"internalType": "contract INAMI"
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "setPair",
Expand Down Expand Up @@ -467,6 +542,210 @@ export const IntentsEngineAbiArb = [
],
"stateMutability": "view"
},
{
"type": "function",
"name": "translateCommand",
"inputs": [
{
"name": "callData",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "intent",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "translateExecute",
"inputs": [
{
"name": "callData",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "intent",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "translatePackedUserOp",
"inputs": [
{
"name": "userOp",
"type": "tuple",
"internalType": "struct IE.PackedUserOperation",
"components": [
{
"name": "sender",
"type": "address",
"internalType": "address"
},
{
"name": "nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "initCode",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "callData",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "accountGasLimits",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "preVerificationGas",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "gasFees",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "paymasterAndData",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "signature",
"type": "bytes",
"internalType": "bytes"
}
]
}
],
"outputs": [
{
"name": "intent",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "translateTokenTransfer",
"inputs": [
{
"name": "token",
"type": "address",
"internalType": "address"
},
{
"name": "tokenCalldata",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "intent",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "translateUserOp",
"inputs": [
{
"name": "userOp",
"type": "tuple",
"internalType": "struct IE.UserOperation",
"components": [
{
"name": "sender",
"type": "address",
"internalType": "address"
},
{
"name": "nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "initCode",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "callData",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "callGasLimit",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "verificationGasLimit",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "preVerificationGas",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "maxFeePerGas",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "maxPriorityFeePerGas",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "paymasterAndData",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "signature",
"type": "bytes",
"internalType": "bytes"
}
]
}
],
"outputs": [
{
"name": "intent",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "whatIsTheAddressOf",
Expand Down Expand Up @@ -551,7 +830,7 @@ export const IntentsEngineAbiArb = [
},
{
"type": "event",
"name": "NameSet",
"name": "AliasSet",
"inputs": [
{
"name": "token",
Expand Down Expand Up @@ -603,6 +882,11 @@ export const IntentsEngineAbiArb = [
"name": "InvalidCharacter",
"inputs": []
},
{
"type": "error",
"name": "InvalidSelector",
"inputs": []
},
{
"type": "error",
"name": "InvalidSwap",
Expand Down
2 changes: 1 addition & 1 deletion ui/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const IE_ADDRESS: {
[key: number]: Address;
} = {
1: "0x1E00000000Cf8ba83e0005c59c1Bf1C4682C8E00",
42161: "0x1e00003a669bb466d6B49800000099E1abDD6600",
42161: "0x1e00002C59149d0057F12e031ecC0000d38A000C",
};

export const ETH_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";

0 comments on commit b0475e5

Please sign in to comment.