Skip to content

Instantly share code, notes, and snippets.

View 0xouzm's full-sized avatar
🎯
Focusing

ou zm 0xouzm

🎯
Focusing
  • Mars
View GitHub Profile
@0xouzm
0xouzm / 01_deployContracts.js
Created February 28, 2024 10:43 — forked from BlockmanCodes/01_deployContracts.js
Uniswap V3: Deploy contracts locally - updated may 2023
const { ContractFactory, utils } = require("ethers")
const WETH9 = require("../WETH9.json")
const fs = require('fs');
const { promisify } = require('util');
const artifacts = {
UniswapV3Factory: require("@uniswap/v3-core/artifacts/contracts/UniswapV3Factory.sol/UniswapV3Factory.json"),
SwapRouter: require("@uniswap/v3-periphery/artifacts/contracts/SwapRouter.sol/SwapRouter.json"),
NFTDescriptor: require("@uniswap/v3-periphery/artifacts/contracts/libraries/NFTDescriptor.sol/NFTDescriptor.json"),
@0xouzm
0xouzm / reconnect.js
Created October 31, 2022 12:29 — forked from carlhoerberg/reconnect.js
How to build reconnect logic for amqplib
var amqp = require('amqplib/callback_api');
// if the connection is closed or fails to be established at all, we will reconnect
var amqpConn = null;
function start() {
amqp.connect(process.env.CLOUDAMQP_URL + "?heartbeat=60", function(err, conn) {
if (err) {
console.error("[AMQP]", err.message);
return setTimeout(start, 1000);
}
/*
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
*/
'use strict';
const shim = require('fabric-shim');
const util = require('util');
@0xouzm
0xouzm / fabcar.go
Created June 16, 2021 02:47 — forked from alexroan/fabcar.go
Fabcar.go
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@0xouzm
0xouzm / Fabcar.sol
Created June 16, 2021 02:33 — forked from alexroan/Fabcar.sol
Simple Car Registry
pragma solidity ^0.5.0;
contract Fabcar {
struct Car {
string make;
string model;
string color;
string owner;
}