Skip to content

Instantly share code, notes, and snippets.

View gat786's full-sized avatar
🏠
Working from home

Ganesh Tiwari gat786

🏠
Working from home
View GitHub Profile
@gat786
gat786 / BasicsChainlink...HelloWorld.sol
Created October 30, 2023 03: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.20+commit.a1b79de6.js&optimize=false&runs=200&gist=
from dotenv import load_dotenv
import logging
load_dotenv()
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s [%(levelname)s] %(filename)s:%(lineno)d - %(message)s',
datefmt='%Y-%m-%d %H:%M:%S'
)
alias k=kubectl
alias g=gcloud
alias gssh="gcloud compute ssh"
alias gal="gcloud auth login"
alias gaad="gcloud auth application-default login"
alias gcil="gcloud compute instances list"
alias gccl="gcloud container clusters list"
alias gccg="gcloud container clusters get-credentials"
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import {Client} from "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol";
import {CCIPReceiver} from "@chainlink/contracts-ccip/src/v0.8/ccip/applications/CCIPReceiver.sol";
/**
* THIS IS AN EXAMPLE CONTRACT THAT USES HARDCODED VALUES FOR CLARITY.
* THIS IS AN EXAMPLE CONTRACT THAT USES UN-AUDITED CODE.
* DO NOT USE THIS CODE IN PRODUCTION.
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import {IRouterClient} from "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol";
import {OwnerIsCreator} from "@chainlink/contracts-ccip/src/v0.8/shared/access/OwnerIsCreator.sol";
import {Client} from "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol";
import {LinkTokenInterface} from "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol";
/**
* THIS IS AN EXAMPLE CONTRACT THAT USES HARDCODED VALUES FOR CLARITY.
wait-for-it.sh: waiting for 127.0.0.1:5432 without a timeout
wait-for-it.sh: 127.0.0.1:5432 is available after 0 seconds
not untarring the bundle
{"level":"info","message":"[process service types] MAIN_BACKEND, DB_CONNECTOR, DB_SSH_CONNECTOR","timestamp":"2023-08-03T19:12:31.631Z"}
Database migrations are up to date.
Setting http and https agent maxSockets to 25
{"level":"info","message":"Not configuring Sentry...","timestamp":"2023-08-03T19:12:33.173Z"}
{"level":"info","message":"Not configuring StatsD...","timestamp":"2023-08-03T19:12:33.173Z"}
{"level":"info","message":"Running node v16.14.2","timestamp":"2023-08-03T19:12:33.174Z"}
{"0":"--max-http-header-size=80000","level":"info","message":"ARGV:","timestamp":"2023-08-03T19:12:33.175Z"}
[{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"},{"internalType":"address","name":"_accessController","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int256","name":"current","type":"int256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"AnswerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"address","name":"startedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"startedAt","type":"uint256"}],"name":"NewRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{
import sys
import json
import os
file_path = sys.argv[1]
dict = {}
with open(file_path, mode='r') as file:
lines = file.read().splitlines()
for line in lines:
# add deadsnakes ppa for installing python 3.8
sudo apt update
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
# install python3.8 with venv support
sudo apt install python3.8 python3.8-venv python3.8-dev -y
sudo apt install python3-pip -y
# make sure you have curl and git
sudo apt update
@gat786
gat786 / .deps...npm...@chainlink...contracts...src...v0.8...interfaces...AggregatorV3Interface.sol
Created December 27, 2022 15:14
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=