<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>tuzi</title>
        <link>https://paragraph.com/@binancezh-2</link>
        <description>undefined</description>
        <lastBuildDate>Fri, 05 Jun 2026 02:54:29 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <image>
            <title>tuzi</title>
            <url>https://storage.googleapis.com/papyrus_images/38180e7b9bffd6288299c50cad8c83d4f48d8fde1494629c2cdf31558f2ef4b9.jpg</url>
            <link>https://paragraph.com/@binancezh-2</link>
        </image>
        <copyright>All rights reserved</copyright>
        <item>
            <title><![CDATA[Alchemy第三周]]></title>
            <link>https://paragraph.com/@binancezh-2/alchemy-2</link>
            <guid>PjzBgvylNTvyjt09Yu76</guid>
            <pubDate>Wed, 10 Aug 2022 18:02:56 GMT</pubDate>
            <description><![CDATA[管理员运行ubuntu 运行创新新文件夹mkdir ChainBattled cd ChainBattled 运行创建成功之后运行npm install @openzeppelin/contracts 运行后界面打开codecode . 删除这两个文件夹下的2个文件修改 hardhat.config.js 内容为：修改 hardhat.config.js 内容为：require("dotenv").config(); require("@nomiclabs/hardhat-waffle"); require("@nomiclabs/hardhat-etherscan"); module.exports = { solidity: "0.8.10", networks: { mumbai: { url: process.env.TESTNET_RPC, accounts: [process.env.PRIVATE_KEY] }, }, etherscan: { apiKey: process.env.POLYGONSCAN_API_KEY } }; 在 contracts 文件夹中...]]></description>
            <content:encoded><![CDATA[<p>管理员运行ubuntu</p><p>运行创新新文件夹</p><pre data-type="codeBlock" text="mkdir ChainBattled
cd  ChainBattled
"><code><span class="hljs-built_in">mkdir</span> ChainBattled
<span class="hljs-built_in">cd</span>  ChainBattled
</code></pre><p>运行</p><pre data-type="codeBlock" text="npx hardhat
"><code></code></pre><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/03d81e15076547daf9c7f412f9043d03b33f85b24f7f2989ec56c154409980ef.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>创建成功之后运行</p><pre data-type="codeBlock" text="npm install @openzeppelin/contracts
"><code>npm install @openzeppelin/contracts
</code></pre><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/5259d9951857a113f13666b3879caa8488efe5da1005caceaf2cc032dfcd1ab9.png" alt="运行后界面" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">运行后界面</figcaption></figure><p>打开code</p><pre data-type="codeBlock" text="code .
"><code><span class="hljs-selector-tag">code</span> .
</code></pre><p>删除这两个文件夹下的2个文件修改 hardhat.config.js 内容为：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/fa7705fd2e8030c8ae892280bb0e5bedb2ae1a0790c2c549b8350c0f76341b65.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>修改 hardhat.config.js 内容为：</p><pre data-type="codeBlock" text="require(&quot;dotenv&quot;).config();
require(&quot;@nomiclabs/hardhat-waffle&quot;);
require(&quot;@nomiclabs/hardhat-etherscan&quot;);

module.exports = {
  solidity: &quot;0.8.10&quot;,
  networks: {
    mumbai: {
      url: process.env.TESTNET_RPC,
      accounts: [process.env.PRIVATE_KEY]
    },
  },
  etherscan: {
    apiKey: process.env.POLYGONSCAN_API_KEY
  }
};
"><code><span class="hljs-built_in">require</span>(<span class="hljs-string">"dotenv"</span>).config();
<span class="hljs-built_in">require</span>(<span class="hljs-string">"@nomiclabs/hardhat-waffle"</span>);
<span class="hljs-built_in">require</span>(<span class="hljs-string">"@nomiclabs/hardhat-etherscan"</span>);

module.exports <span class="hljs-operator">=</span> {
  solidity: <span class="hljs-string">"0.8.10"</span>,
  networks: {
    mumbai: {
      url: process.env.TESTNET_RPC,
      accounts: [process.env.PRIVATE_KEY]
    },
  },
  etherscan: {
    apiKey: process.env.POLYGONSCAN_API_KEY
  }
};
</code></pre><p>在 contracts 文件夹中，创建一个新文件并将其命名为“ChainBattles.sol” 文件内容为：</p><pre data-type="codeBlock" text="// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import &quot;@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol&quot;;
import &quot;@openzeppelin/contracts/utils/Counters.sol&quot;;
import &quot;@openzeppelin/contracts/utils/Strings.sol&quot;;
import &quot;@openzeppelin/contracts/utils/Base64.sol&quot;;

contract ChainBattles is ERC721URIStorage  {
    using Strings for uint256;
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;

    mapping(uint256 =&gt; uint256) public tokenIdToLevels;

    constructor() ERC721 (&quot;Chain Battles&quot;, &quot;CBTLS&quot;){
    }

    function generateCharacter(uint256 tokenId) public view returns(string memory){
        bytes memory svg = abi.encodePacked(
             &apos;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; preserveAspectRatio=&quot;xMinYMin meet&quot; viewBox=&quot;0 0 350 350&quot;&gt;&apos;,
             &apos;&lt;style&gt;.base { fill: white; font-family: serif; font-size: 14px; }&lt;/style&gt;&apos;,
             &apos;&lt;rect width=&quot;100%&quot; height=&quot;100%&quot; fill=&quot;black&quot; /&gt;&apos;,
             &apos;&lt;text x=&quot;50%&quot; y=&quot;40%&quot; class=&quot;base&quot; dominant-baseline=&quot;middle&quot; text-anchor=&quot;middle&quot;&gt;&apos;,&quot;Warrior&quot;,&apos;&lt;/text&gt;&apos;,
             &apos;&lt;text x=&quot;50%&quot; y=&quot;50%&quot; class=&quot;base&quot; dominant-baseline=&quot;middle&quot; text-anchor=&quot;middle&quot;&gt;&apos;, &quot;Levels: &quot;,getLevels(tokenId),&apos;&lt;/text&gt;&apos;,
             &apos;&lt;/svg&gt;&apos;
        );
        return string(
            abi.encodePacked(
                &quot;data:image/svg+xml;base64,&quot;,
                Base64.encode(svg)
            ));
    }   
    
    function getLevels(uint256 tokenId) public view returns (string memory){
        uint256 levels = tokenIdToLevels[tokenId];
        return levels.toString();
    }

    function getTokenURI(uint256 tokenId) public view returns (string memory){
        bytes memory dataURI = abi.encodePacked(
             &apos;{&apos;,
                 &apos;&quot;name&quot;: &quot;Chain Battles #&apos;, tokenId.toString(), &apos;&quot;,&apos;,
                 &apos;&quot;description&quot;: &quot;Battles on chain&quot;,&apos;,
                 &apos;&quot;image&quot;: &quot;&apos;, generateCharacter(tokenId), &apos;&quot;&apos;,
              &apos;}&apos;
        );
        return string(
            abi.encodePacked(
                &quot;data:application/json;base64,&quot;,
                Base64.encode(dataURI)
            )
        );
    }

    function mint() public {
        _tokenIds.increment();
        uint256 newItemId = _tokenIds.current();
        _safeMint(msg.sender, newItemId);
        tokenIdToLevels[newItemId] = 0;
        _setTokenURI(newItemId, getTokenURI(newItemId));
    }

    function train(uint256 tokenId) public {
        require(_exists(tokenId));
        require(ownerOf(tokenId) == msg.sender, &quot;You must own this token to train it&quot;);
        uint256 currentLevel = tokenIdToLevels[tokenId];
        tokenIdToLevels[tokenId] = currentLevel + 1;
        _setTokenURI(tokenId, getTokenURI(tokenId));
    }
}
"><code><span class="hljs-comment">// SPDX-License-Identifier: MIT</span>
<span class="hljs-meta"><span class="hljs-keyword">pragma</span> <span class="hljs-keyword">solidity</span> ^0.8.0;</span>

<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/utils/Counters.sol"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/utils/Strings.sol"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/utils/Base64.sol"</span>;

<span class="hljs-class"><span class="hljs-keyword">contract</span> <span class="hljs-title">ChainBattles</span> <span class="hljs-keyword">is</span> <span class="hljs-title">ERC721URIStorage</span>  </span>{
    <span class="hljs-keyword">using</span> <span class="hljs-title">Strings</span> <span class="hljs-title"><span class="hljs-keyword">for</span></span> <span class="hljs-title"><span class="hljs-keyword">uint256</span></span>;
    <span class="hljs-keyword">using</span> <span class="hljs-title">Counters</span> <span class="hljs-title"><span class="hljs-keyword">for</span></span> <span class="hljs-title">Counters</span>.<span class="hljs-title">Counter</span>;
    Counters.Counter <span class="hljs-keyword">private</span> _tokenIds;

    <span class="hljs-keyword">mapping</span>(<span class="hljs-keyword">uint256</span> <span class="hljs-operator">=</span><span class="hljs-operator">></span> <span class="hljs-keyword">uint256</span>) <span class="hljs-keyword">public</span> tokenIdToLevels;

    <span class="hljs-function"><span class="hljs-keyword">constructor</span>(<span class="hljs-params"></span>) <span class="hljs-title">ERC721</span> (<span class="hljs-params"><span class="hljs-string">"Chain Battles"</span>, <span class="hljs-string">"CBTLS"</span></span>)</span>{
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">generateCharacter</span>(<span class="hljs-params"><span class="hljs-keyword">uint256</span> tokenId</span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> <span class="hljs-title"><span class="hljs-keyword">view</span></span> <span class="hljs-title"><span class="hljs-keyword">returns</span></span>(<span class="hljs-params"><span class="hljs-keyword">string</span> <span class="hljs-keyword">memory</span></span>)</span>{
        <span class="hljs-keyword">bytes</span> <span class="hljs-keyword">memory</span> svg <span class="hljs-operator">=</span> <span class="hljs-built_in">abi</span>.<span class="hljs-built_in">encodePacked</span>(
             <span class="hljs-string">'&#x3C;svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350">'</span>,
             <span class="hljs-string">'&#x3C;style>.base { fill: white; font-family: serif; font-size: 14px; }&#x3C;/style>'</span>,
             <span class="hljs-string">'&#x3C;rect width="100%" height="100%" fill="black" />'</span>,
             <span class="hljs-string">'&#x3C;text x="50%" y="40%" class="base" dominant-baseline="middle" text-anchor="middle">'</span>,<span class="hljs-string">"Warrior"</span>,<span class="hljs-string">'&#x3C;/text>'</span>,
             <span class="hljs-string">'&#x3C;text x="50%" y="50%" class="base" dominant-baseline="middle" text-anchor="middle">'</span>, <span class="hljs-string">"Levels: "</span>,getLevels(tokenId),<span class="hljs-string">'&#x3C;/text>'</span>,
             <span class="hljs-string">'&#x3C;/svg>'</span>
        );
        <span class="hljs-keyword">return</span> <span class="hljs-keyword">string</span>(
            <span class="hljs-built_in">abi</span>.<span class="hljs-built_in">encodePacked</span>(
                <span class="hljs-string">"data:image/svg+xml;base64,"</span>,
                Base64.encode(svg)
            ));
    }   
    
    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getLevels</span>(<span class="hljs-params"><span class="hljs-keyword">uint256</span> tokenId</span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> <span class="hljs-title"><span class="hljs-keyword">view</span></span> <span class="hljs-title"><span class="hljs-keyword">returns</span></span> (<span class="hljs-params"><span class="hljs-keyword">string</span> <span class="hljs-keyword">memory</span></span>)</span>{
        <span class="hljs-keyword">uint256</span> levels <span class="hljs-operator">=</span> tokenIdToLevels[tokenId];
        <span class="hljs-keyword">return</span> levels.toString();
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getTokenURI</span>(<span class="hljs-params"><span class="hljs-keyword">uint256</span> tokenId</span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> <span class="hljs-title"><span class="hljs-keyword">view</span></span> <span class="hljs-title"><span class="hljs-keyword">returns</span></span> (<span class="hljs-params"><span class="hljs-keyword">string</span> <span class="hljs-keyword">memory</span></span>)</span>{
        <span class="hljs-keyword">bytes</span> <span class="hljs-keyword">memory</span> dataURI <span class="hljs-operator">=</span> <span class="hljs-built_in">abi</span>.<span class="hljs-built_in">encodePacked</span>(
             <span class="hljs-string">'{'</span>,
                 <span class="hljs-string">'"name": "Chain Battles #'</span>, tokenId.toString(), <span class="hljs-string">'",'</span>,
                 <span class="hljs-string">'"description": "Battles on chain",'</span>,
                 <span class="hljs-string">'"image": "'</span>, generateCharacter(tokenId), <span class="hljs-string">'"'</span>,
              <span class="hljs-string">'}'</span>
        );
        <span class="hljs-keyword">return</span> <span class="hljs-keyword">string</span>(
            <span class="hljs-built_in">abi</span>.<span class="hljs-built_in">encodePacked</span>(
                <span class="hljs-string">"data:application/json;base64,"</span>,
                Base64.encode(dataURI)
            )
        );
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">mint</span>(<span class="hljs-params"></span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> </span>{
        _tokenIds.increment();
        <span class="hljs-keyword">uint256</span> newItemId <span class="hljs-operator">=</span> _tokenIds.current();
        _safeMint(<span class="hljs-built_in">msg</span>.<span class="hljs-built_in">sender</span>, newItemId);
        tokenIdToLevels[newItemId] <span class="hljs-operator">=</span> <span class="hljs-number">0</span>;
        _setTokenURI(newItemId, getTokenURI(newItemId));
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">train</span>(<span class="hljs-params"><span class="hljs-keyword">uint256</span> tokenId</span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> </span>{
        <span class="hljs-built_in">require</span>(_exists(tokenId));
        <span class="hljs-built_in">require</span>(ownerOf(tokenId) <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-built_in">msg</span>.<span class="hljs-built_in">sender</span>, <span class="hljs-string">"You must own this token to train it"</span>);
        <span class="hljs-keyword">uint256</span> currentLevel <span class="hljs-operator">=</span> tokenIdToLevels[tokenId];
        tokenIdToLevels[tokenId] <span class="hljs-operator">=</span> currentLevel <span class="hljs-operator">+</span> <span class="hljs-number">1</span>;
        _setTokenURI(tokenId, getTokenURI(tokenId));
    }
}
</code></pre><p>运行</p><pre data-type="codeBlock" text="touch .env
"><code><span class="hljs-built_in">touch</span> .<span class="hljs-built_in">env</span>
</code></pre><p>在code上修改.env内容为：</p><pre data-type="codeBlock" text="TESTNET_RPC=&quot;&quot;
PRIVATE_KEY=&quot;&quot;
POLYGONSCAN_API_KEY=&quot;&quot;
"><code><span class="hljs-attr">TESTNET_RPC</span>=<span class="hljs-string">""</span>
<span class="hljs-attr">PRIVATE_KEY</span>=<span class="hljs-string">""</span>
<span class="hljs-attr">POLYGONSCAN_API_KEY</span>=<span class="hljs-string">""</span>
</code></pre><p>导航到<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.alchemy.com/">alchemy.com</a>并创建一个新的 Polygon Mumbai 应用程序，复制 API HTTP URL，并将 API 作为“ <strong>TESTNET_RPC</strong> ”</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/455dc03027dd6277dd41f81961dfa25ab42cad308107d87cd8395b804d4fc0f1.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/d6adf045900cef3f459b557c5909803137bcfb63973cddf33cfec6c1f886321a.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>PRIVATE_KEY为小狐狸私钥（新建账号）</p><p>POLYGONSCAN_API_KEY在下面网址中注册账号</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="http://polygonscan.com">polygonscan.com</a></p><p>注册后在新增key并复制填写在code中。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/97d1979e768f980fca73e0730710d6ad0523c98206dd5203b3b28cae0f672bcc.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>修改后如下图：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/48e4cb9262b9da843bb48155b7204d3eb34747ff048297b80632e4590b2de0cf.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>运行</p><pre data-type="codeBlock" text="npx hardhat compile
"><code>npx hardhat <span class="hljs-built_in">compile</span>
</code></pre><p>如出现下面报错，就运行，没遇到请忽略</p><pre data-type="codeBlock" text="npm install dotenv
npm install @nomiclabs/hardhat-waffle
"><code>npm install dotenv
npm install @nomiclabs<span class="hljs-operator">/</span>hardhat<span class="hljs-operator">-</span>waffle
</code></pre><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/5bacf420676077b7fe45d22533aa6b5d2d737be05eab5c7f262ee5de2bc2e5a8.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>运行成功npx hardhat compile后</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/8ef9889be9a53e6a7eeb8622dd1d9675d32d68fadac37448b5173c636977b19a.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>在scripts文件夹内新建文件 deploy.js内容为：</p><pre data-type="codeBlock" text="const main = async () =&gt; {
  try {
    const nftContractFactory = await hre.ethers.getContractFactory(
      &quot;ChainBattles&quot;
    );
    const nftContract = await nftContractFactory.deploy();
    await nftContract.deployed();

    console.log(&quot;Contract deployed to:&quot;, nftContract.address);
    process.exit(0);
  } catch (error) {
    console.log(error);
    process.exit(1);
  }
};
  
main();
"><code>const main <span class="hljs-operator">=</span> async () <span class="hljs-operator">=</span><span class="hljs-operator">></span> {
  <span class="hljs-keyword">try</span> {
    const nftContractFactory <span class="hljs-operator">=</span> await hre.ethers.getContractFactory(
      <span class="hljs-string">"ChainBattles"</span>
    );
    const nftContract <span class="hljs-operator">=</span> await nftContractFactory.deploy();
    await nftContract.deployed();

    console.log(<span class="hljs-string">"Contract deployed to:"</span>, nftContract.<span class="hljs-built_in">address</span>);
    process.exit(<span class="hljs-number">0</span>);
  } <span class="hljs-keyword">catch</span> (<span class="hljs-function"><span class="hljs-keyword">error</span>) </span>{
    console.log(<span class="hljs-function"><span class="hljs-keyword">error</span>)</span>;
    process.exit(<span class="hljs-number">1</span>);
  }
};
  
main();
</code></pre><p>保存后运行</p><pre data-type="codeBlock" text="npx hardhat run scripts/deploy.js --network mumbai
"><code>npx hardhat run scripts<span class="hljs-operator">/</span>deploy.js <span class="hljs-operator">-</span><span class="hljs-operator">-</span>network mumbai
</code></pre><p>运行成功后可以看到一个合约代码</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/4bc81a3655ad6abf68f20038109ebcedea64cbf8bef724769261b75369cc8282.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>去<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mumbai.polygonscan.com/">mumbai.polygonscan.com</a>搜索这个合约代码。</p><p>进入您的智能合约广告后，点击“标签”标签。</p><p>你会注意到不正常：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ffd40936e13de9bae57bef68fa8ea2f0d2da882fea67ba904c8cd4912294f8bc.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>回到终端运行<strong>验证码</strong></p><pre data-type="codeBlock" text="npx hardhat verify --network mumbai YOUR_SMARTCONTRACT_ADDRESS
"><code>npx hardhat verify <span class="hljs-operator">-</span><span class="hljs-operator">-</span>network mumbai YOUR_SMARTCONTRACT_ADDRESS
</code></pre><p>通过仿制与您的智能合约</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/517161fb17549cc22333d5afeac54110dba9cc1485029bbeb069b84d864a0d2f.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>现在智能合约已经通过验证，mumbai.polygonscan.com 将在其附近显示一个小项目：</p><p>要用作使用，请并使用**第一个 FT 品牌的“第一次承包商”的“N 品牌”**，然后单击“连接到 Web3”</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/4893ede3180319560a7fd789701a928dd239e717ddf5c0595b00df53dd079ce9.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>然后“min​​​t”函数并点击写：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/9bae9433db5b9affc6bdfe28645d05f6c56a584339bc9b6f7f526a390a4bb6ce.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>这将显示一个弹出窗口，要求您支付毒气，点击个性化按钮。</p><p>恭喜！您刚刚开始制造您的第一个动态 NFT - 让我们到 OpenSea 测试网来现场查看它。</p><h2 id="h-opensea-nft" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">在 OpenSea 上查看您的动态 NFT</h2><p>复制智能合约地址，前往<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://testnets.opensea.io/">opensea.com</a>，并将其部署到街头搜索。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/27fba0dee62dc695e7e1fc76fce972f6764873d2924bbb125a5152239d562d59.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>如果一切正常，您现在应该会看到 NFT 显示在 OpenSea 上，其中包含动态图像、标题和描述。</p><p>让我们回到终端。</p><h2 id="h-nft-nft" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">更新动态 NFT 图像训练 NFT</h2><p>导航回<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mumbai.polygonscan.com/">孟买.polygonscan.com</a>，<strong>点击合同标签 &gt; 写合同</strong>并寻找“火车”功能。</p><p>插入您的 NFT 的 ID - 这种情况下为“1”，因为我们只生成了一个，然后**点击写入：**</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/d5e254fad165d80910ce9d418c0d015a7b8e51197822ef442caa7a4f906ef268.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://testnets.opensea.io/">然后回到testnets.opensea.com</a>并刷新页面：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/bac6ba912c35e43920d6c6f78e9f0d64b844527beee18983ac59b97c423310f2.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>完成任务填表。</p><p>重新刷新ft合同链接就可以了</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://alchemyapi.typeform.com/roadtoweekthree">alchemyapi.typeform.com/roadtoweekthree</a></p>]]></content:encoded>
            <author>binancezh-2@newsletter.paragraph.com (tuzi)</author>
        </item>
        <item>
            <title><![CDATA[Alchemy第二周教程]]></title>
            <link>https://paragraph.com/@binancezh-2/alchemy</link>
            <guid>XvLrZRk8UGC5tFqNXwL8</guid>
            <pubDate>Wed, 10 Aug 2022 12:07:49 GMT</pubDate>
            <description><![CDATA[电脑需要安装 ubuntu 和 visual studio code 安装后管理员 ubuntu 运行mkdir BuyMeACoffee-contracts cd BuyMeACoffee-contracts npm init -y npx hardhat 运行成功后选择第一个一直回车创建新项目完成后界面输入Code . 会跳转打开code软件 （code内容修改后都需要手动点击保存）右键重命名为 BuyMeACoffee.sol 把内容修改为：//SPDX-License-Identifier: Unlicense // contracts/BuyMeACoffee.sol pragma solidity ^0.8.0; // Switch this to your own contract address once deployed, for bookkeeping! // Example Contract Address on Goerli: 0xDBa03676a2fBb6711CB652beF5B7416A53c1421D contract BuyMeACoffee ...]]></description>
            <content:encoded><![CDATA[<p>电脑需要安装 ubuntu 和 visual studio code 安装后管理员 ubuntu 运行</p><pre data-type="codeBlock" text="mkdir BuyMeACoffee-contracts 
cd BuyMeACoffee-contracts

npm init -y

npx hardhat
"><code>mkdir BuyMeACoffee<span class="hljs-operator">-</span>contracts 
cd BuyMeACoffee<span class="hljs-operator">-</span>contracts

npm init <span class="hljs-operator">-</span>y

npx hardhat
</code></pre><p>运行成功后选择第一个一直回车创建新项目</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ade23d543d7590aee1c10a21ff9f14065981ee05295f5e9972a4b4f41b4ac9d0.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>完成后界面</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/82a0e5152e0ac693fb0b363efa1752718537322190cb00d78b4d4e0ce9af96bd.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>输入</p><pre data-type="codeBlock" text="Code .
"><code><span class="hljs-selector-tag">Code</span> .
</code></pre><p>会跳转打开code软件  （code内容修改后都需要手动点击保存）</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ef45af861226f8f2ba64249b1ad41e69b81ce9c7535d8dca24603d4d2e641c47.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>右键重命名为 BuyMeACoffee.sol</p><p>把内容修改为：</p><pre data-type="codeBlock" text="//SPDX-License-Identifier: Unlicense

// contracts/BuyMeACoffee.sol

pragma solidity ^0.8.0;

 

// Switch this to your own contract address once deployed, for bookkeeping!

// Example Contract Address on Goerli: 0xDBa03676a2fBb6711CB652beF5B7416A53c1421D

 

contract BuyMeACoffee {

    // Event to emit when a Memo is created.

    event NewMemo(

        address indexed from,

        uint256 timestamp,

        string name,

        string message

    );

    

    // Memo struct.

    struct Memo {

        address from;

        uint256 timestamp;

        string name;

        string message;

    }

    

    // Address of contract deployer. Marked payable so that

    // we can withdraw to this address later.

    address payable owner;

 

    // List of all memos received from coffee purchases.

    Memo[] memos;

 

    constructor() {

        // Store the address of the deployer as a payable address.

        // When we withdraw funds, we&apos;ll withdraw here.

        owner = payable(msg.sender);

    }

 

    /**

     * @dev fetches all stored memos

     */

    function getMemos() public view returns (Memo[] memory) {

        return memos;

    }

 

    /**

     * @dev buy a coffee for owner (sends an ETH tip and leaves a memo)

     * @param _name name of the coffee purchaser

     * @param _message a nice message from the purchaser

     */

    function buyCoffee(string memory _name, string memory _message) public payable {

        // Must accept more than 0 ETH for a coffee.

        require(msg.value &gt; 0, &quot;can&apos;t buy coffee for free!&quot;);

 

        // Add the memo to storage!

        memos.push(Memo(

            msg.sender,

            block.timestamp,

            _name,

            _message

        ));

 

        // Emit a NewMemo event with details about the memo.

        emit NewMemo(

            msg.sender,

            block.timestamp,

            _name,

            _message

        );

    }

 

    /**

     * @dev send the entire balance stored in this contract to the owner

     */

    function withdrawTips() public {

        require(owner.send(address(this).balance));

    }

}

 
"><code><span class="hljs-comment">//SPDX-License-Identifier: Unlicense</span>

<span class="hljs-comment">// contracts/BuyMeACoffee.sol</span>

<span class="hljs-meta"><span class="hljs-keyword">pragma</span> <span class="hljs-keyword">solidity</span> ^0.8.0;</span>

 

<span class="hljs-comment">// Switch this to your own contract address once deployed, for bookkeeping!</span>

<span class="hljs-comment">// Example Contract Address on Goerli: 0xDBa03676a2fBb6711CB652beF5B7416A53c1421D</span>

 

<span class="hljs-class"><span class="hljs-keyword">contract</span> <span class="hljs-title">BuyMeACoffee</span> </span>{

    <span class="hljs-comment">// Event to emit when a Memo is created.</span>

    <span class="hljs-function"><span class="hljs-keyword">event</span> <span class="hljs-title">NewMemo</span>(<span class="hljs-params">

        <span class="hljs-keyword">address</span> <span class="hljs-keyword">indexed</span> <span class="hljs-keyword">from</span>,

        <span class="hljs-keyword">uint256</span> timestamp,

        <span class="hljs-keyword">string</span> name,

        <span class="hljs-keyword">string</span> message

    </span>)</span>;

    

    <span class="hljs-comment">// Memo struct.</span>

    <span class="hljs-keyword">struct</span> <span class="hljs-title">Memo</span> {

        <span class="hljs-keyword">address</span> <span class="hljs-keyword">from</span>;

        <span class="hljs-keyword">uint256</span> timestamp;

        <span class="hljs-keyword">string</span> name;

        <span class="hljs-keyword">string</span> message;

    }

    

    <span class="hljs-comment">// Address of contract deployer. Marked payable so that</span>

    <span class="hljs-comment">// we can withdraw to this address later.</span>

    <span class="hljs-keyword">address</span> <span class="hljs-keyword">payable</span> owner;

 

    <span class="hljs-comment">// List of all memos received from coffee purchases.</span>

    Memo[] memos;

 

    <span class="hljs-function"><span class="hljs-keyword">constructor</span>(<span class="hljs-params"></span>) </span>{

        <span class="hljs-comment">// Store the address of the deployer as a payable address.</span>

        <span class="hljs-comment">// When we withdraw funds, we'll withdraw here.</span>

        owner <span class="hljs-operator">=</span> <span class="hljs-keyword">payable</span>(<span class="hljs-built_in">msg</span>.<span class="hljs-built_in">sender</span>);

    }

 

    <span class="hljs-comment">/**

     * @dev fetches all stored memos

     */</span>

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getMemos</span>(<span class="hljs-params"></span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> <span class="hljs-title"><span class="hljs-keyword">view</span></span> <span class="hljs-title"><span class="hljs-keyword">returns</span></span> (<span class="hljs-params">Memo[] <span class="hljs-keyword">memory</span></span>) </span>{

        <span class="hljs-keyword">return</span> memos;

    }

 

    <span class="hljs-comment">/**

     * @dev buy a coffee for owner (sends an ETH tip and leaves a memo)

     * @param _name name of the coffee purchaser

     * @param _message a nice message from the purchaser

     */</span>

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">buyCoffee</span>(<span class="hljs-params"><span class="hljs-keyword">string</span> <span class="hljs-keyword">memory</span> _name, <span class="hljs-keyword">string</span> <span class="hljs-keyword">memory</span> _message</span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> <span class="hljs-title"><span class="hljs-keyword">payable</span></span> </span>{

        <span class="hljs-comment">// Must accept more than 0 ETH for a coffee.</span>

        <span class="hljs-built_in">require</span>(<span class="hljs-built_in">msg</span>.<span class="hljs-built_in">value</span> <span class="hljs-operator">></span> <span class="hljs-number">0</span>, <span class="hljs-string">"can't buy coffee for free!"</span>);

 

        <span class="hljs-comment">// Add the memo to storage!</span>

        memos.<span class="hljs-built_in">push</span>(Memo(

            <span class="hljs-built_in">msg</span>.<span class="hljs-built_in">sender</span>,

            <span class="hljs-built_in">block</span>.<span class="hljs-built_in">timestamp</span>,

            _name,

            _message

        ));

 

        <span class="hljs-comment">// Emit a NewMemo event with details about the memo.</span>

        <span class="hljs-keyword">emit</span> NewMemo(

            <span class="hljs-built_in">msg</span>.<span class="hljs-built_in">sender</span>,

            <span class="hljs-built_in">block</span>.<span class="hljs-built_in">timestamp</span>,

            _name,

            _message

        );

    }

 

    <span class="hljs-comment">/**

     * @dev send the entire balance stored in this contract to the owner

     */</span>

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">withdrawTips</span>(<span class="hljs-params"></span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> </span>{

        <span class="hljs-built_in">require</span>(owner.<span class="hljs-built_in">send</span>(<span class="hljs-keyword">address</span>(<span class="hljs-built_in">this</span>).<span class="hljs-built_in">balance</span>));

    }

}

 
</code></pre><p>右键重命名为buy-coffee.js</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b6fc9d47cbc8b7c87f2ed1f6c17fc7c2bb373df21a33edee24d2ef059d162e89.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>内容修改为：</p><pre data-type="codeBlock" text="const hre = require(&quot;hardhat&quot;);

 

// Returns the Ether balance of a given address.

async function getBalance(address) {

  const balanceBigInt = await hre.waffle.provider.getBalance(address);

  return hre.ethers.utils.formatEther(balanceBigInt);

}

 

// Logs the Ether balances for a list of addresses.

async function printBalances(addresses) {

  let idx = 0;

  for (const address of addresses) {

    console.log(`Address ${idx} balance: `, await getBalance(address));

    idx ++;

  }

}

 

// Logs the memos stored on-chain from coffee purchases.

async function printMemos(memos) {

  for (const memo of memos) {

    const timestamp = memo.timestamp;

    const tipper = memo.name;

    const tipperAddress = memo.from;

    const message = memo.message;

    console.log(`At ${timestamp}, ${tipper} (${tipperAddress}) said: &quot;${message}&quot;`);

  }

}

 

async function main() {

  // Get the example accounts we&apos;ll be working with.

  const [owner, tipper, tipper2, tipper3] = await hre.ethers.getSigners();

 

  // We get the contract to deploy.

  const BuyMeACoffee = await hre.ethers.getContractFactory(&quot;BuyMeACoffee&quot;);

  const buyMeACoffee = await BuyMeACoffee.deploy();

 

  // Deploy the contract.

  await buyMeACoffee.deployed();

  console.log(&quot;BuyMeACoffee deployed to:&quot;, buyMeACoffee.address);

 

  // Check balances before the coffee purchase.

  const addresses = [owner.address, tipper.address, buyMeACoffee.address];

  console.log(&quot;== start ==&quot;);

  await printBalances(addresses);

 

  // Buy the owner a few coffees.

  const tip = {value: hre.ethers.utils.parseEther(&quot;1&quot;)};

  await buyMeACoffee.connect(tipper).buyCoffee(&quot;Carolina&quot;, &quot;You&apos;re the best!&quot;, tip);

  await buyMeACoffee.connect(tipper2).buyCoffee(&quot;Vitto&quot;, &quot;Amazing teacher&quot;, tip);

  await buyMeACoffee.connect(tipper3).buyCoffee(&quot;Kay&quot;, &quot;I love my Proof of Knowledge&quot;, tip);

 

  // Check balances after the coffee purchase.

  console.log(&quot;== bought coffee ==&quot;);

  await printBalances(addresses);

 

  // Withdraw.

  await buyMeACoffee.connect(owner).withdrawTips();

 

  // Check balances after withdrawal.

  console.log(&quot;== withdrawTips ==&quot;);

  await printBalances(addresses);

 

  // Check out the memos.

  console.log(&quot;== memos ==&quot;);

  const memos = await buyMeACoffee.getMemos();

  printMemos(memos);

}

 

// We recommend this pattern to be able to use async/await everywhere

// and properly handle errors.

main()

  .then(() =&gt; process.exit(0))

  .catch((error) =&gt; {

    console.error(error);

    process.exit(1);

  });
"><code>const hre <span class="hljs-operator">=</span> <span class="hljs-built_in">require</span>(<span class="hljs-string">"hardhat"</span>);

 

<span class="hljs-comment">// Returns the Ether balance of a given address.</span>

async <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getBalance</span>(<span class="hljs-params"><span class="hljs-keyword">address</span></span>) </span>{

  const balanceBigInt <span class="hljs-operator">=</span> await hre.waffle.provider.getBalance(<span class="hljs-keyword">address</span>);

  <span class="hljs-keyword">return</span> hre.ethers.utils.formatEther(balanceBigInt);

}

 

<span class="hljs-comment">// Logs the Ether balances for a list of addresses.</span>

async <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">printBalances</span>(<span class="hljs-params">addresses</span>) </span>{

  let idx <span class="hljs-operator">=</span> <span class="hljs-number">0</span>;

  <span class="hljs-keyword">for</span> (const <span class="hljs-keyword">address</span> of addresses) {

    console.log(`Address ${idx} balance: `, await getBalance(<span class="hljs-keyword">address</span>));

    idx <span class="hljs-operator">+</span><span class="hljs-operator">+</span>;

  }

}

 

<span class="hljs-comment">// Logs the memos stored on-chain from coffee purchases.</span>

async <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">printMemos</span>(<span class="hljs-params">memos</span>) </span>{

  <span class="hljs-keyword">for</span> (const memo of memos) {

    const timestamp <span class="hljs-operator">=</span> memo.timestamp;

    const tipper <span class="hljs-operator">=</span> memo.<span class="hljs-built_in">name</span>;

    const tipperAddress <span class="hljs-operator">=</span> memo.from;

    const message <span class="hljs-operator">=</span> memo.message;

    console.log(`At ${timestamp}, ${tipper} (${tipperAddress}) said: <span class="hljs-string">"${message}"</span>`);

  }

}

 

async <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>) </span>{

  <span class="hljs-comment">// Get the example accounts we'll be working with.</span>

  const [owner, tipper, tipper2, tipper3] <span class="hljs-operator">=</span> await hre.ethers.getSigners();

 

  <span class="hljs-comment">// We get the contract to deploy.</span>

  const BuyMeACoffee <span class="hljs-operator">=</span> await hre.ethers.getContractFactory(<span class="hljs-string">"BuyMeACoffee"</span>);

  const buyMeACoffee <span class="hljs-operator">=</span> await BuyMeACoffee.deploy();

 

  <span class="hljs-comment">// Deploy the contract.</span>

  await buyMeACoffee.deployed();

  console.log(<span class="hljs-string">"BuyMeACoffee deployed to:"</span>, buyMeACoffee.<span class="hljs-built_in">address</span>);

 

  <span class="hljs-comment">// Check balances before the coffee purchase.</span>

  const addresses <span class="hljs-operator">=</span> [owner.<span class="hljs-built_in">address</span>, tipper.<span class="hljs-built_in">address</span>, buyMeACoffee.<span class="hljs-built_in">address</span>];

  console.log(<span class="hljs-string">"== start =="</span>);

  await printBalances(addresses);

 

  <span class="hljs-comment">// Buy the owner a few coffees.</span>

  const tip <span class="hljs-operator">=</span> {<span class="hljs-built_in">value</span>: hre.ethers.utils.parseEther(<span class="hljs-string">"1"</span>)};

  await buyMeACoffee.connect(tipper).buyCoffee(<span class="hljs-string">"Carolina"</span>, <span class="hljs-string">"You're the best!"</span>, tip);

  await buyMeACoffee.connect(tipper2).buyCoffee(<span class="hljs-string">"Vitto"</span>, <span class="hljs-string">"Amazing teacher"</span>, tip);

  await buyMeACoffee.connect(tipper3).buyCoffee(<span class="hljs-string">"Kay"</span>, <span class="hljs-string">"I love my Proof of Knowledge"</span>, tip);

 

  <span class="hljs-comment">// Check balances after the coffee purchase.</span>

  console.log(<span class="hljs-string">"== bought coffee =="</span>);

  await printBalances(addresses);

 

  <span class="hljs-comment">// Withdraw.</span>

  await buyMeACoffee.connect(owner).withdrawTips();

 

  <span class="hljs-comment">// Check balances after withdrawal.</span>

  console.log(<span class="hljs-string">"== withdrawTips =="</span>);

  await printBalances(addresses);

 

  <span class="hljs-comment">// Check out the memos.</span>

  console.log(<span class="hljs-string">"== memos =="</span>);

  const memos <span class="hljs-operator">=</span> await buyMeACoffee.getMemos();

  printMemos(memos);

}

 

<span class="hljs-comment">// We recommend this pattern to be able to use async/await everywhere</span>

<span class="hljs-comment">// and properly handle errors.</span>

main()

  .then(() <span class="hljs-operator">=</span><span class="hljs-operator">></span> process.exit(<span class="hljs-number">0</span>))

  .catch((<span class="hljs-function"><span class="hljs-keyword">error</span>) => </span>{

    console.error(<span class="hljs-function"><span class="hljs-keyword">error</span>)</span>;

    process.exit(<span class="hljs-number">1</span>);

  });
</code></pre><p>终端运行npx hardhat run scripts/buy-coffee.js 查看是否有报错如果没有报错，会出来一个合约如下图。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/de391eaffbc039f8b9c8e0d259a69cbd8f31286576ed8806e16e810a9a85e9b7.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>在code内右键新建文件deploy.js</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/4f30db6daf28e7d5dd6a197c9eabd7209b54569b770c997cd584d7f3804d3bc6.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>内容为：</p><pre data-type="codeBlock" text="// scripts/deploy.js

const hre = require(&quot;hardhat&quot;);

async function main() {

// We get the contract to deploy.

const BuyMeACoffee = await hre.ethers.getContractFactory(&quot;BuyMeACoffee&quot;);

const buyMeACoffee = await BuyMeACoffee.deploy();

await buyMeACoffee.deployed();

console.log(&quot;BuyMeACoffee deployed to:&quot;, buyMeACoffee.address);

}

// We recommend this pattern to be able to use async/await everywhere

// and properly handle errors.

main()

.then(() =&gt; process.exit(0))

.catch((error) =&gt; {

console.error(error);

process.exit(1);

});
"><code><span class="hljs-comment">// scripts/deploy.js</span>

const hre <span class="hljs-operator">=</span> <span class="hljs-built_in">require</span>(<span class="hljs-string">"hardhat"</span>);

async <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>) </span>{

<span class="hljs-comment">// We get the contract to deploy.</span>

const BuyMeACoffee <span class="hljs-operator">=</span> await hre.ethers.getContractFactory(<span class="hljs-string">"BuyMeACoffee"</span>);

const buyMeACoffee <span class="hljs-operator">=</span> await BuyMeACoffee.deploy();

await buyMeACoffee.deployed();

console.log(<span class="hljs-string">"BuyMeACoffee deployed to:"</span>, buyMeACoffee.<span class="hljs-built_in">address</span>);

}

<span class="hljs-comment">// We recommend this pattern to be able to use async/await everywhere</span>

<span class="hljs-comment">// and properly handle errors.</span>

main()

.then(() <span class="hljs-operator">=</span><span class="hljs-operator">></span> process.exit(<span class="hljs-number">0</span>))

.catch((<span class="hljs-function"><span class="hljs-keyword">error</span>) => </span>{

console.error(<span class="hljs-function"><span class="hljs-keyword">error</span>)</span>;

process.exit(<span class="hljs-number">1</span>);

});
</code></pre><p>运行npx hardhat run scripts/deploy.js  查看是否有报错，如果没报错会出现一个合约代码，如下图：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6699021c316b09e84ac12cc067d5f45b50a8ffe8c16bcac111260fb1b6be9dd7.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>点击hardhat.config.js 将内容修改为：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/10efb42ff19244bb340d8b77eb124bb83df5ec47c5245eeaa33184288953a510.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><pre data-type="codeBlock" text="// hardhat.config.js

require(&quot;@nomiclabs/hardhat-ethers&quot;);

require(&quot;@nomiclabs/hardhat-waffle&quot;);

require(&quot;dotenv&quot;).config()

// You need to export an object to set up your config

// Go to https://hardhat.org/config/ to learn more

const GOERLI_URL = process.env.GOERLI_URL;

const PRIVATE_KEY = process.env.PRIVATE_KEY;

/**

* @type import(&apos;hardhat/config&apos;).HardhatUserConfig

*/

module.exports = {

solidity: &quot;0.8.4&quot;,

networks: {

goerli: {

url: GOERLI_URL,

accounts: [PRIVATE_KEY]

}

}

};
"><code><span class="hljs-comment">// hardhat.config.js</span>

<span class="hljs-built_in">require</span>(<span class="hljs-string">"@nomiclabs/hardhat-ethers"</span>);

<span class="hljs-built_in">require</span>(<span class="hljs-string">"@nomiclabs/hardhat-waffle"</span>);

<span class="hljs-built_in">require</span>(<span class="hljs-string">"dotenv"</span>).config()

<span class="hljs-comment">// You need to export an object to set up your config</span>

<span class="hljs-comment">// Go to https://hardhat.org/config/ to learn more</span>

const GOERLI_URL <span class="hljs-operator">=</span> process.env.GOERLI_URL;

const PRIVATE_KEY <span class="hljs-operator">=</span> process.env.PRIVATE_KEY;

<span class="hljs-comment">/**

* @type import('hardhat/config').HardhatUserConfig

*/</span>

module.exports <span class="hljs-operator">=</span> {

solidity: <span class="hljs-string">"0.8.4"</span>,

networks: {

goerli: {

url: GOERLI_URL,

accounts: [PRIVATE_KEY]

}

}

};
</code></pre><p>运行npm install dotenv</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/93c4606e9be4b37c61d7377573423f0e6481e63e6b28f86979109f7f3019c1f0.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>运行touch .env</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6e277857b0f9cc2fe6595b16ef35e7530e3ee303697985958b91d35ea93e84a7.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>填充 env内容</p><pre data-type="codeBlock" text="GOERLI_URL=https://eth-goerli.alchemyapi.io/v2/&lt;your api key&gt;
GOERLI_API_KEY=&lt;your api key&gt;
PRIVATE_KEY=&lt;your metamask api key&gt;
"><code>GOERLI_URL<span class="hljs-operator">=</span>https:<span class="hljs-comment">//eth-goerli.alchemyapi.io/v2/&#x3C;your api key></span>
GOERLI_API_KEY<span class="hljs-operator">=</span><span class="hljs-operator">&#x3C;</span>your api key<span class="hljs-operator">></span>
PRIVATE_KEY<span class="hljs-operator">=</span><span class="hljs-operator">&#x3C;</span>your metamask api key<span class="hljs-operator">></span>
</code></pre><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/5ce9b74d15ded1f62da4a8a7caeb289ce2cc3c733a5f22533dadd0ffaf2d4bb8.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.alchemy.com/">https://www.alchemy.com/</a>  在这里注册，新建</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c15447b4dc4c6eb715882e34efaddc3a3105fa1b91475e6d5e043ec8d12af6bf.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>GOERLI_UL为 https链接 GOERLI_API_KEY 为 api-key</p><p>PRIVATE_KEY为小狐狸私钥（创建新账号）</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6d5d1dc33a08f8a870f1720c046cb1d1b45920885948501f372435f7eba5677e.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>如下图</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/60e9fbd5a957fbb7df860ec3ebdfd2e22cb111328e3255db0b0cffd87fa21a73.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>运行npx hardhat run scripts/deploy.js --network goerli 查看是否报错，如果没报错，会出现一个合约地址，如下图</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/a12bfbf2a37e1cda60586f139b77eb22988cec4a141bdfc5002b3588d286f3e7.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>如果报错，如下图 选择的2行代码修改为一行：</p><p>require(&quot;@nomicfoundation/hardhat-toolbox&quot;);</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/2c82dfc80037302516d641af9491a6983a2c0a1db115d1ce9d84c34e04fa62a8.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>修改后再次运行npx hardhat run scripts/deploy.js --network goerli 创建合约，如果继续报错，看一下报错原因是什么。</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://goerli.etherscan.io/">https://goerli.etherscan.io/</a>  运行成之后就可以去里面查询合约 并且复制合约链接备用（填表要用）</p><p>新建文件再code中内容保存为：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ce8485accc2b96a430f613d3412563d942c3c6f34127183aff397e45a7652ee3.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><pre data-type="codeBlock" text="// scripts/withdraw.js

const hre = require(&quot;hardhat&quot;);

const abi = require(&quot;../artifacts/contracts/BuyMeACoffee.sol/BuyMeACoffee.json&quot;);

async function getBalance(provider, address) {

const balanceBigInt = await provider.getBalance(address);

return hre.ethers.utils.formatEther(balanceBigInt);

}

async function main() {

// Get the contract that has been deployed to Goerli.

const contractAddress=&quot;0xDBa03676a2fBb6711CB652beF5B7416A53c1421D&quot;;

const contractABI = abi.abi;

// Get the node connection and wallet connection.

const provider = new hre.ethers.providers.AlchemyProvider(&quot;goerli&quot;, process.env.GOERLI_API_KEY);

// Ensure that signer is the SAME address as the original contract deployer,

// or else this script will fail with an error.

const signer = new hre.ethers.Wallet(process.env.PRIVATE_KEY, provider);

// Instantiate connected contract.

const buyMeACoffee = new hre.ethers.Contract(contractAddress, contractABI, signer);

// Check starting balances.

console.log(&quot;current balance of owner: &quot;, await getBalance(provider, signer.address), &quot;ETH&quot;);

const contractBalance = await getBalance(provider, buyMeACoffee.address);

console.log(&quot;current balance of contract: &quot;, await getBalance(provider, buyMeACoffee.address), &quot;ETH&quot;);

// Withdraw funds if there are funds to withdraw.

if (contractBalance !== &quot;0.0&quot;) {

console.log(&quot;withdrawing funds..&quot;)

const withdrawTxn = await buyMeACoffee.withdrawTips();

await withdrawTxn.wait();

} else {

console.log(&quot;no funds to withdraw!&quot;);

}

// Check ending balance.

console.log(&quot;current balance of owner: &quot;, await getBalance(provider, signer.address), &quot;ETH&quot;);

}

// We recommend this pattern to be able to use async/await everywhere

// and properly handle errors.

main()

.then(() =&gt; process.exit(0))

.catch((error) =&gt; {

console.error(error);

process.exit(1);

});
"><code><span class="hljs-comment">// scripts/withdraw.js</span>

const hre <span class="hljs-operator">=</span> <span class="hljs-built_in">require</span>(<span class="hljs-string">"hardhat"</span>);

const <span class="hljs-built_in">abi</span> <span class="hljs-operator">=</span> <span class="hljs-built_in">require</span>(<span class="hljs-string">"../artifacts/contracts/BuyMeACoffee.sol/BuyMeACoffee.json"</span>);

async <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getBalance</span>(<span class="hljs-params">provider, <span class="hljs-keyword">address</span></span>) </span>{

const balanceBigInt <span class="hljs-operator">=</span> await provider.getBalance(<span class="hljs-keyword">address</span>);

<span class="hljs-keyword">return</span> hre.ethers.utils.formatEther(balanceBigInt);

}

async <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params"></span>) </span>{

<span class="hljs-comment">// Get the contract that has been deployed to Goerli.</span>

const contractAddress<span class="hljs-operator">=</span><span class="hljs-string">"0xDBa03676a2fBb6711CB652beF5B7416A53c1421D"</span>;

const contractABI <span class="hljs-operator">=</span> <span class="hljs-built_in">abi</span>.<span class="hljs-built_in">abi</span>;

<span class="hljs-comment">// Get the node connection and wallet connection.</span>

const provider <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> hre.ethers.providers.AlchemyProvider(<span class="hljs-string">"goerli"</span>, process.env.GOERLI_API_KEY);

<span class="hljs-comment">// Ensure that signer is the SAME address as the original contract deployer,</span>

<span class="hljs-comment">// or else this script will fail with an error.</span>

const signer <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> hre.ethers.Wallet(process.env.PRIVATE_KEY, provider);

<span class="hljs-comment">// Instantiate connected contract.</span>

const buyMeACoffee <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> hre.ethers.Contract(contractAddress, contractABI, signer);

<span class="hljs-comment">// Check starting balances.</span>

console.log(<span class="hljs-string">"current balance of owner: "</span>, await getBalance(provider, signer.<span class="hljs-built_in">address</span>), <span class="hljs-string">"ETH"</span>);

const contractBalance <span class="hljs-operator">=</span> await getBalance(provider, buyMeACoffee.<span class="hljs-built_in">address</span>);

console.log(<span class="hljs-string">"current balance of contract: "</span>, await getBalance(provider, buyMeACoffee.<span class="hljs-built_in">address</span>), <span class="hljs-string">"ETH"</span>);

<span class="hljs-comment">// Withdraw funds if there are funds to withdraw.</span>

<span class="hljs-keyword">if</span> (contractBalance <span class="hljs-operator">!</span><span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-string">"0.0"</span>) {

console.log(<span class="hljs-string">"withdrawing funds.."</span>)

const withdrawTxn <span class="hljs-operator">=</span> await buyMeACoffee.withdrawTips();

await withdrawTxn.wait();

} <span class="hljs-keyword">else</span> {

console.log(<span class="hljs-string">"no funds to withdraw!"</span>);

}

<span class="hljs-comment">// Check ending balance.</span>

console.log(<span class="hljs-string">"current balance of owner: "</span>, await getBalance(provider, signer.<span class="hljs-built_in">address</span>), <span class="hljs-string">"ETH"</span>);

}

<span class="hljs-comment">// We recommend this pattern to be able to use async/await everywhere</span>

<span class="hljs-comment">// and properly handle errors.</span>

main()

.then(() <span class="hljs-operator">=</span><span class="hljs-operator">></span> process.exit(<span class="hljs-number">0</span>))

.catch((<span class="hljs-function"><span class="hljs-keyword">error</span>) => </span>{

console.error(<span class="hljs-function"><span class="hljs-keyword">error</span>)</span>;

process.exit(<span class="hljs-number">1</span>);

});
</code></pre><p>打开登录自己账号 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://replit.com/@thatguyintech/BuyMeACoffee-Solidity-DeFi-Tipping-app">https://replit.com/@thatguyintech/BuyMeACoffee-Solidity-DeFi-Tipping-app</a></p><p>点击</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/57b1977e1a67fa003edac388c5abb3152faf052c777700625959cc665f6e9220.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>代码修改为自己创建的合约地址</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/cc71fba937a58ffdcb49f928090b2ab6033a86c8620d7cb86aa007385237c3f6.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>ctrl + F  搜索Albert  可以修改自己的昵称 随便改</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/20f7bb011b255ded644ff77889c2013e2ea2fd6e952e1cd5e86514f893eae0a0.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>点击发布  内容自己填</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/f885b3df56930d85f64c36d6d44a97a9e7890120ae98ff47eefe2a655f4c92f3.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>复制填表用</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/976356e89a2e28aea24ab52f10d64f1fc7dcac2ccc25f6c27d9407672fa797d6.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>复制填表用</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/97e6aa13a752fbbf6c46bc773300421edf73fa11aff13ed0c1a52982e9d72149.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>在新窗口打开复制的这个链接</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/976356e89a2e28aea24ab52f10d64f1fc7dcac2ccc25f6c27d9407672fa797d6.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>运行后使用小狐狸交互一下  结束</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e2e6f09dec568865e44d18bbdc7b8daf3a8f54b3b68eb584db30466e6c5fcc0d.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/04c2a1cd8217cdb76c59538deff713b5303ef2fe846ebcd3f5125030ac8ce852.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>填表</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://alchemyapi.typeform.com/roadtoweektwo">https://alchemyapi.typeform.com/roadtoweektwo</a></p><p>最后一项要填3个添加， 第一个是合约链接（是链接，不是地址）  第二、三是结尾上面让复制的2个链接。</p>]]></content:encoded>
            <author>binancezh-2@newsletter.paragraph.com (tuzi)</author>
        </item>
        <item>
            <title><![CDATA[gm]]></title>
            <link>https://paragraph.com/@binancezh-2/gm</link>
            <guid>ydxwJMBRkAfYnIzUNwEr</guid>
            <pubDate>Fri, 05 Aug 2022 00:29:34 GMT</pubDate>
            <description><![CDATA[GM"Smile in the mirror. Do that every morning, and you&apos;ll start to see a big difference in your life."]]></description>
            <content:encoded><![CDATA[<p>GM&quot;Smile in the mirror. Do that every morning, and you&apos;ll start to see a big difference in your life.&quot;</p>]]></content:encoded>
            <author>binancezh-2@newsletter.paragraph.com (tuzi)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/697f6883ea104aa6e19669078bf9ff68191d0b5e08f7c218a4eafe9c47a058fe.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[cool]]></title>
            <link>https://paragraph.com/@binancezh-2/cool</link>
            <guid>WwgQ84sxWTborum3LjXK</guid>
            <pubDate>Fri, 05 Aug 2022 00:27:04 GMT</pubDate>
            <description><![CDATA[GM"Smile in the mirror. Do that every morning, and you&apos;ll start to see a big difference in your life."]]></description>
            <content:encoded><![CDATA[<p>GM&quot;Smile in the mirror. Do that every morning, and you&apos;ll start to see a big difference in your life.&quot;</p>]]></content:encoded>
            <author>binancezh-2@newsletter.paragraph.com (tuzi)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/697f6883ea104aa6e19669078bf9ff68191d0b5e08f7c218a4eafe9c47a058fe.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[1]]></title>
            <link>https://paragraph.com/@binancezh-2/1</link>
            <guid>mBMuNgOeb2iZsuSS1sLU</guid>
            <pubDate>Fri, 06 May 2022 03:53:02 GMT</pubDate>
            <description><![CDATA[12]]></description>
            <content:encoded><![CDATA[<p>12</p>]]></content:encoded>
            <author>binancezh-2@newsletter.paragraph.com (tuzi)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/697f6883ea104aa6e19669078bf9ff68191d0b5e08f7c218a4eafe9c47a058fe.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[canyu11]]></title>
            <link>https://paragraph.com/@binancezh-2/canyu11</link>
            <guid>giZjGlFMVKYyUhxDsX8Y</guid>
            <pubDate>Fri, 08 Oct 2021 05:38:22 GMT</pubDate>
            <description><![CDATA[钙参与奖]]></description>
            <content:encoded><![CDATA[<p>钙参与奖</p>]]></content:encoded>
            <author>binancezh-2@newsletter.paragraph.com (tuzi)</author>
        </item>
    </channel>
</rss>