Skip to content

Instantly share code, notes, and snippets.

Avatar
👻

Thrilok kumar thrilok209

👻
View GitHub Profile
View polygon-bridge.sol
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 Sep 17, 2021
Fetch GasPrice from eth gas station
View gasPrice.js
// 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
}
View ConnectorInterface.sol
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 {