Task Router Skill
Task Router
Call guide and best practices for the BSC on-chain giveaway contract based on contracts/contracts/Giveaway.sol, including contract address, core method signatures, parameter meanings, and conventions for calling the contract from scripts, frontends, or OpenClow workflows via ethers/web3. Use this skill when you need to create giveaways, claim giveaways, manage whitelists, or withdraw expired giveaways on BSC.
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
SkillHub CLI
skillhub install franckstone/giveaway-skillsExaminez la source et la compatibilité, puis suivez les étapes d’installation.
Donnez le lien à votre agent et demandez-lui d’examiner instructions et dépendances avant d’expliquer les étapes.
contracts/contracts/Giveaway.sol
0xc9Db158004fEFe15633eF2Ac3C3eA209e58Db5B9
IERC20, Ownable, ReentrancyGuard, internal TransferHelper libraryAssumptions when calling:
https://bsc-dataseed.binance.org)DistributionType
0 = AVERAGE: equal share, each claim gets amount / count
1 = RANDOM: random share, a single claim is roughly in the range (0 \sim 2 \times) the averageClaimRestriction
0 = PUBLIC: public, no additional restriction1 = TOKEN_HOLDER: only addresses holding restrictionToken with balance ≥ minTokenBalance
2 = WHITELIST: only whitelisted addresses can claimGiveawayInfo
token: token address for the giveaway, address(0) means BNBsender: creator addressamount: current remaining total giveaway amount in the contract (after creation fee is deducted)count: current remaining claimable slotsdistributionType: distribution type (0/1)restriction: claim restriction type (0/1/2)restrictionToken: restriction token address (only meaningful for TOKEN_HOLDER)minTokenBalance: minimum token balance requiredlastDate: expiration timestamp (seconds)createGiveawaySignature:
function createGiveaway(
address token,
uint256 amount,
uint256 count,
DistributionType distributionType,
ClaimRestriction restriction,
address restrictionToken,
uint256 minTokenBalance,
string memory content,
uint256 lastDate
) public payable
Key constraints:
bytes(content).length < 128
amount > 0
Ces informations proviennent de l’analyse indexée et peuvent être anciennes. Vérifiez les fichiers actuels.
# BSC Giveaway Contract Call Skill
## 1. Deployment information
- **Network**: BSC (Binance Smart Chain mainnet, chainId = 56)
- **Contract file**: `contracts/contracts/Giveaway.sol`
- **Contract address**: `0xc9Db158004fEFe15633eF2Ac3C3eA209e58Db5B9`
- **Main dependencies**: `IERC20`, `Ownable`, `ReentrancyGuard`, internal `TransferHelper` library
Assumptions when calling:
- You are already connected to a BSC mainnet RPC (for example `https://bsc-dataseed.binance.org`)
- Account balance and gas settings are handled by the caller
## 2. Core enums and structs (pass as uint in calls)
**DistributionType**
- `0` = AVERAGE: equal share, each claim gets `amount / count`
- `1` = RANDOM: random share, a single claim is roughly in the range \(0 \sim 2 \times\) the average
**ClaimRestriction**
- `0` = PUBLIC: public, no additional restriction
- `1` = TOKEN_HOLDER: only addresses holding `restrictionToken` with balance ≥ `minTokenBalance`
- `2` = WHITELIST: only whitelisted addresses can claim
**GiveawayInfo**
- `token`: token address for the giveaway, `address(0)` means BNB
- `sender`: creator address
- `amount`: current remaining total giveaway amount in the contract (after creation fee is deducted)
- `count`: current remaining claimable slots
- `distributionType`: distribution type (0/1)
- `restriction`: claim restriction type (0/1/2)
- `restrictionToken`: restriction token address (only meaningful for TOKEN_HOLDER)
- `minTokenBalance`: minimum token balance required
- `lastDate`: expiration timestamp (seconds)
## 3. Write function cheatsheet
### 3.1 Create giveaway `createGiveaway`
Signature:
```solidity
function createGiveaway(
address token,
uint256 amount,
uint256 count,
DistributionType distributionType,
ClaimRestriction restriction,
address restrictionToken,
uint256 minTokenBalance,
string memory content,
uint256 lastDate
) public payable
```
Key constraints:
- `bytes(content).length < 128`
- `amount > 0`
- `amount / cou...Task Router
Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay,...
Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.
OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.