This file contains hidden or 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
const PRIVATE_KEY = "" | |
const TronWeb = require('tronweb') | |
const tronWeb = new TronWeb({ | |
fullHost: 'https://api.trongrid.io', | |
privateKey: PRIVATE_KEY | |
}) | |
const ethers = tronWeb.utils.ethersUtils; | |
var hexStr2byteArray = function(str) { |
This file contains hidden or 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.8.6; | |
//SPDX-License-Identifier: UNLICENSED | |
/// @notice ERC20 token contract interface | |
interface IERC20 { | |
function transfer(address user, uint256 amount) external returns (bool); | |
} | |
contract TimelockDeposits { | |
/// @notice Owner address |
This file contains hidden or 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
//SPDX-License-Identifier: MIT | |
//2021, @fbsloXBT | |
pragma solidity ^0.8.4; | |
interface IUSDC { | |
function transfer(address to, uint256 amount) external returns(bool); | |
function transferFrom(address sender, address receiver, uint256 amount) external returns(bool); | |
} |
This file contains hidden or 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
const ABI = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"DepositedFundingToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"Owners |
This file contains hidden or 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
async function sendTx(){ | |
let accounts = await ethereum.request({ method: 'eth_requestAccounts' }); | |
let your_address = '' | |
let amount = 1 | |
const transactionParameters = { | |
nonce: '0x00', // ignored by MetaMask | |
to: your_address, // Required except during contract publications. | |
from: accounts[0], // must match user's active address. | |
chainId: 1, // Used to prevent transaction reuse across blockchains. Auto-filled by MetaMask. | |
gas: '0x186A0', |
This file contains hidden or 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
{ | |
"name": "uniswap", | |
"timestamp": "2021-03-28T14:37:21.973Z", | |
"version": { | |
"major": 1, | |
"minor": 3, | |
"patch": 1 | |
}, | |
"tags": {}, | |
"logoURI": "/images/coins/wbnb.png", |
This file contains hidden or 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
// File: node_modules\@openzeppelin\contracts\token\ERC20\IERC20.sol | |
pragma solidity ^0.5.0; | |
/** | |
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include | |
* the optional functions; to access them see {ERC20Detailed}. | |
*/ | |
interface IERC20 { | |
/** |
This file contains hidden or 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
// File: node_modules\@openzeppelin\contracts\token\ERC20\IERC20.sol | |
pragma solidity ^0.5.0; | |
/** | |
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include | |
* the optional functions; to access them see {ERC20Detailed}. | |
*/ | |
interface IERC20 { | |
/** |
This file contains hidden or 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 Twit = require('twit') | |
const CONSUMER_KEY='' | |
const CONSUMER_SECRET='' | |
const ACCESS_TOKEN='' | |
const ACCESS_TOKEN_SECRET='' | |
var T = new Twit({ | |
consumer_key: CONSUMER_KEY, | |
consumer_secret: CONSUMER_SECRET, |
This file contains hidden or 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 ping = require('ping'); | |
var hive = require("@hiveio/hive-js") | |
var host = "ipAddress" | |
var fromNumber = "+1..." | |
var toNumber = "+1..." | |
var accountSid = 'TwillioSID'; | |
var authToken = 'TwillioAPISecret'; | |
var owner = 'fbslo' | |
var privateSignigKey = "5J..." |