β‘SampleContractHook
A sample Solidity Smart Contract to show how to code your own Contract Hook. Contract Hooks are called every time a user with it setup gets tagged in a message.
Table of Contents
Admin Functions
pause
const ethers = require('ethers');
// Initialize ethers with provider and signer
const provider = new ethers.providers.JsonRpcProvider('http://localhost:8545');
const signer = provider.getSigner();
// Set contract address and ABI
const contractAddress = "contract address goes here";
const contractABI = "contract ABI goes here";
// Create contract instance
const contractInstance = new ethers.Contract(contractAddress, contractABI, signer);
// Call pause function
await contractInstance.pause();unpause
updateAdmin
Variable
Type
Description
updateKUTHULUContracts
Variable
Type
Description
updateContracts
Variable
Type
Description
mintDoom
Variable
Type
Description
KUTHULU Functions
KuthuluHook
Parameters
Parameter
Type
Description
Field
Type
Description
Field
Type
Description
Returns
Parameter
Type
Description
Usage with ethers.js
Public Functions
getKuthuluMsgCount
Variable
Type
Description
postTestMessage
toggleLike
Last updated