玩儿点儿新花样,将Ascii banner艺术字放入以太坊区块链上

玩儿点儿新花样,将Ascii banner艺术字放入以太坊区块链上
要实现将数据放入以太坊区块链,需要借助一笔转账交易来完成,且数据必须是16进制的。本文将以图文的形式介绍将Ascii banner艺术字放到区块链上。具体步骤如下:

准备工作:
Ascii Banner艺术字:https://www.bootschool.net/ascii
在线字符串转16进制工具:https://tool.lu/hexstr/
以太坊第三方钱包(推荐桌面版):https://download.mycrypto.com/

步骤1、在本站生成或找一个Ascii艺术字

Ascii Banner工具:https://www.bootschool.net/ascii ,如
ascii art i love you

步骤2、将拷贝的艺术字使用在线工具转换成16进制

在线将字符串转16进制(hex)工具:https://tool.lu/hexstr/https://onlinehextools.com/convert-string-to-hex

如步骤1中字符串转换后的16进制为:

20202020202020202020202c6720203862202c6720202020202020202020202020202020202c672020202020202020386720202038672020202020200d0a202020202020206f38383838222020383820593820202020202e6f6438383838383838383850222020202020202038382720203838272020202020200d0a2020202020202020203838202020203838202220202020202020203838202038382020383820202020202020203838272020383838383838383862200d0a20202020203838383838383838383838383838383820202064383838383838383838383838383862202020203838382020383820206f6f20203838200d0a2020202020202020203838202020203838202020202020203838202020203838202020202020383820202038273838203827202020383820205027200d0a20202020202020202038382c6f20203838206f392c2020202020383838383838383838383838202020202020203838202020203820383820202020200d0a20202020202020202038385020202038382c38502020202020202020203838202020202020202020202020202038382020206f3820383820672020200d0a202020202020202c38383820202020383838272020202020202020203838383838383838622020202020202020383820202038272038382060382c200d0a2020202020206438273838202020673838202020202020202020203838206767202c3838272020202020202020383820202c502020383820203862200d0a2020202020203827203838206f502038382c2020202020202020643827206067383827202020202020202020203838202038202020383820206050200d0a202020202020202020383820202020603838206720202020206f3827202067673838622c2020202020202020203838206620202020383820202020200d0a2020202020202020643827202020202020606227202020206f3820206f5027202020225938616f2020202020203838202020202064382720202020200d0a2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020200d0a202020202020202020202020202020202020202020202020202020202020202020202020202d2d66726f6d20626f6f747363686f6f6c2e6e65740d0a20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202032303139e5b9b43131e69c883232e697a50d0a20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020

步骤3、使用以太坊钱包创建交易

以太坊第三方钱包(推荐桌面版):https://download.mycrypto.com/ ,考虑到官方提供的钱包需要同步区块后才能使用,而且现如今区块已经很大了,所以我这里使用的是轻钱包。

准备两个以太坊钱包地址,一个用于发送以太币0x4ED3d9613CBE15411CcdfDe8aAf32e848Fb2Fc15,一个用于接收以太币0xC3c60C32dDec406D66f952542b49dCc75927A34c,而且发送钱包里边得有一定量的以太币才行。如果没有以太坊钱包地址,需要先行自己创建,关于如何创建钱包和获取以太币,请自行搜索。

input-eth-and-data

说明:当填入数据后,钱包会给出警告信息WARNING: This is a non standard transaction, it contains data!,大概意思就是说明这笔交易不是标准的交易,因为含有数据。这个警告我们可以不用管它。

当所有输入确认无误后我们就可以点击发送交易按钮了,然后会看到确认交易的一个弹窗,如图:
send-eth
点击发送按钮即可。如果交易被成功的打包我们会看到如图的提示
scan transaction on ether explorer

我们点击提示框中的Verify..的按钮,到区块链浏览器中去查看这笔交易,交易ID为:0x8108b7108e3cdcc052cb4ea277587741101d196a3c04b2baf5eb9f807f7e4bde

eth-transaction-pending
当这笔交易成功的被网络确认后(确认数达到了要求个数后,确认的快慢跟网络拥堵情况、gas费的多少等有关)我们就可以在区块链中看到我们的数据了。最终效果如图:
data-successfully-add-to-ether-blockchain

参考文献:Kitties in Blockchain. Step by step instruction.

the end

热门文章