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
import { DirectSecp256k1HdWallet, DirectSecp256k1Wallet } from '@cosmjs/proto-signing'; | |
import { SigningStargateClient } from '@cosmjs/stargate'; | |
import { fromHex } from '@cosmjs/encoding'; | |
// 大概操作 | |
// 1、请在至少在解质押结束前30秒启动脚本。没必要启动太早,启动太早如果节点做了请求限制则节点会不在接受访问请求 | |
// 2、根据你的需求修改下面的 mnemonic 以及 recipient | |
// 3、安装好node.js程序之后,执行 node axl.js脚本 | |
// 策略:每隔100ms检查到账户是否有可转移资金,一旦检测到立即发送转账交易。 |
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
import { ApiPromise, WsProvider } from '@polkadot/api'; | |
async function subscribeTemplatePallet() { | |
// 连接到 Polkadot 节点 | |
const provider = new WsProvider('ws://localhost:9944'); | |
const api = await ApiPromise.create({ provider }); | |
// 订阅 template pallet 中的值更新 | |
api.query.templateModule.something((result) => { | |
console.log('Something updated:', result.toHuman()); |
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
{ | |
"app_hash": "", | |
"app_state": { | |
"auth": { | |
"accounts": [ | |
{ | |
"@type": "/ethermint.types.v1.EthAccount", | |
"base_account": { | |
"account_number": "1820993", | |
"address": "evmos1qqqqqqqqqqyyayt5xyj2nqs8d3vlzqyy46yd62", |
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
{ | |
"tx":{ | |
"body":{ | |
"messages":[ | |
{ | |
"@type":"/ethermint.evm.v1.MsgEthereumTx", | |
"data":{ | |
"@type":"/ethermint.evm.v1.LegacyTx", | |
"nonce":"0", | |
"gas_price":"50000000000", |
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
{ | |
"genesis_time": "2023-07-14T08:09:45.35884Z", | |
"chain_id": "quarix_8888888-1", | |
"initial_height": "1", | |
"consensus_params": { | |
"block": { | |
"max_bytes": "22020096", | |
"max_gas": "210000000000", | |
"time_iota_ms": "1000" | |
}, |
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
{"_format":"hh-sol-artifact-1","contractName":"ERC1967Proxy","sourceName":"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol","abi":[{"inputs":[{"internalType":"address","name":"_logic","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}],"bytecode":"0x60806040526040516107353803806107358339810160408190526100229161031e565b61002e82 |
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
import util from "util"; | |
import path from "path"; | |
import { exec } from "child_process"; | |
import Web3 from "web3"; | |
const execPromis = util.promisify(exec); | |
const sleep = (time) => { | |
return new Promise((resolve) => setTimeout(resolve, time)); | |
}; |
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
contract ProjectManager { | |
// 算力资源 | |
struct ComputeRes { | |
int256 id; | |
int256 tid; // 领取的任务id | |
address owner; | |
int256 status; | |
int256 ctype; // 算力类型:处理视频,处理音频,图像识别..... | |
int256[] pows; | |
} |
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
{ | |
"genesis_time": "2022-10-26T09:07:14.75812Z", | |
"chain_id": "evmos_20191205-1", | |
"initial_height": "1", | |
"consensus_params": { | |
"block": { | |
"max_bytes": "22020096", | |
"max_gas": "-1", | |
"time_iota_ms": "1000" | |
}, |
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
if (Array.isArray(genesisCfg)) { | |
const convert = (value) => { | |
if (value == "true" || value == "false") { | |
return value == "true"; | |
} else if (value.startsWith("'")) { | |
return value.replace(/'/g, ""); | |
} else return parseInt(value); | |
}; | |
for (const cfg of genesisCfg) { | |
console.log("genesis." + cfg); |
NewerOlder