Skip to content

Instantly share code, notes, and snippets.

View Daniel-VDM's full-sized avatar
🎯
Focusing

Daniel Van Der Maden Daniel-VDM

🎯
Focusing
View GitHub Profile
@Daniel-VDM
Daniel-VDM / ffxiv-beta-dalamud.sh
Last active March 20, 2024 06:06
ffxiv-beta-dalamud.sh
curl -L -o /usr/bin/jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe
key=$(curl -s https://kamori.goats.dev/Dalamud/Release/VersionInfo?track=staging | jq -r '.key')
cp $HOME/AppData/Roaming/XIVLauncher/dalamudConfig.json $HOME/AppData/Roaming/XIVLauncher/dalamudConfig.json.$(date +%s ).bak
cat $HOME/AppData/Roaming/XIVLauncher/dalamudConfig.json | jq ".DalamudBetaKey = \"$key\"" > $HOME/AppData/Roaming/XIVLauncher/dalamudConfig.json

Multichain integration

Overview

Multichain is a collection of functions, types, interfaces, and runtimes that can be implemented for any blockchain. Those familiar with the Rosetta spec by Coinbase will note similarities in goals. However, multichain's scope is limited to accounts, contract calls, and sending transactions — there is no block data extraction. Moreover, the chain (Harmony) would have to implement the appropriate functions to Ren's multichain repo as a pull request and undergo their review. The Ren Project notes that once Harmony has integrated with the multichain API, we have the possibility for support in the RenVM.

Context

To help bridge the gap between Harmony and other chains, we must explore ways to integrate with chain agnostic interfaces. Having an API that is standard across multiple chains (notably BTC & ETH) will help reduce the friction of getting a

@Daniel-VDM
Daniel-VDM / HRC20_fund.md
Last active August 15, 2020 03:52
HRC20_fund.md

Funding from a CSV file for HRC20 tokens.

Install

  1. Make sure you have docker installed.
  2. Go to a directory you are comfortable with. For example cd ~/Desktop.
  3. Download the funding script with the following comand:
curl -O https://raw.githubusercontent.com/harmony-one/dapp-curve-contracts/master/scripts/fund.sh && chmod +x fund.sh

Node API Overhaul

Last updated: Wednesday, July 8th, 2020.

Overview

The API layer of a Harmony node is its main interface with the outside world. Therefore, it must be consistent, robust, and well-documented in order to provide easy integration with developers who wish to build on Harmony.

Current issues with v1 & v2 of Harmony's JSON-RPC based API

  • Inconsistancies of response types (hex v.s. hex string v.s. number) and names (cammelCase v.s. kebab-case v.s. snake_case).

Send transactions using the Harmony CLI from a CSV file

Install

  1. (Optional) Open terminal and cd to wherever you want to install your CLI. Personally I like ~/bin.
mkdir -p ~/bin && cd ~/bin
  1. Get the latest Harmony CLI version
curl -O https://raw.githubusercontent.com/harmony-one/go-sdk/master/scripts/hmy.sh && chmod +x ./hmy.sh && ./hmy.sh -d
$ df -Th
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 7.7G 0 7.7G 0% /dev
tmpfs tmpfs 1.6G 776K 1.6G 1% /run
/dev/nvme0n1p1 ext4 291G 64G 228G 22% / <-- Notice how TYPE is ext4
# Go on AWS and use InstanceID to get to EBS storage, then increase the EBS storage.
# Once done, do the following
# check to make sure EBS upgrade is done with
[snapshot]
type = s3
provider = AWS
env_auth = false
region = us-east-1
acl = public-read
server_side_encryption = AES256
storage_class = REDUCED_REDUNDANCY
export SHARD=3
curl -LO https://harmony.one/hmycli && mv hmycli hmy && chmod +x hmy
./hmy keys generate-bls-keys --shard $SHARD
mkdir -p .hmy/blskeys
mv *.key .hmy/blskeys/
touch bls.pass
bash <(curl -s https://raw.githubusercontent.com/harmony-one/experiment-deploy/master/tools/install-node.sh) -N mainnet -n validator
./node.sh -d
cp ./staging/harmony ./
curl https://rclone.org/install.sh | sudo bash
# profile
export WHOAMI=LRTN; export HMY_PROFILE=lrtn;
# init network
./go.sh -p lrtn -k
# deinit network
./aws-instances.sh -g LRTN && ls *.ids # always check listed files for correct IPs.
./aws-instances.sh -G delete

Running a node on Harmony Dryrun Network

Spin up AWS instance

More details on how to spin up AWS instance here

  1. select amazon linux 2 AMI
  2. select t3.small as instance type
  3. select 15 GiB of storage.
  4. ssh into your AWS instance