diff --git a/packages/contracts/scripts/smt-checker/README.md b/packages/contracts/scripts/smt-checker/README.md index f41261a5e..b094a8b19 100644 --- a/packages/contracts/scripts/smt-checker/README.md +++ b/packages/contracts/scripts/smt-checker/README.md @@ -51,4 +51,14 @@ https://github.com/molecula451/ubiquity-dollar/assets/41552663/a4cad18e-0686-463 This will prompt you to select a contract. Once selected, check that the contract was updated in Foundry, then build it using forge build. Wait for the SMT-Checker results to appear after compiling. -![checker](https://github.com/molecula451/ubiquity-dollar/assets/41552663/a8e6a3de-2ccf-40bd-8d19-c1b4203c466f) \ No newline at end of file +![checker](https://github.com/molecula451/ubiquity-dollar/assets/41552663/a8e6a3de-2ccf-40bd-8d19-c1b4203c466f) + +## Debug + +On Ubuntu you might get: + +Compiler run failed: +Error: Unknown exception during compilation: Dynamic exception type: std::runtime_error +std::exception::what: locale::facet::_S_create_c_locale name not valid + +Fix: do an 'export LC_ALL=C; unset LANGUAGE' \ No newline at end of file diff --git a/packages/dapp/components/lib/hooks/use-deployed-address.tsx b/packages/dapp/components/lib/hooks/use-deployed-address.tsx deleted file mode 100644 index 241f067f1..000000000 --- a/packages/dapp/components/lib/hooks/use-deployed-address.tsx +++ /dev/null @@ -1,26 +0,0 @@ -// @dev you need to run a build to generate these fixtures. -import contractDeployments from "@ubiquity/contracts/deployments.json"; -import { useNetwork } from "wagmi"; - -const LOCAL_CHAIN = 31337; -const deployedContracts: Record = contractDeployments; - -const useDeployedAddress = (...names: string[]): string[] => { - const { chain } = useNetwork(); - const chainId: number = chain?.id || LOCAL_CHAIN; - if (chainId) { - const record = deployedContracts[chainId.toString()] ?? {}; - - const getContractAddress = (name: string): string | undefined => { - const contractInstance = record?.contracts ? record?.contracts[name] : undefined; - return contractInstance?.address || undefined; - }; - - const addresses = names.map((name) => getContractAddress(name) || ""); - return addresses; - } else { - return []; - } -}; - -export default useDeployedAddress; diff --git a/packages/dapp/components/utils/deployments.ts b/packages/dapp/components/utils/deployments.ts deleted file mode 100644 index 28bba077b..000000000 --- a/packages/dapp/components/utils/deployments.ts +++ /dev/null @@ -1,11 +0,0 @@ -import ContractDeployments from "@ubiquity/contracts/deployments.json"; - -const _contractDeployments = (): Record => { - return ContractDeployments; -}; - -export const getDeployments = (chainId: number, contractName: string): { address: string; abi: any } | undefined => { - const record = _contractDeployments()[chainId.toString()] ?? {}; - const contractInstance = record?.contracts ? record?.contracts[contractName] : undefined; - return contractInstance ? { address: contractInstance.address, abi: contractInstance.abi } : undefined; -};