Skip to content

Instantly share code, notes, and snippets.

View KarthickNcog's full-sized avatar

Karthick Kumar KarthickNcog

View GitHub Profile
608060405234801561001057600080fd5b506107a5806100206000396000f3fe60806040526004361061001e5760003560e01c80638eab0f1514610023575b600080fd5b61003d600480360381019061003891906103de565b61003f565b005b8051825114610083576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161007a90610530565b60405180910390fd5b600034905060005b835181101561023f578281815181106100cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151821015610117576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161010e90610550565b60405180910390fd5b828181518110610150577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015182610163919061062a565b915083818151811061019e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff166108fc8483815181106101f8577f4e487b710000000000000000000000000000000000
6080604052348015600e575f80fd5b506107378061001c5f395ff3fe60806040526004361061001d575f3560e01c80638eab0f1514610021575b5f80fd5b61003b60048036038101906100369190610490565b61003d565b005b8051825114610081576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161007890610586565b60405180910390fd5b5f3490505f5b835181101561019a578281815181106100a3576100a26105a4565b5b60200260200101518210156100ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100e49061061b565b60405180910390fd5b828181518110610100576100ff6105a4565b5b6020026020010151826101139190610666565b9150838181518110610128576101276105a4565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff166108fc84838151811061015c5761015b6105a4565b5b602002602001015190811502906040515f60405180830381858888f1935050505015801561018c573d5f803e3d5ffd5b508080600101915050610087565b505f81146101dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d4906106e3565b60405180910390fd5b505050565b5f
[
{
"inputs": [
{
"internalType": "address payable[]",
"name": "recipients",
"type": "address[]"
},
{
"internalType": "uint256[]",
608060405260026017553480156200001657600080fd5b50604051620097853803806200978583398181016040528101906200003c9190620002f0565b828281600090816200004f9190620005f4565b508060019081620000619190620005f4565b5050506001600b8190555033601a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000c4600c6200013260201b620047851760201c565b6611c37937e08000601b819055506014601b5490806001815401808255809150506001900390600052602060002001600090919091909150556000601c60006101000a81548160ff02191690831515021790555062000129816200014860201b60201c565b505050620006db565b6001816000016000828254019250508190555050565b8060189081620001599190620005f4565b5050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620001c6826200017b565b810181811067ffffffffffffffff82111715620001e857620001e76200018c565b5b80604052505050565b6000620001fd6200015d565b9050
[
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "validatorID",
"type": "uint256"
},
const Web3 = require('web3');
const web3 = new Web3('YOUR_ETHEREUM_NODE_URL');
// The sender's private key (keep this secure)
const senderPrivateKey = 'YOUR_SENDER_PRIVATE_KEY';
// Connect to sender's wallet
const senderAccount = web3.eth.accounts.privateKeyToAccount(senderPrivateKey);
// NFT contract address and ABI
@KarthickNcog
KarthickNcog / gist:6edb349b31cd0fd25d9e9939a0d648e9
Created October 3, 2023 11:10
Rainbow kit Network Connection
const ncogEarthChainTestNet: Network = {
id: 2528,
name: 'NEC Testnet',
network: 'ncogEarthChainTestnet',
iconUrl: 'https://example.com/icon.svg',
iconBackground: '#fff',
nativeCurrency: {
decimals: 18,
name: 'NEC Token',
symbol: 'NEC',
@KarthickNcog
KarthickNcog / gist:f18cfc7e306ab4b2cbcf1bc2fd66ff14
Last active June 27, 2024 16:45
Install Script for LiveNet
apt update
apt upgrade -y
apt install -y software-properties-common
add-apt-repository -y ppa:longsleep/golang-backports
apt update
apt install golang-go -y
apt install zip unzip -y
apt install make -y
apt install -y git
apt autoremove -y
@KarthickNcog
KarthickNcog / PrepareMessage.ts
Created May 2, 2023 14:18
Build the raw message content for the forwarded email
// Build the raw message content for the forwarded email
let rawContent = `Content-Type: message/rfc822\n` +
`Content-Disposition: attachment; filename="original.eml"\n` +
`Content-Transfer-Encoding: base64\n\n` +
`${res.data.raw}`;
// Iterate over the original message's attachments and add them to the forwarded email
res.data.payload.parts.forEach(part => {
if (part.body.attachmentId) {
rawContent += `\nContent-Type: ${part.mimeType}; name="${part.filename}"\n` +