Skip to content

Instantly share code, notes, and snippets.

View vibern0's full-sized avatar
🥸
do you even blockchain?

Bernardo vibern0

🥸
do you even blockchain?
View GitHub Profile
import { createPublicClient, http } from "viem";
import { gnosis } from "viem/chains";
export const publicClient = createPublicClient({
chain: gnosis,
transport: http(),
});
const wagmiAbi = [
{
// the handler
const handleTransfer = async ({
event,
context,
}: {
event: eventLog<Hub_HubTransfer_eventArgs | PersonalCRC_Transfer_eventArgs>;
context: handlerContext;
}) => {
const entity: Hub_Transfer = {
export const getQuote = async (
address: Address,
amount: number,
fromAssetTypeId: AssetTypeIdentifier,
toAssetTypeId: AssetTypeIdentifier
) => {
if (!amount) {
throw new Error('Amount must be defined and bigger than 0');
}
const quote = ... // this is loaded before with orderBookApi.getQuote
const safeAddress = "0xF35128804511Ef5c98D3b539592C88e0928bdfA3"
const comethWallet = getComethWallet().wallet
await comethWallet.connect(safeAddress)
const CoWSettlementAbi = [
{
"inputs": [
{ "internalType": "bytes", "name": "orderUid", "type": "bytes" },
{ "internalType": "bool", "name": "signed", "type": "bool" }
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreidp22xgjyuk2vmnf2sbf3pjw7mvjjy7i6wfo75bsh7sgyui4ssbya ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@vibern0
vibern0 / request.txt
Created October 28, 2020 16:39
Request to DataGrip license
Request ID=24102020/6032880
@vibern0
vibern0 / dd_ibs_test.sh
Created October 25, 2020 12:39 — forked from paulofellix/dd_ibs_test.sh
Determine Best Block Size DD [Linux]
#!/bin/bash
# Since we're dealing with dd, abort if any errors occur
set -e
TEST_FILE=${1:-dd_ibs_testfile}
if [ -e "$TEST_FILE" ]; then TEST_FILE_EXISTS=$?; fi
TEST_FILE_SIZE=134217728
# Exit if file exists
@vibern0
vibern0 / react_in_html_with_jsx.html
Created May 13, 2020 10:31
Yes, React in HTML with JSX. I was looking forward to this for some time now.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello World</title>
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<!-- Don't use this in production: -->
#! /bin/bash
######################################################################
#
# This script generates an SSL certficate for local development. To
# execute the script, run `bash create-dev-ssl-cert.sh`. Sudo is
# needed to save the certificate to your Mac KeyChain. After the cert
# is generated, you can use `HTTPS=true yarn start` to run the web
# server.
#
pragma solidity ^0.5.0;
import "@openzeppelin/contracts/token/ERC721/ERC721Full.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721Mintable.sol";
contract MyNFT is ERC721Full, ERC721Mintable {
constructor() ERC721Full("MyNFT", "MNFT") public {
}
}