Skip to content

Instantly share code, notes, and snippets.

View ImanMousavi's full-sized avatar

Iman ImanMousavi

View GitHub Profile
@ImanMousavi
ImanMousavi / Token-BulkSender.sol
Last active January 9, 2023 07:06
This DAPP was used to send token or ETH to many addresses in one transaction, and that can help user to save tx fee
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BulkSender is Ownable {
ARG version=1.14.4
ARG file=dogecoin-${version}-x86_64-linux-gnu.tar.gz
ARG folder=dogecoin-${version}
FROM debian:stable as stage1
ARG version
ARG file
ARG folder
WORKDIR /the/workdir
RUN apt update
@ImanMousavi
ImanMousavi / docker-build.sh
Created June 10, 2022 11:43 — forked from jawi/docker-build.sh
Shell script to build, tag and push docker images to a (local) docker registry
#!/bin/bash
#
# Usage: ./docker-build.sh </dir/to/dockerfile> <remote-registry-prefix>
#
# Example: ./docker-build.sh node-agent-service 10.0.1.16:5000/inaetics
#
# needs docker command (v1.3 or later) in order to work.
#
# (C) 2015 - jawi - licensed under Apache Public License v2.
@ImanMousavi
ImanMousavi / docker-compose.yml
Created May 21, 2022 10:57 — forked from Jorijn/docker-compose.yml
Docker Compose file to be used in combination with https://gist.github.com/Jorijn/141f49dd0c69901f28215893d5900bca. Place this in the cloned root of the blockbook project and run `docker-compose up -d`. Configuration sample: https://gist.github.com/Jorijn/c0f5d3daf6ab6d35ac25b47c2a5be331
version: "3"
services:
blockbook:
container_name: blockbook
restart: always
build: .
entrypoint:
- /go/src/blockbook/blockbook
- -sync
- -blockchaincfg=/home/blockbook/cfg/cfg.json
# coding=utf-8
import random
import sys
import math
import hashlib
import hmac
import requests
import time
//solidity 6.12
pragma solidity >=0.6.0 <0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
@ImanMousavi
ImanMousavi / tron_estimate_energy
Created November 9, 2021 17:20
TRON estimate energy
#!/bin/env python3
import collections
import statistics
import sys
import requests
import base58
@ImanMousavi
ImanMousavi / Presale.sol
Created November 8, 2021 06:25
ERC20 Presale token
/**
*Submitted for verification at BscScan.com on 2021-05-18
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
abstract contract Context {
@ImanMousavi
ImanMousavi / Wallet.sol
Created September 11, 2021 08:05
Ethereum Wallet Ðapp
//sol Wallet
// Multi-sig, daily-limited account proxy/wallet.
// @authors:
// Gav Wood <g@ethdev.com>
// inheritable "property" contract that enables methods to be protected by requiring the acquiescence of either a
// single, or, crucially, each of a number of, designated owners.
// usage:
// use modifiers onlyowner (just own owned) or onlymanyowners(hash), whereby the same hash must be provided by
// some number (specified in constructor) of the set of owners (specified in the constructor, modifiable) before the
// interior is executed.
sudo docker run -d \
--name watchtower \
-e WATCHTOWER_NOTIFICATIONS_LEVEL=info \
-e WATCHTOWER_NOTIFICATIONS=slack \
-e WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL="hook-url" \
-v ~/.docker/config.json:/config.json \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower -i 60