Update Token Socials

The token socials owner can update the packed social links stored on-chain via the TokenSocials registry.

Update Socials

const socials = new ethers.Contract(SOCIALS_ADDRESS, SOCIALS_ABI, signer);

// Pack your social links into bytes32
// The packing format is application-specific
const packedSocials = ethers.utils.formatBytes32String("...");

await (await socials.set_socials(TOKEN_ADDRESS, packedSocials)).wait();

Read Current Socials

const packed = await socials.get_socials(TOKEN_ADDRESS);
const owner = await socials.get_owner(TOKEN_ADDRESS);
const [packed2, owner2, registeredAt] = await socials.get_record(TOKEN_ADDRESS);

Transfer Socials Ownership

// Current owner or Hook (via CTO) can transfer
await (await socials.transfer_owner(TOKEN_ADDRESS, newOwnerAddress)).wait();