Skip to content

Instantly share code, notes, and snippets.

View zhaojun-sh's full-sized avatar

zhaojun.sh zhaojun-sh

View GitHub Profile
/// http://remix.ethereum.org/#optimize=false&version=soljson-v0.4.24+commit.e67f0147.js
pragma solidity ^0.4.24;
contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
pragma solidity ^0.4.24;
contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
@zhaojun-sh
zhaojun-sh / efsn-pos-mining-linux-guide.txt
Last active January 2, 2019 13:05
Efsn pos mining guide for linux
Efsn pos mining guide for linux
1. Build the efsn from source code.
Make sure golang installed first.
$ git clone https://github.com/zhaojun-sh/efsn.git
$ cd ./efsn/
//
// 20200426 v0.10 增加共管账户lockout审批功能
// 20200424 v0.9 增加创建共管账户和审批功能
// 20200421 v0.8 增加建组gid和获取enode签名功能
// 20200409 v0.5 更新reqDcrmAddr接口,mode参数放到data中
// 20200401 v0.4 增加lockout测试功能
// 20200327 v0.3 增加测试结果统计功能,打印出失败的交易KeyID
// 20200325 v0.2 支持循环测试
// 20200324 v0.1 支持发送个人模式申请DCRM地址
//

dcrm-client测试程序

运行dcrm测试网络

编译dev分支的最新代码.

git clone https://github.com/fsn-dev/dcrm-walletService.git
cd dcrm-walletService
git checkout dev 
make
#!/bin/bash
# specify the sender
SENDER_OPT="--sender 0x1111111111111111111111111111111111111111 --keystore ./keystore/UTC--0x1111111111111111111111111111111111111111.json --password ./password.txt"
printUsage() {
echo "Usage: $0 <chainName> <gateway> <rewardToken> <batchInterval> <input-files ...> [--sendtx]"
echo ""
echo "input files line format: address,value"
echo "value is of unit wei"
# @version 0.2.4
# (c) Curve.Fi, 2020
# Pool for DAI/USDC/USDT
from vyper.interfaces import ERC20
import CurveToken as CurveToken
# Events
@zhaojun-sh
zhaojun-sh / Anyswap_router_testnet.md
Last active April 6, 2021 06:04
Anyswap router testnet V3
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.0;
interface ISushiswapV2Pair {
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
@zhaojun-sh
zhaojun-sh / anyBLOCKV4ERC20.sol
Last active April 9, 2021 08:09
BLOCKnet to AVAX c-chain
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.2;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);