Skip to content

Instantly share code, notes, and snippets.

View Pana's full-sized avatar
🎯
Focusing

Pana Pana

🎯
Focusing
View GitHub Profile
@justinpan0
justinpan0 / conflux-reason.js
Last active August 27, 2020 06:15
查询Conflux合约的"Error encountered during contract execution, or out of gas"失败原因
const request = require('request');
const { Conflux } = require("js-conflux-sdk");
const cfx = new Conflux({
url: "http://mainnet-jsonrpc.conflux-chain.org:12537"
});
function hex_to_ascii(str1) {
var hex = str1.toString();
var str = '';
for (var n = 0; n < hex.length; n += 2) {