Create a account in the account factory contract
const Component = () => { const { contract } = useContract("{{contract_address}}"); const { mutate: createAccount, isLoading, error, } = useCreateAccount(contract); if (error) { console.error("failed to create account", error); } return ( <button disabled={isLoading} onClick={() => createAccount("0x...")} > Create Account </button> );};
function useCreateAccount( contract: RequiredParam<SmartContract<BaseContract>>,): UseMutationResult< TransactionResultWithAddress, unknown, string, unknown>;
Instance of a account factory contract
let contract: RequiredParam<SmartContract<BaseContract>>;
let returnType: UseMutationResult< TransactionResultWithAddress, unknown, string, unknown>;
A mutation object to create a account