Skip to content

Instantly share code, notes, and snippets.

View Olanetsoft's full-sized avatar
😉

Idris Olubisi Olanetsoft

😉
View GitHub Profile
@eddmann
eddmann / bitcoin-merkle-proofs.js
Created November 10, 2017 10:20
Bitcoin Internals: Verifying Merkle Roots using Merkle Proofs in JavaScript
const fetchLatestBlock = () =>
fetch(`https://blockchain.info/q/latesthash?cors=true`)
.then(r => r.text());
const fetchMerkleRootAndTransactions = block =>
fetch(`https://blockchain.info/rawblock/${block}?cors=true`)
.then(r => r.json())
.then(d => [d.mrkl_root, d.tx.map(t => t.hash)]);
const random = arr =>
@bradtraversy
bradtraversy / ssh.md
Last active October 22, 2024 15:35
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh [email protected]

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@dabit3
dabit3 / App.js
Created August 11, 2021 15:44
Sign in with Ethereum & Decentralized Identity with Ceramic, IDX, React, and 3ID Connect
import './App.css';
import { useState } from 'react'
import CeramicClient from '@ceramicnetwork/http-client'
import ThreeIdResolver from '@ceramicnetwork/3id-did-resolver'
import { EthereumAuthProvider, ThreeIdConnect } from '@3id/connect'
import { DID } from 'dids'
import { IDX } from '@ceramicstudio/idx'
import './styles/App.css';
import twitterLogo from './assets/twitter-logo.svg';
import { ethers } from "ethers";
import React, { useEffect, useState } from "react";
import myEpicNft from './utils/MyEpicNFT.json';
const TWITTER_HANDLE = '_buildspace';
const TWITTER_LINK = `https://twitter.com/${TWITTER_HANDLE}`;
const OPENSEA_LINK = '';
const TOTAL_MINT_COUNT = 50;
@Olanetsoft
Olanetsoft / index.md
Last active December 9, 2022 00:31
Mara Blockchain Masterclass - Web3 developer Roadshow

Building and Deploying USDC-based Smart Contract

Building and Deploying USDC-based Smart Contract

This workshop is targeted at developers who are transitioning from Web2 to Web3 or have just recently gotten into Web3 and are looking to have a well-rounded foundation.

Step 1

Let's ensure we have Node/NPM installed on our PC. If we don't have it installed, head over here for a guide.

Step 2

Series 1: Mara Blockchain Masterclass - Ghana

frame

This workshop is targeted at developers who are transitioning from Web2 to Web3 or have just recently gotten into Web3 and are looking to have a well-rounded foundation.

This first workshop is Series 1 in the three-part series that aims to introduce you to the blockchain and how to build on the blockchain.

@Olanetsoft
Olanetsoft / index.md
Last active May 14, 2024 14:51
Decentralized Identity – Build a Profile with Next.js, Ethereum & Ceramic Network

Decentralized Identity – Build a Profile with Next.js, Ethereum & Ceramic Network

In this workshop, you will learn about how to build a decentralized identity profile with Ethereum on Ceramic Networks.

Prerequisites

  • To go through this tutorial, you'll need some experience with JavaScript and React.js. Experience with Next.js isn't a requirement, but it's nice to have.

  • Make sure to have Node.js or npm installed on your computer. If you don't, click here.

@Olanetsoft
Olanetsoft / SendMessage.sol
Created September 6, 2023 12:25
2-way Communication Smart Contract with Solidity and Axelar
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import { AxelarExecutable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/executable/AxelarExecutable.sol';
import { IAxelarGateway } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGateway.sol';
import { IAxelarGasService } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGasService.sol';
import { IERC20 } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IERC20.sol';
contract ExecutableSample is AxelarExecutable {
string public message;
@Olanetsoft
Olanetsoft / tm-deploy.js
Last active November 27, 2023 15:21
Deploy token manager on Base Goerli testnet
// Axelar chains config https://github.com/axelarnetwork/axelar-contract-deployments/blob/d4b2a6ad23d3a24eaf5e94a5a2406e4a27c91431/axelar-chains-config/info/testnet.json#L1059
// Base Goerli test
const hre = require("hardhat");
const crypto = require("crypto");
const ITSContractABI = require("../utils/its/abi");
const tokenManagerMintBurnABI = require("../utils/its/tokenManagerMintBurnABI");
const MINT_BURN = 0;
const LOCK_UNLOCK = 2;
@Olanetsoft
Olanetsoft / interchainTokenServiceABI.json
Last active February 27, 2024 12:35
Interchain Token Service ABI
[
{
"inputs": [
{
"internalType": "address",
"name": "tokenManagerDeployer_",
"type": "address"
},
{
"internalType": "address",