基于区块链的毕业设计ethereum-nft-activity – 以太坊nft活动

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计ethereum-nft-activity – 以太坊nft活动 是一篇很好的国外资料

ethereum-nft-activity

How much energy does it take to power popular Ethereum-backed CryptoArt platforms? And what emissions are associated with this energy use?

These questions do not have clear answers for two reasons:

  1. The overall energy usage and emissions of Ethereum are hard to estimate. I am working on this in a separate repo: kylemcdonald/ethereum-energy
  2. The portion for which a specific user, platform, or transaction might be considered “responsible” is more of a philosophical question than a technical one. Like many complex systems, there is an indirect relationship between the service and the emissions. I am working on different approaches in this notebook: Per-Transaction Models

This table represents one method for computing emissions, as of October 8, 2021. The methodology is described below.

Name Gas Transactions kgCO2
Art Blocks 8756400546 73620 3336893
Async 2682742201 23928 905177
Foundation 70824065154 395269 31629583
KnownOrigin 11452164645 61186 3977724
Makersplace 32657198905 110226 10932105
Nifty Gateway 1445519970 29279 661300
OpenSea 1592368367580 8888770 655648763
Rarible 171642953984 1246418 67217701
SuperRare 24336594302 251460 8772221
Zora 4085215807 15165 1844186

Preparation

First, sign up for an API key at Etherscan. Create env.json and add the API key. It should look like:

{     "etherscan-api-key": "<etherscan-api-key>" }

Install dependencies:

pip install -r requirements.txt

Note: this project requires Python 3.

contracts_footprint.py

This will pull all the transactions from Etherscan, sum the gas and transaction counts, and do a basic emissions estimate. Results are saved in the /output directory as JSON or TSV. Run the script with, for example: python contracts_footprint.py --verbose --tsv data/contracts.json data/nifty-gateway-contracts.json.

This may take longer the first time, while your local cache is updated. When updating after a week, it can take 5 minutes or more to download all new transactions. The entire cache can be multiple gigabytes.

This script has a few unique additional flags:

  • --summary to summarize the results in a format similar to the above table, combining multiple contracts into a single row of output.
  • --startdate and --enddate can be used to only analyze a specific date range, using the format YYYY-MM-DD.
  • --tsv will save the results of analysis as a TSV file instead of JSON.

contracts_history.py

This will pull all the transactions from Etherscan, sum the transaction fees and gas used, and group by day and platform. Results are saved in the /output directory as CSV files. Run the script with, for example: python contracts_history.py --verbose data/contracts.json data/nifty-gateway-contracts.json

The most recent results are cached in the gh_pages branch.

Additional flags

Both scripts have these shared additional flags:

  • --noupdate runs from cached results. This will not make any requests to Nifty Gateway or Etherscan. When using the Etherscan class in code without an API key, this is the default behavior.
  • --verbose prints progress when scraping Nifty Gateway or pulling transactions from Etherscan.

Helper scripts

  • python ethereum_stats.py will pull stats from Etherscan like daily fees and block rewards and save them to data/ethereum-stats.json
  • python nifty_gateway.py will scrape all the contracts from Nifty Gateway and save them to data/nifty-gateway-contracts.json

Methodology

The footprint of a platform is the sum of the footprints for all artwork on the platform. Most platforms use a few Ethereum contracts to handle all artworks. For each contract, we download all the transactions associated with the contract from Etherscan. Then for each transaction, we compute the kgCO2/gas footprint for that day, based on three values:

  1. The emissions intensity in kgCO2/kWh for the entire Ethereum network. This is an average of the emissions intensity for each mining pool in 2019, weighted by their percentage of the hashrate.
  2. The total power used during that day, estimated by Digiconomist.
  3. The total gas used during that day, measured by Etherscan.

The total kgCO2 for a platform is equal to the sum of the gas used for each transaction times the kgCO2/gas on that day. Finally, we add 20% to handle “network inefficiencies and unnaccounted for mining pools” as originally described by Offsetra. Offsetra has since removed this 20% from their method.

Sources

Contracts are sourced from a combination of personal research and DappRadar.

When possible, we have confirmed contract coverage directly with the marketplaces. Confirmed contracts include:

  • SuperRare: all confirmed
  • Foundation: all confirmed
  • OpenSea: some contracts on DappRadar have not been confirmed
  • Nifty Gateway: all confirmed

Limitations

  • Digiconomist’s Bitcoin estimates have been criticized as low (5x too low) or high (2x too high) compared to other estimates. It may be possible to make a more accurate estimate for Ethereum following a different methodology, based on the available mining hardware and corresponding power usage. That said, even the official Ethereum website references Digiconomist when discussing the power usage. Work on a more accurate bottom-up energy and emissions estimate for Ethereum is happening in kylemcdonald/ethereum-energy.
  • Mining pool locations and the corresponding emissions intensity may have changed significantly from the 2019 values. A full correction might correspond to a +/-50% change.

How to add more platforms

To modify this code so that it works with more platforms, add every possible contract and wallet for each platform to the data/contracts.json file, using the format:

'<Platform Name>/<Contract Name>': '<0xAddress>'

Additionally, any NFT-specific contracts (e.g. ERC-721 and compatible) should be added to the data/marketplaces-collectibles-games.json file, with a similar format.

Then submit a pull request back to this repository. Thanks in advance!

To track Cryptokitties, you will need to explicitly remove the Cryptokitties contract from the blocklist in etherscan.py. Cryptokitties are blocked by default because there is a collection of Momo Wang Cryptokitties that have been grafted onto the Nifty Gateway marketplace that would otherwise require this script to pull all Cryptokitties ever.

Contracts and Addresses

Contracts and addresses used by each platform can be found in data/contracts.json and are also listed here using python print_contracts.py to generate Markdown. Nifty Gateway contracts are listed separately in data/nifty-gateway-contracts.json.

Art Blocks

  • Deployer 2020-11-27 to 2021-05-15
  • GenArt721 2020-11-27 to 2021-05-16
  • GenArt721Core 2020-12-12 to 2021-05-17

Async

  • ASYNC 2020-02-25 to 2021-05-02
  • ASYNC-V2 2020-07-21 to 2021-05-03

Foundation

  • ERC-721 2021-01-13 to 2021-05-03
  • FND NFT (FNDNFT) ERC-20 2021-01-13 to 2021-05-03

KnownOrigin

  • ArtistAcceptingBids 2018-10-23 to 2020-11-13
  • ArtistAcceptingBidsV2 2019-02-26 to 2021-05-03
  • ArtistEditionControls 2018-11-07 to 2020-07-07
  • ArtistEditionControlsV2 2019-02-26 to 2021-05-03
  • KnownOrigin Token 2018-09-04 to 2021-05-03
  • KnownOriginDigitalAsset 2018-04-04 to 2021-04-18
  • SelfServiceAccessControls 2019-04-25 to 2021-05-02
  • SelfServiceEditionCuration 2019-04-08 to 2020-07-07
  • SelfServiceEditionCurationV2 2019-04-25 to 2020-07-07
  • SelfServiceEditionCurationV3 2019-04-30 to 2020-07-07

Makersplace

  • DigitalMediaCore 2019-03-11 to 2021-05-03
  • Unknown 1 2019-02-26 to 2020-07-29
  • Unknown 2 2020-02-24 to 2021-05-01

Nifty Gateway

  • GUSD cashout 2020-01-31 to 2021-05-02

OpenSea

  • OpenSea Shared Storefront (OPENSTORE) 2020-12-02 to 2021-05-03
  • OpenSea Token (OPT) 2021-02-05 to 2021-04-29
  • OpenSeaENSResolver 2019-06-27 to 2020-07-03
  • SaleClockAuction 2018-01-08 to 2021-03-04
  • Unknown 1 2018-02-15 to 2020-06-18
  • Unknown 2 2018-04-03 to 2019-07-14
  • Wallet 2018-01-02 to 2021-05-03
  • Wyvern Exchange 2018-06-12 to 2021-05-03
  • WyvernProxyRegistry 2018-06-12 to 2021-05-03

Rarible

  • ERC1155Sale 1 2020-05-27 to 2020-10-11
  • ERC1155Sale 2 2020-09-03 to 2021-04-23
  • ERC721Sale 2020-09-03 to 2021-01-22
  • Exchange V1 2020-11-17 to 2021-05-03
  • MintableToken 1 2019-10-18 to 2021-03-06
  • MintableToken 2 2019-12-23 to 2021-04-29
  • MintableToken 3 2020-05-27 to 2021-05-03
  • RariToken 2020-07-14 to 2021-05-03
  • RaribleToken 2020-05-27 to 2021-05-03
  • TokenSale 2019-10-24 to 2020-08-31
  • Unknown 1 2020-05-27 to 2020-09-12

SuperRare

  • Bids 2019-09-04 to 2021-05-03
  • SupeRare (SUPR) 2018-04-01 to 2021-05-03
  • SuperRareV2 (SUPR) 2019-09-04 to 2021-05-03
  • Unknown 1 2020-12-05 to 2021-05-03
  • Unknown 2 2020-12-05 to 2021-05-03

Zora

  • Market 2020-12-31 to 2020-12-31
  • Media (ZORA) 2020-12-31 to 2021-05-03

准备

支持以太坊eth的加密艺术平台需要多少能量?什么样的排放与这种能源使用有关

由于两个原因,这些问题没有明确的答案:

  1. 特定用户、平台或交易可能被视为“负责”的部分与其说是技术问题,不如说是一个哲学问题。与许多复杂系统一样,服务和排放之间存在间接关系。在本笔记本中,我正在研究不同的方法:按交易模型–summary,以类似于上表的格式总结结果,将多个合同组合成一行输出
  2. –startdate和–enddate只能用于分析特定的日期范围,使用YYYY-MM-DD格式。

截至2021年10月8日,此表代表了一种计算排放量的方法。下文介绍了该方法

Name Gas Transactions kgCO2
395269 < /TD > 31629583</TD > < TyrNigigin < /TD > 11452164645 < /TD > 61186
3977724 Makerplace 32657198905 110226
10932105 1445519970 29279 661300
OpenSea 67217701 61186 3977724
Makersplace 32657198905 110226 10932105
Nifty Gateway 1445519970 29279 661300
OpenSea 1592368367580 8888770 655648763
Rarible 171642953984 1246418 67217701
SuperRare 24336594302 251460 8772221
Zora 4085215807 15165 1844186

合同

首先,在Etherscan注册API密钥。创建env.json并添加API密钥。它应该是这样的:

{     "etherscan-api-key": "<etherscan-api-key>" }

安装依赖项:

pip install -r requirements.txt

注意:此项目需要Python 3

辅助脚本

这将从Etherscan中提取所有事务,将气体和事务计数相加,并进行基本排放估计。结果以JSON或TSV的形式保存在/output目录中。运行脚本,例如:python contracts_footprint.py–verbose–tsv data/contracts.json data/nifty-gateway-contracts.json

第一次更新本地缓存时,这可能需要更长的时间。一周后更新时,下载所有新事务可能需要5分钟或更长时间。整个缓存可以是多个千兆字节

此脚本有几个独特的附加标志:

  • –tsv将分析结果保存为tsv文件,而不是JSON文件
  • –noupdate从缓存结果运行。这不会向Nifty Gateway或Etherscan发出任何请求。在没有API密钥的代码中使用Etherscan类时,这是默认行为
  • –verbose在抓取漂亮的网关或从Etherscan提取事务时打印进度

来源

这将从Etherscan提取所有交易,合计交易费用和使用的气体,并按天和平台分组。结果作为CSV文件保存在/output目录中。运行脚本,例如:python contracts_history.py–verbose data/contracts.json data/nifty-gateway-contracts.json

最新的结果缓存在gh_pages分支中

限制

两个脚本都有这些共享的附加标志:

  • python-ethereum_-stats.py将从Etherscan中提取统计数据,如每日费用和区块奖励,并将其保存到data/ethereum-stats.json
  • python-nifty_-gateway.py将从nifty-gateway中删除所有合同,并将其保存到data/nifty-gateway-contracts.json

合同和地址

  • 整个行业的排放强度(单位为kgCO2/kWh)以太坊eth网络。这是2019年各采矿池排放强度的平均值,以其占排放率的百分比加权
  • 数学家估计的当天使用的总功率

艺术块

平台的封装外形是平台上所有艺术品的封装外形的总和。大多数平台使用一些以太坊eth合同来处理所有艺术品。对于每个合同,我们从Etherscan下载与合同相关的所有事务。然后,对于每笔交易,我们根据三个值计算当天的kgCO2/气体足迹:

  1. 当天使用的总气体,以太扫描测量
  2. 超稀有:所有已确认的
  3. 基础:所有已确认的

平台的总kgCO2等于每笔交易所用气体的总和乘以当天的kgCO2/气体。最后,我们添加了20%来处理Offsetra最初描述的“网络效率低下和未计算的挖掘池”。Offsetra从他们的方法中删除了这20%

基础

合同来源于个人研究和DappRadar的组合

如果可能,我们已直接与市场确认合同覆盖范围。确认的合同包括:

  • OpenSea:DappRadar的一些合同尚未确认
  • 漂亮网关:所有已确认的
  • 数字经济学家的BTC估值与其他估值相比被批评为低(5倍太低)或高(2倍太高)。根据可用的挖掘硬件和相应的电源使用情况,可以采用不同的方法对以太坊eth进行更准确的估计。这就是说,即使是以太坊eth官方网站在讨论电力使用时也引用了数字经济学。kylemcdonald/以太坊eth能源公司正在为以太坊eth能源公司进行更准确的自下而上能源和排放估算
  • 采矿池位置和相应的排放强度可能与2019年的值相比发生了显著变化。完全校正可能对应于+/-50%的变化

Limitations

  • 部署器2020-11-27至2021-05-15
  • GenArt721 2020-11-27至2021-05-16

How to add more platforms

要修改此代码,使其与更多平台协同工作,请使用以下格式将每个平台的所有可能合同和钱包添加到data/contracts.json文件中:

'<Platform Name>/<Contract Name>': '<0xAddress>'

此外,任何NFT特定合同(如ERC-721和兼容的)应以类似格式添加到data/marketplaces-collectibles-games.json文件中

然后将拉取请求提交回该存储库。提前谢谢

要跟踪Cryptokitties,您需要从etherscan.py中的区块列表中显式删除Cryptokitties合约。Cryptokitties在默认情况下被阻止,因为有一组Momo Wang Cryptokitties已被移植到Nifty Gateway marketplace,否则将需要此脚本拉取所有Cryptokitties

Contracts and Addresses

每个平台使用的合同和地址可以在data/Contracts.json中找到,这里还列出了使用python print_Contracts.py生成降价的合同和地址。Nifty网关合同在data/Nifty-Gateway-contracts.json中单独列出

Art Blocks

  • ERC-721 2021-01-13至2021-05-03ERC-20 2021-01-13至2021-05-03艺术接受投标2018-10-23至2020-11-13艺术接受投标2019-02-26至2021-05-03艺术接受投标2018-11-07至2020-07-07控制2018-11-07艺术接受投标2019-02-26至2021-05-03KnownOrigindigitalAset 2018-04-04至2021-04-18自助服务访问控制2019-04-25至2021-05-02自助服务编辑策划2019-04-08至2020-07-07
  • 自助服务编辑策划v2 2019-04-25至2020-07-07
  • DigitalMediaCore 2019-03-11至2021-05-03

Async

  • 未知2019-02-26至2020-07-29
  • OpenSea代币(OPT)2021-02-05至2021-04-29

Foundation

  • OpenSeaENSResolver 2019-06-27至2020-07-03
  • 钱包2018-01-02至2021-05-03WyvernProxyRegistry 2018-06-12至2021-05-03

KnownOrigin

  • MintableToken 3 2020-05-27至2021-05-03
  • RariToken 2020-07-14至2021-05-03
  • 代币销售2019-10-24至2020-08-31
  • 2019-09-04至2021-05-03的投标(SUPR)2018-04-01至2021-05-03
  • 超级富豪2(SUPR)2019-09-04至2021-05-03
  • 未知1 2020-12-05至2021-05-03
  • 媒体(ZORA)2020-123~2021-05-03T/> TT>>8756400546</TD>73620</TD>TD><>2682742201</TD>TD>23928</TD>TD>905177</TD>TD>基金< < /TD>70824065154 < /TD > 395269 < /TD >

    31629583</TD > < TyrNigigin < /TD >

    11452164645 < /TD >

    61186 3977724 Makerplace 32657198905 110226 10932105

    漂亮的网关 1445519970 29279 661300 OpenSea

    1592368367580

    67217701

    超稀有

    24336594302

    251460

    8772221

    佐拉

    4085215807

    15165

    1844186

  • SelfServiceEditionCuration 2019-04-08 to 2020-07-07
  • SelfServiceEditionCurationV2 2019-04-25 to 2020-07-07
  • SelfServiceEditionCurationV3 2019-04-30 to 2020-07-07

Makersplace

  • DigitalMediaCore 2019-03-11 to 2021-05-03
  • Unknown 1 2019-02-26 to 2020-07-29
  • Unknown 2 2020-02-24 to 2021-05-01

Nifty Gateway

  • GUSD cashout 2020-01-31 to 2021-05-02

OpenSea

  • OpenSea Shared Storefront (OPENSTORE) 2020-12-02 to 2021-05-03
  • OpenSea Token (OPT) 2021-02-05 to 2021-04-29
  • OpenSeaENSResolver 2019-06-27 to 2020-07-03
  • SaleClockAuction 2018-01-08 to 2021-03-04
  • Unknown 1 2018-02-15 to 2020-06-18
  • Unknown 2 2018-04-03 to 2019-07-14
  • Wallet 2018-01-02 to 2021-05-03
  • Wyvern Exchange 2018-06-12 to 2021-05-03
  • WyvernProxyRegistry 2018-06-12 to 2021-05-03

Rarible

  • ERC1155Sale 1 2020-05-27 to 2020-10-11
  • ERC1155Sale 2 2020-09-03 to 2021-04-23
  • ERC721Sale 2020-09-03 to 2021-01-22
  • Exchange V1 2020-11-17 to 2021-05-03
  • MintableToken 1 2019-10-18 to 2021-03-06
  • MintableToken 2 2019-12-23 to 2021-04-29
  • MintableToken 3 2020-05-27 to 2021-05-03
  • RariToken 2020-07-14 to 2021-05-03
  • RaribleToken 2020-05-27 to 2021-05-03
  • TokenSale 2019-10-24 to 2020-08-31
  • Unknown 1 2020-05-27 to 2020-09-12

SuperRare

  • Bids 2019-09-04 to 2021-05-03
  • SupeRare (SUPR) 2018-04-01 to 2021-05-03
  • SuperRareV2 (SUPR) 2019-09-04 to 2021-05-03
  • Unknown 1 2020-12-05 to 2021-05-03
  • Unknown 2 2020-12-05 to 2021-05-03

Zora

  • Market 2020-12-31 to 2020-12-31
  • Media (ZORA) 2020-12-31 to 2021-05-03

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

www.interchains.cc

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

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

提供最优质的资源集合

立即查看 了解详情