Skip to content

Instantly share code, notes, and snippets.

View michielmulders's full-sized avatar

Michiel Mulders michielmulders

View GitHub Profile
@michielmulders
michielmulders / stateUpdate.json
Created January 3, 2024 15:32
state download example
{
"accounts": {
"bert": {
"network": "testnet",
"alias": "bert",
"accountId": "0.0.7426198",
"type": "ecdsa",
"publicKey": "302d300706052b8104000a03220003732a9daae40e2a41ccd10dd35b521cbcafdd4bf906a66e37d0a65512a1d7db23",
"evmAddress": "a5accb5010ad3ee50c66a433d5b8fdfe0d0eab59",
"solidityAddress": "0000000000000000000000000000000000715096",
@michielmulders
michielmulders / createAccAndFT.json
Last active November 22, 2023 23:47
(test) Create account and create token script
{
"scripts": [
{
"name": "createAccAndFT",
"commands": [
"network use testnet",
"account create -a random",
"token create-ft -n m -s mm -d 2 -i 1000 -a 302e020100300506032b6570042204202a6568253a539643468dda3128a734c9fcb07a927b3f742719a869db731f9f50 -t 0.0.4536940 -k 302e020100300506032b6570042204202a6568253a539643468dda3128a734c9fcb07a927b3f742719a869db731f9f50"
]
},
@michielmulders
michielmulders / .env
Last active April 15, 2023 15:45
Hedera Consensus Service (code example)
OPERATOR_ID=
OPERATOR_PVKEY=
@michielmulders
michielmulders / token-admin-update-supply.js
Created March 28, 2023 08:42
Admin key updates supply key on NFT (Hedera Hashgraph)
console.clear();
require("dotenv").config();
const {
AccountId,
PrivateKey,
Client,
TokenCreateTransaction,
TokenUpdateTransaction,
TokenType,
@michielmulders
michielmulders / HIP412-1.0.0.json
Last active November 9, 2022 12:40
[email protected] - JSON schema implementation for collectible NFTs on Hedera (v1.0.0)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"version": "1.0.0",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Identifies the asset to which this token represents."
},
@michielmulders
michielmulders / utils.js
Created August 22, 2022 10:58
Hedera Utils for account and token creation using Hedera JS SDK
const {
TokenCreateTransaction,
Hbar,
AccountCreateTransaction,
PrivateKey
} = require("@hashgraph/sdk");
/*
* @return {AccountId} accountId
*/
@michielmulders
michielmulders / books.json
Created December 24, 2020 19:58
MeiliSearch books dataset (GoodReads)
[
{
"id": "1",
"title": "Harry Potter and the Half-Blood Prince",
"author": "J.K. Rowling/Mary GrandPré",
"cover": "hard cover with dust jacket",
"language": "eng",
"publisher": "Scholastic Inc.",
"details": {
"isbn": "0439785960",
@michielmulders
michielmulders / post.go
Created December 16, 2020 10:56
Post request Go web server
package main
import (
"log"
"net/http"
"io/ioutil"
)
func postRoute(rw http.ResponseWriter, req *http.Request) {
body, err := ioutil.ReadAll(req.Body)
@michielmulders
michielmulders / books.json
Last active December 15, 2020 18:13
MeiliSearch GoodReads dataset
[
{
"id": "1",
"title": "Harry Potter and the Half-Blood Prince",
"author": "J.K. Rowling/Mary GrandPré",
"cover": "hard cover with dust jacket",
"language": "eng",
"publisher": "Scholastic Inc.",
"details": {
"isbn": "0439785960",
@michielmulders
michielmulders / books.json
Created December 15, 2020 17:06
MeiliSearch books dataset
[{"id":"1","title":"Harry Potter and the Half-Blood Prince","author":"J.K. Rowling/Mary GrandPré","cover":"hard cover with dust jacket","language":"eng","publisher":"Scholastic Inc.","details":{"isbn":"0439785960","rating":"4.57","pages":"652"}},{"id":"2","title":"Harry Potter and the Order of the Phoenix","author":"J.K. Rowling/Mary GrandPré","cover":"hard cover with dust jacket","language":"eng","publisher":"Scholastic Inc.","details":{"isbn":"0439358078","rating":"4.49","pages":"870"}},{"id":"4","title":"Harry Potter and the Chamber of Secrets","author":"J.K. Rowling","cover":"soft cover","language":"eng","publisher":"Scholastic","details":{"isbn":"0439554896","rating":"4.42","pages":"352"}},{"id":"5","title":"Harry Potter and the Prisoner of Azkaban","author":"J.K. Rowling/Mary GrandPré","cover":"hard cover with dust jacket","language":"eng","publisher":"Scholastic Inc.","details":{"isbn":"043965548X","rating":"4.56","pages":"435"}},{"id":"13","title":"The Ultimate Hitchhiker's Guide to the Galaxy (Hitchh