Overview
- Skill Key
- franckstone/giveaway-skills
- Author
- frank
- Source Repo
- openclaw/skills
- Version
- 0.1.0
- Source Path
- skills/franckstone/giveaway-skills
- Latest Commit SHA
- 50081e93a8b62bf9db3213bded32f73b47571404
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.
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 giveaway-skills 技能。 若已安装,则直接安装 giveaway-skills 技能。
# 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...
capt-marbles
Task Router
capncoconut
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, check marketplace stats, or manage agent credentials. Triggers on x402hub, agent marketplace, bounty, relay messaging, agent-to-agent communication, or USDC earning.
capevace
Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.
captchasco
OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.
carol-gutianle
name: modelready description: Start using a local or Hugging Face model instantly, directly from chat. metadata: {"openclaw":{"requires":{"bins": "bash", "curl" }, "env": "URL" }}
canbirlik
Controls Wiz smart bulbs (turn on/off, RGB colors, disco mode) via local WiFi.