- RPC URL: https://mainnet-rpc.dexon.org
- ChainID: 237
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.16; | |
contract curve { | |
// xp : amount of tokens, array | |
// A : amplification coefficient | |
function get_D(uint256[] memory xp, uint256 A) public pure returns(uint256) { | |
uint256 N_COINS = xp.length; | |
uint256 S = 0; | |
for(uint256 i = 0; i < N_COINS; i++) | |
S += xp[i]; | |
if(S == 0) return 0; |
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 Coin { | |
address public minter; | |
mapping (address => uint) public balances; | |
event Sent(address from, address to, uint amount); | |
function Coin() { | |
minter = msg.sender; | |
} |
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
var Web3 = require('web3'); | |
var web3 = new Web3(); //web3 provider | |
var privateKeys=[] //load private keys from DB | |
for(var i in privateKeys){ | |
web3.eth.accounts.privateKeyToAccount(i); | |
} | |
var accounts = web3.eth.accounts; |
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 random | |
selfshare = 0.0 | |
totalshare = 0.0 | |
x=0.9 | |
y=0.09 | |
z=0.01 | |
selfreward=0.0 | |
poolreward=0.0 |