インテグレーションAPI

CHAINFetch Bucket State

Last updated January 31, 2026

Genesis JavaScript SDK を使用してブロックチェーンからリアルタイムのバケット状態を直接取得します。デポジット合計、カウント、トークン割り当て、時間条件を返します。

オンチェーンフェッチには UmiGenesis SDK が必要です。

メソッド

メソッドローンチタイプ説明
fetchLaunchPoolBucketV2Launch PoolLaunch Pool バケット状態を取得
fetchPresaleBucketV2PresalePresale バケット状態を取得

Launch Pool バケット

import { fetchLaunchPoolBucketV2 } from '@metaplex-foundation/genesis';
const bucket = await fetchLaunchPoolBucketV2(umi, launchPoolBucket);
console.log('Total deposits:', bucket.quoteTokenDepositTotal);
console.log('Deposit count:', bucket.depositCount);
console.log('Claim count:', bucket.claimCount);
console.log('Token allocation:', bucket.bucket.baseTokenAllocation);

Presale バケット

import { fetchPresaleBucketV2 } from '@metaplex-foundation/genesis';
const bucket = await fetchPresaleBucketV2(umi, presaleBucket);
console.log('Total deposits:', bucket.quoteTokenDepositTotal);
console.log('Deposit count:', bucket.depositCount);
console.log('Token allocation:', bucket.bucket.baseTokenAllocation);
console.log('SOL cap:', bucket.allocationQuoteTokenCap);

時間条件

各バケットにはローンチフェーズを制御する4つの時間条件があります:

条件目的
depositStartConditionデポジット受付開始時刻
depositEndConditionデポジット受付終了時刻
claimStartConditionクレーム受付開始時刻
claimEndConditionクレーム受付終了時刻
const bucket = await fetchLaunchPoolBucketV2(umi, launchPoolBucket);
// Deposit window
const depositStart = bucket.depositStartCondition.time;
const depositEnd = bucket.depositEndCondition.time;
// Claim window
const claimStart = bucket.claimStartCondition.time;
const claimEnd = bucket.claimEndCondition.time;
console.log('Deposit starts:', new Date(Number(depositStart) * 1000));
console.log('Deposit ends:', new Date(Number(depositEnd) * 1000));
console.log('Claims start:', new Date(Number(claimStart) * 1000));
console.log('Claims end:', new Date(Number(claimEnd) * 1000));