curl
Copy
Ask AI
curl https://rest.initia.xyz/initia/move/v1/accounts/0x3a886b32a802582f2e446e74d4a24d1d7ed01adf46d2a8f65c5723887e708789/resources/by_struct_tag?struct_tag=0x3a886b32a802582f2e446e74d4a24d1d7ed01adf46d2a8f65c5723887e708789%3A%3Avip%3A%3AModuleStore
initia.js
Copy
Ask AI
import { RESTClient } from '@initia/initia.js'
const L1_VIP_CONTRACT = '0x3a886b32a802582f2e446e74d4a24d1d7ed01adf46d2a8f65c5723887e708789'
const L1_REST_URL = 'https://rest.initia.xyz'
async function getCurrentStage(): Promise<string> {
const rest = new RESTClient(L1_REST_URL)
return rest.move.resource<any>(L1_VIP_CONTRACT, `${L1_VIP_CONTRACT}::vip::ModuleStore`).then((res) => res.data.stage)
}