sol-nft-wrap – sol nft包装区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,sol-nft-wrap – sol nft包装区块链毕设代写 是一篇很好的国外资料

sol-nft-wrap

This set of smart contracts presents an account abtraction, and an ERC721 NFT as ownership registry and transfer mechanism for abitrary contracts.

Components

C1: Acct, an asset container

Acct is a contract whose sole purpose is to hold assets, in order to transfer those assets between owners, possibly including ownership by an NFT marketplace.

Acct contract hold ERC20 tokens or ETH. This on-chain account (aka wallet) may be owned by

  1. an owner address (EOA or another contract), or
  2. the owner of an NFT, whose unique NFT id is the contract address owned by the NFT.

TBD: Holding NFTs.

C2: OwnerRegistry, an ERC721 NFT registry for contracts

OwnerRegistry is a standard ERC721 contract with ‘OWNERS’ ticker symbol.

The Token-ID within this registry is the contract address of an Acct.

Ownership of the assets within an Acct (or any other tracked contract) may then be transferred via normal ERC721 transfer mechanisms.

Features

NFT Lock

If the “NFT Lock” is set, then withdrawals are disabled when the Acct is owned by an NFT. This is intended to freeze the Acct while listed on an NFT marketplace. When ownership is transferred, the owner unregisters the Acct from the registry to access the assets.

Time Lock

A non-revokable time lock can be applied to an Acct. If the time lock’s timestamp is in the future, when withdrawals are disabled. When the timestamp is in the past, withdrawals are enabled (modulo other locks, such as the NFT lock, being unlocked also).

User stories

Asset package and transfer

Alice provably locks us assets in a smart contract, and registers the contract with an ERC721-compatible registry. Alice deposits the NFT on an NFT marketplace.

Bob examines the NFT on the marketplace, and inspects the assets associated with the NFT.

Bob purchases the NFT on the marketplace, ownership of the NFT transfers to Bob. Bob may immediately withdraw any or all of the assets. Alice cannot access the assets, following NFT ownership transfer.

Setup.

  1. Install packages
    npm i -g truffle npm i 
  2. Update provider url in config/default.json
  3. Set DEPLOYMENT_ACCOUNT_KEY in env
    create a .env file in root DEPLOYMENT_ACCOUNT_KEY =  "my mnemonic phrase" 
  4. Deploy you own contracts if want to do arb-
    truffle migrate --reset --network mainnet/ropsten 

We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products. Learn more.


sol-nft包装

组件

C1:Acct,一个资产容器

C2:OwnerRegistry,一个用于合同的ERC721 nft注册表

功能

nft锁

时间锁定

用户故事

设置。

基本cookies
始终处于活动状态
分析cookies
  • 所有者地址(EOA或其他合同),或NFT的所有者,其唯一的NFT id是NFT拥有的合同地址。
  • 安装包npm i-g truffle npm i
  • 在配置中更新提供程序url/默认值.json
  • 在env中设置DEPLOYMENT_ACCOUNT_KEY在根部署中创建一个.env文件_ACCOUNT_KEY=“my memmonic phrase”
  • 如果要执行arb-truffle migrate–reset–network mainnet/ropsten,请部署您自己的合同
  • 这组智能合约提供了一个账户abtraction,以及一个erc721nft作为临时合同的所有权登记和转移机制。

    组件

    C1:Acct,一个资产容器

    账户是一种合同,其唯一目的是持有资产,以便在所有者之间转让这些资产,可能包括非金融交易市场的所有权。

    账户合约持有ERC20代币或ETH。此链上账户(又名钱包)可能由

    1. 所有者地址(EOA或其他合同),或NFT的所有者,其唯一的NFT id是NFT拥有的合同地址。
    2. 安装包npm i-g truffle npm i

    TBD:Holding NFT所有。

    C2:OwnerRegistry,一个用于合同的ERC721 nft注册表

    OwnerRegistry是一个标准的ERC721合同,带有“OWNERS”股票代码。

    此注册表中的令牌ID是帐户的合同地址。

    帐户内资产(或任何其他跟踪合同)的所有权可通过正常的ERC721传输机制进行转移。

    功能

    nft锁

    如果设置了“NFT锁”,则当账户归NFT所有时,取款被禁用。这是为了冻结帐户,同时在非金融交易市场上市。所有权转移时,所有者从注册表注销帐户以访问资产。

    时间锁定

    不可撤销的时间锁可应用于帐户。如果时间锁的时间戳在将来,则当取款被禁用时。当时间戳在过去时,将启用取款(对其他锁,如NFT锁,也将被解锁)。可证明的是,<72a>在智能合约注册表中注册一个兼容的智能锁。爱丽丝在一个非金融交易市场上存款。

    用户故事

    设置。

    Bob检查市场上的非金融交易,并检查与非金融交易相关的资产。

    Bob在市场上购买NFT,NFT的所有权转移给Bob。Bob可立即提取任何或全部资产。在NFT所有权转移后,Alice无法访问这些资产。

    我们使用可选的第三方分析cookies来了解您如何使用GitHub.com网站所以我们可以制造更好的产品。了解更多。

    基本cookies

    1. 在配置中更新提供程序url/默认值.json
    2. 在env中设置DEPLOYMENT_ACCOUNT_KEY在根部署中创建一个.env文件_ACCOUNT_KEY=“my memmonic phrase”
    3. 如果要执行arb-truffle migrate–reset–network mainnet/ropsten,请部署您自己的合同
    4. Deploy you own contracts if want to do arb-
      truffle migrate --reset --network mainnet/ropsten 

    我们使用可选的第三方分析cookies来了解您如何使用GitHub.com网站所以我们可以制造更好的产品。
    您可以随时通过单击页面底部的Cookie首选项来更新您的选择。有关更多信息,请参阅我们的隐私声明。

    部分转自网络,侵权联系删除区块链源码网

    www.interchains.cc

    https://www.interchains.cc/18143.html

    区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 !
    区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » sol-nft-wrap – sol nft包装区块链毕设代写

    提供最优质的资源集合

    立即查看 了解详情