diff --git a/docs/eth-stark/useDynamicAccount.md b/docs/eth-stark/useEthStarkAccount.md similarity index 89% rename from docs/eth-stark/useDynamicAccount.md rename to docs/eth-stark/useEthStarkAccount.md index 36c9463..b598ab6 100644 --- a/docs/eth-stark/useDynamicAccount.md +++ b/docs/eth-stark/useEthStarkAccount.md @@ -2,12 +2,12 @@ sidebar_position: 6 --- -# useDynamicAccount +# useEthStarkAccount This is the hook that wraps the `useAccount` hook from starknet-react and wagmi. Use this hook to get your account details. ```ts -const { address } = useDynamicAccount(); +const { address } = useEthStarkAccount(); ``` ## Return Value diff --git a/docs/eth-stark/useDynamicContract.md b/docs/eth-stark/useEthStarkContract.md similarity index 87% rename from docs/eth-stark/useDynamicContract.md rename to docs/eth-stark/useEthStarkContract.md index 30078c9..d460c9c 100644 --- a/docs/eth-stark/useDynamicContract.md +++ b/docs/eth-stark/useEthStarkContract.md @@ -2,13 +2,13 @@ sidebar_position: 5 --- -# useDynamicContract +# useEthStarkContract This is the hook that wraps the `useScaffoldContract` hook from Scaffold-Stark and Scaffold-ETH for both Starknet and Ethereum. Use this hook to get your contract instance by providing the contract name. It enables you to interact with your contract methods. -For reading data or sending transactions, it's recommended to use `useDynamicReadContract` and `useDynamicWriteContract`. +For reading data or sending transactions, it's recommended to use `useEthStarkReadContract` and `useEthStarkWriteContract`. ```ts -const { data: yourContract, isLoading: yourContractLoading } = useDynamicContract({ +const { data: yourContract, isLoading: yourContractLoading } = useEthStarkContract({ eth: { contractName: "YourContract", }, @@ -17,7 +17,7 @@ const { data: yourContract, isLoading: yourContractLoading } = useDynamicContrac }, }); -// Returns the greeting and can be called in any function, unlike useDynamicReadContract +// Returns the greeting and can be called in any function, unlike useEthStarkReadContract // for eth contract await yourContract?.read.greeting(); @@ -32,7 +32,7 @@ import { useWalletClient } from "wagmi"; const { account } = useAccount(); const { data: walletClient } = useWalletClient(); -const { data: yourContract, isLoading: yourContractLoading } = useDynamicContract({ +const { data: yourContract, isLoading: yourContractLoading } = useEthStarkContract({ eth: { contractName: "YourContract", walletClient: walletClient, @@ -53,7 +53,7 @@ const setGreeting = async () => { }; ``` -This example uses the `useDynamicContract` hook to obtain a contract instance for the `YourContract` smart contract. +This example uses the `useEthStarkContract` hook to obtain a contract instance for the `YourContract` smart contract. ## Configuration diff --git a/docs/eth-stark/useDynamicDeployContract.md b/docs/eth-stark/useEthStarkDeployedContract.md similarity index 93% rename from docs/eth-stark/useDynamicDeployContract.md rename to docs/eth-stark/useEthStarkDeployedContract.md index 679efd6..3a1f79d 100644 --- a/docs/eth-stark/useDynamicDeployContract.md +++ b/docs/eth-stark/useEthStarkDeployedContract.md @@ -2,7 +2,7 @@ sidebar_position: 4 --- -# useDynamicDeployContract +# useEthStarkDeployedContract This is the hook that wraps the `useDeployedContractInfo` hook from Scaffold-Stark and Scaffold-ETH for both Starknet and Ethereum. Use this hook to fetch details about a deployed smart contract, including the ABI and address. @@ -11,7 +11,7 @@ const { data: deployedContractInfo, isLoading: deployedContractLoading, error: deployedContractError, -} = useDynamicDeployContract({ +} = useEthStarkDeployedContract({ eth: { contractName: "YourContract" }, strk: { contractName: "YourContract" }, }); diff --git a/docs/eth-stark/useDynamicEventHistory.md b/docs/eth-stark/useEthStarkEventHistory.md similarity index 97% rename from docs/eth-stark/useDynamicEventHistory.md rename to docs/eth-stark/useEthStarkEventHistory.md index adff3bf..a1df638 100644 --- a/docs/eth-stark/useDynamicEventHistory.md +++ b/docs/eth-stark/useEthStarkEventHistory.md @@ -2,12 +2,12 @@ sidebar_position: 3 --- -# useDynamicEventHistory +# useEthStarkEventHistory This is the hook that wraps the `useScaffoldEventHistory` hook from Scaffold-Stark and Scaffold-ETH for both Starknet and Ethereum. This hook allows you to read events from a deployed smart contract. ```ts -const { data, isLoading, error } = useDynamicEventHistory({ +const { data, isLoading, error } = useEthStarkEventHistory({ strk: { contractName: "YourContract", eventName: "contracts::YourContract::YourContract::GreetingChanged", diff --git a/docs/eth-stark/useDynamicReadContract.md b/docs/eth-stark/useEthStarkReadContract.md similarity index 96% rename from docs/eth-stark/useDynamicReadContract.md rename to docs/eth-stark/useEthStarkReadContract.md index 2e2dd34..483d23a 100644 --- a/docs/eth-stark/useDynamicReadContract.md +++ b/docs/eth-stark/useEthStarkReadContract.md @@ -2,12 +2,12 @@ sidebar_position: 1 --- -# useDynamicReadContract +# useEthStarkReadContract This is the hook that wraps the `useScaffoldReadContract` hook from Scaffold-Stark and Scaffold-ETH for both Starknet and Ethereum. Use this hook to read public variables and get data from read-only functions of your Starknet and Ethereum smart contracts. ```ts -const { data: totalCounter } = useDynamicReadContract({ +const { data: totalCounter } = useEthStarkReadContract({ strk: { contractName: "YourContract", functionName: "userGreetingCounter", diff --git a/docs/eth-stark/useDynamicTargetNetwork.md b/docs/eth-stark/useEthStarkTargetNetwork.md similarity index 81% rename from docs/eth-stark/useDynamicTargetNetwork.md rename to docs/eth-stark/useEthStarkTargetNetwork.md index 3afd1ff..bf843dc 100644 --- a/docs/eth-stark/useDynamicTargetNetwork.md +++ b/docs/eth-stark/useEthStarkTargetNetwork.md @@ -2,12 +2,12 @@ sidebar_position: 7 --- -# useDynamicTargetNetwork +# useEthStarkTargetNetwork This is the hook that wraps the `useTargetNetwork` hook from Scaffold-Stark and Scaffold-ETH. Use this hook to get the current connected network. ```ts -const targetNetwork = useDynamicTargetNetwork(); +const targetNetwork = useEthStarkTargetNetwork(); ``` ## Return Value diff --git a/docs/eth-stark/useDynamicWriteContract.md b/docs/eth-stark/useEthStarkWriteContract.md similarity index 95% rename from docs/eth-stark/useDynamicWriteContract.md rename to docs/eth-stark/useEthStarkWriteContract.md index 44da784..2e7a98a 100644 --- a/docs/eth-stark/useDynamicWriteContract.md +++ b/docs/eth-stark/useEthStarkWriteContract.md @@ -2,12 +2,12 @@ sidebar_position: 2 --- -# useDynamicWriteContract +# useEthStarkWriteContract This is the hook that wraps the `useScaffoldWriteContract` hook from Scaffold-Stark and Scaffold-ETH for both Starknet and Ethereum. Use this hook to write to your smart contract by calling state-mutating functions. ```ts -const { writeAsync, isPending: greetingPending } = useDynamicWriteContract({ +const { writeAsync, isPending: greetingPending } = useEthStarkWriteContract({ strk: { contractName: "YourContract", functionName: "updateGreeting", @@ -26,7 +26,7 @@ This example calls the updateGreeting function of the YourContract smart contrac ## Usage Example ```tsx -const { writeAsync, isPending: isUpdateGreetingPending } = useDynamicWriteContract({ +const { writeAsync, isPending: isUpdateGreetingPending } = useEthStarkWriteContract({ strk: { contractName: "YourContract", functionName: "updateGreeting",