自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 ethereum event 监听 ethers.js

const { ethers } = require("ethers");const address = "0xdac17f958d2ee523a2206206994597c13d831ec7";const erc20_abi = require('./abi/erc20.json');const provider = new ethers.providers.JsonRpcProvider('https://mainnet.infura.io/');const contract = new eth

2022-04-18 17:43:10 1464

原创 枚举 json转字符串

定义时:[JsonConverter(typeof(EnumJsonConvert))]public EnumType span { get; set; } public class EnumJsonConvert<T> : JsonConverter where T : struct, IConvertible { public void EnumConverter() { if (!typeof(T).IsEnum)

2021-01-13 14:36:31 390

原创 substrate Balance, BlockNumber, AccountId 等值转换

Balance -> u64let value :Option = TryInto::::try_into(balance).ok();u64-> Balancelet balance :Option<T::Balance> = value.try_into().ok();BlockNumber -> u32let number : Option = TryInto::::try_into(block_number);u32 -> BlockNumber

2020-12-10 11:36:10 600

原创 .net Nethereum.Web3 发送带签名交易 SendRawTransaction

var web3 = new Web3("http://localhost:8545"); //转账数量 var amount = Web3.Convert.ToWei(1); Console.WriteLine($"amount: {amount}"); var callInput = (CallInput)EtherTransferTransactionInputBuilder.CreateTransactionInput(s.

2020-12-10 11:23:10 2135

原创 Remix solidity 拆分byte

把bytes 数据拆分function subbyte(bytes memory self, uint startIndex, uint len) internal pure returns (bytes memory) {require(startIndex <= self.length && self.length - startIndex >= len);uint addr = dataPtr(self);return toBytes(addr + startIn

2020-12-10 11:16:54 740

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除