6个版本

0.1.5 2023年10月24日
0.1.4 2023年10月24日

#17 in #members

Download history 2/week @ 2024-06-29 102/week @ 2024-07-27

每月104次下载

Apache-2.0

22KB
457 代码行

CW-Goop

Cw-goop是Stargaze的Flexible Whitelist的定制版本。Stargaze的Flexible Whitelist.

InstantiateMsg

#[cw_serde]
pub struct InstantiateMsg {
    pub members: Vec<Member>,
    pub claim_limit: u32,
    pub admins: Vec<String>,
    pub admins_mutable: bool,
}

json示例

{
  "members": [
    {
      "address": "0x24EaSp0rts..",
      "headstash_amount": 123456789,
      "claim_count": 0
    },
    {
      "address": "0x23iMiNtHeGaMe...",
      "headstash_amount": 987654321,
      "claim_count": 1 
    }
  ],
  "claim_limit": 1,
  "admins": [
    "terp1...", 
    "terp1a...."
    ],
  "admins_mutable": true
}

ExecuteMsg

#[cw_serde]
pub enum ExecuteMsg {
    AddMembers(AddMembersMsg),
    UpdateAdmins { admins: Vec<String> },
    Freeze {},
}

添加成员

{
  "AddMembers": {
    "to_add": [
      {
        "address": "0x24EaSp0rts",
        "claim_count": 0
      },
      {
        "address": "0x23iMiNtHeGaMe",
        "claim_count": 0
      }
    ]
  }
}

更新管理员

{
  "UpdateAdmins": {
    "admins": ["admin_address_1", "admin_address_2"]
  }
}

冻结

{
  "Freeze": {}
}

查询信息

成员

是否为成员

成员

配置

管理员列表

可以执行

地址限制

依赖项

~5.5–7MB
~153K SLoC