搜索

PythonReactSEOPDF
OpenClaw

giveaway-skills

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.

franckstone0 来源安装数☆ 0 仓库 Starsv0.1.0

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install franckstone/giveaway-skills

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

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:

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...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/franckstone/giveaway-skills
Version
0.1.0
Commit
50081e93a8b62bf9db3213bded32f73b47571404
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# 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...

相关技能

OpenClaw

x402hub

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,...

OpenClaw

claw

capevace

Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.

OpenClaw

captchas-openclaw

captchasco

OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.