Skip to content

Instantly share code, notes, and snippets.

View drinkius's full-sized avatar

Alexander Telegin drinkius

View GitHub Profile
@drinkius
drinkius / bot.rb
Last active January 29, 2024 16:46 — forked from dideler/bot.rb
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@drinkius
drinkius / README.md
Last active August 21, 2023 12:33
Munujo

Notary

Notary hook collects signatures for multi-sign transactions. It has two modes of operation:

  1. Attach a proposed transaction to a memo and send it to the hook account
  2. Endorse an already proposed transaction by using its unique ID as invoice ID and sending a 1 drop payment to the hook.

It relies on the signer list on the account the hook is running on. Only accounts on this list can propose and endorse multisign transactions through this hook.

to test:

  • make sure Hooks Builder has at least 3 accounts: Alice, Bob and Carol
@drinkius
drinkius / airgap.md
Created December 25, 2022 14:33 — forked from pryce-turner/airgap.md
Air-gapped Raspberry Pi for eth2-deposit-cli

Motivation

The greatest strength of an airgapped machine is also it's biggest headache - no way out! This is a short guide for configuring an old Raspberry Pi 2 (no radio cards!) to securely use the eth2-deposit-cli tool. Whether using an existing mnemonic or generating a new one, the security conscious will appreciate doing so on a machine which never has and never will touch any network.


Requirements

  • Raspberry Pi
  • min 16Gb microSD
type = "offchainreporting"
schemaVersion = 1
name = "PEG BASE version 4 contract 0x60EDc0FE07B9AFFa5FD9299CB267C48daE41e117 network fantom opera mainnet"
maxTaskDuration = "0s"
blockchainTimeout = "20s"
contractAddress = "0x60EDc0FE07B9AFFa5FD9299CB267C48daE41e117"
contractConfigConfirmations = 4
contractConfigTrackerPollInterval = "1m0s"
contractConfigTrackerSubscribeInterval = "2m0s"
evmChainID = "250"
type = "offchainreporting"
schemaVersion = 1
name = "GTON PEG BASE version 4 contract 0x2a756421daF8ec9724FC12D00E0cED895E750F9b network fantom opera mainnet"
maxTaskDuration = "0s"
blockchainTimeout = "20s"
contractAddress = "0x2a756421daF8ec9724FC12D00E0cED895E750F9b"
contractConfigConfirmations = 4
contractConfigTrackerPollInterval = "1m0s"
contractConfigTrackerSubscribeInterval = "2m0s"
type = "offchainreporting"
schemaVersion = 1
name = "GTON PEG USD version 4 contract 0x68cdb9302614568727948EC52C4109dF23D7a096 network fantom opera mainnet"
maxTaskDuration = "0s"
blockchainTimeout = "20s"
contractAddress = "0x68cdb9302614568727948EC52C4109dF23D7a096"
contractConfigConfirmations = 4
contractConfigTrackerPollInterval = "1m0s"
contractConfigTrackerSubscribeInterval = "2m0s"
{
"BondManager": "0xc42ba9C3b89F662ca7DF635fC8C52D2C33bC804f",
"CanonicalTransactionChain": "0x0A8CB15257C3B402008357441a57e51d7E4a7eCF",
"ChainStorageContainer-CTC-batches": "0xB28e4568f45Bb14Fca3d78b5358C933E18af0488",
"ChainStorageContainer-CTC-queue": "0x6fEfaa4cf65f653704A143322709C23A18E9BfbF",
"ChainStorageContainer-SCC-batches": "0x66e45df8cd6E83E0096A6B191eE62EB09108c55d",
"L1StandardBridge_for_verification_only": "0x37C64328dAae607eCb48193E9098CbdEA1583DBE",
"AddressManager": "0xFe04f519b28fE14959e74B3ac79fCf2C3417B4d4",
"MVM_DiscountOracle": "0x4240223b74E26beEcA9c6E3950b560d36D2d8A76",
"MVM_L2ChainManagerOnL1_for_verification_only": "0x2c0623A3bCE778809eBc1Cd801bc2d65D50dE915",
{
"commit": "444b8b586a513646e9c8a86f187b9d829e18f9c2",
"config": {
"chainId": 1000,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
@drinkius
drinkius / Guy.sol
Created June 25, 2022 12:56
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract MinterYT is ERC721, ERC721Enumerable, ERC721URIStorage {
using SafeMath for uint256;
uint public constant mintPrice =0;
@drinkius
drinkius / .deps...npm...@openzeppelin...contracts...security...ReentrancyGuard.sol
Created April 20, 2022 22:27
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.9+commit.3e3065ac.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested