Skip to content

Commit

Permalink
feat: evm intent (#7)
Browse files Browse the repository at this point in the history
* feat: evm intent

* fix: prettier

* chore: temporarily adjust ci for no tests
  • Loading branch information
R0bi7 authored Nov 3, 2024
1 parent 76b5e7c commit e347d9c
Show file tree
Hide file tree
Showing 17 changed files with 1,657 additions and 10 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"build": "tsc",
"test": "vitest run",
"dev": "vitest",
"ci": "npm run build && npm run check-format && npm run check-exports && npm run test",
"ci": "npm run build && npm run check-format && npm run check-exports",
"format": "prettier --write .",
"check-format": "prettier --check .",
"check-exports": "attw --pack . --ignore-rules=cjs-resolves-to-esm",
Expand All @@ -31,6 +31,11 @@
"dist"
],
"type": "module",
"dependencies": {
"@uniswap/permit2-sdk": "^1.3.0",
"tiny-invariant": "^1.1.0",
"viem": "^2.21.35"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.16.4",
"@changesets/cli": "^2.27.9",
Expand Down
222 changes: 222 additions & 0 deletions src/abis/erc20.abi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
export const erc20Abi = [
{
constant: true,
inputs: [],
name: "name",
outputs: [
{
name: "",
type: "string",
},
],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: false,
inputs: [
{
name: "_spender",
type: "address",
},
{
name: "_value",
type: "uint256",
},
],
name: "approve",
outputs: [
{
name: "",
type: "bool",
},
],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: true,
inputs: [],
name: "totalSupply",
outputs: [
{
name: "",
type: "uint256",
},
],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: false,
inputs: [
{
name: "_from",
type: "address",
},
{
name: "_to",
type: "address",
},
{
name: "_value",
type: "uint256",
},
],
name: "transferFrom",
outputs: [
{
name: "",
type: "bool",
},
],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: true,
inputs: [],
name: "decimals",
outputs: [
{
name: "",
type: "uint8",
},
],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [
{
name: "_owner",
type: "address",
},
],
name: "balanceOf",
outputs: [
{
name: "balance",
type: "uint256",
},
],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [],
name: "symbol",
outputs: [
{
name: "",
type: "string",
},
],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: false,
inputs: [
{
name: "_to",
type: "address",
},
{
name: "_value",
type: "uint256",
},
],
name: "transfer",
outputs: [
{
name: "",
type: "bool",
},
],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: true,
inputs: [
{
name: "_owner",
type: "address",
},
{
name: "_spender",
type: "address",
},
],
name: "allowance",
outputs: [
{
name: "",
type: "uint256",
},
],
payable: false,
stateMutability: "view",
type: "function",
},
{
payable: true,
stateMutability: "payable",
type: "fallback",
},
{
anonymous: false,
inputs: [
{
indexed: true,
name: "owner",
type: "address",
},
{
indexed: true,
name: "spender",
type: "address",
},
{
indexed: false,
name: "value",
type: "uint256",
},
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
name: "from",
type: "address",
},
{
indexed: true,
name: "to",
type: "address",
},
{
indexed: false,
name: "value",
type: "uint256",
},
],
name: "Transfer",
type: "event",
},
] as const
2 changes: 2 additions & 0 deletions src/abis/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { intentAbi } from "./intent.abi.js"
export { erc20Abi } from "./erc20.abi.js"
Loading

0 comments on commit e347d9c

Please sign in to comment.