From 102a1da51a4683228c19dcd6014660963d1263f8 Mon Sep 17 00:00:00 2001 From: Lucemans Date: Sun, 2 Jun 2024 07:58:27 +0000 Subject: [PATCH] Update Deployments --- src/abi/abi.ts | 33 +++++++++++++++++++++++++-- src/components/modals/RescueModal.tsx | 3 +-- src/constants.ts | 2 +- src/hooks/useExpiryNames.tsx | 2 +- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/abi/abi.ts b/src/abi/abi.ts index e626dc2..fc9cb0e 100644 --- a/src/abi/abi.ts +++ b/src/abi/abi.ts @@ -77,6 +77,29 @@ export const RESCUE_NAME_ABI = [ { type: "function", name: "execute", + inputs: [ + { + name: "vaults", + type: "uint256[]", + internalType: "uint256[]" + }, + { + name: "names", + type: "string[][]", + internalType: "string[][]" + }, + { + name: "payee", + type: "address", + internalType: "address payable" + } + ], + outputs: [], + stateMutability: "payable" + }, + { + type: "function", + name: "getPrice", inputs: [ { name: "vaults", @@ -99,8 +122,14 @@ export const RESCUE_NAME_ABI = [ internalType: "address payable" } ], - outputs: [], - stateMutability: "payable" + outputs: [ + { + name: "result", + type: "uint256", + internalType: "uint256" + } + ], + stateMutability: "view" }, { type: "function", diff --git a/src/components/modals/RescueModal.tsx b/src/components/modals/RescueModal.tsx index f4a2c19..f4e1d1a 100644 --- a/src/components/modals/RescueModal.tsx +++ b/src/components/modals/RescueModal.tsx @@ -19,7 +19,6 @@ export const RescueModal: FC<{ (accumulator, current) => accumulator + current.length, 0 ); - const price = 0n; const recipient = address!; return ( @@ -72,7 +71,7 @@ export const RescueModal: FC<{ abi: RESCUE_NAME_ABI, address: CONTRACT_ADDRESS[chainId], functionName: "execute", - args: [vaults, labels, price, recipient] + args: [vaults, labels, recipient] }); }} > diff --git a/src/constants.ts b/src/constants.ts index 2aa712d..d9909b3 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -3,5 +3,5 @@ import { mainnet, sepolia } from "wagmi/chains"; export const CONTRACT_ADDRESS: { [key: number]: Address } = { [mainnet.id]: "0x0", - [sepolia.id]: "0x53d35F2735293Ca4b5599f378aC41a60b3910Ba5" + [sepolia.id]: "0x8c82dd2f5Ad2E4F70d2710Cc5290e0D80e42191B" }; diff --git a/src/hooks/useExpiryNames.tsx b/src/hooks/useExpiryNames.tsx index 69e057e..b774ef4 100644 --- a/src/hooks/useExpiryNames.tsx +++ b/src/hooks/useExpiryNames.tsx @@ -35,7 +35,7 @@ export const useExpiryNames = () => { const x = await axios.post( // Yes, this uses a cors-anywhere bypass. This is a demo. // The streamingfast entrypoint doesnt output the right cors headers - "https://cors-anywhere.herokuapp.com/https://srv.streamingfast.io/b868bc69/graphql", + "https://cors-anywhere.herokuapp.com/https://srv.streamingfast.io/708f83b3/graphql", { query }