在多个钱包 solana metaplex 和 candymachine 之间分配铸造资金

Split money on minting between more than one wallet solana metaplex & candymachine

我是区块链的新手,我正在尝试使用区块链,所以我使用 metaplex 和 candy-machine 来上传和生成运行良好的虚拟 nft。我正在使用的开源存储库如下:

https://github.com/metaplex-foundation/metaplex https://github.com/exiled-apes/candy-machine-mint

然后为了学习,我想将铸币和二次销售分成多个钱包,所以我改了JSON,在创建者的数组中添加了三个测试钱包。

{
  "name": "#0",
  "symbol": "%$%",
  "description": "description goes here",
  "seller_fee_basis_points": 500,
  "image": "image.png",
  "external_url": "",
  "edition": 0,
  "attributes": [
    {
      "trait_type": "Background",
      "value": "Street"
    }
  ],
  "properties": {
    "files": [
      {
        "uri": "image.png",
        "type": "image/png"
      }
    ],
    "category": "image",
    "creators": [
      {
        "address": "<public address 1>",
        "share": 34
      },
      {
        "address": "<public address 1>",
        "share": 33
      },
      {
        "address": "<public address 1>",
        "share": 33
      }
    ]
  }
}

但问题是分裂发生在二次销售上,而不是铸造上。在创建钱包时,设置为国库资源的钱包将获得所有金额。我也想在铸币时拆分交易金额。

有趣的是,我在 metaplex documentation:

中找到了这句话

The SPL Metadata program supports storing up to five co-creators that share potential future profits from sales for the items as defined by seller_fee_basis_points . Each creator needs to be added as part of the minting process and is required to approve metadata that was used in his name using the sign_metadata endpoint. Unverified artwork cannot be sold with Metaplex.

During the first sale, creators share in 100% of the proceeds, while in follow up sales, they share in proceeds as a percentage determined by seller_fee_basis_points. Whether or not a metadata is considered in second sale or not is determined by the primary_sale_happened boolean on the Metadata account.

我对此的解释是,预期的行为应该是使用每个创作者份额定义的比率在创作者之间分配初始销售。听起来你正在经历不同的事情。

请记住,此文档是针对父项目的。 Candy-machine-mint 似乎是一个叉子,他们可能已经改变了其中的一些行为。

您感兴趣的合约代码源码可以在这里找到:https://github.com/metaplex-foundation/metaplex-program-library/blob/master/nft-candy-machine/program/src/lib.rs

在第 247 行调用了 sol 的转移到糖果机的单个金库地址。要将其更改为多个地址,必须更新和重新部署该合约。

我在 solana 社区 atm 中看到的另一种选择是第二份合同,它将平均分配资金。不幸的是,这个合约的创建者一直在为它收费,目前还没有开源。如果您有兴趣,可以在 metaplex discord 上找到它们。