View techflare_query_btc_h_filter.sh
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
$ curl -X GET -H "Content-Type: application/json" "https://3t9jjasu58.execute-api.ap-northeast-1.amazonaws.com/Stage/chainlink?n=btc&p=h" \ | |
| jq '. | { name: .name, value: .sma."5"}' | |
{ | |
"name": "bitcoin", | |
"value": 37379.58199999999 | |
} |
View techflare_query_btch.sh
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
$ curl -X GET -H "Content-Type: application/json" "https://3t9jjasu58.execute-api.ap-northeast-1.amazonaws.com/Stage/chainlink?n=btc&p=h" | jq . | |
{ | |
"std": { | |
"9": 987.8966188715287, | |
"3": 598.4951346781628, | |
"5": 636.6109131330054, | |
"30": 2345.7798994815985, | |
"20": 2062.520469866928 | |
}, | |
"momentum": { |
View flashbots_goerli.js
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
const ethers = require('ethers'); | |
const { FlashbotsBundleProvider} = require('@flashbots/ethers-provider-bundle') | |
// Standard json rpc provider directly from ethers.js. For example you can use Infura, Alchemy, or your own node. | |
// This sample uses one of the default provider goerli | |
const provider = new ethers.getDefaultProvider("goerli"); | |
// `authSigner` is an Ethereum private key that does NOT store funds and is NOT your bot's primary key. | |
// This is an identifying key for signing payloads to establish reputation and whitelisting | |
const authSigner = new ethers.Wallet( |
View get_blockchains.sh
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
curl -X POST --data '{ | |
"jsonrpc":"2.0", | |
"id" :1, | |
"method" :"platform.getBlockchains", | |
"params" :{} | |
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/P | jq '.result.blockchains[-1]' |
View create_blockchain.sh
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
curl -X POST --data '{ | |
"jsonrpc": "2.0", | |
"method": "platform.createBlockchain", | |
"params" : { | |
"subnetID": "2bFRwRRTmvn64z7LuDq4bzLqfjTtFan8GDiMqk6eok85JG8gvK", | |
"vmID":"avm", | |
"name":"New test AVM", | |
"genesisData": "11111WdAJwMmBJiYYaZJcCDmqdBhzAKSUNe2xDYhSEEXegyWznPNKkby24NtZK3U82cHgbqPTh1ALM9S8hpZhRo6uhnKNaxiggDHrtV6LBZktr9D3hhUGEWwViT7vp6iWvJVEkvVckf", | |
"username":"testuser_jp01", | |
"password":"<your user password>" |
View build_genesis.sh
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
curl -X POST --data '{ | |
"jsonrpc": "2.0", | |
"id" : 1, | |
"method" : "avm.buildGenesis", | |
"params" : { | |
"networkId": 16, | |
"genesisData": { | |
"asset1": { | |
"name": "testFixedCapAsset", | |
"symbol":"TFCA", |
View add_validator_subnet.sh
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
curl -X POST --data '{ | |
"jsonrpc": "2.0", | |
"method": "platform.addSubnetValidator", | |
"params": { | |
"nodeID":"NodeID-EggGmnQFaTffeRNG1Kzs9dXJzFGdxac3D", | |
"subnetID":"2bFRwRRTmvn64z7LuDq4bzLqfjTtFan8GDiMqk6eok85JG8gvK", | |
"startTime":'$(date --date="10 minutes" +%s)', | |
"endTime":'$(date --date="30 days" +%s)', | |
"weight":100, | |
"changeAddr": "P-fuji1s3056zrcm36y0pzx5d3g9p5quavvpxk2yhssvp", |
View get_node_id.sh
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
curl -X POST --data '{ | |
"jsonrpc": "2.0", | |
"method": "info.getNodeID", | |
"params":{}, | |
"id": 1 | |
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info | |
{"jsonrpc":"2.0","result":{"nodeID":"NodeID-EggGmnQFaTffeRNG1Kzs9dXJzFGdxac3D"},"id":1} |
View add_validator_primary.sh
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
curl -X POST --data '{ | |
"jsonrpc": "2.0", | |
"method": "platform.addValidator", | |
"params": { | |
"nodeID":"NodeID-EggGmnQFaTffeRNG1Kzs9dXJzFGdxac3D", | |
"startTime":'$(date --date="10 minutes" +%s)', | |
"endTime":'$(date --date="90 days" +%s)', | |
"stakeAmount":1000000000, | |
"rewardAddress":"P-fuji1s3056zrcm36y0pzx5d3g9p5quavvpxk2yhssvp", | |
"delegationFeeRate":10, |
View create_subnet.sh
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
$ curl -X POST --data '{ | |
"jsonrpc": "2.0", | |
"method": "platform.createSubnet", | |
"params": { | |
"controlKeys":[ | |
"P-fuji1s3056zrcm36y0pzx5d3g9p5quavvpxk2yhssvp", | |
"P-fuji16ng9sc5vyy99twvza8fg3xdl0262ryfsmcxcwp" | |
], | |
"threshold":2, | |
"username":"testuser_jp01", |