返回 Skill 列表
extension
分类: 开发与工程无需 API Key

bap578_adapter_blueprint

为绑定令牌的代理账户生成一个简单的适配器合约蓝图。

person作者: jakexiaohubgithub

BAP578 Adapter Blueprint

Usage

  • Category: BAP578 Dev
  • Mode: guide
  • Version: 0.1.0

Input Example

{
  "contractName": "MyBAP578Adapter",
  "nfaInterface": "INFAOwner"
}

Output Example

contract MyBAP578Adapter {
  modifier onlyOperator(uint256 tokenId) {
    require(INFAOwner(nfa).ownerOf(tokenId) == msg.sender, 'not operator');
    _;
  }
}

Security Notes

  • Keep ownerOf(tokenId) as the primary authorization guard.
  • Isolate vault debit/credit permissions from business logic.

Install

npx @skillshub/bap578-adapter-blueprint