useAptosClient
Use this hook to get an Aptos client connected to the defined chain.
Usage
const aptos = useAptosClient(chainId);
This example uses the useAptosClient
hook to retrieve the Aptos client for chainId
.
Parameters
Parameter | Type | Description |
---|---|---|
chainId | string | The id for the chain as defined in defaultChains. |
Return Value
data
: Object containingaddress
andabi
of contract.