This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Web3 = require('web3'); | |
const web3 = new Web3('https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'); | |
const myWalletAddress = '0x8bD4DD33e7a479409d8bb8c1eA33BCf6f5625391'; | |
const artBlocksBroker = { | |
address: '0xE52A2A7B8dACe2ff8cdC64EabB605821A393474D', | |
abi: [{"inputs":[{"internalType":"address","name":"_profitReceiver","type":"address"},{"internalType":"uint256","name":"_artBlocksBrokerFeeBips","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":true,"internalType":"uint256","name":"_artBlocksProjectId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_priceInWeiEach","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_quantity","type":"uint256"},{"indexed":false,"internalType":"string","name":"_action","type":"string"},{"indexed":false,"internalType":"uint256","name":"_optionalTokenId","type":"uint256"}],"name":"Action" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 获取一个随机的uint8 | |
* | |
* @return {number} 随机数 | |
*/ | |
const getRandomUint8 = () => | |
(typeof crypto !== 'undefined' && crypto.getRandomValues | |
? crypto.getRandomValues(new Uint8Array(1))[0] | |
: Math.floor(Math.random() * 0xff)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>demo</title> | |
</head> | |
<body> | |
<h3>用户的输入</h3> | |
<form id="demo-form"> | |
<label>姓名 <input name="name" type="text"></label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file webpack配置文件 | |
* @author wangyang02 | |
*/ | |
const webpack = require('webpack'); | |
module.exports = { | |
entry: __dirname + '/src/index.js', | |
output: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file rollup配置文件 | |
* @author wangyang02 | |
*/ | |
import babel from 'rollup-plugin-babel'; | |
export default [{ | |
input: 'src/index.js', | |
plugins: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require('http'); | |
const PORT = 3000; | |
const server = http.createServer((req, res) => { | |
if (req.method !== 'POST') { | |
return res.end(''); | |
} | |
console.log('\nheader:'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(d, w) { | |
var gid = "_uuid_im_3019_"; | |
function $isdone() { | |
var e = d.getElementById(gid); | |
if (e) { | |
return true | |
} | |
return false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 代码翻译:周培公 | |
* 电子邮件:[email protected] | |
* 腾讯微博:http://t.qq.com/lanxmail | |
* 新浪微博:http://weibo.com/1766654653 | |
* 个人主页:http://hi.baidu.com/lanxmail | |
* 代码地址:http://www.google-analytics.com/ga.js | |
* 文档地址:http://code.google.com/intl/zh-CN/apis/analytics/ | |
* @fileoverview Google Analytics(分析)客户端javascript代码。 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="stylesheet" href="https://assets-cdn.github.com/assets/frameworks-5fa9151252f4560e323d564c56b7bbcdd2cb3c9c1b91b2ba2a4f32442817566f.css"> | |
<style> body { padding: 0 30px; } </style> | |
<div class="markdown-body"> | |
## Markdown Here | |
</div> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/highlight.js/latest/styles/default.min.css"> | |
<script src="https://cdn.jsdelivr.net/highlight.js/latest/highlight.min.js"></script> | |
<script>hljs.initHighlightingOnLoad();</script> |
NewerOlder