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
#define uint32_t uint | |
#define uint64_t ulong | |
#define uint8_t uchar | |
#define NULL 0 | |
static void memset(uchar *str, int c, size_t n){ | |
for(int i=0;i<n;i++){ | |
str[i] = c; | |
} | |
} |
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 { readFileSync } from "fs" | |
import { fromHex } from "@cosmjs/encoding" | |
import { DirectSecp256k1Wallet, OfflineDirectSigner } from "@cosmjs/proto-signing" | |
import { SigningStargateClient, StargateClient } from "@cosmjs/stargate" | |
import { MsgSend } from "cosmjs-types/cosmos/bank/v1beta1/tx" | |
import { Tx } from "cosmjs-types/cosmos/tx/v1beta1/tx" | |
const rpc = "https://public-celestia-rpc.numia.xyz" | |
// 其他 rpc https://docs.celestia.org/nodes/mainnet |
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
/* eslint-disable camelcase */ | |
const path = require('path') | |
const os = require('os') | |
const http = require('http') | |
const https = require('https') | |
const fetch = require('node-fetch') | |
/* eslint-disable-next-line */ | |
const { Indexer, CellCollector } = require('@ckb-lumos/indexer') | |
const { SIMPLE_UDT, ANYONE_CAN_PAY_TESTNET } = require('@nervosnetwork/ckb-sdk-utils/lib/systemScripts') |
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
from http.client import HTTPSConnection | |
import grpc | |
import json | |
import os | |
import ssl | |
import sys | |
from graphql import graphql_pb2_grpc | |
from graphql.graphql_pb2 import Request |
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
from http.client import HTTPSConnection | |
import grpc | |
import json | |
import os | |
import ssl | |
import sys | |
from graphql import graphql_pb2_grpc | |
from graphql.graphql_pb2 import Request |
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
pragma solidity ^0.6.0; | |
pragma experimental ABIEncoderV2; | |
interface IERC20 { | |
/** | |
* @dev Returns the amount of tokens in existence. | |
*/ | |
function totalSupply() external view returns (uint256); |
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
pragma solidity ^0.5.17; | |
interface IERC20 { | |
function totalSupply() external view returns (uint256); | |
function balanceOf(address account) external view returns (uint256); | |
function transfer(address recipient, uint256 amount) external returns (bool); | |
function allowance(address owner, address spender) external view returns (uint256); | |
function approve(address spender, uint256 amount) external returns (bool); | |
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); | |
event Transfer(address indexed from, address indexed to, uint256 value); |
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
pragma solidity 0.5.17; | |
library SafeMath { | |
function mul(uint256 a, uint256 b) internal pure returns (uint256) { | |
if (a == 0) | |
return 0; | |
uint256 c = a * b; | |
require(c / a == b); | |
return c; |
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
/** | |
*Submitted for verification at Etherscan.io on 2020-09-21 | |
*/ | |
// Dependency file: @openzeppelin/contracts/GSN/Context.sol | |
// SPDX-License-Identifier: MIT | |
// pragma solidity ^0.6.0; |
NewerOlder