Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ build/
contract/oracle.wasm
contract/*.sh
src/*.sh
*.abi
*.wasm
2 changes: 1 addition & 1 deletion include/delphioracle/delphioracle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ CONTRACT delphioracle : public eosio::contract {
};
*/

struct producer_info {
TABLE producer_info {
name owner;
double total_votes = 0;
eosio::public_key producer_key; /// a packed public key object
Expand Down
2 changes: 1 addition & 1 deletion scripts/configure.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"vote_interval": 10000,
"write_cooldown": 55000000,
"approver_threshold": 1,
"approving_oracles_threshold":2,
"approving_oracles_threshold":1,
"approving_custodians_threshold":1,
"minimum_rank": 105,
"paid": 21,
Expand Down
4 changes: 2 additions & 2 deletions scripts/configure.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

cleos set account permission $1 active --add-code
cleos push action $1 configure "$(cat configure.json)" -p $1
cleos set account permission delphioracle active --add-code
cleos push action delphioracle configure "$(cat configure.json)" -p delphioracle
33 changes: 33 additions & 0 deletions scripts/dev/get-pairs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

# Simple script to get all rows for all pairs from DelphiOracle contract

# Configuration
CONTRACT="delphioracle"
API_ENDPOINT="https://eos.api.eosnation.io"

# List of pairs to check (from the image)
declare -a pairs=(
"usdtars" "usdtcrc" "usdtmxn" "usdteur" "usdtaud" "usdtcad"
"usdtcop" "usdtgbp" "usdtkrw" "usdtjpy" "usdtvnd" "usdttwd"
"usdtthb" "usdtsol" "usdtclp" "usdtcny" "usdtidr" "usdtmyr"
"usdtngn" "usdtugx" "usdtkes" "eosusdt" "ethusd" "btcusd"
"eosbtc"
)

# Get all rows for all pairs
echo "Getting all pairs from the pairs table by name..."
echo

for pair in "${pairs[@]}"; do
pair=$(echo $pair | tr -d '"')
echo "Searching for pair: $pair"
echo "----------------------------------------"
# Search the pairs table using the name index (index 2)
# echo "Command: cleos -u $API_ENDPOINT get table $CONTRACT $CONTRACT pairs --limit 1 --lower \"$pair\""
cleos -u $API_ENDPOINT get table $CONTRACT $CONTRACT pairs --limit 1 --lower "$pair"
echo "----------------------------------------"
echo
done

echo "Completed fetching data for all pairs."
Loading