diff --git a/.github/workflow/deploy.yml b/.github/workflow/deploy.yml new file mode 100644 index 0000000..7fbcdff --- /dev/null +++ b/.github/workflow/deploy.yml @@ -0,0 +1,84 @@ +name: Deploy Remix site to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +env: + BUILD_PATH: "." # default value when not using subfolders + # BUILD_PATH: subfolder + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Detect package manager + id: detect-package-manager + run: | + if [ -f "${{ github.workspace }}/yarn.lock" ]; then + echo "manager=yarn" >> $GITHUB_OUTPUT + echo "command=install" >> $GITHUB_OUTPUT + echo "runner=yarn" >> $GITHUB_OUTPUT + exit 0 + elif [ -f "${{ github.workspace }}/package.json" ]; then + echo "manager=npm" >> $GITHUB_OUTPUT + echo "command=ci" >> $GITHUB_OUTPUT + echo "runner=npx --no-install" >> $GITHUB_OUTPUT + exit 0 + else + echo "Unable to determine package manager" + exit 1 + fi + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: ${{ steps.detect-package-manager.outputs.manager }} + cache-dependency-path: ${{ env.BUILD_PATH }}/package-lock.json + - name: Setup Pages + id: pages + uses: actions/configure-pages@v4 + - name: Install dependencies + run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} + working-directory: ${{ env.BUILD_PATH }} + - name: Build with Remix + run: | + ${{ steps.detect-package-manager.outputs.runner }} run build \ + --site "${{ steps.pages.outputs.origin }}" \ + --base "${{ steps.pages.outputs.base_path }}" + working-directory: ${{ env.BUILD_PATH }} + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ${{ env.BUILD_PATH }}/build/client + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + needs: build + runs-on: ubuntu-latest + name: Deploy + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/app/abis/abi1.ts b/app/abis/abi1.ts new file mode 100644 index 0000000..5ee0fef --- /dev/null +++ b/app/abis/abi1.ts @@ -0,0 +1,800 @@ +export const abi = [ + { + inputs: [ + { internalType: "address", name: "token_addr", type: "address" }, + { internalType: "address", name: "art_proxy", type: "address" }, + { internalType: "address", name: "_owner", type: "address" }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "approved", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { indexed: false, internalType: "bool", name: "approved", type: "bool" }, + ], + name: "ApprovalForAll", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "fromDelegate", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "toDelegate", + type: "address", + }, + ], + name: "DelegateChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegate", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "previousBalance", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newBalance", + type: "uint256", + }, + ], + name: "DelegateVotesChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "provider", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "locktime", + type: "uint256", + }, + { + indexed: false, + internalType: "enum VotingEscrow.DepositType", + name: "deposit_type", + type: "uint8", + }, + { indexed: false, internalType: "uint256", name: "ts", type: "uint256" }, + ], + name: "Deposit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "prevSupply", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "supply", + type: "uint256", + }, + ], + name: "Supply", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "provider", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { indexed: false, internalType: "uint256", name: "ts", type: "uint256" }, + ], + name: "Withdraw", + type: "event", + }, + { + inputs: [], + name: "DELEGATION_TYPEHASH", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DOMAIN_TYPEHASH", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAX_DELEGATES", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "abstain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_approved", type: "address" }, + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + ], + name: "approve", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "artProxy", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "attach", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "attachments", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_owner", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "uint256", name: "_block", type: "uint256" }, + ], + name: "balanceOfAtNFT", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "balanceOfNFT", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "uint256", name: "_t", type: "uint256" }, + ], + name: "balanceOfNFTAt", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "block_number", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "checkpoint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "", type: "address" }, + { internalType: "uint32", name: "", type: "uint32" }, + ], + name: "checkpoints", + outputs: [{ internalType: "uint256", name: "timestamp", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_value", type: "uint256" }, + { internalType: "uint256", name: "_lock_duration", type: "uint256" }, + ], + name: "create_lock", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_value", type: "uint256" }, + { internalType: "uint256", name: "_lock_duration", type: "uint256" }, + { internalType: "address", name: "_to", type: "address" }, + ], + name: "create_lock_for", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "currentTokenId", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "delegatee", type: "address" }], + name: "delegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "delegatee", type: "address" }, + { internalType: "uint256", name: "nonce", type: "uint256" }, + { internalType: "uint256", name: "expiry", type: "uint256" }, + { internalType: "uint8", name: "v", type: "uint8" }, + { internalType: "bytes32", name: "r", type: "bytes32" }, + { internalType: "bytes32", name: "s", type: "bytes32" }, + ], + name: "delegateBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "delegator", type: "address" }], + name: "delegates", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "uint256", name: "_value", type: "uint256" }, + ], + name: "deposit_for", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "detach", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "epoch", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "getApproved", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "timestamp", type: "uint256" }], + name: "getPastTotalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "account", type: "address" }, + { internalType: "uint256", name: "timestamp", type: "uint256" }, + ], + name: "getPastVotes", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "account", type: "address" }, + { internalType: "uint256", name: "timestamp", type: "uint256" }, + ], + name: "getPastVotesIndex", + outputs: [{ internalType: "uint32", name: "", type: "uint32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "getVotes", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "get_last_user_slope", + outputs: [{ internalType: "int128", name: "", type: "int128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "uint256", name: "_value", type: "uint256" }, + ], + name: "increase_amount", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "uint256", name: "_lock_duration", type: "uint256" }, + ], + name: "increase_unlock_time", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_owner", type: "address" }, + { internalType: "address", name: "_operator", type: "address" }, + ], + name: "isApprovedForAll", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_spender", type: "address" }, + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + ], + name: "isApprovedOrOwner", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "locked", + outputs: [ + { internalType: "int128", name: "amount", type: "int128" }, + { internalType: "uint256", name: "end", type: "uint256" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "locked__end", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_from", type: "uint256" }, + { internalType: "uint256", name: "_to", type: "uint256" }, + ], + name: "merge", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "nonces", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "numCheckpoints", + outputs: [{ internalType: "uint32", name: "", type: "uint32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "ownerOf", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "ownership_change", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "point_history", + outputs: [ + { internalType: "int128", name: "bias", type: "int128" }, + { internalType: "int128", name: "slope", type: "int128" }, + { internalType: "uint256", name: "ts", type: "uint256" }, + { internalType: "uint256", name: "blk", type: "uint256" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_from", type: "address" }, + { internalType: "address", name: "_to", type: "address" }, + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_from", type: "address" }, + { internalType: "address", name: "_to", type: "address" }, + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "bytes", name: "_data", type: "bytes" }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_operator", type: "address" }, + { internalType: "bool", name: "_approved", type: "bool" }, + ], + name: "setApprovalForAll", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_proxy", type: "address" }], + name: "setArtProxy", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_team", type: "address" }], + name: "setTeam", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_voter", type: "address" }], + name: "setVoter", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "slope_changes", + outputs: [{ internalType: "int128", name: "", type: "int128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256[]", name: "amounts", type: "uint256[]" }, + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + ], + name: "split", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "supply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes4", name: "_interfaceID", type: "bytes4" }], + name: "supportsInterface", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "team", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_owner", type: "address" }, + { internalType: "uint256", name: "_tokenIndex", type: "uint256" }, + ], + name: "tokenOfOwnerByIndex", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "tokenURI", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_block", type: "uint256" }], + name: "totalSupplyAt", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "t", type: "uint256" }], + name: "totalSupplyAtT", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_from", type: "address" }, + { internalType: "address", name: "_to", type: "address" }, + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + ], + name: "transferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "user_point_epoch", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "", type: "uint256" }, + { internalType: "uint256", name: "", type: "uint256" }, + ], + name: "user_point_history", + outputs: [ + { internalType: "int128", name: "bias", type: "int128" }, + { internalType: "int128", name: "slope", type: "int128" }, + { internalType: "uint256", name: "ts", type: "uint256" }, + { internalType: "uint256", name: "blk", type: "uint256" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "uint256", name: "_idx", type: "uint256" }, + ], + name: "user_point_history__ts", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "voted", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "voter", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "voting", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + ] as const; + \ No newline at end of file diff --git a/app/abis/abi2.ts b/app/abis/abi2.ts new file mode 100644 index 0000000..2ce61d4 --- /dev/null +++ b/app/abis/abi2.ts @@ -0,0 +1,1258 @@ +// for velodrome, aerodrome +export const abi = [ + { + inputs: [ + { internalType: "address", name: "_forwarder", type: "address" }, + { internalType: "address", name: "_token", type: "address" }, + { internalType: "address", name: "_factoryRegistry", type: "address" }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { inputs: [], name: "AlreadyVoted", type: "error" }, + { inputs: [], name: "AmountTooBig", type: "error" }, + { inputs: [], name: "ERC721ReceiverRejectedTokens", type: "error" }, + { + inputs: [], + name: "ERC721TransferToNonERC721ReceiverImplementer", + type: "error", + }, + { inputs: [], name: "InvalidManagedNFTId", type: "error" }, + { inputs: [], name: "InvalidNonce", type: "error" }, + { inputs: [], name: "InvalidSignature", type: "error" }, + { inputs: [], name: "InvalidSignatureS", type: "error" }, + { inputs: [], name: "LockDurationNotInFuture", type: "error" }, + { inputs: [], name: "LockDurationTooLong", type: "error" }, + { inputs: [], name: "LockExpired", type: "error" }, + { inputs: [], name: "LockNotExpired", type: "error" }, + { inputs: [], name: "NoLockFound", type: "error" }, + { inputs: [], name: "NonExistentToken", type: "error" }, + { inputs: [], name: "NotApprovedOrOwner", type: "error" }, + { inputs: [], name: "NotDistributor", type: "error" }, + { inputs: [], name: "NotEmergencyCouncilOrGovernor", type: "error" }, + { inputs: [], name: "NotGovernor", type: "error" }, + { inputs: [], name: "NotGovernorOrManager", type: "error" }, + { inputs: [], name: "NotLockedNFT", type: "error" }, + { inputs: [], name: "NotManagedNFT", type: "error" }, + { inputs: [], name: "NotManagedOrNormalNFT", type: "error" }, + { inputs: [], name: "NotNormalNFT", type: "error" }, + { inputs: [], name: "NotOwner", type: "error" }, + { inputs: [], name: "NotPermanentLock", type: "error" }, + { inputs: [], name: "NotTeam", type: "error" }, + { inputs: [], name: "NotVoter", type: "error" }, + { inputs: [], name: "OwnershipChange", type: "error" }, + { inputs: [], name: "PermanentLock", type: "error" }, + { inputs: [], name: "SafeCastOverflow", type: "error" }, + { inputs: [], name: "SafeCastUnderflow", type: "error" }, + { inputs: [], name: "SameAddress", type: "error" }, + { inputs: [], name: "SameNFT", type: "error" }, + { inputs: [], name: "SameState", type: "error" }, + { inputs: [], name: "SignatureExpired", type: "error" }, + { inputs: [], name: "SplitNoOwner", type: "error" }, + { inputs: [], name: "SplitNotAllowed", type: "error" }, + { inputs: [], name: "TooManyTokenIDs", type: "error" }, + { inputs: [], name: "ZeroAddress", type: "error" }, + { inputs: [], name: "ZeroAmount", type: "error" }, + { inputs: [], name: "ZeroBalance", type: "error" }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "approved", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { indexed: false, internalType: "bool", name: "approved", type: "bool" }, + ], + name: "ApprovalForAll", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "_fromTokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_toTokenId", + type: "uint256", + }, + ], + name: "BatchMetadataUpdate", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "_to", type: "address" }, + { + indexed: true, + internalType: "uint256", + name: "_mTokenId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "_from", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "_lockedManagedReward", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "_freeManagedReward", + type: "address", + }, + ], + name: "CreateManaged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "fromDelegate", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "toDelegate", + type: "uint256", + }, + ], + name: "DelegateChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegate", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "previousBalance", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newBalance", + type: "uint256", + }, + ], + name: "DelegateVotesChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "provider", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + indexed: true, + internalType: "enum IVotingEscrow.DepositType", + name: "depositType", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "locktime", + type: "uint256", + }, + { indexed: false, internalType: "uint256", name: "ts", type: "uint256" }, + ], + name: "Deposit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_owner", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "_tokenId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_mTokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_weight", + type: "uint256", + }, + { indexed: false, internalType: "uint256", name: "_ts", type: "uint256" }, + ], + name: "DepositManaged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_owner", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "_tokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { indexed: false, internalType: "uint256", name: "_ts", type: "uint256" }, + ], + name: "LockPermanent", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_sender", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "_from", + type: "uint256", + }, + { indexed: true, internalType: "uint256", name: "_to", type: "uint256" }, + { + indexed: false, + internalType: "uint256", + name: "_amountFrom", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_amountTo", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_amountFinal", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_locktime", + type: "uint256", + }, + { indexed: false, internalType: "uint256", name: "_ts", type: "uint256" }, + ], + name: "Merge", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "_tokenId", + type: "uint256", + }, + ], + name: "MetadataUpdate", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_allowedManager", + type: "address", + }, + ], + name: "SetAllowedManager", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_from", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_tokenId1", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_tokenId2", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "_sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "_splitAmount1", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_splitAmount2", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_locktime", + type: "uint256", + }, + { indexed: false, internalType: "uint256", name: "_ts", type: "uint256" }, + ], + name: "Split", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "prevSupply", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "supply", + type: "uint256", + }, + ], + name: "Supply", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_owner", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "_tokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { indexed: false, internalType: "uint256", name: "_ts", type: "uint256" }, + ], + name: "UnlockPermanent", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "provider", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { indexed: false, internalType: "uint256", name: "ts", type: "uint256" }, + ], + name: "Withdraw", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_owner", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "_tokenId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "_mTokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_weight", + type: "uint256", + }, + { indexed: false, internalType: "uint256", name: "_ts", type: "uint256" }, + ], + name: "WithdrawManaged", + type: "event", + }, + { + inputs: [], + name: "CLOCK_MODE", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "DELEGATION_TYPEHASH", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DOMAIN_TYPEHASH", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "allowedManager", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_approved", type: "address" }, + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + ], + name: "approve", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "artProxy", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_owner", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "balanceOfNFT", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "uint256", name: "_t", type: "uint256" }, + ], + name: "balanceOfNFTAt", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "canSplit", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "checkpoint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "uint48", name: "_index", type: "uint48" }, + ], + name: "checkpoints", + outputs: [ + { + components: [ + { internalType: "uint256", name: "fromTimestamp", type: "uint256" }, + { internalType: "address", name: "owner", type: "address" }, + { + internalType: "uint256", + name: "delegatedBalance", + type: "uint256", + }, + { internalType: "uint256", name: "delegatee", type: "uint256" }, + ], + internalType: "struct IVotingEscrow.Checkpoint", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "clock", + outputs: [{ internalType: "uint48", name: "", type: "uint48" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_value", type: "uint256" }, + { internalType: "uint256", name: "_lockDuration", type: "uint256" }, + ], + name: "createLock", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_value", type: "uint256" }, + { internalType: "uint256", name: "_lockDuration", type: "uint256" }, + { internalType: "address", name: "_to", type: "address" }, + ], + name: "createLockFor", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_to", type: "address" }], + name: "createManagedLockFor", + outputs: [{ internalType: "uint256", name: "_mTokenId", type: "uint256" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "deactivated", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "delegator", type: "uint256" }, + { internalType: "uint256", name: "delegatee", type: "uint256" }, + ], + name: "delegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "delegator", type: "uint256" }, + { internalType: "uint256", name: "delegatee", type: "uint256" }, + { internalType: "uint256", name: "nonce", type: "uint256" }, + { internalType: "uint256", name: "expiry", type: "uint256" }, + { internalType: "uint8", name: "v", type: "uint8" }, + { internalType: "bytes32", name: "r", type: "bytes32" }, + { internalType: "bytes32", name: "s", type: "bytes32" }, + ], + name: "delegateBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "delegator", type: "uint256" }], + name: "delegates", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "uint256", name: "_value", type: "uint256" }, + ], + name: "depositFor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "uint256", name: "_mTokenId", type: "uint256" }, + ], + name: "depositManaged", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "distributor", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "epoch", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "escrowType", + outputs: [ + { + internalType: "enum IVotingEscrow.EscrowType", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "factoryRegistry", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "forwarder", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "getApproved", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_timestamp", type: "uint256" }], + name: "getPastTotalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_account", type: "address" }, + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "uint256", name: "_timestamp", type: "uint256" }, + ], + name: "getPastVotes", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "idToManaged", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "uint256", name: "_value", type: "uint256" }, + ], + name: "increaseAmount", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "uint256", name: "_lockDuration", type: "uint256" }, + ], + name: "increaseUnlockTime", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_owner", type: "address" }, + { internalType: "address", name: "_operator", type: "address" }, + ], + name: "isApprovedForAll", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_spender", type: "address" }, + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + ], + name: "isApprovedOrOwner", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "forwarder", type: "address" }], + name: "isTrustedForwarder", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "lockPermanent", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "locked", + outputs: [ + { + components: [ + { internalType: "int128", name: "amount", type: "int128" }, + { internalType: "uint256", name: "end", type: "uint256" }, + { internalType: "bool", name: "isPermanent", type: "bool" }, + ], + internalType: "struct IVotingEscrow.LockedBalance", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "managedToFree", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "managedToLocked", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_from", type: "uint256" }, + { internalType: "uint256", name: "_to", type: "uint256" }, + ], + name: "merge", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "nonces", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "numCheckpoints", + outputs: [{ internalType: "uint48", name: "", type: "uint48" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "ownerOf", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "", type: "address" }, + { internalType: "uint256", name: "", type: "uint256" }, + ], + name: "ownerToNFTokenIdList", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "permanentLockBalance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_loc", type: "uint256" }], + name: "pointHistory", + outputs: [ + { + components: [ + { internalType: "int128", name: "bias", type: "int128" }, + { internalType: "int128", name: "slope", type: "int128" }, + { internalType: "uint256", name: "ts", type: "uint256" }, + { internalType: "uint256", name: "blk", type: "uint256" }, + { + internalType: "uint256", + name: "permanentLockBalance", + type: "uint256", + }, + ], + internalType: "struct IVotingEscrow.GlobalPoint", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_from", type: "address" }, + { internalType: "address", name: "_to", type: "address" }, + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_from", type: "address" }, + { internalType: "address", name: "_to", type: "address" }, + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "bytes", name: "_data", type: "bytes" }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_allowedManager", type: "address" }, + ], + name: "setAllowedManager", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_operator", type: "address" }, + { internalType: "bool", name: "_approved", type: "bool" }, + ], + name: "setApprovalForAll", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_proxy", type: "address" }], + name: "setArtProxy", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_mTokenId", type: "uint256" }, + { internalType: "bool", name: "_state", type: "bool" }, + ], + name: "setManagedState", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_team", type: "address" }], + name: "setTeam", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_voter", type: "address" }, + { internalType: "address", name: "_distributor", type: "address" }, + ], + name: "setVoterAndDistributor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "slopeChanges", + outputs: [{ internalType: "int128", name: "", type: "int128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_from", type: "uint256" }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + ], + name: "split", + outputs: [ + { internalType: "uint256", name: "_tokenId1", type: "uint256" }, + { internalType: "uint256", name: "_tokenId2", type: "uint256" }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "supply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes4", name: "_interfaceID", type: "bytes4" }], + name: "supportsInterface", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "team", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_account", type: "address" }, + { internalType: "bool", name: "_bool", type: "bool" }, + ], + name: "toggleSplit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "tokenId", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "tokenURI", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_timestamp", type: "uint256" }], + name: "totalSupplyAt", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_from", type: "address" }, + { internalType: "address", name: "_to", type: "address" }, + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + ], + name: "transferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "unlockPermanent", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "userPointEpoch", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "uint256", name: "_loc", type: "uint256" }, + ], + name: "userPointHistory", + outputs: [ + { + components: [ + { internalType: "int128", name: "bias", type: "int128" }, + { internalType: "int128", name: "slope", type: "int128" }, + { internalType: "uint256", name: "ts", type: "uint256" }, + { internalType: "uint256", name: "blk", type: "uint256" }, + { internalType: "uint256", name: "permanent", type: "uint256" }, + ], + internalType: "struct IVotingEscrow.UserPoint", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "voted", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "voter", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_tokenId", type: "uint256" }, + { internalType: "bool", name: "_voted", type: "bool" }, + ], + name: "voting", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "", type: "uint256" }, + { internalType: "uint256", name: "", type: "uint256" }, + ], + name: "weights", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_tokenId", type: "uint256" }], + name: "withdrawManaged", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; diff --git a/app/components/Spinner.tsx b/app/components/Spinner.tsx new file mode 100644 index 0000000..3afd6db --- /dev/null +++ b/app/components/Spinner.tsx @@ -0,0 +1,25 @@ +export function Spinner() { + return ( + + + + + + + + + + + ) + } \ No newline at end of file diff --git a/app/config.ts b/app/config.ts new file mode 100644 index 0000000..555ed10 --- /dev/null +++ b/app/config.ts @@ -0,0 +1,82 @@ +import { + type Chain, + fantom, + base, + optimism, + arbitrum, + avalanche, + mantle, +} from "viem/chains"; +import { type Abi } from "viem"; +import { abi } from "./abis/abi1"; +import { abi as abi2 } from "./abis/abi2"; +export const config: Record< + string, + { + chain: Chain; + address: `0x${string}`; + abi: Abi; + underlying: `0x${string}`; // to get price from dexscreener + } +> = { + veFVM: { + chain: fantom, + address: "0xae459ee7377fb9f67518047bba5482c2f0963236", + abi: abi, + underlying: "0x07BB65fAaC502d4996532F834A1B7ba5dC32Ff96", + }, + veBVM: { + chain: base, + address: "0x91F85d68B413dE823684c891db515B0390a02512", + abi: abi, + underlying: "0xd386a121991E51Eab5e3433Bf5B1cF4C8884b47a", + }, + veVelo: { + chain: optimism, + address: "0xFAf8FD17D9840595845582fCB047DF13f006787d", + abi: abi2, + underlying: "0x9560e827aF36c94D2Ac33a39bCE1Fe78631088Db", + }, + veAero: { + chain: base, + address: "0xebf418fe2512e7e6bd9b87a8f0f294acdc67e6b4", + abi: abi2, + underlying: "0x940181a94A35A4569E4529A3CDfB74e38FD98631", + }, + veRAM: { + chain: arbitrum, + address: "0xaaa343032aa79ee9a6897dab03bef967c3289a06", + abi, + underlying: "0xAAA6C1E32C55A7Bfa8066A6FAE9b42650F262418", + }, + veEqual: { + chain: fantom, + address: "0x8313f3551c4d3984ffbadfb42f780d0c8763ce94", + abi, + underlying: "0x3Fd3A0c85B70754eFc07aC9Ac0cbBDCe664865A6", + }, + vePhar: { + chain: avalanche, + address: "0xAAAEa1fB9f3DE3F70E89f37B69Ab11B47eb9Ce6F", + abi, + underlying: "0xAAAB9D12A30504559b0C5a9A5977fEE4A6081c6b", + }, + veCleo: { + chain: mantle, + address: "0xAAAEa1fB9f3DE3F70E89f37B69Ab11B47eb9Ce6F", + abi, + underlying: "0xC1E0C8C30F251A07a894609616580ad2CEb547F2", + }, + veScale: { + chain: base, + address: "0x28c9c71c776a1203000b56c0cca48bef1cd51c53", + abi, + underlying: "0x54016a4848a38f257B6E96331F7404073Fd9c32C", + }, + veHRA: { + chain: arbitrum, + address: "0x44ccA4FB1737F6A5DEb2AC1Bc1F3D4075bBF9db4", + abi, + underlying: "0xE594b57E7F11ec1E8Af9f003F74Fa52B7aefdc9F", + }, +}; diff --git a/app/root.tsx b/app/root.tsx index f8be391..3b8f4c7 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -6,6 +6,7 @@ import { Scripts, ScrollRestoration, } from "@remix-run/react"; +import "./tailwind.css"; export default function App() { return ( diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx index 04198af..020bae1 100644 --- a/app/routes/_index.tsx +++ b/app/routes/_index.tsx @@ -1,32 +1,256 @@ import type { MetaFunction } from "@remix-run/node"; +import { + Form, + useSubmit, + useSearchParams, + useLoaderData, + ClientLoaderFunctionArgs, + useNavigation, +} from "@remix-run/react"; +import { config } from "../config"; +import { createPublicClient, http, formatUnits, zeroAddress } from "viem"; +import { abi } from "~/abis/abi1"; +import { abi as abi2 } from "~/abis/abi2"; +import { Spinner } from "~/components/Spinner"; export const meta: MetaFunction = () => { return [ - { title: "New Remix SPA" }, - { name: "description", content: "Welcome to Remix (SPA Mode)!" }, + { title: "veNFT" }, + { name: "description", content: "Lookup veNFT data!" }, ]; }; +async function getCoinPrice(token: string): Promise { + try { + const res = await fetch( + `https://api.dexscreener.com/latest/dex/tokens/${token}` + ) + .then((resp) => resp.json()) + .then(({ pairs }) => pairs[0].priceUsd * 1); + return res; + } catch (e) { + return 0; + } +} + +export async function clientLoader({ + request, +}: ClientLoaderFunctionArgs): Promise { + const url = new URL(request.url); + const venft = url.searchParams.get("venft"); + const id = url.searchParams.get("id"); + let client; + if (venft && id) { + const { chain, address, abi: venftAbi, underlying } = config[venft]; + client = createPublicClient({ + chain, + transport: http(), + }); + const [balance, decimals, owner] = await client.multicall({ + allowFailure: false, + contracts: [ + { + address, + abi: abi, + functionName: "balanceOfNFT", + args: [BigInt(id)], + }, + { + address, + abi: abi, + functionName: "decimals", + }, + { + address, + abi: abi, + functionName: "ownerOf", + args: [BigInt(id)], + }, + ], + }); + const price = await getCoinPrice(underlying); + if (venftAbi === abi2) { + const [data] = await client.multicall({ + allowFailure: false, + contracts: [ + { + address, + abi: abi2, + functionName: "locked", + args: [BigInt(id)], + }, + ], + }); + return { + id: id, + balance: formatUnits(balance, decimals), + amount: formatUnits(data.amount, decimals), + end: data.end, + owner, + price, + }; + } + if (venftAbi === abi) { + const [data] = await client.multicall({ + allowFailure: false, + contracts: [ + { + address, + abi, + functionName: "locked", + args: [BigInt(id)], + }, + ], + }); + + return { + id: id, + balance: formatUnits(balance, decimals), + amount: formatUnits(data[0], decimals), + end: data[1], + owner, + price, + }; + } + } + return null; +} + export default function Index() { + const submit = useSubmit(); + const navigation = useNavigation(); + const [searchParams] = useSearchParams(); + const venft = searchParams.get("venft"); + const data = useLoaderData(); + const groupedByChain = Object.entries(config).reduce((acc, [key, value]) => { + if (!acc[value.chain.name]) { + acc[value.chain.name] = []; + } + acc[value.chain.name].push(key); + return acc; + }, {} as Record); return ( -
-

Welcome to Remix (SPA Mode)

- + {navigation.state === "loading" ? ( +
+ +
+ ) : null} +
+
+ + {venft} ID: + {" "} + {data.id} +
+
+ + Owner: + {" "} + + {data.owner === zeroAddress ? ( + data.owner + ) : ( + + {data.owner} + + )} + +
+
+ + {venft?.replace("ve", "")} Locked: + {" "} + {(+data.amount).toLocaleString()} + {data.price && data.amount !== "0" ? ( + (${(data.price * +data.amount).toLocaleString()}) + ) : null} +
+
+ + {venft} Balance: + {" "} + {(+data.balance).toLocaleString()} +
+
+ Unlock:{" "} + + {data.end !== 0n + ? new Date(Number(data.end) * 1000).toUTCString() + : "-"} + +
+
+
+ ) : null} + + ); } diff --git a/app/tailwind.css b/app/tailwind.css new file mode 100644 index 0000000..b5c61c9 --- /dev/null +++ b/app/tailwind.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/package.json b/package.json index 0192583..eecc354 100644 --- a/package.json +++ b/package.json @@ -14,14 +14,15 @@ "@remix-run/node": "^2.5.0", "@remix-run/react": "^2.5.0", "http-server": "^14.1.1", - "react": "^18.2.0", - "react-dom": "^18.2.0" + "react": "canary", + "react-dom": "canary" }, "devDependencies": { "@remix-run/dev": "^2.5.0", "@types/react": "^18.2.20", "@types/react-dom": "^18.2.7", "@typescript-eslint/eslint-plugin": "^6.7.4", + "autoprefixer": "^10.4.16", "eslint": "^8.38.0", "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-typescript": "^3.6.1", @@ -29,6 +30,7 @@ "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", + "tailwindcss": "^3.4.1", "typescript": "^5.1.6", "vite": "^5.0.0", "vite-tsconfig-paths": "^4.2.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b9ee721..811df9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,16 +10,16 @@ dependencies: version: 2.5.0(typescript@5.3.3) '@remix-run/react': specifier: ^2.5.0 - version: 2.5.0(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3) + version: 2.5.0(react-dom@18.3.0-canary-60a927d04-20240113)(react@18.3.0-canary-60a927d04-20240113)(typescript@5.3.3) http-server: specifier: ^14.1.1 version: 14.1.1 react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: canary + version: 18.3.0-canary-60a927d04-20240113 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: canary + version: 18.3.0-canary-60a927d04-20240113(react@18.3.0-canary-60a927d04-20240113) devDependencies: '@remix-run/dev': @@ -34,6 +34,9 @@ devDependencies: '@typescript-eslint/eslint-plugin': specifier: ^6.7.4 version: 6.18.1(@typescript-eslint/parser@6.18.1)(eslint@8.56.0)(typescript@5.3.3) + autoprefixer: + specifier: ^10.4.16 + version: 10.4.16(postcss@8.4.33) eslint: specifier: ^8.38.0 version: 8.56.0 @@ -55,6 +58,9 @@ devDependencies: eslint-plugin-react-hooks: specifier: ^4.6.0 version: 4.6.0(eslint@8.56.0) + tailwindcss: + specifier: ^3.4.1 + version: 3.4.1 typescript: specifier: ^5.1.6 version: 5.3.3 @@ -72,6 +78,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /@alloc/quick-lru@5.2.0: + resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} + engines: {node: '>=10'} + dev: true + /@ampproject/remapping@2.2.1: resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} @@ -1322,7 +1333,7 @@ packages: stream-slice: 0.1.2 typescript: 5.3.3 - /@remix-run/react@2.5.0(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3): + /@remix-run/react@2.5.0(react-dom@18.3.0-canary-60a927d04-20240113)(react@18.3.0-canary-60a927d04-20240113)(typescript@5.3.3): resolution: {integrity: sha512-CHClKLyUmTAUzDVIOFifRYJ4Lw/LMUQgtFq1grjRDyYRWXIAwxhoZx6BTzcseFUbOwbHGDZ37QCh2e7LFNtRHQ==} engines: {node: '>=18.0.0'} peerDependencies: @@ -1335,10 +1346,10 @@ packages: dependencies: '@remix-run/router': 1.14.2 '@remix-run/server-runtime': 2.5.0(typescript@5.3.3) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - react-router: 6.21.2(react@18.2.0) - react-router-dom: 6.21.2(react-dom@18.2.0)(react@18.2.0) + react: 18.3.0-canary-60a927d04-20240113 + react-dom: 18.3.0-canary-60a927d04-20240113(react@18.3.0-canary-60a927d04-20240113) + react-router: 6.21.2(react@18.3.0-canary-60a927d04-20240113) + react-router-dom: 6.21.2(react-dom@18.3.0-canary-60a927d04-20240113)(react@18.3.0-canary-60a927d04-20240113) typescript: 5.3.3 dev: false @@ -1862,6 +1873,10 @@ packages: engines: {node: '>=12'} dev: true + /any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + dev: true + /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -1986,6 +2001,22 @@ packages: has-symbols: 1.0.3 dev: true + /autoprefixer@10.4.16(postcss@8.4.33): + resolution: {integrity: sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==} + engines: {node: ^10 || ^12 || >=14} + hasBin: true + peerDependencies: + postcss: ^8.1.0 + dependencies: + browserslist: 4.22.2 + caniuse-lite: 1.0.30001576 + fraction.js: 4.3.7 + normalize-range: 0.1.2 + picocolors: 1.0.0 + postcss: 8.4.33 + postcss-value-parser: 4.2.0 + dev: true + /available-typed-arrays@1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} @@ -2146,6 +2177,11 @@ packages: engines: {node: '>=6'} dev: true + /camelcase-css@2.0.1: + resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} + engines: {node: '>= 6'} + dev: true + /caniuse-lite@1.0.30001576: resolution: {integrity: sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg==} dev: true @@ -2255,6 +2291,11 @@ packages: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} dev: true + /commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + dev: true + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true @@ -2423,6 +2464,10 @@ packages: engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} dev: true + /didyoumean@1.2.2: + resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + dev: true + /diff@5.1.0: resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} engines: {node: '>=0.3.1'} @@ -2435,6 +2480,10 @@ packages: path-type: 4.0.0 dev: true + /dlv@1.1.3: + resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} + dev: true + /doctrine@2.1.0: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} @@ -3231,6 +3280,10 @@ packages: engines: {node: '>= 0.6'} dev: true + /fraction.js@4.3.7: + resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} + dev: true + /fresh@0.5.2: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} @@ -3912,6 +3965,11 @@ packages: resolution: {integrity: sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==} dev: true + /jiti@1.21.0: + resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} + hasBin: true + dev: true + /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -4016,11 +4074,20 @@ packages: type-check: 0.4.0 dev: true + /lilconfig@2.1.0: + resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} + engines: {node: '>=10'} + dev: true + /lilconfig@3.0.0: resolution: {integrity: sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==} engines: {node: '>=14'} dev: true + /lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + dev: true + /loader-utils@3.2.1: resolution: {integrity: sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==} engines: {node: '>= 12.13.0'} @@ -4670,6 +4737,14 @@ packages: /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + /mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + dev: true + /nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -4704,6 +4779,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /normalize-range@0.1.2: + resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} + engines: {node: '>=0.10.0'} + dev: true + /npm-install-checks@6.3.0: resolution: {integrity: sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -4748,6 +4828,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /object-hash@3.0.0: + resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} + engines: {node: '>= 6'} + dev: true + /object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} @@ -4991,6 +5076,16 @@ packages: hasBin: true dev: true + /pify@2.3.0: + resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} + engines: {node: '>=0.10.0'} + dev: true + + /pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} + engines: {node: '>= 6'} + dev: true + /pkg-types@1.0.3: resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} dependencies: @@ -5019,6 +5114,28 @@ packages: postcss: 8.4.33 dev: true + /postcss-import@15.1.0(postcss@8.4.33): + resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} + engines: {node: '>=14.0.0'} + peerDependencies: + postcss: ^8.0.0 + dependencies: + postcss: 8.4.33 + postcss-value-parser: 4.2.0 + read-cache: 1.0.0 + resolve: 1.22.8 + dev: true + + /postcss-js@4.0.1(postcss@8.4.33): + resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} + engines: {node: ^12 || ^14 || >= 16} + peerDependencies: + postcss: ^8.4.21 + dependencies: + camelcase-css: 2.0.1 + postcss: 8.4.33 + dev: true + /postcss-load-config@4.0.2(postcss@8.4.33): resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} engines: {node: '>= 14'} @@ -5093,6 +5210,16 @@ packages: string-hash: 1.1.3 dev: true + /postcss-nested@6.0.1(postcss@8.4.33): + resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.2.14 + dependencies: + postcss: 8.4.33 + postcss-selector-parser: 6.0.15 + dev: true + /postcss-selector-parser@6.0.15: resolution: {integrity: sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==} engines: {node: '>=4'} @@ -5238,14 +5365,14 @@ packages: unpipe: 1.0.0 dev: true - /react-dom@18.2.0(react@18.2.0): - resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} + /react-dom@18.3.0-canary-60a927d04-20240113(react@18.3.0-canary-60a927d04-20240113): + resolution: {integrity: sha512-l/weUXejD8QJwuRDKgZ4NWWtLL5fYxE+UHc+zwA4tmt+czbvIKMWCM39hshNG6CFNYSYF4hV3h6AtCkR9LiMxQ==} peerDependencies: - react: ^18.2.0 + react: 18.3.0-canary-60a927d04-20240113 dependencies: loose-envify: 1.4.0 - react: 18.2.0 - scheduler: 0.23.0 + react: 18.3.0-canary-60a927d04-20240113 + scheduler: 0.24.0-canary-60a927d04-20240113 dev: false /react-is@16.13.1: @@ -5257,7 +5384,7 @@ packages: engines: {node: '>=0.10.0'} dev: true - /react-router-dom@6.21.2(react-dom@18.2.0)(react@18.2.0): + /react-router-dom@6.21.2(react-dom@18.3.0-canary-60a927d04-20240113)(react@18.3.0-canary-60a927d04-20240113): resolution: {integrity: sha512-tE13UukgUOh2/sqYr6jPzZTzmzc70aGRP4pAjG2if0IP3aUT+sBtAKUJh0qMh0zylJHGLmzS+XWVaON4UklHeg==} engines: {node: '>=14.0.0'} peerDependencies: @@ -5265,28 +5392,34 @@ packages: react-dom: '>=16.8' dependencies: '@remix-run/router': 1.14.2 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - react-router: 6.21.2(react@18.2.0) + react: 18.3.0-canary-60a927d04-20240113 + react-dom: 18.3.0-canary-60a927d04-20240113(react@18.3.0-canary-60a927d04-20240113) + react-router: 6.21.2(react@18.3.0-canary-60a927d04-20240113) dev: false - /react-router@6.21.2(react@18.2.0): + /react-router@6.21.2(react@18.3.0-canary-60a927d04-20240113): resolution: {integrity: sha512-jJcgiwDsnaHIeC+IN7atO0XiSRCrOsQAHHbChtJxmgqG2IaYQXSnhqGb5vk2CU/wBQA12Zt+TkbuJjIn65gzbA==} engines: {node: '>=14.0.0'} peerDependencies: react: '>=16.8' dependencies: '@remix-run/router': 1.14.2 - react: 18.2.0 + react: 18.3.0-canary-60a927d04-20240113 dev: false - /react@18.2.0: - resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} + /react@18.3.0-canary-60a927d04-20240113: + resolution: {integrity: sha512-ehS+psOGXcSqob/sX6Aty7J6y37uR9iV4/Co37E2XyiFUsgBTXY1wuivgTc06VMewi3t1HhHO5IJi/D+qk5Viw==} engines: {node: '>=0.10.0'} dependencies: loose-envify: 1.4.0 dev: false + /read-cache@1.0.0: + resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} + dependencies: + pify: 2.3.0 + dev: true + /readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} dependencies: @@ -5525,8 +5658,8 @@ packages: /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - /scheduler@0.23.0: - resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} + /scheduler@0.24.0-canary-60a927d04-20240113: + resolution: {integrity: sha512-nZnKdZXaqoLyiFtfbN/BoGZTINy/0aQXZ6AeUHPJILG5Jyro4lPQLlt63EV3VxNlqPGYScMk6ZlTnZMs8EZr3A==} dependencies: loose-envify: 1.4.0 dev: false @@ -5818,6 +5951,20 @@ packages: inline-style-parser: 0.1.1 dev: true + /sucrase@3.35.0: + resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + commander: 4.1.1 + glob: 10.3.10 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.6 + ts-interface-checker: 0.1.13 + dev: true + /supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -5836,6 +5983,37 @@ packages: engines: {node: '>= 0.4'} dev: true + /tailwindcss@3.4.1: + resolution: {integrity: sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==} + engines: {node: '>=14.0.0'} + hasBin: true + dependencies: + '@alloc/quick-lru': 5.2.0 + arg: 5.0.2 + chokidar: 3.5.3 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.3.2 + glob-parent: 6.0.2 + is-glob: 4.0.3 + jiti: 1.21.0 + lilconfig: 2.1.0 + micromatch: 4.0.5 + normalize-path: 3.0.0 + object-hash: 3.0.0 + picocolors: 1.0.0 + postcss: 8.4.33 + postcss-import: 15.1.0(postcss@8.4.33) + postcss-js: 4.0.1(postcss@8.4.33) + postcss-load-config: 4.0.2(postcss@8.4.33) + postcss-nested: 6.0.1(postcss@8.4.33) + postcss-selector-parser: 6.0.15 + resolve: 1.22.8 + sucrase: 3.35.0 + transitivePeerDependencies: + - ts-node + dev: true + /tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} @@ -5877,6 +6055,19 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + dependencies: + thenify: 3.3.1 + dev: true + + /thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + dependencies: + any-promise: 1.3.0 + dev: true + /through2@2.0.5: resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} dependencies: @@ -5922,6 +6113,10 @@ packages: typescript: 5.3.3 dev: true + /ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + dev: true + /tsconfck@2.1.2(typescript@5.3.3): resolution: {integrity: sha512-ghqN1b0puy3MhhviwO2kGF8SeMDNhEbnKxjK7h6+fvY9JAxqvXi8y5NAHSQv687OVboS2uZIByzGd45/YxrRHg==} engines: {node: ^14.13.1 || ^16 || >=18} diff --git a/postcss.config.mjs b/postcss.config.mjs new file mode 100644 index 0000000..aea3dd2 --- /dev/null +++ b/postcss.config.mjs @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } + }; \ No newline at end of file diff --git a/tailwind.config.ts b/tailwind.config.ts new file mode 100644 index 0000000..cb33d25 --- /dev/null +++ b/tailwind.config.ts @@ -0,0 +1,10 @@ +import type { Config } from 'tailwindcss' + +export default { + content: ['./app/**/*.{ts,tsx}'], + theme: { + extend: {}, + }, + plugins: [], +} satisfies Config + diff --git a/tsconfig.json b/tsconfig.json index 269c0cc..ba3105a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "include": ["env.d.ts", "**/*.ts", "**/*.tsx"], + "include": ["env.d.ts", "**/*.ts", "**/*.tsx", "tailwind.config.ts", "postcss.config.mjs"], "compilerOptions": { "lib": ["DOM", "DOM.Iterable", "ES2022"], "isolatedModules": true, diff --git a/vite.config.ts b/vite.config.ts index 783ef07..97d4685 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,5 +3,8 @@ import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; export default defineConfig({ - plugins: [remix({ unstable_ssr: false }), tsconfigPaths()], + plugins: [ + remix({ unstable_ssr: false }), + tsconfigPaths(), + ], });