pragma solidity >=0.4.22 <0.7.0; | |
interface ISynthetix { | |
function burnSynthsToTargetOnBehalf(address burnForAddress) external; | |
function issueMaxSynthsOnBehalf(address issueForAddress) external; | |
function remainingIssuableSynths(address issuer) external returns (uint256); | |
} | |
interface IFeePool { | |
function claimOnBehalf(address claimingForAddress) external; |
pragma solidity ^0.5.0; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/math/SafeMath.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20Detailed.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/SafeERC20.sol"; | |
contract Unipool is ERC20, ERC20Detailed("Unipool", "SNX-UNP", 18) { |
// This is universal, works with Infura -- set provider accordingly | |
const ethers = require('ethers') | |
//const provider = ethers.getDefaultProvider('rinkeby') | |
const provider = new ethers.providers.JsonRpcProvider(process.env.WEB3_URL) | |
function hex_to_ascii(str1) { | |
var hex = str1.toString(); | |
var str = ''; | |
for (var n = 0; n < hex.length; n += 2) { |
## Currency Keys (Ascii to hex) | |
ETH 0x455448 | |
SNX 0x534e58 | |
XDR 0x584452 | |
sUSD 0x73555344 | |
sAUD 0x73415544 | |
sEUR 0x73455552 | |
sJPY 0x734a5059 | |
sXAU 0x73584155 |
I got to here after spending hours trying to deploy to an Elastic Beanstalk instance via CircleCi 2.0 so I thought I'd write up what worked for me to hopefully help others. Shout out to RobertoSchneiders who's steps for getting it to work with CircleCi 1.0 were my starting point.
For the record, I'm not the most server-savvy of developers so there may be a better way of doing this.
Here's an example of how to debug Mocha v4 if it hangs.
Ensure you're using a Node.js 8 or newer (or any version with async_hooks support).
If you run your test, you'll notice it hangs:
$ mocha test.js
Kyle Simpson (@getify) wrote a very thoughtful post decrying optimize-js, which is a tool I wrote that exploits known optimizations in JavaScript engines to make JS bundles parse faster (especially minified bundles, due to what could be reasonably described as a bug in Uglify).
Kyle lays out a good case, but I tend to disagree with nearly all his points. So here's my rebuttal.
First install pip for Python2. Download the get-pip.py file from https://bootstrap.pypa.io/get-pip.py | |
$ cd <download location> | |
$ sudo -H python ./get-pip.py | |
Installing pip also installs Python3 | |
To run Python3 | |
$ python3 | |
Install pip3 by just executing the same file as in the step above, but this time using Python3 | |
$ sudo -H python3 ./get-pip.py |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents