Activation
Examples of CityCoin contract functions related to activation and registration.
Get Activation Block
// returns the activation block height
const NETWORK = new StacksMainnet(); // set network from @stacks/network
export async function getActivationBlock() {
const resultCv = await callReadOnlyFunction({
contractAddress: 'SP466FNC0P7JWTNM2R9T199QRZN1MYEDTAR0KP27',
contractName: 'miamicoin-core-v1',
functionName: 'get-activation-block',
functionArgs: [],
network: NETWORK,
senderAddress: contractAddress, // can be any valid STX address
});
const result = cvToJSON(resultCv);
return result.value.value; // activation block height
}Get Registered Users
Last updated
Was this helpful?