Buy Key

Buy keys for a specific amount.

Contract function

buyKeysV2ByToken

Contract address

0x9b727dcaC7b331f95786D3b01fA79191Ab527DA3

Parameters

token: key contract address 
amountX18: amount of key buy

Sample code

 const { write: executeBuy, isLoading: buyLoading } = useContractWrite({
    address: FACTORY_CONTRACT_ADDRESS,
    abi: TOKEN_ABI,
    functionName: "buyKeysV2ByToken",
    args: [user.tokenaddress, buy*1e18,buyPrice],
  });

Last updated