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.12; | |
interface TokenInterface { | |
function approve(address, uint256) external; | |
function transfer(address, uint) external; | |
function transferFrom(address, address, uint) external; | |
function deposit() external payable; | |
function withdraw(uint) external; | |
function balanceOf(address) external view returns (uint); |
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
// in nodeJs | |
const axios = require('axios') | |
async function getCurrentGasPrices() { | |
let response = await axios.get('https://ethgasstation.info/json/ethgasAPI.json') | |
let prices = { | |
low: response.data.safeLow / 10, | |
medium: response.data.average / 10, | |
high: response.data.fast / 10 | |
} |
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; | |
/** | |
* Interface of the Central Event Contract. | |
*/ | |
interface EventInterface { | |
function emitEvent(uint _connectorType, uint _connectorID, bytes32 _eventCode, bytes calldata _eventData) external; | |
} | |
contract Memory { |