This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Install Git Large File Storage (LFS) | |
brew install git-lfs | |
git lfs install | |
# Download & Install Llama | |
git clone https://github.com/ggerganov/llama.cpp | |
cd llama.cpp | |
LLAMA_METAL=1 make -j # build with Metal support for (M-series) Apple Silicon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function getLatestRequestResult() { | |
const bandchain = new BandChain(endpoint) | |
const oracleScript = await bandchain.getOracleScript(oracleScriptId) | |
const { result, resolve_time } = await bandchain.getLastMatchingRequestResult( | |
oracleScript, | |
params, | |
validatorCounts, | |
) | |
return { | |
result: parseFloat(result.px) / params.multiplier, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Chain parameters | |
const endpoint = 'https://guanyu-devnet.bandchain.org/rest' | |
// Request parameters | |
const oracleScriptId = 13 | |
const params = { | |
"base_symbol": "BAND", | |
"quote_symbol": "USD", | |
"aggregation_method": "median", | |
"multiplier": 1000000 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install --save @bandprotocol/bandchain.js | |
import BandChain from '@bandprotocol/bandchain.js' | |
// Chain parameters | |
const endpoint = 'https://guanyu-devnet.bandchain.org/rest' | |
// Request parameters | |
const oracleScriptId = 13 | |
const params = { | |
"base_symbol": "BAND", | |
"quote_symbol": "USD", | |
"aggregation_method": "median", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download genesis file from the repository. | |
wget https://raw.githubusercontent.com/bandprotocol/launch/master/band-wenchang-mainnet/genesis.json | |
# Move the genesis file to the proper location | |
mv genesis.json $HOME/.bandd/config | |
# Add some persistent peers | |
sed -E -i \ | |
's/persistent_peers = \".*\"/persistent_peers = \"[email protected]:26656,[email protected]:26656\"/' \ | |
$HOME/.bandd/config/config.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a new Band wallet. Do not lose your mnemonic! | |
bandcli keys add [[YOUR_WALLET]] | |
# Initialize a blockchain environment for generating genesis transaction. | |
bandd init --chain-id band-wenchang-mainnet [[YOUR_MONIKER]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install bandd, change its permission, and move to /usr/local/bin | |
wget -O bandd https://github.com/bandprotocol/bandchain/releases/download/v0.2.4/bandd_linux_amd64 | |
chmod +x bandd | |
sudo mv bandd /usr/local/bin | |
# Install bandcli, change its permission, and move to /usr/local/bin | |
wget -O bandcli https://github.com/bandprotocol/bandchain/releases/download/v0.2.4/bandcli_linux_amd64 | |
chmod +x bandcli | |
sudo mv bandcli /usr/local/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"key": "band-chain", | |
"chain-id": "ibc-bandchain", | |
"rpc-addr": "http://54.169.14.201:26657", | |
"account-prefix": "band", | |
"gas": 1000000, | |
"gas-prices": "0.025uband", | |
"default-denom": "uband", | |
"trusting-period": "330h" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"key": "gaia", | |
"chain-id": "band-cosmoshub", | |
"rpc-addr": "http://gaia-ibc-hackathon.node.bandchain.org:26657", | |
"account-prefix": "cosmos", | |
"gas": 1000000, | |
"gas-prices": "0.001uatom", | |
"default-denom": "uatom", | |
"trusting-period": "330h" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"key": "consumer", | |
"chain-id": "band-consumer", | |
"rpc-addr": "http://localhost:26657", | |
"account-prefix": "cosmos", | |
"gas": 1000000, | |
"gas-prices": "0.025stake", | |
"default-denom": "stake", | |
"trusting-period": "330h" | |
} |
NewerOlder