Skip to content

Instantly share code, notes, and snippets.

View thrilok209's full-sized avatar
👻

Thrilok kumar thrilok209

👻
View GitHub Profile
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);
@thrilok209
thrilok209 / gasPrice.js
Last active March 23, 2024 13:18
Fetch GasPrice from eth gas station
// 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
}
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 {